body[data-theme="default"] {
    background-color: #f7f9fc;
}

.sidebar .sidebar-user-title {
    font-weight: 600;
}

.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-column {
    min-width: 320px;
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 15px 30px -20px rgba(23, 43, 77, 0.45);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 260px);
}

.kanban-column-header {
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.kanban-task {
    background: #f5f7fb;
    border-radius: .65rem;
    padding: 1rem 1.25rem;
    margin: 0 1.25rem 1rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.kanban-task .task-meta {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6c757d;
}

.kanban-task .task-due {
    font-size: .75rem;
    color: #dc3545;
}

.dashboard-stat {
    border-radius: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #2b83f6, #6b5bfc);
    color: #fff;
}

.dashboard-stat .stat-value {
    font-size: 2.25rem;
    font-weight: 700;
}

.dashboard-stat.variant-green {
    background: linear-gradient(135deg, #1bb978, #31d0aa);
}

.dashboard-stat.variant-orange {
    background: linear-gradient(135deg, #ff8552, #ffb677);
}

.table thead th {
    text-transform: uppercase;
    font-size: .75rem;
    letter-spacing: .08em;
}

.time-tracking-card {
    border-radius: 1rem;
    box-shadow: 0 15px 30px -20px rgba(33, 37, 41, 0.25);
}

.document-tile {
    display: flex;
    align-items: center;
    padding: .85rem 1rem;
    border-radius: .75rem;
    transition: background .2s ease;
}

.document-tile:hover {
    background: rgba(43, 131, 246, .07);
}

.document-tile .icon {
    width: 48px;
    height: 48px;
    border-radius: .75rem;
    background: rgba(43, 131, 246, .12);
    display: grid;
    place-items: center;
    margin-right: 1rem;
}

.document-tile .meta {
    font-size: .82rem;
    color: #6c757d;
}

.badge-priority-high {
    background-color: #dc3545;
}

.badge-priority-medium {
    background-color: #ffc107;
    color: #212529;
}

.badge-priority-low {
    background-color: #198754;
}

.timeline {
    --timeline-gutter: 1.75rem;
    --timeline-line-x: 0.5rem;
    --timeline-dot-size: 12px;
    position: relative;
    padding-left: var(--timeline-gutter);
}

.timeline::before {
    content: "";
    position: absolute;
    left: var(--timeline-line-x);
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0,0,0,0.1);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 0.25rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: calc(var(--timeline-line-x) - var(--timeline-gutter) - (var(--timeline-dot-size) / 2) + 1px);
    top: 50%;
    width: var(--timeline-dot-size);
    height: var(--timeline-dot-size);
    border-radius: 50%;
    background: #2b83f6;
    transform: translateY(-50%);
}

@media (max-width: 767.98px) {
    .timeline {
        --timeline-gutter: 1.5rem;
        --timeline-line-x: 0.4rem;
        --timeline-dot-size: 10px;
    }
}

.timeline-item .timestamp {
    font-size: .75rem;
    color: #6c757d;
}

.wrapper {
    --app-sidebar-width: 264px;
    --app-topbar-height: 72px;
}

body[data-sidebar-layout="compact"] .wrapper {
    --app-sidebar-width: 74px;
}

.main {
    padding-top: var(--app-topbar-height);
}

.navbar.navbar-bg {
    position: fixed;
    top: 0;
    left: var(--app-sidebar-width);
    right: 0;
    z-index: 1030;
    min-height: var(--app-topbar-height);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.sidebar.collapsed + .main .navbar.navbar-bg {
    left: 0;
}

body[data-sidebar-position="right"] .navbar.navbar-bg {
    left: 0;
    right: var(--app-sidebar-width);
}

body[data-sidebar-position="right"] .sidebar.collapsed + .main .navbar.navbar-bg {
    right: 0;
}

.recent-time-entries {
    display: grid;
    gap: 0.85rem;
}

.recent-time-entry {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.85rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.recent-time-entry__main {
    display: grid;
    gap: 0.45rem;
}

.recent-time-entry__topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.recent-time-entry__duration {
    flex-shrink: 0;
    border-radius: 999px;
    background: rgba(43, 131, 246, 0.12);
    color: #1d4f91;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
}

.recent-time-entry__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    color: #6c757d;
    font-size: 0.78rem;
}

.recent-time-entry__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.recent-time-entry__list-badge {
    background: #e7f1ff;
    border: 1px solid #c9defc;
    color: #225ea8;
}

.recent-time-entry__notes {
    color: #4f5b67;
    font-size: 0.82rem;
    line-height: 1.45;
}

@media (max-width: 767.98px) {
    .main {
        padding-top: var(--app-topbar-height);
    }

    .navbar.navbar-bg {
        left: 0;
        right: 0;
    }

    .recent-time-entry {
        padding: 0.85rem;
    }

    .recent-time-entry__topline {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========== DOCUMENT MANAGEMENT V2 ========== */

.folder-card {
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.08);
}

.folder-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.folder-card .folder-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-shrink: 0;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.folder-card:hover .folder-icon {
    transform: scale(1.05);
}

/* Cartelle path-only (visibili solo per navigazione) */
.folder-card.folder-path-only {
    border: 1px dashed rgba(0,0,0,0.15);
    background-color: #f8f9fa;
}

.folder-card.folder-path-only:hover {
    box-shadow: none;
    transform: none;
}

.folder-card.folder-path-only .folder-icon {
    opacity: 0.7;
}

.folder-card.folder-path-only .card-body {
    position: relative;
}

.folder-card.folder-path-only::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0,0,0,0.02) 10px,
        rgba(0,0,0,0.02) 20px
    );
    pointer-events: none;
    border-radius: 0.375rem;
}

.document-card {
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.08);
}

.document-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.document-card .file-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-shrink: 0;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.badge-sm {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.feather-sm {
    width: 14px;
    height: 14px;
}

/* Upload dropzone */
#dropzone {
    border: 2px dashed #dee2e6;
    border-radius: 0.75rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
}

#dropzone:hover {
    border-color: #2b83f6;
    background-color: rgba(43, 131, 246, 0.05);
}

#dropzone.drag-over {
    border-color: #2b83f6;
    background-color: rgba(43, 131, 246, 0.1);
}

.upload-item {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.upload-item:last-child {
    border-bottom: none;
}

/* ========== SERVICE LOCK STATES ========== */
.sidebar-item.is-locked .sidebar-link,
.sidebar-link.is-locked {
    opacity: 0.6;
}

.sidebar-link.is-locked {
    cursor: pointer;
}

.sidebar-link .service-lock {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    opacity: 0.75;
}

.sidebar-link .service-lock i {
    width: 16px;
    height: 16px;
}

.service-locked-card {
    border: 1px dashed rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.08));
}

.service-locked-card .lock-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.08);
    display: grid;
    place-items: center;
    color: #0f172a;
}

.avatar-initials {
    align-items: center;
    background: var(--bs-primary);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    height: 32px;
    justify-content: center;
    line-height: 1;
    text-transform: uppercase;
    width: 32px;
}

.avatar-initials--lg {
    font-size: 0.85rem;
    height: 40px;
    width: 40px;
}

.global-search-form {
    position: relative;
    width: min(34rem, 48vw);
}

.global-search-autocomplete {
    border: 1px solid rgba(15, 23, 42, 0.08);
    left: 0;
    margin-top: 0.45rem;
    max-height: 26rem;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1080;
}

.global-search-autocomplete[hidden] {
    display: none !important;
}

.global-search-autocomplete .list-group-item {
    border-left: 0;
    border-right: 0;
    padding: 0.85rem 1rem;
}

.global-search-autocomplete .list-group-item:first-child {
    border-top: 0;
}

.global-search-autocomplete .list-group-item:last-child {
    border-bottom: 0;
}

.global-search-autocomplete .list-group-item.active {
    background: rgba(59, 125, 221, 0.08);
    border-color: rgba(59, 125, 221, 0.18);
    color: inherit;
}

.global-search-type {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.global-search-meta {
    min-width: 0;
}

.global-search-title {
    color: #1f2937;
    font-weight: 600;
}

.global-search-subtitle {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    color: #6b7280;
    overflow: hidden;
}

.global-search-footer {
    background: #f8fafc;
    color: #334155;
    font-weight: 600;
}
