/* ITISTUDIO OKR App - Main Stylesheet */
/* v0.4.1 - Mobile Menu + Colori Semafori + UX Improvements */

/* === VARIABLES === */
:root {
    --blu: #2B3A67;
    --blu-dark: #1e2a4a;
    --azzurro: #5a6b9a;  /* Più scuro per contrasto */
    --azzurro-light: #8899c4;
    --grigio: #444444;  /* Più scuro per leggibilità */
    --grigio-light: #f5f5f5;
    --grigio-border: #cccccc;  /* Più visibile */
    --verde: #22C55E;  /* Verde brillante */
    --verde-light: #DCFCE7;
    --giallo: #F59E0B;  /* Arancio puro (meno rosso) */
    --giallo-light: #FEF3C7;
    --rosso: #EF4444;  /* Rosso brillante */
    --rosso-light: #FEE2E2;
    --bianco: #ffffff;
    --nero: #222222;  /* Più scuro */
    
    --font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 17px;  /* Aumentato da 16px */
    --font-size-sm: 0.9rem;
    --font-size-xs: 0.8rem;
    --line-height: 1.6;  /* Aumentato da 1.5 */
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.12);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.18);
    --transition: all 0.2s ease;
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--grigio-light);
    color: var(--nero);
    line-height: var(--line-height);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    color: var(--blu);
    font-weight: 700;  /* Più bold */
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin-bottom: var(--spacing-md); }

a {
    color: var(--blu);  /* Più scuro per contrasto */
    text-decoration: underline;
    transition: var(--transition);
}

a:hover {
    color: var(--blu-dark);
}

a:focus {
    outline: 3px solid var(--azzurro);
    outline-offset: 2px;
}

/* === LAYOUT === */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--blu);
    color: var(--bianco);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-logo span {
    color: var(--azzurro-light);
}

.sidebar-subtitle {
    font-size: 0.85rem;
    color: var(--azzurro-light);
    margin-bottom: 2rem;
}

/* Nota 1: Link versione ben visibile */
.version-link {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--bianco);
    background: var(--azzurro);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    text-decoration: none;
    transition: var(--transition);
}
.version-link:hover {
    background: var(--azzurro-light);
    color: var(--blu-dark);
}

.sidebar-nav {
    flex: 1;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--azzurro-light);
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--bianco);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0.25rem;
}

.nav-item:hover {
    background: var(--blu-dark);
}

.nav-item.active {
    background: var(--azzurro);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--azzurro);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--azzurro);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.75rem;
    color: var(--azzurro-light);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

/* Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title h1 {
    margin: 0;
}

.periodo-badge {
    background: var(--azzurro);
    color: var(--bianco);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* === COMPONENTS === */

/* Cards */
.card {
    background: var(--bianco);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--grigio-border);
}

.card-title {
    font-size: 1.125rem;
    color: var(--blu);
    margin: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bianco);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--blu);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--grigio);
    margin-top: 0.25rem;
}

.stat-card.verde { border-left: 4px solid var(--verde); }
.stat-card.giallo { border-left: 4px solid var(--giallo); }
.stat-card.rosso { border-left: 4px solid var(--rosso); }
.stat-card.blu { border-left: 4px solid var(--blu); }

/* Buttons - Più grandi e accessibili */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;  /* Aumentato */
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;  /* Aumentato da 0.875rem */
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-height: 44px;  /* Minimo per touch target */
}

.btn:focus {
    outline: 3px solid var(--azzurro);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--blu);
    color: var(--bianco);
    border-color: var(--blu);
}

.btn-primary:hover {
    background: var(--blu-dark);
    border-color: var(--blu-dark);
}

.btn-secondary {
    background: var(--bianco);
    color: var(--nero);
    border-color: var(--grigio-border);
}

.btn-secondary:hover {
    background: var(--grigio-light);
    border-color: var(--grigio);
}

.btn-success {
    background: var(--verde);
    color: var(--bianco);
    border-color: var(--verde);
}

.btn-success:hover {
    background: #16A34A;
    border-color: #16A34A;
}

.btn-danger {
    background: var(--rosso);
    color: var(--bianco);
    border-color: var(--rosso);
}

.btn-danger:hover {
    background: #DC2626;
    border-color: #DC2626;
}

.btn-sm {
    padding: 0.35rem 0.75rem;  /* v0.3.24: Più compatto */
    font-size: 0.85rem;
    min-height: 30px;
}

.btn-icon {
    padding: 0.4rem;
    min-width: 36px;
    min-height: 36px;
}

/* Forms - Più accessibili */
.form-group {
    margin-bottom: 1.25rem;
}

/* v0.4.0: Form a 2 colonne */
.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row-2col .form-group {
    margin-bottom: 1rem;
}

/* v0.4.0: Form a 3 colonne */
.form-row-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}

.form-row-3col .form-group {
    margin-bottom: 0.75rem;
}

/* v0.4.0: Box info KRT trovato */
.krt-info-box {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    background: var(--grigio-light);
    border-left: 3px solid var(--grigio);
}

.krt-info-box .krt-found {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.krt-info-box .krt-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--verde);
}

.krt-info-box .krt-desc {
    font-size: 0.9rem;
    color: var(--nero);
}

.krt-info-box .text-warning {
    color: var(--giallo-dark, #b8860b);
}

.krt-info-box .text-error {
    color: var(--rosso);
}

.form-label {
    display: block;
    font-size: 1rem;  /* Aumentato da 0.875rem */
    font-weight: 600;
    color: var(--nero);
    margin-bottom: 0.5rem;
}

.form-label.required::after {
    content: ' *';
    color: var(--rosso);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;  /* Aumentato */
    font-family: inherit;
    font-size: 1rem;  /* Aumentato */
    border: 2px solid var(--grigio-border);
    border-radius: var(--border-radius);
    transition: var(--transition);
    min-height: 48px;  /* Minimo per accessibilità */
}

.form-control:focus {
    outline: none;
    border-color: var(--blu);
    box-shadow: 0 0 0 3px rgba(43, 58, 103, 0.2);
}

.form-control::placeholder {
    color: var(--grigio);
}

.form-control:disabled {
    background: var(--grigio-light);
    cursor: not-allowed;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    appearance: none;
}

.form-hint {
    font-size: 0.9rem;
    color: var(--grigio);
    margin-top: 0.35rem;
}

.form-error {
    font-size: 0.9rem;
    color: var(--rosso);
    margin-top: 0.35rem;
    font-weight: 500;
}

/* Checkbox e Radio più grandi */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.form-check label {
    cursor: pointer;
    font-size: 1rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.5rem 0.75rem;  /* v0.3.24: Più compatto */
    text-align: left;
    border-bottom: 1px solid var(--grigio-border);
}

.table th {
    background: var(--blu);
    color: var(--bianco);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    padding: 0.6rem 0.75rem;
}

/* Header ordinabile */
.table th.sortable {
    cursor: pointer;
    user-select: none;
}

.table th.sortable:hover {
    background: var(--blu-dark);
}

.table th .sort-icon {
    margin-left: 0.5rem;
    opacity: 0.5;
    font-size: 0.8em;
}

.table th .sort-icon.sort-asc,
.table th .sort-icon.sort-desc {
    opacity: 1;
    color: var(--verde);
}

.table th.sorted .sort-icon {
    opacity: 1;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:nth-child(even) {
    background: rgba(43, 58, 103, 0.03);
}

.table tbody tr:hover {
    background: rgba(43, 58, 103, 0.08);
}

.table td {
    font-size: 0.9rem;  /* v0.3.24: Più compatto */
}

/* Semaforo */
.semaforo {
    display: inline-block;
    width: 14px;  /* v0.3.24: Ridotto */
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.2);
    vertical-align: middle;
}

.semaforo.verde { background: var(--verde); }
.semaforo.giallo { background: var(--giallo); }
.semaforo.rosso { background: var(--rosso); }

.semaforo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;  /* Più padding */
    border-radius: 1rem;
    font-size: 0.95rem;  /* Più grande */
    font-weight: 600;
    border: 2px solid transparent;
    min-width: 60px;  /* v0.4.0: Larghezza minima per allineamento */
    text-align: center;
}

.semaforo-badge.verde {
    background: var(--verde-light);
    color: #1b5e20;
    border-color: var(--verde);
}

.semaforo-badge.giallo {
    background: var(--giallo-light);
    color: #e65100;
    border-color: var(--giallo);
}

.semaforo-badge.rosso {
    background: var(--rosso-light);
    color: #b71c1c;
    border-color: var(--rosso);
}

/* Progress Bar - Più alta e visibile */
.progress {
    height: 14px;  /* Aumentato da 8px */
    background: var(--grigio-border);
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
}

.progress-bar {
    height: 100%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar.verde { background: var(--verde); }
.progress-bar.giallo { background: var(--giallo); }
.progress-bar.rosso { background: var(--rosso); }

/* Progress con label */
.progress-with-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-with-label .progress {
    flex: 1;
}

.progress-with-label .progress-label {
    font-weight: 700;
    min-width: 50px;
    text-align: right;
}

/* Badges - Più grandi e leggibili */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;  /* v0.3.24: Più compatto */
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid transparent;
}

.badge-primary {
    background: var(--azzurro-light);
    color: var(--blu-dark);
    border-color: var(--azzurro);
}

.badge-success {
    background: var(--verde-light);
    color: #1b5e20;
    border-color: var(--verde);
}

.badge-warning {
    background: var(--giallo-light);
    color: #e65100;
    border-color: var(--giallo);
}

.badge-danger {
    background: var(--rosso-light);
    color: #b71c1c;
    border-color: var(--rosso);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bianco);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--grigio-border);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--blu);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--grigio);
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--grigio-border);
    background: var(--grigio-light);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    background: var(--verde);
    color: var(--bianco);
}

.toast.error {
    background: var(--rosso);
    color: var(--bianco);
}

.toast.warning {
    background: var(--giallo);
    color: var(--nero);
}

/* Tracciabilità Breadcrumb */
.tracciabilita {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--grigio-light);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.tracciabilita-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tracciabilita-item::after {
    content: '→';
    margin-left: 0.5rem;
    color: var(--grigio);
}

.tracciabilita-item:last-child::after {
    display: none;
}

.tracciabilita-item.active {
    font-weight: 600;
    color: var(--blu);
}

/* KR List */
.kr-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.kr-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bianco);
    border: 1px solid var(--grigio-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.kr-item:hover {
    border-color: var(--azzurro);
    box-shadow: var(--shadow);
}

.kr-number {
    width: 40px;
    height: 40px;
    background: var(--blu);
    color: var(--bianco);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.kr-content {
    flex: 1;
    min-width: 0;
}

.kr-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kr-meta {
    font-size: 0.8125rem;
    color: var(--grigio);
}

.kr-progress {
    width: 120px;
    flex-shrink: 0;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blu) 0%, var(--blu-dark) 100%);
}

.login-card {
    background: var(--bianco);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    font-size: 1.75rem;
    color: var(--blu);
}

.login-logo p {
    color: var(--grigio);
    font-size: 0.875rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--grigio);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--nero);
    margin-bottom: 0.5rem;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--grigio-light);
    border-top-color: var(--azzurro);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    .main-content {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    /* Sidebar nascosta di default, visibile con classe .open */
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: none;
    }
    .sidebar.open {
        left: 0;
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    .main-content {
        margin-left: 0;
        padding-top: 70px; /* Spazio per header mobile */
    }
    /* Overlay scuro quando menu aperto */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .mobile-overlay.active {
        display: block;
    }
}

/* Header mobile con hamburger */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--blu);
    color: var(--bianco);
    padding: 0 1rem;
    align-items: center;
    justify-content: space-between;
    z-index: 998;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
}

.mobile-header .logo {
    font-size: 1.25rem;
    font-weight: 700;
}
.mobile-header .logo span {
    color: var(--azzurro-light);
}

/* Hamburger button */
.hamburger-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.hamburger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--bianco);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}
.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Utility Classes */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* === NUOVI STILI v0.3.0 === */

/* Gerarchia OKR - Collapsible (Nota 4) */
.gerarchia-container {
    margin-bottom: 2rem;
}

/* v0.3.24: Wrapper sticky per filtri gerarchia */
.gerarchia-filtri-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--sfondo);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.gerarchia-filtri {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bianco);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.gerarchia-filtri .filtro-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--grigio-border);
    border-radius: 20px;
    background: var(--bianco);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.gerarchia-filtri .filtro-btn:hover {
    border-color: var(--azzurro);
}

.gerarchia-filtri .filtro-btn.active {
    background: var(--blu);
    color: var(--bianco);
    border-color: var(--blu);
}

/* v0.3.24: Filtri periodo (anno/trimestre) */
.filtri-periodo {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filtri-periodo select {
    padding: 0.4rem 0.6rem;
    border: 2px solid var(--grigio-border);
    border-radius: 6px;
    font-size: 0.85rem;
    min-width: 120px;
    cursor: pointer;
}

.filtri-periodo select:focus {
    border-color: var(--blu);
    outline: none;
}

.filtri-separator {
    color: var(--grigio-border);
    font-weight: 300;
    padding: 0 0.5rem;
}

/* v0.3.24: Filtri sopra tabella */
.table-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--sfondo);
    border-radius: var(--border-radius);
    align-items: center;
}

.table-filters .filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-filters .filter-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--grigio);
    white-space: nowrap;
}

.table-filters select {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--grigio-border);
    border-radius: 4px;
    font-size: 0.85rem;
    min-width: 100px;
}

.table-filters select:focus {
    border-color: var(--blu);
    outline: none;
}

.gerarchia-controls {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* v0.4.0: Stile compatto per gerarchia (Apple style) */
.gerarchia-compact .gerarchia-filtri {
    padding: 0.5rem 0.75rem;
    gap: 0.4rem;
    align-items: center;
}

.gerarchia-compact .filtro-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 12px;
    border-width: 1px;
}

.gerarchia-compact .filtri-label {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--grigio);
    margin-right: 0.25rem;
}

.gerarchia-compact .filtri-periodo select {
    padding: 0.25rem 0.4rem;
    font-size: 0.8rem;
    min-width: 100px;
    border-width: 1px;
}

.gerarchia-compact .filtri-separator {
    padding: 0 0.3rem;
}

/* Checkbox inline per filtri */
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--blu);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    background: var(--blu-light);
    border-radius: 12px;
    margin-right: 0.5rem;
}

.checkbox-inline input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* Bottoni extra small e ghost */
.btn-xs {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--grigio-border);
    color: var(--grigio);
}

.btn-ghost:hover {
    background: var(--grigio-light);
    color: var(--nero);
}

/* Filtri compatti per I Miei Task */
.filtri-compact {
    padding: 0.5rem 1rem;
    gap: 0.75rem;
}

.filtri-compact .form-group {
    margin: 0;
}

.filtri-compact .form-label {
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
}

/* KR Card Collapsible */
.kr-card {
    background: var(--bianco);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    border-left: 5px solid var(--azzurro-light);  /* Più chiaro - Nota 0 */
    overflow: hidden;
}

/* Nota 0: Barre laterali più chiare per leggibilità */
.kr-card.kr3y { border-left-color: #8899c4; }  /* Blu più chiaro */
.kr-card.kr1y { border-left-color: #a8b8d8; margin-left: 1.5rem; }  /* Azzurro più chiaro */
.kr-card.krt { border-left-color: #c0c0c0; margin-left: 3rem; }  /* Grigio più chiaro */

.kr-card-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    gap: 1rem;
}

.kr-card-header:hover {
    background: var(--grigio-light);
}

.kr-card-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grigio-light);
    border-radius: 50%;
    transition: var(--transition);
    flex-shrink: 0;
}

.kr-card-toggle.expanded {
    transform: rotate(90deg);
}

.kr-card-numero {
    min-width: 64px;
    height: 64px;
    padding: 0 1rem;
    background: var(--blu);
    color: var(--bianco);
    border-radius: 50%;  /* Cerchio per KR3Y */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.75rem;
    flex-shrink: 0;
}

/* Nota 0: Badge rettangolare con bordi arrotondati per anno (KR1Y) */
.kr-card.kr1y .kr-card-numero { 
    background: var(--azzurro); 
    border-radius: 8px;  /* Rettangolo arrotondato invece di cerchio */
    min-width: 80px;
    font-size: 1.35rem;
}
.kr-card.krt .kr-card-numero { 
    background: var(--grigio); 
    font-size: 1.2rem;
    border-radius: 8px;  /* Rettangolo arrotondato */
    min-width: 65px;
}

/* v0.4.0: Versione compatta per gerarchia (stile Apple) */
.gerarchia-compact ~ #gerarchia-content .kr-card {
    margin-bottom: 0.5rem;
}

.gerarchia-compact ~ #gerarchia-content .kr-card-header {
    padding: 0.5rem 0.75rem;
    gap: 0.6rem;
}

.gerarchia-compact ~ #gerarchia-content .kr-card-toggle {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
}

.gerarchia-compact ~ #gerarchia-content .kr-card-numero {
    min-width: 42px;
    height: 42px;
    padding: 0 0.6rem;
    font-size: 1.1rem;
}

.gerarchia-compact ~ #gerarchia-content .kr-card.kr1y .kr-card-numero {
    min-width: 52px;
    height: 36px;
    font-size: 0.95rem;
    border-radius: 6px;
}

.gerarchia-compact ~ #gerarchia-content .kr-card.krt .kr-card-numero {
    min-width: 42px;
    height: 32px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.gerarchia-compact ~ #gerarchia-content .kr-card.kr1y {
    margin-left: 1rem;
}

.gerarchia-compact ~ #gerarchia-content .kr-card.krt {
    margin-left: 2rem;
}

.gerarchia-compact ~ #gerarchia-content .kr-card-title {
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.gerarchia-compact ~ #gerarchia-content .kr-card-meta {
    font-size: 0.8rem;
}

.gerarchia-compact ~ #gerarchia-content .kr-progress {
    min-width: 50px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
}

.gerarchia-compact ~ #gerarchia-content .krt-tasks-list .table {
    font-size: 0.8rem;
}

.gerarchia-compact ~ #gerarchia-content .krt-tasks-list .table th {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.gerarchia-compact ~ #gerarchia-content .krt-tasks-list .table td {
    padding: 0.2rem 0.4rem;
}

.kr-card-content {
    flex: 1;
    min-width: 0;
}

.kr-card-title {
    font-weight: 600;
    font-size: 1.35rem;
    margin-bottom: 0.25rem;
    color: var(--nero);
}

.kr-card-meta {
    font-size: 1.05rem;
    color: var(--grigio);
}

/* Nota 17: Versione KR3Y in linea */
.versione-inline {
    font-style: italic;
    font-weight: 400;
    color: #999;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* Nota 22: Bottoni azioni inline per task */
.task-actions-inline {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}
.btn-icon-sm {
    background: none;
    border: none;
    padding: 0.15rem 0.3rem;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.btn-icon-sm:hover {
    opacity: 1;
}

.kr-card-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    margin-left: auto;  /* v0.4.0: Spingi a destra */
}

.kr-card-body {
    padding: 0 1.25rem 1.25rem 1.25rem;
    display: none;
}

.kr-card-body.expanded {
    display: block;
}

.kr-card-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--grigio-border);
    margin-top: 1rem;
}

/* Filtri pannello (Nota 6) */
.filtri-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bianco);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    align-items: flex-end;
}

.filtri-panel .form-group {
    margin-bottom: 0;
    min-width: 180px;
}

.filtri-panel .form-control {
    min-height: 44px;
}

.filtri-panel .btn {
    align-self: flex-end;
}

/* Dashboard selettore periodo (Nota 11) */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.periodo-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.periodo-selector label {
    font-weight: 600;
}

.periodo-selector select {
    min-width: 180px;
}

/* Info box per istruzioni */
.info-box {
    padding: 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-box.info {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    color: #0d47a1;
}

.info-box.success {
    background: var(--verde-light);
    border: 2px solid var(--verde);
    color: #1b5e20;
}

.info-box.warning {
    background: var(--giallo-light);
    border: 2px solid var(--giallo);
    color: #e65100;
}

.info-box.danger {
    background: var(--rosso-light);
    border: 2px solid var(--rosso);
    color: #b71c1c;
}

.info-box-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-box-content {
    flex: 1;
}

.info-box-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Visione strategica integrale (Nota 12) */
.visione-card {
    background: linear-gradient(135deg, var(--blu) 0%, var(--blu-dark) 100%);
    color: var(--bianco);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

.visione-card h2 {
    color: var(--bianco);
    margin-bottom: 1rem;
}

.visione-card .visione-triennio {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.visione-card .visione-testo {
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Alert conferma eliminazione (Nota 9) */
.delete-alert {
    padding: 1.5rem;
    background: var(--rosso-light);
    border: 2px solid var(--rosso);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.delete-alert h4 {
    color: var(--rosso);
    margin-bottom: 0.75rem;
}

.delete-alert .dipendenze-list {
    background: var(--bianco);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    max-height: 200px;
    overflow-y: auto;
}

.delete-alert .dipendenze-list li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--grigio-border);
    font-size: 0.95rem;
}

.delete-alert .dipendenze-list li:last-child {
    border-bottom: none;
}

/* Nota admin visibile per team (Nota 10) */
.nota-admin-display {
    background: var(--giallo-light);
    border-left: 4px solid var(--giallo);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.nota-admin-display .nota-label {
    font-weight: 700;
    color: #e65100;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.nota-admin-display .nota-testo {
    color: var(--nero);
}

/* Link versione cliccabile */
.version-link {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    color: var(--azzurro-light);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.version-link:hover {
    background: rgba(255,255,255,0.2);
    color: var(--bianco);
}

/* Stili per ordinamento tabelle (Nota 8) */
.table th.sortable::after {
    content: '⇅';
    margin-left: 0.5rem;
    opacity: 0.4;
}

.table th.sorted-asc::after {
    content: '↑';
    opacity: 1;
}

.table th.sorted-desc::after {
    content: '↓';
    opacity: 1;
}

/* Task card con nota admin */
.task-card {
    border: 2px solid var(--grigio-border);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.task-card:hover {
    border-color: var(--azzurro);
    box-shadow: var(--shadow);
}

.task-card.extra-budget {
    border-color: var(--giallo);
    background: var(--giallo-light);
}

.task-card.pending {
    border-color: var(--rosso);
    border-style: dashed;
}

/* Pulsante + Task in gerarchia (Nota 3) */
.add-task-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--verde-light);
    color: var(--verde);
    border: 2px solid var(--verde);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-task-inline:hover {
    background: var(--verde);
    color: var(--bianco);
}

/* Filtro "Solo i miei task" (Nota 13) */
.solo-miei-filter {
    background: var(--azzurro-light);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: inline-block;
}

.solo-miei-filter .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--blu);
}

.solo-miei-filter input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}


/* Nota 19: Stile visione strategica formattata */
.visione-content {
    padding: 1rem 0;
}
.visione-content h1, .visione-content h2, .visione-content h3, 
.visione-content h4, .visione-content h5, .visione-content h6 {
    color: var(--blu);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}
.visione-content h1 { font-size: 1.5rem; }
.visione-content h2 { font-size: 1.3rem; }
.visione-content h3 { font-size: 1.15rem; }
.visione-content p { margin-bottom: 1rem; }
.visione-content ul, .visione-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}
.visione-content li { margin-bottom: 0.5rem; }
.visione-content strong, .visione-content b { font-weight: 700; }
.visione-content em, .visione-content i { font-style: italic; }
.visione-content u { text-decoration: underline; }
.visione-content hr { margin: 1.5rem 0; border: none; border-top: 1px solid var(--grigio-border); }

/* Nota 21: Stile task list in KRT */
.krt-tasks-list {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--grigio-border);
}
.krt-tasks-list .table { font-size: 0.85rem; margin: 0; }
.krt-tasks-list .table th { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
.krt-tasks-list .table td { padding: 0.25rem 0.5rem; }

/* v0.3.24: Stile celle editabili */
.editable-cell {
    cursor: text;
    position: relative;
}
.editable-cell:hover {
    background-color: rgba(33, 150, 243, 0.1);
}
.editable-cell::after {
    content: '✎';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    font-size: 0.7em;
    color: var(--blu);
    transition: opacity 0.2s;
}
.editable-cell:hover::after {
    opacity: 0.5;
}
.inline-edit-input {
    width: 100%;
    padding: 2px 4px;
    border: 2px solid var(--blu);
    border-radius: 3px;
    font-size: inherit;
    font-family: inherit;
    background: var(--bianco);
    outline: none;
}
.inline-edit-input:focus {
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.3);
}
/* v0.3.24: Stile per editing ID */
.inline-edit-id {
    width: 55px !important;
    text-align: center;
    font-weight: bold;
}
.id-prefix {
    color: var(--grigio);
}
.id-suffix {
    color: var(--blu-dark);
}
.editable-id {
    cursor: text;
}

/* Nota 8: Stile header tabelle ordinabili */
.table th {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}
.table th:hover {
    background-color: var(--grigio-bg);
}
.sort-indicator {
    font-size: 0.75rem;
    opacity: 0.5;
    margin-left: 0.25rem;
}
.table th[data-sort-dir="asc"] .sort-indicator,
.table th[data-sort-dir="desc"] .sort-indicator {
    opacity: 1;
    color: var(--blu);
}

/* v0.3.24: Timeline Task */
.timeline-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: var(--bianco);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    align-items: center;
}

.timeline-year-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.timeline-year {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blu);
    min-width: 60px;
    text-align: center;
}

.timeline-container {
    padding: 1rem;
    overflow-x: auto;
}

.timeline-header {
    display: flex;
    border-bottom: 2px solid var(--blu);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.timeline-label-col {
    width: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding-right: 0.5rem;
}

.timeline-collab-sigla {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--blu-dark);
}

.timeline-task-count {
    font-size: 0.7rem;
    color: var(--grigio);
    background: var(--grigio-bg);
    padding: 0.1rem 0.3rem;
    border-radius: 8px;
}

.timeline-month {
    flex: 1;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--blu);
}

.timeline-months-header {
    flex: 1;
    display: flex;
    position: relative;
}

.timeline-header-quarters {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    z-index: 0;
}

.timeline-months-row {
    display: flex;
    flex: 1;
    position: relative;
    z-index: 1;
}

.timeline-body {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: visible;
    padding-top: 60px;  /* v0.3.25: Spazio per tooltip */
    margin-top: -60px;
}

.timeline-row {
    display: flex;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--grigio-bg);
    overflow: visible;  /* v0.3.25: Permetti tooltip sopra */
}

.timeline-row:hover {
    background: var(--grigio-bg);
}

.timeline-track {
    flex: 1;
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
    overflow: visible;  /* v0.3.25: Permetti tooltip sopra */
}

/* Griglia linee verticali mesi */
.timeline-grid {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 2;
}

.timeline-grid-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #bbb;  /* v0.3.25: Più visibile */
}

/* Sfondi trimestri alternati */
.timeline-quarters {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    z-index: 1;
}

.timeline-quarter {
    flex: 1;
}

.timeline-quarter.q1,
.timeline-quarter.q3 {
    background: rgba(43, 58, 103, 0.06);
}

.timeline-quarter.q2,
.timeline-quarter.q4 {
    background: transparent;
}

.timeline-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: var(--blu);
    transform: translateY(-50%);
}

.task-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 10;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.task-dot:hover {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 100;
}

/* Tooltip custom sopra il pallino */
.task-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: var(--blu-dark);
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    white-space: nowrap;
    min-width: 180px;
    max-width: 350px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    margin-bottom: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    border: 1px solid var(--grigio-border);
    z-index: 1000;
}

.task-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: white;
}

.task-dot:hover .task-tooltip {
    opacity: 1;
    visibility: visible;
}

.task-tooltip-text {
    font-weight: 600;
    line-height: 1.4;
    color: var(--blu-dark);
}

.task-tooltip-date {
    font-size: 0.75rem;
    font-weight: 400;
    color: #999;
    margin-top: 0.25rem;
}

.task-dot-green {
    background: var(--verde);
}

.task-dot-yellow {
    background: var(--giallo);
}

.task-dot-red {
    background: var(--rosso);
}

.timeline-legend {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--grigio);
    justify-content: center;
}

.timeline-legend span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.task-dot-sample {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
}

/* v0.4.0: Timeline personale per Dashboard Team */
.my-timeline {
    padding: 0.5rem 1rem 1rem;
}

.my-timeline-header {
    display: flex;
    justify-content: space-between;
    padding: 0 0.5rem;
    margin-bottom: 0.25rem;
}

.my-tl-month {
    flex: 1;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--grigio);
}

.my-timeline-track {
    position: relative;
    height: 50px;
    background: var(--grigio-light);
    border-radius: 6px;
    overflow: visible;
}

.my-tl-quarters {
    display: flex;
    height: 100%;
    position: absolute;
    width: 100%;
}

.my-tl-q {
    flex: 1;
}

.my-tl-q.q1, .my-tl-q.q3 {
    background: rgba(0, 82, 155, 0.05);
}

.my-tl-q.q2, .my-tl-q.q4 {
    background: rgba(0, 82, 155, 0.1);
}

/* v0.4.0: Linee separazione mesi */
.tl-month-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(0, 82, 155, 0.15);
    z-index: 1;
}

.my-tl-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.tl-dot {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 2;
}

.tl-dot.dot-green { background: var(--verde); }
.tl-dot.dot-yellow { background: var(--giallo); }
.tl-dot.dot-red { background: var(--rosso); }

.tl-dot:hover {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 100;
}

/* v0.4.0: Tooltip integrato nel dot (stile pipeline admin) */
.tl-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: var(--blu-dark);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    min-width: 160px;
    max-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    margin-bottom: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    border: 1px solid var(--grigio-border);
    z-index: 1000;
}

.tl-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: white;
}

.tl-dot:hover .tl-tooltip {
    opacity: 1;
    visibility: visible;
}

.tl-tooltip-id {
    font-weight: 700;
    color: var(--blu);
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
}

.tl-tooltip-desc {
    font-weight: 500;
    line-height: 1.3;
    color: var(--nero);
    white-space: normal;
}

.tl-tooltip-meta {
    font-size: 0.7rem;
    color: var(--grigio);
    margin-top: 0.25rem;
}

/* v0.4.0: Dashboard Team compatta */
.team-stats-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.team-stats-compact .stat-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    background: var(--grigio-light);
}

.team-stats-compact .stat-item.blu { border-left: 3px solid var(--blu); }
.team-stats-compact .stat-item.verde { border-left: 3px solid var(--verde); }
.team-stats-compact .stat-item.giallo { border-left: 3px solid var(--giallo); }
.team-stats-compact .stat-item.rosso { border-left: 3px solid var(--rosso); }

.team-stats-compact .stat-num {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--nero);
}

.team-stats-compact .stat-label {
    font-size: 0.75rem;
    color: var(--grigio);
}

.team-stats-compact .stat-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    padding: 0.4rem 0.75rem;
    background: var(--blu-light);
    border-radius: 6px;
}

.team-stats-compact .progress-info {
    display: flex;
    flex-direction: column;
    font-size: 0.7rem;
    color: var(--grigio);
}

.team-stats-compact .progress-info strong {
    font-size: 1.1rem;
    color: var(--blu);
}

.team-stats-compact .progress-bar-mini {
    width: 80px;
    height: 8px;
    background: rgba(0,82,155,0.2);
    border-radius: 4px;
    overflow: hidden;
}

.team-stats-compact .progress-bar-mini .progress-fill {
    height: 100%;
    background: var(--blu);
    border-radius: 4px;
}

.team-stats-compact .stat-pending {
    font-size: 0.75rem;
    color: var(--giallo-dark, #b8860b);
    font-weight: 500;
}

/* Card compatta */
.card-compact {
    margin-bottom: 0.75rem;
}

.card-compact .card-header {
    padding: 0.5rem 1rem;
}

.card-compact .card-title {
    font-size: 0.9rem;
}

/* v0.4.0: Tooltip flottante per righe task */
.row-tooltip-float {
    display: none;
    position: fixed;
    z-index: 9999;
    max-width: 350px;
    padding: 0.75rem;
    background: var(--blu-dark, #1a365d);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    font-size: 0.85rem;
    line-height: 1.4;
    pointer-events: none;
}

.row-tooltip-float .rtt-nota {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--giallo);
}

.row-tooltip-float .rtt-desc {
    padding: 0.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

.row-tooltip-float strong {
    color: var(--giallo);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-row-hover {
    cursor: pointer;
    transition: background 0.15s ease;
}

.task-row-hover:hover {
    background: var(--blu-light, #e8f4fc);
}

.my-timeline-legend {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--grigio);
}

.my-timeline-legend span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Nota 19: Editor WYSIWYG */
.wysiwyg-toolbar {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
    background: var(--grigio-bg);
    border: 1px solid var(--grigio-border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}
.wysiwyg-toolbar button {
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--grigio-border);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    min-width: 32px;
}
.wysiwyg-toolbar button:hover {
    background: var(--blu);
    color: white;
    border-color: var(--blu);
}
.toolbar-divider {
    color: var(--grigio-border);
    padding: 0 0.25rem;
}
.wysiwyg-editor {
    min-height: 300px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid var(--grigio-border);
    border-radius: 0 0 8px 8px;
    background: white;
    line-height: 1.8;
}
.wysiwyg-editor:focus {
    outline: 2px solid var(--blu);
    outline-offset: -2px;
}
.wysiwyg-editor h2, .wysiwyg-editor h3 {
    color: var(--blu);
    margin: 1rem 0 0.5rem 0;
}
.wysiwyg-editor .page-break {
    display: block;
    text-align: center;
    padding: 1rem;
    margin: 1.5rem 0;
    background: var(--grigio-bg);
    border: 2px dashed var(--grigio-border);
    color: var(--grigio);
    font-weight: 600;
}

/* Nota 19: Paginazione visione */
.visione-pagination {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.visione-pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--grigio-border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}
.visione-pagination button.active {
    background: var(--blu);
    color: white;
    border-color: var(--blu);
}
.visione-page {
    display: none;
}
.visione-page.active {
    display: block;
}

/* Modal large */
.modal-lg .modal {
    max-width: 800px;
}

/* Modal fullscreen per editor visione */
.modal-fullscreen .modal {
    width: 95vw;
    max-width: 95vw;
    height: 90vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.modal-fullscreen .modal-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.modal-fullscreen .wysiwyg-editor {
    flex: 1;
    min-height: 50vh;
    max-height: none;
    height: auto;
}
.modal-fullscreen .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* v0.4.0: Vista dettaglio task */
.task-detail-view {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-detail-view .detail-row {
    display: flex;
    padding: 0.75rem 1rem;
    background: var(--grigio-light);
    border-radius: 6px;
    align-items: flex-start;
    gap: 1rem;
}

.task-detail-view .detail-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--grigio);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 120px;
    flex-shrink: 0;
}

.task-detail-view .detail-value {
    font-size: 0.95rem;
    color: var(--nero);
    flex: 1;
}

/* === Nota 3: Evidenziazione Frasi Visione === */

/* Container visione - compatto */
.visione-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* Header compatto - Nota 6 */
.visione-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}
.visione-triennio {
    font-weight: 700;
    font-size: 1rem;
    color: var(--blu);
}

/* Paginazione compatta inline */
.visione-pagination-compact {
    display: flex;
    gap: 0.3rem;
}
.page-btn {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 2px solid #dee2e6;
    background: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s;
}
.page-btn:hover {
    border-color: var(--blu);
    color: var(--blu);
}
.page-btn.active {
    background: var(--blu);
    color: white;
    border-color: var(--blu);
}

/* Nota 13: Paginazione con frecce */
.visione-pagination-arrows {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.arrow-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    background: white;
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}
.arrow-btn:hover {
    border-color: var(--blu);
    color: var(--blu);
    background: #e3f2fd;
    transform: scale(1.1);
}

/* Nota 13: Numeri pagina cliccabili */
.page-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.page-num {
    font-size: 1.1rem;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: all 0.15s;
}
.page-num:hover {
    color: var(--blu);
}
.page-num.active {
    color: var(--blu);
    font-weight: 700;
    font-size: 1.25rem;
}

/* Body visione - Nota 6: massimo spazio */
.visione-body {
    padding: 1rem 1.25rem;
    position: relative;
}
.visione-page {
    display: none;
}
.visione-page.active {
    display: block;
}
.visione-testo {
    line-height: 1.85;
    color: #1a1a1a;
}

/* Frasi evidenziate */
.frase-evidenziata {
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}
.frase-evidenziata.clickable {
    cursor: pointer;
}
.frase-evidenziata:hover,
.frase-evidenziata.highlight-active {
    filter: brightness(0.8) saturate(1.5);
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
    outline: 3px solid rgba(33, 150, 243, 0.5);
    outline-offset: 1px;
    transform: scale(1.02);
    position: relative;
    z-index: 5;
}

/* v0.3.21: Evidenziazioni con markers */
.marker-highlight {
    transition: all 0.15s ease;
}
.marker-highlight:hover {
    filter: brightness(0.85) saturate(1.3);
    z-index: 100 !important;
}

/* Nota 11: Hint selezione testo */
.selezione-hint {
    background: linear-gradient(135deg, var(--blu) 0%, #1976d2 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    margin-top: 0.75rem;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    animation: pulse-hint 1.5s ease-in-out infinite;
}

@keyframes pulse-hint {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.01); }
}

/* Barra KR3Y compatta - Nota 6 */
.kr3y-bar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    margin-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Nota 14: Icone KR3Y - sempre colorate, intensità diversa */
.kr3y-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
}
/* Nota 14: Ha frasi nella pagina = colore pieno */
.kr3y-icon.ha-frasi {
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
/* Nota 14: No frasi = colore tenue con bordo */
.kr3y-icon.no-frasi {
    opacity: 0.85;
}
.kr3y-icon:hover,
.kr3y-icon.hover {
    transform: scale(1.25);
    box-shadow: 0 4px 16px rgba(0,0,0,0.35) !important;
    opacity: 1 !important;
    z-index: 10;
}

/* Nota 11: Icone pronte per collegamento */
.kr3y-icon.ready-to-link {
    animation: pulse-ready 0.8s ease-in-out infinite;
    cursor: pointer !important;
    transform: scale(1.15);
}
.kr3y-icon.ready-to-link:hover {
    transform: scale(1.35);
}

@keyframes pulse-ready {
    0%, 100% { box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(33, 150, 243, 0.25); }
}

/* Nota 15: Box descrizione KR3Y - PIÙ grande */
.kr3y-desc-box {
    background: #f8f9fa;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    margin-top: 0.75rem;
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.9rem;
    line-height: 1.4;
    color: #222;
    border: 1px solid #e9ecef;
}
.kr3y-desc-box.active {
    background: #e3f2fd;
    border-color: #90caf9;
}
.kr3y-desc-box strong {
    color: var(--blu);
    font-weight: 700;
    margin-right: 0.5rem;
}
.kr3y-desc-box .placeholder {
    color: #999;
    font-style: italic;
    font-size: 1rem;
}

/* Preview frase in modal */
.frase-preview {
    margin-bottom: 1.5rem;
}
.frase-preview label {
    font-weight: 600;
    color: #666;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.5rem;
}
.frase-testo {
    background: #f0f4f8;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
    border-left: 4px solid var(--blu);
    max-height: 150px;
    overflow-y: auto;
}

/* KR attuale in modal modifica */
.kr-attuale {
    margin-bottom: 1.5rem;
}
.kr-attuale label {
    font-weight: 600;
    color: #666;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.5rem;
}
.kr-badge {
    display: inline-block;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
}


/* Nota 4: Frasi visione in Gerarchia OKR */
.kr3y-frasi-visione {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left: 4px solid #ffc107;
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
    font-size: 1rem;
}
.frasi-visione-label {
    font-weight: 600;
    color: #7b5800;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
.frase-visione-item {
    font-style: italic;
    color: #5d4e37;
    line-height: 1.6;
    padding: 0.5rem 0;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
    /* v0.3.21: Layout flex per bottone elimina */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.frase-visione-item span {
    flex: 1;
}
.frase-visione-item .btn-icon-sm {
    opacity: 0;
    transition: opacity 0.15s;
}
.frase-visione-item:hover .btn-icon-sm {
    opacity: 1;
}
.frase-visione-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Adjust KR3Y card when frasi are present */
.kr-card.kr3y:has(.kr3y-frasi-visione) {
    border-top: none;
}
.kr-card.kr3y:has(.kr3y-frasi-visione) .kr-card-header {
    border-radius: 0;
}



/* Nota 10: Editor visione con header fisso */
.visione-edit-header {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e0e0e0;
    z-index: 10;
    margin: -1rem -1rem 0.5rem -1rem;
}
.visione-edit-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.visione-edit-controls label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 0.25rem;
}
.triennio-input {
    width: 100px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
}
.visione-edit-controls button {
    padding: 0.35rem 0.6rem;
    border: 1px solid #ccc;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}
.visione-edit-controls button:hover {
    background: #e3f2fd;
    border-color: var(--blu);
}
.zoom-label {
    font-size: 0.8rem;
    color: var(--grigio);
    margin-left: 0.35rem;
}

/* Editor full height */
.wysiwyg-editor-full {
    min-height: calc(100vh - 220px);
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    line-height: 1.8;
}
.wysiwyg-editor-full:focus {
    outline: none;
    border-color: var(--blu);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* ============================================
   NOTA 23: APPUNTI OKR
   ============================================ */

.appunti-card {
    padding: 0;
}

.appunti-help {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.85rem;
    color: #666;
}

.appunti-help span {
    white-space: nowrap;
}

.appunti-list {
    padding: 0.5rem 0;
}

.appunto-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
    outline: none;
    min-height: 48px;
}

.appunto-row:hover {
    background: #f8f9fa;
}

.appunto-row:focus {
    background: #e3f2fd;
    outline: none;
}

.appunto-row.selected {
    background: #e3f2fd;
    border-left: 4px solid var(--blu);
}

.appunto-row.dragging {
    opacity: 0.5;
    background: #fff3cd;
}

/* Nota 28: Feedback visivo drag & drop per zone diverse */
.appunto-row.drag-over-top {
    border-top: 4px solid var(--blu);
    background: linear-gradient(to bottom, rgba(33, 150, 243, 0.2) 0%, transparent 50%);
}

.appunto-row.drag-over-bottom {
    border-bottom: 4px solid var(--blu);
    background: linear-gradient(to top, rgba(33, 150, 243, 0.2) 0%, transparent 50%);
}

.appunto-row.drag-over-middle {
    background: rgba(33, 150, 243, 0.15);
    border-left: 4px solid var(--azzurro);
    padding-left: calc(1rem + 20px); /* Simula indentazione */
}

.appunto-drag {
    width: 28px;
    color: #999;
    cursor: grab;
    font-size: 1.3rem;
    user-select: none;
    flex-shrink: 0;
}

.appunto-drag:hover {
    color: #333;
}

.appunto-select {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    color: #aaa;
    transition: color 0.15s;
    flex-shrink: 0;
}

.appunto-select:hover {
    color: var(--blu);
}

.appunto-row.selected .appunto-select {
    color: var(--blu);
    font-weight: bold;
}

.appunto-indent {
    flex-shrink: 0;
}

.appunto-text {
    flex: 1;
    padding: 0.4rem 0.75rem;
    min-height: 2rem;
    cursor: text;
    word-break: break-word;
    font-size: 1.25rem;
    line-height: 1.4;
}

.appunto-text:hover {
    background: rgba(0,0,0,0.02);
    border-radius: 4px;
}

.appunto-input-edit,
.appunto-input-new {
    width: 100%;
    border: 1px solid var(--blu);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font-size: 1.25rem;
    font-family: inherit;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.appunto-input-new {
    border: 1px solid #ddd;
    box-shadow: none;
}

.appunto-input-new:focus {
    border-color: var(--blu);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.appunto-actions-inline {
    display: none;
    gap: 0.25rem;
}

.appunto-row:hover .appunto-actions-inline {
    display: flex;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.btn-icon:hover {
    opacity: 1;
}

.appunto-children {
    margin-left: 0;
}

.appunto-new {
    background: #fafafa;
    border-bottom: none;
}

.appunto-new .appunto-drag,
.appunto-new .appunto-select {
    visibility: hidden;
}

/* Bottoni conversione */
.appunti-actions {
    display: flex;
    gap: 0.5rem;
}

.appunti-actions .btn {
    padding: 0.5rem 1rem;
}

/* Alert warning nei modal */
.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}
