/* ═══════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════ */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 0px;
    --topbar-height: 60px;
    --brand-primary: #0095da;
    --brand-primary-light: #33aae1;
    --brand-primary-dark: #0078b0;
    --brand-accent: #f5821f;
    --brand-gradient: #0095da;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --surface-muted: #f1f5f9;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════ */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 1200px) {
    html { font-size: 14.5px; }
}

body {
    background: var(--surface-muted);
    color: var(--text-primary);
    margin: 0;
    overflow-x: hidden;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 149, 218, 0.25);
}

/* ═══════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform var(--transition);
}

.sidebar.collapsed {
    transform: translateX(calc(-1 * var(--sidebar-width)));
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    background: transparent;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sidebar-brand-text {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.sidebar-nav-section {
    margin-bottom: 8px;
}

.sidebar-nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 8px 12px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
    margin-bottom: 2px;
}

.sidebar-link:hover {
    background: var(--surface-muted);
    color: var(--brand-primary);
}

.sidebar-link.active {
    background: rgba(0, 149, 218, 0.08);
    color: var(--brand-primary);
    font-weight: 600;
}

.sidebar-link.active i {
    color: var(--brand-primary);
}

.sidebar-link i {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
}

.sidebar-user-avatar {
    font-size: 1.6rem;
    color: var(--text-muted);
    line-height: 1;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.sidebar-user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   MAIN WRAPPER
   ═══════════════════════════════════════════ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

.main-wrapper.expanded {
    margin-left: 0;
}

/* ═══════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════ */
.topbar {
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1030;
    gap: 16px;
}

.sidebar-toggle {
    color: var(--text-secondary);
    padding: 4px;
    text-decoration: none;
}

.sidebar-toggle:hover {
    color: var(--brand-primary);
}

.topbar-actions .btn-link {
    text-decoration: none;
}

/* ═══════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════ */
.main-content {
    flex: 1;
    padding: 28px;
    max-width: 1600px;
}

/* ═══════════════════════════════════════════
   MAIN FOOTER
   ═══════════════════════════════════════════ */
.main-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--surface);
}

/* ═══════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════ */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    transition: box-shadow var(--transition);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Stat Cards (KPI) */
.stat-card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card .card-body {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.blue { background: rgba(0, 149, 218, 0.1); color: #0095da; }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-icon.amber { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-icon.red { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.stat-info { flex: 1; }

.stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════ */
.table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.table th {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom-width: 1px;
    padding: 12px 16px;
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.table-hover tbody tr:hover {
    background-color: var(--surface-hover);
}

.table thead.modern-head {
    background: var(--surface-muted);
}

.table thead.modern-head th {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.table tfoot {
    background: var(--surface-muted);
}

.table tfoot td {
    font-weight: 600;
    border-top: 2px solid var(--border-color);
}

/* ═══════════════════════════════════════════
   BADGES (STATUS)
   ═══════════════════════════════════════════ */
.badge {
    font-weight: 500;
    font-size: 0.72rem;
    padding: 5px 10px;
    border-radius: 50px;
    letter-spacing: 0.01em;
}

.status-multiple { background: rgba(0, 149, 218, 0.18); color: #005f8a; }

/* ═══════════════════════════════════════════
   PROGRESS BARS
   ═══════════════════════════════════════════ */
.progress {
    height: 8px;
    border-radius: 50px;
    background: var(--surface-muted);
    overflow: hidden;
}

.progress-bar {
    border-radius: 50px;
    transition: width 0.6s ease;
}

.progress-bar.bar-completed { background: #10b981; }
.progress-bar.bar-in-progress { background: #0095da; }
.progress-bar.bar-on-hold { background: #f59e0b; }
.progress-bar.bar-stopped { background: #ef4444; }
.progress-bar.bar-uat { background: #06b6d4; }
.progress-bar.bar-not-started { background: #94a3b8; }
.progress-bar.bar-multiple { background: #0095da; }

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn-brand {
    background: var(--brand-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: all var(--transition);
    box-shadow: 0 2px 4px rgba(0, 149, 218, 0.3);
}

.btn-brand:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 149, 218, 0.4);
    color: #fff;
}

.btn-brand:disabled {
    opacity: 0.5;
    transform: none;
}

.btn-soft {
    background: var(--surface-muted);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    padding: 6px 14px;
}

.btn-soft:hover {
    background: var(--surface-hover);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* ═══════════════════════════════════════════
   FILTER BAR
   ═══════════════════════════════════════════ */
.filter-bar {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.filter-bar label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.filter-bar .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border-color);
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 160px;
}

.filter-bar .form-select:focus {
    border-color: var(--brand-primary);
}

.filter-bar .filter-search {
    border-radius: var(--radius-sm);
    border-color: var(--border-color);
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 220px;
    max-width: 300px;
}

.filter-bar .filter-search:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(var(--brand-primary-rgb, 59, 130, 246), 0.15);
}

.filter-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    flex-shrink: 0;
}

.ts-wrapper.has-items .ts-control > input::placeholder {
    color: transparent !important;
}

/* ═══════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════ */
.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    padding: 10px 16px;
}

.page-breadcrumb a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.page-breadcrumb a:hover {
    color: var(--brand-hover);
    text-decoration: underline;
}

.page-breadcrumb .breadcrumb-sep {
    color: var(--border-color);
    font-size: 0.7rem;
}

.page-breadcrumb .breadcrumb-current {
    color: var(--text-secondary);
    font-weight: 500;
}

.breadcrumb-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.82rem;
    margin-right: 6px;
    padding-right: 12px;
    border-right: 1px solid var(--border-color);
    transition: color var(--transition);
}

.breadcrumb-back:hover {
    color: var(--brand-primary);
}

.breadcrumb-back i {
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════════
   PAGE HEADERS
   ═══════════════════════════════════════════ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.page-header .subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════
   RESOURCE AVATARS
   ═══════════════════════════════════════════ */
.resource-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.avatar-isobel { background: #8b5cf6; }
.avatar-desmond { background: #3b82f6; }
.avatar-teboho { background: #10b981; }
.avatar-dillan { background: #f59e0b; }
.avatar-morne, .avatar-morné { background: #ef4444; }

/* ═══════════════════════════════════════════
   APPROVAL CARDS
   ═══════════════════════════════════════════ */
.approval-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    background: var(--surface);
    transition: all var(--transition);
    margin-bottom: 12px;
}

.approval-item:hover {
    border-color: var(--brand-primary-light);
    box-shadow: var(--shadow-md);
}

/* ═══════════════════════════════════════════
   EMPTY STATES
   ═══════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* ═══════════════════════════════════════════
   BURN GAUGE (Budget)
   ═══════════════════════════════════════════ */
.burn-gauge {
    position: relative;
    height: 12px;
    background: #e2e8f0;
    border-radius: 50px;
    overflow: hidden;
}

.burn-gauge-fill {
    height: 100%;
    border-radius: 50px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.burn-gauge-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(calc(-1 * var(--sidebar-width)));
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .main-content {
        padding: 20px 16px;
    }
}

/* Sidebar overlay on mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1035;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    display: block;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.35s ease-out both;
}

.animate-in:nth-child(1) { animation-delay: 0s; }
.animate-in:nth-child(2) { animation-delay: 0.05s; }
.animate-in:nth-child(3) { animation-delay: 0.1s; }
.animate-in:nth-child(4) { animation-delay: 0.15s; }
.animate-in:nth-child(5) { animation-delay: 0.2s; }
.animate-in:nth-child(6) { animation-delay: 0.25s; }

/* ═══════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 50px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ═══════════════════════════════════════════
   CONTEXT SWITCHER
   ═══════════════════════════════════════════ */
.context-switcher {
    position: relative;
}

.context-switcher-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--surface-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.context-switcher-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: rgba(0, 149, 218, 0.04);
}

.context-switcher-btn::after {
    display: none; /* hide default Bootstrap caret */
}

.context-switcher-btn .bi-building {
    color: var(--brand-primary);
    font-size: 0.95rem;
}

.context-label {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.context-dropdown {
    min-width: 280px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    margin-top: 4px;
}

.context-dropdown .dropdown-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 10px 16px 4px;
}

.context-dropdown .dropdown-divider {
    margin: 4px 0;
    border-color: var(--border-color);
}

.context-item {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 16px;
    color: var(--text-primary);
    transition: all var(--transition);
    border-radius: 0;
}

.context-item:hover {
    background: var(--surface-muted);
    color: var(--brand-primary);
}

.context-item.active {
    background: rgba(0, 149, 218, 0.08);
    color: var(--brand-primary);
    font-weight: 600;
}

.context-project-item {
    padding-left: 28px;
}

.context-project-code {
    display: inline-block;
    background: rgba(0, 149, 218, 0.08);
    color: var(--brand-primary);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
    letter-spacing: 0.02em;
}

.context-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   TOPBAR USER MENU
   ═══════════════════════════════════════════ */
.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 12px 4px 6px;
    cursor: pointer;
    transition: all var(--transition);
}

.topbar-user-btn:hover {
    border-color: var(--brand-primary);
    background: rgba(0, 149, 218, 0.04);
}

.topbar-user-btn::after {
    display: none;
}

.topbar-user-avatar {
    font-size: 1.4rem;
    color: var(--text-muted);
    line-height: 1;
}

.topbar-user-info {
    text-align: left;
}

.topbar-user-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.topbar-user-role {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.topbar-user-menu .dropdown-menu {
    min-width: 200px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* ═══════════════════════════════════════════
   TOPBAR DATE RANGE PICKER
   ═══════════════════════════════════════════ */
.topbar-date-filter {
    position: relative;
}

.drp-trigger {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 4px 10px;
    white-space: nowrap;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.drp-trigger:hover {
    border-color: var(--brand-primary-light);
}

.drp-trigger:focus,
.drp-trigger.active {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 149, 218, 0.12);
}

.btn-drp-clear {
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 2px 5px;
    margin-left: 2px;
}

.btn-drp-clear:hover {
    color: var(--text-primary);
}

/* Dropdown panel */
.drp-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 1050;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 580px;
    overflow: hidden;
}

.drp-dropdown.open {
    display: flex;
    flex-direction: column;
}

/* Presets column */
.drp-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 12px 14px 8px;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-muted);
}

.drp-presets-label {
    width: 100%;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.drp-preset {
    border: 1px solid var(--border-color);
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.drp-preset:hover {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

.drp-preset.active {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

/* Calendars area */
.drp-calendars {
    display: flex;
    gap: 0;
    padding: 10px 14px;
}

.drp-cal {
    flex: 1;
}

.drp-cal + .drp-cal {
    border-left: 1px solid var(--border-color);
    padding-left: 14px;
    margin-left: 14px;
}

/* Calendar header (month / year with nav) */
.drp-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.drp-cal-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.drp-cal-nav {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    transition: all var(--transition);
}

.drp-cal-nav:hover {
    background: var(--surface-muted);
    color: var(--text-primary);
}

/* Day-of-week header row */
.drp-cal-dow {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

/* Days grid */
.drp-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.drp-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    font-size: 0.74rem;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 50%;
    color: var(--text-primary);
    transition: all 0.12s ease;
    padding: 0;
}

.drp-day:hover:not(.drp-day-disabled):not(.drp-day-empty) {
    background: var(--surface-muted);
}

.drp-day.drp-day-today {
    font-weight: 700;
    box-shadow: inset 0 0 0 1.5px var(--brand-primary-light);
}

.drp-day.drp-day-disabled {
    color: var(--text-muted);
    opacity: 0.4;
    cursor: default;
}

.drp-day.drp-day-empty {
    cursor: default;
}

.drp-day.drp-day-start,
.drp-day.drp-day-end {
    background: var(--brand-primary);
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
}

.drp-day.drp-day-in-range {
    background: rgba(0, 149, 218, 0.10);
    border-radius: 0;
    color: var(--brand-primary-dark);
}

.drp-day.drp-day-start {
    border-radius: 50% 0 0 50%;
}

.drp-day.drp-day-end {
    border-radius: 0 50% 50% 0;
}

.drp-day.drp-day-start.drp-day-end {
    border-radius: 50%;
}

/* Footer */
.drp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-top: 1px solid var(--border-color);
    background: var(--surface-muted);
}

.drp-selection-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width: 767.98px) {
    .context-label {
        max-width: 120px;
    }
}

/* ═══════════════════════════════════════════
   TASK TABS
   ═══════════════════════════════════════════ */
.task-tabs {
    border-bottom: 2px solid var(--border-color);
    gap: 0;
}

.task-tab {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 12px 20px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-tab:hover {
    color: var(--brand-primary);
    background: rgba(0, 149, 218, 0.04);
}

.task-tab.active {
    color: var(--brand-primary);
    font-weight: 600;
    border-bottom-color: var(--brand-primary);
}

.task-tab i {
    font-size: 1rem;
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(0, 149, 218, 0.1);
    color: var(--brand-primary);
    border-radius: 50px;
    padding: 0 6px;
    margin-left: 4px;
}

.tab-card {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* ═══════════════════════════════════════════
   COMMENT LIST
   ═══════════════════════════════════════════ */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-item {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    padding-right: 56px;
    background: var(--surface);
    transition: border-color var(--transition);
}

.comment-item:hover {
    border-color: var(--brand-primary-light);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 3px;
}

.comment-author {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.comment-body {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity var(--transition);
}

.comment-item:hover .comment-actions {
    opacity: 1;
}

.comment-action-btn {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 0;
    cursor: pointer;
    transition: all var(--transition);
}

.comment-action-btn:hover {
    background: rgba(0, 149, 218, 0.1);
    color: var(--brand-primary);
}

.comment-action-btn.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Inline-editable time entry rows */
tr[data-can-edit="true"] {
    cursor: pointer;
}

tr[data-can-edit="true"]:not(.editing):hover {
    background: var(--surface-hover);
}

tr.editing {
    background: #f0f4ff !important;
}

tr.editing td {
    vertical-align: middle;
}

tr .ev {
    max-width: 140px;
}

tr td .ev[type="text"] {
    max-width: 100%;
}

.ea {
    gap: 4px;
    justify-content: flex-end;
}

/* ═══════════════════════════════════════════
   ATTACHMENT LIST
   ═══════════════════════════════════════════ */
.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: border-color var(--transition);
}

.attachment-item:hover {
    border-color: var(--brand-primary-light);
}

.attachment-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attachment-icon i {
    font-size: 1.2rem;
    color: var(--brand-primary);
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.attachment-name a {
    color: var(--text-primary);
    text-decoration: none;
}

.attachment-name a:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}

.attachment-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
}

.attachment-meta span::before {
    content: "·";
    margin-right: 8px;
}

.attachment-meta span:first-child::before {
    display: none;
}

/* ═══════════════════════════════════════════
   UPLOAD & FORM REFINEMENTS
   ═══════════════════════════════════════════ */
.comment-form,
.time-entry-form {
    padding: 16px 20px;
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
}

/* ─── Dropzone upload area ─── */
.dropzone-area {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 14px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.dropzone-area:hover {
    border-color: var(--brand-primary-light);
    background: #e6f4fb;
}

.dropzone-area.dragover {
    border-color: var(--brand-primary);
    background: #e6f4fb;
    box-shadow: 0 0 0 3px rgba(0, 149, 218, 0.12);
}

.dropzone-area.has-file {
    border-style: solid;
    border-color: var(--brand-primary-light);
    background: #e6f4fb;
    padding: 12px 20px;
}

.dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.dropzone-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
}

.dropzone-icon {
    font-size: 1.3rem;
    color: var(--brand-primary-light);
    opacity: 0.7;
}

.dropzone-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.dropzone-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.dropzone-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.dropzone-browse {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: underline;
}

.dropzone-file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
}

.dropzone-file-info .dropzone-filename {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.dropzone-icon-selected {
    font-size: 1.1rem;
    color: #059669;
}

.dropzone-file-info button {
    pointer-events: auto;
    position: relative;
    z-index: 3;
}

/* ─── Paste zone upload area ─── */
.paste-zone {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 14px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    outline: none;
}

.paste-zone:focus,
.paste-zone:focus-within {
    border-color: var(--brand-primary-light);
    background: #e6f4fb;
    box-shadow: 0 0 0 3px rgba(0, 149, 218, 0.12);
}

.paste-zone:hover {
    border-color: var(--brand-primary-light);
    background: #faf5ff;
}

.paste-zone.has-file {
    border-style: solid;
    border-color: #059669;
    background: #f0fdf4;
    padding: 12px 20px;
}

.paste-zone-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.paste-zone-icon {
    font-size: 1.3rem;
    color: var(--brand-primary-light);
    opacity: 0.7;
}

.paste-zone-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.paste-zone-title {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.paste-zone-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.paste-zone-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* ═══════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-notification {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 280px;
    max-width: 420px;
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid transparent;
}

.toast-notification.toast-error {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.toast-notification.toast-warning {
    border-left-color: #d97706;
    background: #fffbeb;
}

.toast-notification.toast-success {
    border-left-color: #059669;
    background: #f0fdf4;
}

.toast-notification .toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast-notification.toast-error .toast-icon { color: #dc2626; }
.toast-notification.toast-warning .toast-icon { color: #d97706; }
.toast-notification.toast-success .toast-icon { color: #059669; }

.toast-notification .toast-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 0 0 8px;
    line-height: 1;
}

.toast-notification .toast-close:hover {
    color: var(--text-primary);
}

.toast-notification.toast-hide {
    animation: toastSlideOut 0.25s ease forwards;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(40px); }
}

/* ═══════════════════════════════════════════
   PRESENTATION MODE
   ═══════════════════════════════════════════ */

/* ── Theme overrides ── */
body.presentation-mode {
    --brand-primary: #0d9488;
    --brand-primary-light: #14b8a6;
    --brand-primary-dark: #0f766e;
    --brand-gradient: #0d9488;
}

body.presentation-mode .btn:focus,
body.presentation-mode .btn:active:focus,
body.presentation-mode .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.25);
}

body.presentation-mode .btn-brand {
    box-shadow: 0 2px 4px rgba(13, 148, 136, 0.3);
}

body.presentation-mode .btn-brand:hover {
    box-shadow: 0 4px 8px rgba(13, 148, 136, 0.4);
}

body.presentation-mode .btn-soft:hover {
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* ── Sidebar theme ── */
body.presentation-mode .sidebar {
    background: #0f3d3a;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

body.presentation-mode .sidebar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.presentation-mode .sidebar-brand-icon {
    background: #0d9488;
}

body.presentation-mode .sidebar-brand-text {
    color: #f0fdfa;
}

body.presentation-mode .sidebar-nav-label {
    color: rgba(153, 246, 228, 0.6);
}

body.presentation-mode .sidebar-link {
    color: rgba(204, 251, 241, 0.75);
}

body.presentation-mode .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f0fdfa;
}

body.presentation-mode .sidebar-link.active {
    background: #0d9488;
    color: #f0fdfa;
}

body.presentation-mode .sidebar-link.active i {
    color: #f0fdfa;
}

/* ── Topbar accent ── */
body.presentation-mode .topbar {
    border-bottom: 2px solid #0d9488;
    background: #f0fdfa;
}

body.presentation-mode .sidebar-toggle:hover {
    color: #0d9488;
}

/* ── Presentation banner ── */
.presentation-banner {
    background: #0d9488;
    color: #f0fdfa;
    text-align: center;
    padding: 6px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.presentation-banner i {
    font-size: 0.9rem;
}

.presentation-banner .badge {
    background: rgba(255, 255, 255, 0.2);
    color: #f0fdfa;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 999px;
}

/* ── Active link colours for presentation ── */
body.presentation-mode .sidebar-link i {
    color: inherit;
}

/* ── Table row hover in presentation ── */
body.presentation-mode .table-hover tbody tr:hover {
    background-color: rgba(13, 148, 136, 0.04);
}

/* ── Discussed badge ── */
.discussed-badge {
    color: #059669;
    font-size: 1.15rem;
}

.discussed-badge i {
    filter: drop-shadow(0 1px 2px rgba(5, 150, 105, 0.25));
}

/* ── Status badge tint in presentation ── */
body.presentation-mode .modern-head th {
    border-bottom-color: #0d9488;
}

/* ── Page header accent in presentation ── */
body.presentation-mode .page-header h1 {
    color: #134e4a;
}

/* ── Tab styling in presentation ── */
body.presentation-mode .task-tab.active {
    color: #0d9488;
    border-bottom-color: #0d9488;
}

body.presentation-mode .task-tab:hover {
    color: #0d9488;
}

/* ══════════════════════════════════════════════
   Notification Bell
   ══════════════════════════════════════════════ */

.notification-bell-btn {
    color: var(--text-secondary);
    padding: 0.35rem;
    line-height: 1;
    text-decoration: none;
    transition: color 0.15s;
}

.notification-bell-btn:hover,
.notification-bell-btn:focus {
    color: var(--brand-primary);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    color: #fff;
    background: #ef4444;
    border-radius: 10px;
    border: 2px solid var(--surface-card, #fff);
}

/* Sidebar notification link highlight */
.sidebar-link-notify {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.sidebar-link-notify:hover {
    background: rgba(239, 68, 68, 0.14);
    color: #dc2626;
}

.sidebar-link-notify.active {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.sidebar-link-notify i,
.sidebar-link-notify.active i {
    color: #ef4444;
}

.sidebar-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    color: #fff;
    background: #ef4444;
    border-radius: 10px;
}

.notification-dropdown {
    width: 380px;
    max-height: 480px;
    padding: 0;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    font-size: 0.88rem;
}

.notification-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-muted, #94a3b8);
    font-size: 0.85rem;
}

.notification-list {
    max-height: 340px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
    transition: background 0.12s;
}

.notification-item:hover {
    background: var(--surface-muted, #f8fafc);
    color: inherit;
    text-decoration: none;
}

.notification-icon-wrap {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    font-size: 0.82rem;
    margin-top: 2px;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    display: flex;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.3;
}

.notification-title .text-truncate {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-meta {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    margin-top: 2px;
}

.notification-reason {
    margin-top: 4px;
    padding: 4px 8px;
    font-size: 0.75rem;
    color: #dc2626;
    background: rgba(239, 68, 68, 0.06);
    border-radius: 6px;
    border-left: 3px solid rgba(239, 68, 68, 0.3);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-footer {
    display: block;
    padding: 0.7rem 1rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    border-top: 1px solid var(--border-color, #e2e8f0);
    transition: background 0.12s;
}

.notification-footer:hover {
    background: var(--surface-muted, #f8fafc);
    text-decoration: none;
}

/* ── Rejection reason card (Notifications page) ── */
.rejection-reason-card {
    padding: 6px 10px;
    font-size: 0.8rem;
    color: #dc2626;
    background: rgba(239, 68, 68, 0.06);
    border-radius: 6px;
    border-left: 3px solid rgba(239, 68, 68, 0.3);
    line-height: 1.4;
}

/* ═══════════════════════════════════════════
   TIME COMPLIANCE (Dashboard + Timesheet)
   ═══════════════════════════════════════════ */
.time-compliance-card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* ── Badges ── */
.tc-badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: 20px;
}

.tc-badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: 20px;
}

/* ── Heatmap Strip (Dashboard) ── */
.tc-heatmap {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.tc-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    padding: 10px 4px;
    border-radius: var(--radius-md);
    transition: transform var(--transition), box-shadow var(--transition);
}

.tc-day:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.tc-day-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.tc-day-circle {
    position: relative;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.tc-day-hours {
    font-size: 0.82rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.tc-day-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.tc-day-remaining {
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

/* SVG ring */
.tc-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.tc-ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 3;
}

.tc-ring-fill {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Status colors */
.tc-day-complete { background: rgba(16, 185, 129, 0.06); }
.tc-day-complete .tc-day-hours { color: #059669; }
.tc-day-complete .tc-ring-fill { stroke: #10b981; }
.tc-day-complete .tc-day-remaining { color: #10b981; }

.tc-day-partial { background: rgba(245, 158, 11, 0.06); }
.tc-day-partial .tc-day-hours { color: #d97706; }
.tc-day-partial .tc-ring-fill { stroke: #f59e0b; }
.tc-day-partial .tc-day-remaining { color: #d97706; }

.tc-day-missing { background: rgba(239, 68, 68, 0.06); }
.tc-day-missing .tc-day-hours { color: #dc2626; }
.tc-day-missing .tc-ring-fill { stroke: #ef4444; }
.tc-day-missing .tc-day-remaining { color: #ef4444; }

.tc-day-today { background: rgba(0, 149, 218, 0.08); }
.tc-day-today .tc-day-hours { color: var(--brand-primary); }
.tc-day-today .tc-ring-fill { stroke: var(--brand-primary); }
.tc-day-today .tc-day-label { color: var(--brand-primary); }

.tc-day-ring {
    box-shadow: 0 0 0 2px var(--brand-primary);
}

.tc-day-future { background: var(--surface-muted); }
.tc-day-future .tc-day-hours { color: var(--text-muted); }
.tc-day-future .tc-ring-fill { stroke: #cbd5e1; }

.tc-day-weekend {
    background: transparent;
    opacity: 0.5;
}

.tc-day-weekend .tc-day-circle {
    background: var(--surface-muted);
}

.tc-day-weekend .tc-day-hours { color: var(--text-muted); }

/* ── Gauge wrap ── */
.tc-gauge-wrap {
    padding: 12px 16px;
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
}

/* ── Day Cards (Timesheet — compact) ── */
.tc-day-cards-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tc-compact-day {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--surface-muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.tc-compact-today {
    box-shadow: 0 0 0 1.5px var(--brand-primary);
    background: rgba(0, 149, 218, 0.06);
}

.tc-compact-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tc-compact-name {
    font-weight: 600;
    color: var(--text-primary);
}

.tc-compact-hrs {
    font-weight: 700;
}

.tc-compact-sep {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.tc-compact-req {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.tc-compact-gap {
    font-size: 0.68rem;
    font-weight: 600;
}

.tc-compact-week {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

/* ── Topbar Heatmap ── */
.topbar-heatmap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 16px;
    padding: 4px 12px;
    background: var(--surface-muted);
    border-radius: 20px;
}

.hm-dot-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: default;
}

.hm-letter {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1;
}

.hm-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: transform var(--transition);
}

.hm-dot-wrap:hover .hm-dot {
    transform: scale(1.3);
}

.hm-complete  { background: #10b981; }
.hm-partial   { background: #f59e0b; }
.hm-missing   { background: #ef4444; }
.hm-today     { background: var(--brand-primary); box-shadow: 0 0 0 2px rgba(0, 149, 218, 0.3); }
.hm-future    { background: #e2e8f0; }

.hm-remaining {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-left: 4px;
    white-space: nowrap;
}

.hm-remaining-done {
    color: #10b981;
}

.hm-remaining-done {
    color: #10b981;
}

@media (max-width: 767.98px) {
    .tc-heatmap {
        gap: 4px;
    }

    .tc-day-circle {
        width: 40px;
        height: 40px;
    }

    .tc-day-hours {
        font-size: 0.7rem;
    }

    .tc-day-cards-compact {
        gap: 6px;
    }

    .tc-day-remaining {
        display: none;
    }
}
