        :root {
            /* Light Theme Defaults */
            --bg-body: #F4F5F9;
            --bg-card: #FFFFFF;
            --bg-sidebar: #FFFFFF;
            --text-primary: #111827;
            --text-secondary: #6B7280;
            --border-color: #E5E7EB;
            --primary-accent: #5B5CEB;
            --primary-light: #EEF2FF;
            --success: #10B981;
            --success-light: #D1FAE5;
            --warning: #F59E0B;
            --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
            --sidebar-width: 260px;
        }

        body.dark-mode {
            --bg-body: #1F2029;
            --bg-card: #252836;
            --bg-sidebar: #252836;
            --text-primary: #FFFFFF;
            --text-secondary: #9CA3AF;
            --border-color: #374151;
            --primary-accent: #6366F1;
            --primary-light: rgba(99, 102, 241, 0.1);
            --success: #34D399;
            --success-light: rgba(52, 211, 153, 0.1);
            --warning: #FBBF24;
            --card-shadow: none;
        }

        * {
            box-sizing: border-box;
            outline: none;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-body);
            color: var(--text-primary);
            margin: 0;
            padding: 0;
            height: 100vh;
            display: flex;
            overflow: hidden;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        button:active {
            transform: scale(0.98);
        }

        .date-btn {
            background: white;
            border: 2px solid var(--border-color);
            border-radius: 16px;
            padding: 20px 24px;
            cursor: pointer;
            transition: all 0.2s;
            min-width: 140px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .date-btn:hover {
            border-color: var(--primary-accent);
            background: var(--bg-body);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }

        .date-btn:active {
            transform: scale(0.98);
        }

        .db-label {
            font-size: 14px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .db-date {
            font-size: 18px;
            color: var(--text-primary);
            font-weight: 700;
        }

        /* --- UTILITIES --- */
        .hidden {
            display: none !important;
        }

        .flex {
            display: flex;
        }

        .flex-col {
            flex-direction: column;
        }

        .items-center {
            align-items: center;
        }

        .justify-between {
            justify-content: space-between;
        }

        .gap-2 {
            gap: 8px;
        }

        .gap-4 {
            gap: 16px;
        }

        button {
            font-family: inherit;
            cursor: pointer;
        }

        /* --- ICONS (SVG) --- */
        .icon {
            width: 20px;
            height: 20px;
            stroke-width: 2;
            stroke: currentColor;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        /* --- LAYOUT --- */

        /* Sidebar */
        .sidebar {
            width: var(--sidebar-width);
            background: var(--bg-sidebar);
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            padding: 24px;
            transition: background 0.3s;
            z-index: 20;
        }

        .brand {
            font-size: 20px;
            font-weight: 700;
            color: var(--primary-accent);
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 40px;
        }

        .nav-menu {
            display: flex;
            flex-direction: column;
            gap: 8px;
            flex: 1;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            border-radius: 12px;
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s;
        }

        .nav-item:hover,
        .nav-item.active {
            background: var(--primary-light);
            color: var(--primary-accent);
        }

        .support-card {
            background: var(--primary-light);
            padding: 20px;
            border-radius: 16px;
            text-align: center;
            margin-top: auto;
        }

        .support-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--primary-accent);
            margin-bottom: 4px;
        }

        .support-text {
            font-size: 12px;
            color: var(--text-secondary);
            margin-bottom: 12px;
        }

        .btn-support {
            background: var(--primary-accent);
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
        }

        .btn-support:hover {
            opacity: 0.9;
        }

        /* Main Content */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            position: relative;
        }

        /* Top Header */
        .top-header {
            height: 70px;
            border-bottom: 1px solid var(--border-color);
            background: var(--bg-card);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 32px;
            transition: background 0.3s;
        }

        /* Hamburger Menu (Mobile Only) */
        .hamburger-btn {
            display: none;
            background: none;
            border: none;
            color: var(--text-primary);
            cursor: pointer;
            padding: 8px;
            margin-right: 12px;
        }

        .sidebar-overlay {
            display: none;
            /* Hide on desktop */
        }

        .breadcrumbs {
            font-size: 14px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .breadcrumbs span {
            color: var(--text-primary);
            font-weight: 600;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .date-picker {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background: var(--bg-body);
            border-radius: 8px;
            font-size: 13px;
            color: var(--text-primary);
            font-weight: 500;
            position: relative;
            transition: all 0.2s;
        }

        .date-picker:hover {
            background: var(--primary-light);
            color: var(--primary-accent);
        }

        .date-nav-btn {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            width: 32px;
            height: 32px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            transition: all 0.2s;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .date-nav-btn:hover {
            background: var(--primary-light);
            border-color: var(--primary-accent);
            color: var(--primary-accent);
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .date-nav-btn:active {
            transform: scale(0.95);
        }

        /* Date Range Dropdown Styles */
        .date-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            width: 280px;
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
            z-index: 1000;
            padding: 16px;
        }

        .date-dropdown.hidden {
            display: none;
        }

        .date-dropdown-header {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid var(--border-color);
        }

        .date-quick-buttons {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
        }

        .date-quick-btn {
            flex: 1;
            padding: 10px 8px;
            border: 1px solid var(--border-color);
            background: var(--bg-body);
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.2s;
        }

        .date-quick-btn:hover {
            background: var(--primary-light);
            border-color: var(--primary-accent);
            color: var(--primary-accent);
        }

        .date-quick-btn.active {
            background: var(--primary-accent);
            border-color: var(--primary-accent);
            color: white;
        }

        .date-range-divider {
            font-size: 11px;
            color: var(--text-secondary);
            text-align: center;
            margin: 12px 0;
            position: relative;
        }

        .date-range-divider::before,
        .date-range-divider::after {
            content: '';
            position: absolute;
            top: 50%;
            width: 30%;
            height: 1px;
            background: var(--border-color);
        }

        .date-range-divider::before {
            left: 0;
        }

        .date-range-divider::after {
            right: 0;
        }

        .date-range-inputs {
            display: flex;
            gap: 12px;
            margin-bottom: 12px;
        }

        .date-input-group {
            flex: 1;
        }

        .date-input-group label {
            display: block;
            font-size: 11px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 4px;
        }

        .date-input-group input[type="date"] {
            width: 100%;
            padding: 8px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-size: 12px;
            background: var(--bg-body);
            color: var(--text-primary);
        }

        .date-input-group input[type="date"]:focus {
            outline: none;
            border-color: var(--primary-accent);
        }

        .date-apply-btn {
            width: 100%;
            padding: 10px;
            background: linear-gradient(135deg, var(--primary-accent) 0%, #6366F1 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .date-apply-btn:hover {
            opacity: 0.9;
            transform: translateY(-1px);
        }

        .date-apply-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        /* Calendar Grid Styles */
        .calendar-container {
            margin-bottom: 12px;
        }

        .calendar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            margin-bottom: 8px;
        }

        .calendar-header span {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .calendar-nav-btn {
            background: var(--bg-body);
            border: 1px solid var(--border-color);
            color: var(--text-primary);
            width: 28px;
            height: 28px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .calendar-nav-btn:hover {
            background: var(--primary-light);
            border-color: var(--primary-accent);
            color: var(--primary-accent);
        }

        .calendar-weekdays {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            text-align: center;
            margin-bottom: 4px;
        }

        .calendar-weekdays span {
            font-size: 10px;
            font-weight: 600;
            color: var(--text-secondary);
            padding: 4px 0;
        }

        .calendar-days {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 2px;
        }

        .calendar-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s;
            color: var(--text-primary);
            background: transparent;
            border: 2px solid transparent;
        }

        .calendar-day:hover {
            background: var(--primary-light);
            border-color: var(--primary-accent);
        }

        .calendar-day.other-month {
            color: var(--text-secondary);
            opacity: 0.5;
        }

        .calendar-day.today {
            background: #EF4444;
            color: white;
            font-weight: 700;
        }

        .calendar-day.today:hover {
            background: #DC2626;
            border-color: #DC2626;
        }

        .calendar-day.selected {
            background: var(--primary-accent);
            color: white;
            font-weight: 600;
            border-color: var(--primary-accent);
        }

        .calendar-day.range-start {
            border-top-left-radius: 50%;
            border-bottom-left-radius: 50%;
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
        }

        .calendar-day.range-end {
            border-top-right-radius: 50%;
            border-bottom-right-radius: 50%;
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
        }

        .calendar-day.in-range {
            background: var(--primary-light);
            color: var(--primary-accent);
            border-radius: 0;
        }

        /* Updated Quick Button Styles */
        .date-quick-btn {
            flex: 1;
            padding: 12px 8px;
            border: 2px solid var(--border-color);
            background: var(--bg-body);
            border-radius: 10px;
            font-size: 11px;
            font-weight: 600;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .date-quick-btn .btn-icon {
            font-size: 18px;
        }

        .date-quick-btn:hover {
            background: var(--primary-light);
            border-color: var(--primary-accent);
            color: var(--primary-accent);
        }

        .date-quick-btn.active {
            background: var(--primary-light);
            border-color: var(--primary-accent);
            color: var(--primary-accent);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
        }

        .theme-toggle {
            background: none;
            border: none;
            color: var(--text-secondary);
            padding: 8px;
            border-radius: 50%;
            transition: background 0.2s;
        }

        .theme-toggle:hover {
            background: var(--bg-body);
            color: var(--primary-accent);
        }

        .user-profile {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px 8px 20px;
            background: transparent;
            border: none;
            border-left: 1px solid var(--border-color);
            cursor: pointer;
            text-align: left;
            transition: all 0.2s;
            font-family: inherit;
        }

        .user-profile:hover {
            background: var(--bg-body);
        }

        .user-profile:active {
            opacity: 0.8;
        }

        .avatar {
            width: 36px;
            height: 36px;
            background: var(--primary-accent);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: 14px;
        }

        .user-info {
            display: flex;
            flex-direction: column;
        }

        .user-name {
            font-size: 13px;
            font-weight: 600;
        }

        .user-role {
            font-size: 11px;
            color: var(--text-secondary);
        }

        /* Dashboard Area */
        .dashboard-container {
            flex: 1;
            overflow-y: auto;
            padding: 30px;
        }

        .fade-enter {
            animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }


        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            /* 4 Columns */
            gap: 24px;
            margin-bottom: 30px;
        }

        /* Full Width for Tables/Tree */
        .grid-full {
            grid-column: span 4;
        }

        .grid-half {
            grid-column: span 2;
        }

        /* Metric Card */
        .metric-card {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 24px;
            box-shadow: var(--card-shadow);
            display: flex;
            flex-direction: column;
            gap: 12px;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .metric-card:hover {
            transform: translateY(-2px);
        }

        .metric-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }

        .metric-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            background: var(--primary-light);
            color: var(--primary-accent);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .metric-title {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 4px;
        }

        .metric-value {
            font-size: 26px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .metric-badge {
            font-size: 11px;
            font-weight: 600;
            padding: 4px 8px;
            border-radius: 20px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .badge-up {
            background: var(--success-light);
            color: var(--success);
        }

        /* Chart Card */
        .chart-card {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 24px;
            box-shadow: var(--card-shadow);
            display: flex;
            flex-direction: column;
            min-height: 320px;
        }

        .chart-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .chart-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
        }

        /* CSS Bar Chart */
        .bar-chart-container {
            flex: 1;
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 12px;
            padding-bottom: 20px;
            position: relative;
        }

        .bar-group {
            flex: 1;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            align-items: center;
            gap: 8px;
        }

        .bar {
            width: 100%;
            max-width: 40px;
            background: linear-gradient(180deg, var(--primary-accent) 0%, rgba(91, 92, 235, 0.6) 100%);
            border-radius: 4px 4px 0 0;
            transition: height 0.6s ease;
            min-height: 4px;
        }

        .bar-label {
            font-size: 11px;
            color: var(--text-secondary);
            text-align: center;
        }

        /* Table Card */
        .table-card {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 24px;
            box-shadow: var(--card-shadow);
            overflow: hidden;
        }

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

        th {
            text-align: left;
            padding: 16px;
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 600;
            text-transform: uppercase;
            border-bottom: 1px solid var(--border-color);
        }

        td {
            padding: 16px;
            font-size: 14px;
            color: var(--text-primary);
            border-bottom: 1px solid var(--border-color);
        }

        tr:last-child td {
            border-bottom: none;
        }

        .status-pill {
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
        }

        .status-active {
            background: var(--success-light);
            color: var(--success);
        }

        .status-pending {
            background: var(--primary-light);
            color: var(--primary-accent);
        }

        /* Login Overlay */
        #login-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg-body);
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: opacity 0.5s;
        }

        #daily-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: white;
            z-index: 200;
            /* Above login */
            display: flex;
            align-items: center;
            justify-content: center;
            transition: opacity 0.5s;
            overflow-y: auto;
            padding: 20px;
        }

        .overlay-time {
            font-size: 80px;
            font-weight: 300;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .overlay-date {
            font-size: 24px;
            font-weight: 600;
            color: var(--primary-accent);
            margin-bottom: 60px;
        }

        .date-buttons-container {
            display: flex;
            gap: 16px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .overlay-hint {
            margin-top: 24px;
            color: var(--text-secondary);
            font-size: 12px;
        }


        .login-box {
            background: var(--bg-card);
            border-radius: 24px;
            padding: 40px;
            width: 100%;
            max-width: 400px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
            text-align: center;
            border: 1px solid var(--border-color);
        }

        .login-title {
            font-size: 24px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .login-subtitle {
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 32px;
        }

        .btn {
            width: 100%;
            padding: 12px;
            border-radius: 12px;
            border: none;
            font-size: 14px;
            font-weight: 600;
            transition: 0.2s;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
        }

        .btn-primary {
            background: var(--primary-accent);
            color: white;
            box-shadow: 0 4px 10px rgba(91, 92, 235, 0.3);
        }

        .btn-primary:hover {
            opacity: 0.9;
            transform: translateY(-1px);
        }

        .btn-outline {
            background: transparent;
            border: 1px solid var(--border-color);
            color: var(--text-primary);
        }

        .btn-outline:hover {
            background: var(--bg-body);
        }

        select {
            width: 100%;
            padding: 12px;
            border-radius: 12px;
            border: 1px solid var(--border-color);
            background: var(--bg-body);
            color: var(--text-primary);
            margin-bottom: 16px;
        }

        /* TOAST NOTIFICATION */
        #toast {
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            background: var(--bg-card);
            padding: 12px 24px;
            border-radius: 50px;
            border: 1px solid var(--border-color);
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
            display: flex;
            align-items: center;
            gap: 12px;
            color: var(--text-primary);
            font-weight: 500;
            opacity: 0;
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            z-index: 200;
        }

        #toast.visible {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }

        #toast svg {
            color: var(--success);
        }

        button:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        /* --- READ ONLY MODE --- */
        .read-only-mode .form-section {
            background: var(--success-light);
            border-color: var(--success);
        }

        .read-only-mode .form-input {
            background: white;
            color: var(--text-primary);
            border-color: var(--success);
            cursor: not-allowed;
        }

        .read-only-mode .modal-footer {
            display: none;
        }

        .read-only-banner {
            background: var(--success);
            color: white;
            padding: 12px;
            text-align: center;
            font-weight: 600;
            border-radius: 8px;
            margin-bottom: 20px;
        }

        /* --- SEARCH BAR --- */
        .search-container {
            position: relative;
            width: 300px;
            margin-right: 20px;
        }

        .search-input {
            width: 100%;
            padding: 10px 16px 10px 40px;
            border-radius: 12px;
            border: 1px solid var(--border-color);
            background: var(--bg-body);
            color: var(--text-primary);
            font-size: 13px;
            transition: all 0.2s;
        }

        .search-input:focus {
            border-color: var(--primary-accent);
            box-shadow: 0 0 0 3px var(--primary-light);
            background: var(--bg-card);
        }

        .search-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
            width: 16px;
            height: 16px;
        }

        .search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            margin-top: 8px;
            background: var(--bg-card);
            border-radius: 12px;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
            border: 1px solid var(--border-color);
            z-index: 50;
            max-height: 300px;
            overflow-y: auto;
            display: none;
        }

        .search-results.visible {
            display: block;
        }

        .search-item {
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-color);
            cursor: pointer;
            font-size: 13px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

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

        .search-item:hover {
            background: var(--bg-body);
        }

        /* --- GLOBAL LOADER --- */
        .global-loader {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(4px);
            z-index: 9999;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 16px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
        }

        .global-loader.visible {
            opacity: 1;
            pointer-events: all;
        }

        .loader-spinner {
            width: 48px;
            height: 48px;
            border: 4px solid var(--bg-card);
            border-top-color: var(--primary-accent);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        .loader-text {
            color: white;
            font-size: 14px;
            font-weight: 500;
        }

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

        /* --- BRANCH DETAILS MODAL --- */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 150;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s;
            transition: opacity 0.3s;
            backdrop-filter: blur(2px);
        }

        /* Report Preview Modal - Highest Priority */
        #reportPreviewModal {
            z-index: 20000 !important;
        }

        .modal-overlay.visible {
            opacity: 1;
            pointer-events: all;
        }

        .modal-container {
            background: var(--bg-body);
            width: 95%;
            max-width: 1200px;
            height: 90vh;
            border-radius: 16px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        }

        .modal-header {
            background: var(--bg-card);
            padding: 20px 32px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-title {
            font-size: 20px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .modal-close {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            transition: 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-close:hover {
            background: var(--bg-body);
            color: var(--text-primary);
        }

        .modal-body {
            flex: 1;
            overflow-y: auto;
            padding: 32px;
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 24px;
        }

        .form-section {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 24px;
        }

        .form-section-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-secondary);
            text-transform: uppercase;
            margin-bottom: 20px;
            letter-spacing: 0.5px;
            text-align: center;
        }

        .form-row {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 16px;
        }

        .form-row:last-child {
            margin-bottom: 0;
        }

        .form-label {
            flex: 1;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .form-input {
            flex: 1;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background: var(--bg-body);
            color: var(--text-primary);
            font-size: 13px;
            transition: border-color 0.2s;
        }

        .form-input:focus {
            border-color: var(--primary-accent);
            box-shadow: 0 0 0 3px var(--primary-light);
        }

        .form-input::placeholder {
            color: #9CA3AF;
        }

        .input-error {
            border-color: #EF4444 !important;
            animation: shake 0.3s cubic-bezier(.36, .07, .19, .97) both;
        }

        @keyframes shake {

            10%,
            90% {
                transform: translate3d(-1px, 0, 0);
            }

            20%,
            80% {
                transform: translate3d(2px, 0, 0);
            }

            30%,
            50%,
            70% {
                transform: translate3d(-4px, 0, 0);
            }

            40%,
            60% {
                transform: translate3d(4px, 0, 0);
            }
        }

        /* Helpers for Grid Layout */
        .left-panel {
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        .right-panel {
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        .grid-2-col {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
        }

        .target-row {
            margin-bottom: 16px;
        }

        .target-header {
            display: flex;
            justify-content: space-between;
            font-size: 11px;
            color: var(--text-secondary);
            margin-bottom: 6px;
            font-weight: 600;
        }

        .modal-footer {
            padding: 20px 32px;
            border-top: 1px solid var(--border-color);
            background: var(--bg-card);
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }

        /* --- MOBILE RESPONSIVENESS --- */
        @media (max-width: 768px) {
            :root {
                --sidebar-width: 260px;
                /* Fixed width for drawer */
            }

            /* Layout */
            .sidebar {
                position: fixed;
                top: 0;
                left: 0;
                bottom: 0;
                transform: translateX(-100%);
                box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
                transition: transform 0.3s ease-in-out;
            }

            .sidebar.open {
                transform: translateX(0);
            }

            /* Overlay for Sidebar */
            .sidebar-overlay {
                display: block;
                /* Show on mobile (controlled by opacity) */
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.5);
                z-index: 15;
                opacity: 0;
                pointer-events: none;
                transition: opacity 0.3s;
                backdrop-filter: blur(2px);
            }

            .sidebar-overlay.visible {
                opacity: 1;
                pointer-events: all;
            }

            .main-content {
                width: 100%;
                margin-left: 0;
            }

            .top-header {
                padding: 0 16px;
            }

            .hamburger-btn {
                display: block;
            }

            /* Hide Breadcrumbs on super small screens or truncate */
            .breadcrumbs {
                font-size: 13px;
            }

            /* Search Bar */
            .search-container {
                width: auto;
                position: static;
                /* Let it break out if needed, or keep compact */
            }

            .search-input {
                width: 36px;
                height: 36px;
                padding: 0;
                border: none;
                background: transparent;
                text-indent: -9999px;
                /* Hide text visually */
                cursor: pointer;
                position: relative;
                z-index: 5;
            }

            .search-input:focus {
                position: absolute;
                top: 70px;
                /* Below header */
                left: 16px;
                right: 16px;
                width: calc(100% - 32px);
                height: 44px;
                background: var(--bg-card);
                border: 1px solid var(--primary-accent);
                text-indent: 0;
                padding: 10px 16px;
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
                z-index: 100;
            }

            .search-icon {
                pointer-events: none;
                /* Let clicks pass to input */
                color: var(--text-primary);
                width: 20px;
                height: 20px;
                z-index: 6;
            }

            /* When focused, move icon or hide it? simpler to just style input as a popup */

            /* Dashboard Grid */
            .dashboard-container {
                padding: 16px;
            }

            .dashboard-grid {
                grid-template-columns: repeat(2, 1fr);
                /* 2 Columns on mobile */
                gap: 8px;
                /* Reduce gap further */
            }

            .grid-full {
                grid-column: span 2;
            }

            .grid-half {
                grid-column: span 1;
            }

            /* Compact Cards for Mobile */
            .metric-card {
                padding: 12px;
                gap: 6px;
            }

            .metric-value {
                font-size: 18px;
            }

            .metric-title {
                font-size: 10px;
            }

            .metric-icon {
                width: 28px;
                height: 28px;
            }

            /* Ensure tables/charts still take full width if needed */
            .table-card,
            .chart-card {
                grid-column: span 2;
                padding: 16px;
                /* Compact padding for these too */
            }

            /* User Profile */
            .user-info {
                display: none;
                /* Hide name/role to save space */
            }

            .user-profile {
                padding-left: 10px;
                gap: 0;
            }

            /* Charts & Tables */
            .chart-card,
            .table-card,
            .metric-card {
                padding: 16px;
            }

            .bar-chart-container {
                overflow-x: auto;
                /* Allow scroll if too squished */
                padding-bottom: 30px;
                /* Space for scrollbar */
            }

            /* Drill Down Grid */
            #drillDownGrid {
                /* 2 columns on mobile instead of auto-fill minmax 200 which might result in 1 */
                grid-template-columns: 1fr 1fr !important;
                gap: 10px !important;
            }

            /* Modals */
            .modal-container {
                width: 100%;
                height: 100%;
                border-radius: 0;
                max-width: none;
            }

            .modal-header {
                padding: 16px;
            }

            .modal-body {
                padding: 16px;
                grid-template-columns: 1fr;
                /* Stack columns */
                display: flex;
                flex-direction: column;
            }

            .left-panel,
            .right-panel {
                gap: 16px;
            }

            .grid-2-col {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .modal-footer {
                padding: 16px;
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 12px;
            }

            .modal-footer button {
                width: 100% !important;
                /* Fill the grid cell */
                font-size: 11px;
                /* Slightly smaller text for fit */
                padding: 10px 4px !important;
                /* Force consistent padding (overrides JS inline styles) */
            }

            /* Font Sizes */
            .metric-value {
                font-size: 22px;
            }

            .login-box {
                width: 90%;
                padding: 24px;
            }
        }

        /* --- CEO DETAIL MODAL --- */
        .detail-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 200;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s;
            backdrop-filter: blur(4px);
        }

        .detail-modal-overlay.visible {
            opacity: 1;
            pointer-events: all;
        }

        .detail-modal-container {
            background: var(--bg-body);
            width: 95%;
            max-width: 1400px;
            height: 90vh;
            border-radius: 20px;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.35);
            transform: scale(0.95) translateY(20px);
            transition: transform 0.3s ease;
        }

        .detail-modal-overlay.visible .detail-modal-container {
            transform: scale(1) translateY(0);
        }

        /* FULL SCREEN OVERRIDE FOR LAST MONTH SUMMARY */
        #lastMonthSummaryModal .detail-modal-container {
            width: 100%;
            height: 100vh;
            max-width: none;
            border-radius: 0;
            margin: 0;
            transform: none;
            box-shadow: none;
        }

        #lastMonthSummaryModal .detail-modal-header {
            padding: 24px 32px;
            border-bottom: 1px solid var(--border-color);
        }

        #lastMonthSummaryModal .detail-modal-body {
            padding: 40px;
        }

        .detail-modal-header {
            background: linear-gradient(135deg, var(--primary-accent) 0%, #4F46E5 100%);
            padding: 20px 32px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: white;
        }

        .detail-modal-title {
            font-size: 20px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .detail-modal-subtitle {
            font-size: 13px;
            opacity: 0.8;
            margin-left: 12px;
        }

        .detail-modal-back {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: background 0.2s;
        }

        .detail-modal-back:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .detail-modal-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }

        .detail-modal-close:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .detail-modal-body {
            flex: 1;
            overflow-y: auto;
            padding: 32px;
            background: var(--bg-body);
        }

        /* Detail Content Styles */
        .detail-summary-row {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 24px;
        }

        .detail-stat-card {
            background: var(--bg-card);
            padding: 20px;
            border-radius: 16px;
            box-shadow: var(--card-shadow);
            text-align: center;
        }

        .detail-stat-value {
            font-size: 32px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .detail-stat-label {
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 4px;
        }

        .detail-branch-list {
            background: var(--bg-card);
            border-radius: 16px;
            box-shadow: var(--card-shadow);
            overflow: hidden;
        }

        .detail-branch-header {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
            padding: 16px 24px;
            background: var(--bg-body);
            font-size: 11px;
            font-weight: 700;
            color: var(--text-secondary);
            text-transform: uppercase;
            border-bottom: 1px solid var(--border-color);
        }

        .detail-branch-row {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
            padding: 16px 24px;
            border-bottom: 1px solid var(--border-color);
            align-items: center;
            transition: background 0.2s;
        }

        .detail-branch-row:hover {
            background: var(--bg-body);
        }

        .detail-branch-row:last-child {
            border-bottom: none;
        }

        .detail-branch-name {
            font-weight: 600;
            color: var(--text-primary);
        }

        .detail-branch-region {
            font-size: 11px;
            color: var(--text-secondary);
        }

        .detail-pct-badge {
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            display: inline-block;
        }

        .detail-filter-bar {
            display: flex;
            gap: 12px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .detail-filter-btn {
            padding: 8px 16px;
            border-radius: 20px;
            border: 1px solid var(--border-color);
            background: var(--bg-card);
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .detail-filter-btn:hover,
        .detail-filter-btn.active {
            background: var(--primary-accent);
            color: white;
            border-color: var(--primary-accent);
        }

        /* Clickable Cards */
        .clickable-metric {
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .clickable-metric:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
        }

        .clickable-section {
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .clickable-section:hover {
            transform: scale(1.02);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
        }

        .clickable-row {
            cursor: pointer;
        }

        .clickable-row:hover {
            background: var(--primary-light) !important;
        }

        /* Mobile Detail Modal */
        @media (max-width: 768px) {
            .detail-modal-container {
                width: 100%;
                height: 100%;
                border-radius: 0;
            }

            .detail-modal-header {
                padding: 16px;
            }

            .detail-modal-body {
                padding: 16px;
            }

            .detail-summary-row {
                grid-template-columns: 1fr 1fr;
            }

            .detail-branch-header,
            .detail-branch-row {
                grid-template-columns: 2fr 1fr 1fr;
                font-size: 12px;
                padding: 12px 16px;
            }

            .detail-branch-header>*:nth-child(n+4),
            .detail-branch-row>*:nth-child(n+4) {
                display: none;
            }
        }

        /* ============================================
           ENHANCED MOBILE RESPONSIVE STYLES
           Mobile-First Approach Additions
           ============================================ */

        /* --- GLOBAL OVERFLOW PREVENTION --- */
        html {
            overflow-x: hidden;
            -webkit-text-size-adjust: 100%;
            -ms-text-size-adjust: 100%;
        }

        html,
        body {
            max-width: 100vw;
            overscroll-behavior-x: none;
        }

        /* Prevent any element from causing horizontal scroll */
        .main-content,
        .dashboard-container,
        .modal-body,
        .detail-modal-body,
        .login-box,
        .form-section {
            max-width: 100%;
            overflow-x: hidden;
        }

        /* Table scroll container for wide tables */
        .table-scroll-container {
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .table-card {
            overflow-x: auto;
        }

        /* --- PERFORMANCE OPTIMIZATIONS --- */
        .sidebar,
        .modal-container,
        .detail-modal-container {
            will-change: transform;
        }

        /* Reduce motion for users who prefer it */
        @media (prefers-reduced-motion: reduce) {

            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }

        /* --- iOS & MOBILE-SPECIFIC FIXES --- */
        @supports (-webkit-touch-callout: none) {

            /* iOS-specific styles */
            body {
                -webkit-text-size-adjust: 100%;
            }

            /* Prevent iOS zoom on input focus */
            input,
            select,
            textarea {
                font-size: 16px !important;
            }
        }

        /* Smooth scrolling for touch devices */
        .dashboard-container,
        .modal-body,
        .detail-modal-body,
        .search-results {
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;
        }

        /* --- EXTRA SMALL SCREENS (≤ 480px) --- */
        @media (max-width: 480px) {
            :root {
                --sidebar-width: 85vw;
            }

            /* Base body adjustments */
            body {
                font-size: 14px;
            }

            /* Header */
            .top-header {
                height: 60px;
                padding: 0 12px;
                gap: 8px;
            }

            .hamburger-btn {
                display: flex !important;
                align-items: center;
                justify-content: center;
                width: 40px;
                height: 40px;
                min-width: 40px;
                padding: 8px;
                margin-right: 8px;
            }

            .breadcrumbs {
                font-size: 12px;
                flex: 1;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                max-width: 120px;
            }

            .header-actions {
                gap: 8px;
            }

            /* Hide search on very small screens */
            .search-container {
                display: none;
            }

            /* Date picker compact mode */
            .date-picker-wrapper {
                min-width: 0;
            }

            .date-picker {
                padding: 8px 10px;
                font-size: 12px;
                border-radius: 8px;
            }

            .date-picker .icon {
                width: 14px;
                height: 14px;
            }

            #headerDate {
                max-width: 80px;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            /* Theme toggle compact */
            .theme-toggle {
                width: 36px;
                height: 36px;
                padding: 6px;
            }

            /* User profile - icon only */
            .user-profile {
                padding-left: 8px;
                border-left: none;
            }

            .avatar {
                width: 32px;
                height: 32px;
                font-size: 12px;
            }

            .user-info {
                display: none !important;
            }

            /* Dashboard container */
            .dashboard-container {
                padding: 12px;
            }

            .dashboard-grid {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            /* Metric cards */
            .metric-card {
                padding: 16px;
                gap: 8px;
                border-radius: 12px;
            }

            .metric-title {
                font-size: 12px;
            }

            .metric-value {
                font-size: 20px;
            }

            .metric-badge {
                font-size: 10px;
                padding: 3px 6px;
            }

            .metric-icon {
                width: 36px;
                height: 36px;
                border-radius: 10px;
            }

            /* Chart cards */
            .chart-card {
                padding: 16px;
                min-height: 250px;
                border-radius: 12px;
            }

            .chart-title {
                font-size: 14px;
            }

            /* Table cards */
            .table-card {
                padding: 12px;
                border-radius: 12px;
            }

            th {
                padding: 10px 8px;
                font-size: 10px;
            }

            td {
                padding: 10px 8px;
                font-size: 12px;
            }

            /* Date dropdown full width */
            .date-dropdown {
                position: fixed;
                top: 60px;
                left: 8px;
                right: 8px;
                width: auto;
                max-height: calc(100vh - 80px);
                overflow-y: auto;
                border-radius: 16px;
            }

            .date-quick-buttons {
                flex-wrap: wrap;
            }

            .date-quick-btn {
                flex: 1 1 30%;
                padding: 10px 6px;
                font-size: 10px;
            }

            .date-quick-btn .btn-icon {
                font-size: 16px;
            }

            .calendar-day {
                font-size: 11px;
            }

            /* Login overlay */
            .login-box {
                width: 100%;
                max-width: none;
                margin: 0 12px;
                padding: 24px 20px;
                border-radius: 20px;
            }

            .login-title {
                font-size: 20px;
            }

            .login-subtitle {
                font-size: 13px;
            }

            .btn {
                padding: 14px;
                font-size: 14px;
                min-height: 48px;
            }

            select {
                padding: 14px 12px;
                font-size: 16px;
                min-height: 48px;
            }

            /* Daily overlay */
            .overlay-time,
            #overlay-time {
                font-size: 48px !important;
            }

            .overlay-date,
            #overlay-date {
                font-size: 18px !important;
                margin-bottom: 40px !important;
            }

            .date-btn {
                min-width: 100%;
                max-width: 280px;
                padding: 16px 12px;
                border-radius: 12px;
            }

            .db-label {
                font-size: 12px;
            }

            .db-date {
                font-size: 14px;
            }

            .date-buttons-container {
                flex-direction: column !important;
                gap: 12px !important;
                align-items: center;
                width: 100%;
                max-width: 300px;
                margin: 0 auto;
            }

            .overlay-hint {
                font-size: 11px;
                margin-top: 20px;
            }

            /* Modals - full screen on mobile */
            .modal-container {
                width: 100%;
                height: 100%;
                max-height: 100%;
                border-radius: 0;
            }

            .modal-header {
                padding: 14px 16px;
                position: sticky;
                top: 0;
                z-index: 10;
            }

            .modal-title {
                font-size: 16px;
            }

            .modal-body {
                padding: 16px;
                flex: 1;
                overflow-y: auto;
            }

            .form-section {
                padding: 16px;
                margin-bottom: 16px;
                border-radius: 10px;
            }

            .form-section-title {
                font-size: 12px;
                margin-bottom: 14px;
            }

            .form-row {
                flex-direction: column;
                gap: 6px;
                margin-bottom: 12px;
            }

            .form-label {
                font-size: 12px;
                flex: none;
            }

            .form-input {
                padding: 12px;
                font-size: 16px;
                min-height: 44px;
                border-radius: 8px;
            }

            .grid-2-col {
                grid-template-columns: 1fr;
                gap: 12px;
            }

            .target-row {
                margin-bottom: 12px;
            }

            .target-header {
                font-size: 10px;
            }

            .modal-footer {
                padding: 14px 16px;
                position: sticky;
                bottom: 0;
                gap: 10px;
                flex-wrap: wrap;
            }

            .modal-footer button {
                flex: 1 1 100%;
                min-height: 44px;
                font-size: 13px;
            }

            /* Detail modal */
            .detail-modal-container {
                width: 100%;
                height: 100%;
                border-radius: 0;
            }

            .detail-modal-header {
                padding: 12px 16px;
                flex-wrap: wrap;
                gap: 8px;
            }

            .detail-modal-back {
                padding: 8px 12px;
                font-size: 12px;
            }

            .detail-modal-title {
                font-size: 16px;
                order: 2;
                width: 100%;
                margin-top: 8px;
            }

            .detail-modal-subtitle {
                font-size: 11px;
            }

            .detail-modal-close {
                width: 32px;
                height: 32px;
            }

            .detail-modal-body {
                padding: 12px;
            }

            .detail-summary-row {
                grid-template-columns: 1fr 1fr;
                gap: 10px;
            }

            .detail-stat-card {
                padding: 14px;
                border-radius: 12px;
            }

            .detail-stat-value {
                font-size: 22px;
            }

            .detail-stat-label {
                font-size: 10px;
            }

            .detail-filter-bar {
                gap: 8px;
                margin-bottom: 14px;
            }

            .detail-filter-btn {
                padding: 8px 12px;
                font-size: 11px;
            }

            .detail-branch-list {
                border-radius: 12px;
            }

            .detail-branch-header,
            .detail-branch-row {
                grid-template-columns: 1fr 1fr;
                padding: 10px 12px;
                font-size: 11px;
            }

            .detail-branch-header>*:nth-child(n+3),
            .detail-branch-row>*:nth-child(n+3) {
                display: none;
            }

            .detail-pct-badge {
                padding: 3px 8px;
                font-size: 10px;
            }

            /* Drill down grid */
            #drillDownGrid {
                grid-template-columns: 1fr !important;
                gap: 10px !important;
            }

            /* Support card in sidebar */
            .support-card {
                padding: 16px;
                border-radius: 12px;
            }

            .support-title {
                font-size: 13px;
            }

            .support-text {
                font-size: 11px;
            }

            .btn-support {
                padding: 10px 16px;
                font-size: 12px;
            }

            /* Toast */
            #toast {
                left: 12px;
                right: 12px;
                transform: translateY(100px);
                padding: 12px 16px;
                font-size: 13px;
                border-radius: 12px;
            }

            #toast.visible {
                transform: translateY(0);
            }

            /* Loader */
            .loader-spinner {
                width: 40px;
                height: 40px;
            }

            .loader-text {
                font-size: 13px;
            }
        }

        /* --- SMALL SCREENS (481px - 640px) --- */
        @media (min-width: 481px) and (max-width: 640px) {
            .dashboard-grid {
                grid-template-columns: 1fr 1fr;
                gap: 14px;
            }

            .dashboard-container {
                padding: 16px;
            }

            .grid-full {
                grid-column: span 2;
            }

            .grid-half {
                grid-column: span 2;
            }

            .metric-card {
                padding: 18px;
            }

            #drillDownGrid {
                grid-template-columns: 1fr 1fr !important;
            }

            .date-btn {
                min-width: 120px;
            }

            #overlay-time {
                font-size: 60px !important;
            }
        }

        /* --- MEDIUM SCREENS (641px - 768px) --- */
        @media (min-width: 641px) and (max-width: 768px) {
            .dashboard-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 18px;
            }

            .grid-full {
                grid-column: span 2;
            }

            .modal-body {
                grid-template-columns: 1fr;
            }

            .grid-2-col {
                grid-template-columns: 1fr 1fr;
            }

            .detail-summary-row {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        /* --- ENHANCED TOUCH TARGETS (applies to all sizes) --- */
        @media (hover: none) and (pointer: coarse) {
            /* Touch device detection */

            .nav-item {
                padding: 14px 16px;
                min-height: 48px;
            }

            .btn,
            .btn-primary,
            .btn-outline,
            .btn-support,
            .date-btn,
            .date-quick-btn,
            .calendar-nav-btn,
            .detail-filter-btn,
            .date-apply-btn {
                min-height: 44px;
            }

            .form-input,
            select,
            input[type="date"],
            input[type="text"] {
                min-height: 44px;
                padding: 12px;
            }

            .modal-close,
            .detail-modal-close,
            .theme-toggle,
            .hamburger-btn {
                min-width: 44px;
                min-height: 44px;
            }

            /* Larger tap targets for calendar days */
            .calendar-day {
                min-height: 36px;
                min-width: 36px;
            }

            /* Better spacing for clickable items */
            .search-item {
                padding: 14px 16px;
            }

            .detail-branch-row {
                min-height: 56px;
            }

            /* Remove hover effects that don't work on touch */
            .metric-card:hover {
                transform: none;
            }

            .clickable-metric:hover {
                transform: none;
                box-shadow: var(--card-shadow);
            }

            /* Add active states instead */
            .metric-card:active,
            .clickable-metric:active {
                transform: scale(0.98);
                opacity: 0.9;
            }

            .btn:active,
            .nav-item:active,
            .date-btn:active {
                transform: scale(0.97);
            }
        }

        /* --- LANDSCAPE MOBILE --- */
        @media (max-height: 500px) and (orientation: landscape) {
            .top-header {
                height: 50px;
            }

            .dashboard-container {
                padding: 10px;
            }

            /* Login adjustments for landscape */
            .login-box {
                padding: 20px;
                max-height: 95vh;
                overflow-y: auto;
            }

            /* Daily overlay adjustments */
            #overlay-time {
                font-size: 40px !important;
            }

            #overlay-date {
                font-size: 16px !important;
                margin-bottom: 20px !important;
            }

            .date-btn {
                padding: 12px 16px;
            }
        }

        /* --- SAFE AREA INSETS (Notch devices) --- */
        @supports (padding-top: env(safe-area-inset-top)) {
            .top-header {
                padding-top: max(0px, env(safe-area-inset-top));
            }

            .sidebar {
                padding-top: max(24px, env(safe-area-inset-top));
                padding-bottom: max(24px, env(safe-area-inset-bottom));
            }

            .modal-footer {
                padding-bottom: max(20px, env(safe-area-inset-bottom));
            }

            .modal-container,
            .detail-modal-container {
                padding-bottom: env(safe-area-inset-bottom);
            }

            #toast {
                bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px));
            }
        }

        /* --- PRINT STYLES --- */
        @media print {

            .sidebar,
            .hamburger-btn,
            .theme-toggle,
            .modal-overlay,
            .detail-modal-overlay,
            #login-overlay,
            #daily-overlay,
            #toast,
            .global-loader {
                display: none !important;
            }

            .main-content {
                width: 100% !important;
            }

            .dashboard-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        /* --- TOGGLE SWITCH STYLES --- */

        /* DEFAULT TOGGLE (Improved) */
        .switch {
            position: relative;
            display: inline-block;
            width: 48px;
            height: 24px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #D1D5DB;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        body.dark-mode .slider {
            background-color: #4B5563;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        body.dark-mode .slider:before {
            background-color: #F3F4F6;
        }

        input:checked+.slider {
            background-color: var(--primary-accent);
        }

        input:focus+.slider {
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
        }

        input:checked+.slider:before {
            transform: translateX(24px);
        }

        .slider.round {
            border-radius: 30px;
        }

        .slider.round:before {
            border-radius: 50%;
        }

        /* MINIMAL TOGGLE (Green Theme) */
        .switch.minimal-toggle {
            width: 62px;
            height: 30px;
        }

        .switch.minimal-toggle input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .switch.minimal-toggle .slider {
            background-color: #D1D5DB;
            transition: all 0.3s ease-in-out;
        }

        body.dark-mode .switch.minimal-toggle .slider {
            background-color: #374151;
        }

        .switch.minimal-toggle .slider:before {
            height: 23.8px;
            width: 23.8px;
            left: 3.4px;
            bottom: 3.4px;
            background-color: #9CA3AF;
            transition: all 0.3s ease;
        }

        body.dark-mode .switch.minimal-toggle .slider:before {
            background-color: #6B7280;
        }

        .switch.minimal-toggle input:checked+.slider {
            background-color: #86EFAC;
        }

        body.dark-mode .switch.minimal-toggle input:checked+.slider {
            background-color: #14532d;
        }

        .switch.minimal-toggle input:checked+.slider:before {
            transform: translateX(32.3px);
            background-color: rgba(34, 197, 94, 0.7);
        }

        body.dark-mode .switch.minimal-toggle input:checked+.slider:before {
            background-color: #22C55E;
        }

        /* ORANGE TOGGLE */
        .switch.orange-toggle {
            width: 48px;
            height: 24px;
        }

        .switch.orange-toggle input {
            appearance: none;
            position: relative;
            width: 48px;
            height: 24px;
            border-radius: 24px;
            background-color: #D6D3D1;
            transition: all 0.3s ease;
            cursor: pointer;
            outline: none;
        }

        body.dark-mode .switch.orange-toggle input {
            background-color: #57534E;
        }

        .switch.orange-toggle input:before {
            content: '';
            position: absolute;
            left: calc(1.5em - 1.6em);
            top: calc(1.5em - 1.6em);
            width: 1.6em;
            height: 1.7em;
            border-radius: 50%;
            border: 1px solid #A8A29E;
            background-color: white;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        body.dark-mode .switch.orange-toggle input:before {
            border-color: #78716C;
        }

        .switch.orange-toggle input:checked {
            background-color: #EA580C;
        }

        .switch.orange-toggle input:checked:before {
            transform: translateX(100%);
            border-color: #EA580C;
        }

        .switch.orange-toggle input:hover:before {
            box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.15);
        }

        .switch.orange-toggle input:checked:hover:before {
            box-shadow: 0 0 0 8px rgba(236, 72, 72, 0.15);
        }

        /* View Mode Toggle Container Styles */
        .view-mode-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 6px 12px;
            background: var(--bg-body);
            border-radius: 12px;
            border: 1px solid var(--border-color);
            transition: all 0.2s;
        }

        .view-mode-toggle:hover {
            border-color: var(--primary-accent);
            box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
        }

        .toggle-label {
            font-size: 14px;
            font-weight: 500;
            transition: all 0.2s;
            user-select: none;
        }

        .toggle-label#labelPlan {
            color: var(--primary-accent);
            font-weight: 600;
        }

        .toggle-label#labelReview {
            color: var(--text-secondary);
        }

        /* Update label colors when toggle is checked */
        #viewModeToggle:checked~#labelPlan,
        .view-mode-toggle:has(#viewModeToggle:checked) #labelPlan {
            color: var(--text-secondary);
            font-weight: 500;
        }

        #viewModeToggle:checked~#labelReview,
        .view-mode-toggle:has(#viewModeToggle:checked) #labelReview {
            color: var(--primary-accent);
            font-weight: 600;
        }

        /* --- PLAN MODE STYLES --- */
        body.mode-plan .toggle-label#labelPlan {
            color: var(--primary) !important;
        }

        body.mode-plan .toggle-label#labelReview {
            color: var(--text-secondary) !important;
        }

        /* Hide Achievement Columns in Plan Mode */
        body.mode-plan .col-achievement,
        body.mode-plan .col-percentage {
            display: none !important;
        }

        body.mode-plan .metric-cell .metric-achieved,
        body.mode-plan .metric-cell .metric-percentage {
            display: none !important;
        }

        /* --- COLLECTION GRID (Responsive) --- */
        .collection-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            padding: 20px 0;
        }

        @media (max-width: 768px) {
            .collection-grid {
                grid-template-columns: 1fr;
                /* 1 Column on Mobile */
                gap: 12px;
            }
        }

        /* --- PREMIUM PROFILE MODAL --- */
        .premium-modal-container {
            background: white;
            width: 90%;
            max-width: 380px;
            /* Slightly narrower for mobile card feel */
            border-radius: 24px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
            overflow: hidden;
            position: relative;
            /* Center in overlay */
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes modalPop {
            from {
                transform: translate(-50%, -40%) scale(0.9);
                opacity: 0;
            }

            to {
                transform: translate(-50%, -50%) scale(1);
                opacity: 1;
            }
        }

        .premium-close-btn {
            position: absolute;
            top: 16px;
            right: 16px;
            background: #F3F4F6;
            border: none;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            color: #4B5563;
            z-index: 10;
        }

        .premium-close-btn:hover {
            background: #E5E7EB;
            transform: rotate(90deg);
        }

        /* --- CHANGE PASSWORD MODAL (scoped override) --- */
        #changePasswordModal .modal-container {
            height: auto;
            max-height: 90vh;
        }

        #changePasswordModal .modal-body {
            display: block;
            padding: 24px;
            overflow-y: auto;
        }

        #changePasswordModal .form-row {
            display: block;
            margin-bottom: 14px;
        }

        #changePasswordModal .form-label {
            display: block;
            margin-bottom: 6px;
        }

        #changePasswordModal .form-input {
            width: 100%;
            display: block;
        }

        /* --- ADD USER MODAL (scoped override) --- */
        #addUserModal .modal-container {
            height: auto;
            max-height: 92vh;
        }

        #addUserModal .modal-body {
            display: block;
            padding: 24px;
            overflow-y: auto;
        }

        #addUserModal .form-row {
            display: block;
            margin-bottom: 12px;
        }

        #addUserModal .form-label {
            display: block;
            margin-bottom: 6px;
        }

        #addUserModal .form-input {
            width: 100%;
            display: block;
        }

        .profile-identity {
            padding: 32px 24px 24px;
            display: flex;
            flex-direction: column;
            align-items: center;
            background: linear-gradient(180deg, #F9FAFB 0%, #FFFFFF 100%);
            border-bottom: 1px solid #F3F4F6;
        }

        .premium-avatar-ring {
            padding: 4px;
            background: white;
            border-radius: 50%;
            box-shadow: 0 0 0 1px #E5E7EB, 0 8px 16px rgba(0, 0, 0, 0.05);
            margin-bottom: 16px;
        }

        .premium-avatar-ring .avatar {
            width: 80px;
            height: 80px;
            font-size: 32px;
            background: var(--primary-accent);
        }

        .premium-user-name {
            font-size: 20px;
            font-weight: 700;
            color: var(--text-primary);
            margin: 0 0 8px 0;
        }

        .premium-user-role-badge {
            background: #EEF2FF;
            color: var(--primary-accent);
            padding: 6px 16px;
            border-radius: 20px;
            font-size: 12px;
        }

        .profile-card-content {
            /* Main wrapper */
        }

        .profile-details-container {
            padding: 24px;
        }

        .detail-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 16px;
        }

        .detail-item {
            display: flex;
            align-items: center;
            gap: 16px;
            padding: 12px;
            border-radius: 16px;
            transition: background 0.2s;
        }

        .detail-item:hover {
            background: #F9FAFB;
        }

        .detail-icon-box {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: #F3F4F6;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #6B7280;
            flex-shrink: 0;
        }

        .detail-item:hover .detail-icon-box {
            background: white;
            color: var(--primary-accent);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }

        .detail-text-group {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .detail-text-group label {
            font-size: 11px;
            font-weight: 600;
            color: #9CA3AF;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .detail-text-group span {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-primary);
        }

        /* Copy Success Animation */
        @keyframes btnSuccess {
            0% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.05);
                background-color: var(--success);
                border-color: var(--success);
            }

            100% {
                transform: scale(1);
            }
        }

        .btn-success-anim {
            animation: btnSuccess 0.5s ease-in-out;
        }

        /* --- SUMMARY DASHBOARD STYLES --- */
        #lastMonthSummaryModal .detail-modal-header {
            background: #ffffff;
            color: var(--text-primary);
            border-bottom: 1px solid #e5e7eb;
        }

        #lastMonthSummaryModal .detail-modal-title {
            color: var(--text-primary);
        }

        #lastMonthSummaryModal .detail-modal-close {
            color: var(--text-secondary);
        }

        #lastMonthSummaryModal .detail-modal-close:hover {
            background: #f3f4f6;
            color: var(--text-primary);
        }

        #lastMonthSummaryModal .detail-modal-back {
            color: var(--text-secondary);
            background: #f3f4f6;
            border: 1px solid #e5e7eb;
        }

        #lastMonthSummaryModal .detail-modal-back:hover {
            background: #e5e7eb;
            color: var(--text-primary);
        }

        .summary-dashboard {
            display: flex;
            flex-direction: column;
            gap: 24px;
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-body);
            padding: 20px;
        }

        /* Top Filter Bar */
        .summary-filter-bar {
            display: flex;
            gap: 16px;
            padding: 12px 20px;
            background: white;
            border-radius: 8px;
            border: 1px solid #e5e7eb;
        }

        .s-select {
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            font-size: 13px;
            color: var(--text-primary);
            min-width: 150px;
            background: #f9fafb;
        }

        /* Metrics Row */
        .summary-metrics-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 20px;
        }

        .s-metric-card {
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            display: flex;
            align-items: center;
            gap: 16px;
            border-top: 3px solid transparent;
        }

        .s-metric-card:nth-child(1) {
            border-top-color: #6366F1;
        }

        .s-metric-card:nth-child(2) {
            border-top-color: #F59E0B;
        }

        .s-metric-card:nth-child(3) {
            border-top-color: #10B981;
        }

        .s-metric-card:nth-child(4) {
            border-top-color: #EF4444;
        }

        .s-metric-icon {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: #f3f4f6;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            color: #4b5563;
        }

        .s-metric-content {
            flex: 1;
        }

        .s-metric-value {
            font-size: 20px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .s-metric-label {
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: 2px;
        }

        .s-metric-sub {
            font-size: 11px;
            color: #6B7280;
            margin-top: 4px;
        }

        /* Detail Grid */
        .summary-details-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 24px;
        }

        @media (max-width: 1024px) {
            .summary-details-grid {
                grid-template-columns: 1fr;
            }
        }

        .s-widget {
            background: white;
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            padding: 20px;
            overflow: hidden;
        }

        .s-widget-header {
            font-size: 15px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid #f3f4f6;
        }

        .s-table-container {
            overflow-x: auto;
        }

        .s-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
        }

        .s-table th {
            background: #f9fafb;
            color: var(--text-secondary);
            font-weight: 600;
            text-align: left;
            padding: 10px 12px;
            border-bottom: 1px solid #e5e7eb;
        }

        .s-table td {
            padding: 10px 12px;
            border-bottom: 1px solid #f3f4f6;
            color: var(--text-primary);
            vertical-align: middle;
        }

        .s-table tr:hover td {
            background: #f9fafb;
        }

        .s-bucket-col {
            background: #FEF9C3;
            /* Yellowish bg for first col like image */
            font-weight: 600;
        }

        /* Progress Bars */
        .s-progress-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
        }

        .s-progress-track {
            flex: 1;
            height: 14px;
            background: #e5e7eb;
            border-radius: 2px;
            overflow: hidden;
            position: relative;
        }

        .s-progress-fill {
            height: 100%;
            background: #10B981;
            /* Default teal/green */
        }

        .s-val-label {
            font-size: 11px;
            min-width: 35px;
            text-align: right;
        }

        /* Colors matching image */
        .fill-teal {
            background-color: #0d9488;
        }

        .fill-red {
            background-color: #ef4444;
        }

        .fill-green {
            background-color: #10b981;
        }

        .fill-gray {
            background-color: #9ca3af;
        }

        .badge-red {
            background: #FEE2E2;
            color: #DC2626;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 11px;
        }

        .badge-green {
            background: #D1FAE5;
            color: #059669;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 11px;
        }

        .badge-gray {
            background: #F3F4F6;
            color: #4B5563;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 11px;
        }

        /* --- BUBBLE CHART STYLES --- */
        .scatter-chart-container {
            position: relative;
            height: 250px;
            width: 100%;
            border-left: 1px solid #e5e7eb;
            border-bottom: 1px solid #e5e7eb;
            margin: 10px 0 20px 20px;
            background: repeating-linear-gradient(0deg,
                    transparent,
                    transparent 49px,
                    #f3f4f6 50px);
            background-size: 100% 50px;
            /* Grid lines */
        }

        .scatter-bubble {
            position: absolute;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 10px;
            font-weight: 600;
            opacity: 0.8;
            cursor: pointer;
            transition: transform 0.2s, opacity 0.2s;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .scatter-bubble:hover {
            transform: scale(1.1);
            opacity: 1;
            z-index: 10;
        }

        .scatter-label {
            position: absolute;
            font-size: 10px;
            color: #6B7280;
            pointer-events: none;
            white-space: nowrap;
        }

        .scatter-axis-label-y {
            position: absolute;
            left: -30px;
            top: 50%;
            transform: rotate(-90deg);
            font-size: 10px;
            font-weight: 600;
            color: #6B7280;
        }

        .scatter-axis-label-x {
            position: absolute;
            bottom: -25px;
            right: 0;
            font-size: 10px;
            font-weight: 600;
            color: #6B7280;
        }

        /* Cluster Colors */
        .bubble-pink {
            background-color: rgba(236, 72, 153, 0.7);
            border: 1px solid #ec4899;
        }

        .bubble-orange {
            background-color: rgba(249, 115, 22, 0.7);
            border: 1px solid #f97316;
        }

        .bubble-yellow {
            background-color: rgba(234, 179, 8, 0.7);
            border: 1px solid #eab308;
        }

        .fill-red {
            background-color: #ef4444;
        }

        .fill-green {
            background-color: #10b981;
        }

        .fill-gray {
            background-color: #9ca3af;
        }

        .badge-red {
            background: #FEE2E2;
            color: #DC2626;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 11px;
        }

        .badge-green {
            background: #D1FAE5;
            color: #059669;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 11px;
        }

        .badge-gray {
            background: #F3F4F6;
            color: #4B5563;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 11px;
        }

        /* --- ANIMATIONS & TOOLTIPS --- */
        @keyframes slideUpFade {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .animate-enter {
            animation: slideUpFade 0.5s ease-out forwards;
            opacity: 0;
        }

        .delay-1 {
            animation-delay: 0.1s;
        }

        .delay-2 {
            animation-delay: 0.2s;
        }

        .delay-3 {
            animation-delay: 0.3s;
        }

        /* Custom Tooltip */
        .chart-tooltip {
            position: absolute;
            background: rgba(0, 0, 0, 0.85);
            color: white;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 11px;
            pointer-events: none;
            z-index: 100;
            white-space: nowrap;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            transform: translate(-50%, -100%);
            margin-top: -10px;
            opacity: 0;
            transition: opacity 0.2s;
        }

        .scatter-bubble:hover .chart-tooltip {
            opacity: 1;
        }
