/* Sahara Customer Portal - Modern Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0b192c;
    --primary-light: #1e3e62;
    --primary-dark: #060e18;
    --accent: #ff6500;
    --accent-hover: #e05800;
    --accent-subtle: rgba(255, 101, 0, 0.12);
    --cyan: #00b4d8;
    --cyan-subtle: rgba(0, 180, 216, 0.12);
    --success: #10b981;
    --success-subtle: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-subtle: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-subtle: rgba(239, 68, 68, 0.12);
    --info: #3b82f6;
    --info-subtle: rgba(59, 130, 246, 0.12);

    --bg-page: #f4f6fa;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --border-color: #e5e9f2;
    --border-light: #edf2f7;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(11, 25, 44, 0.08);
    --shadow-lg: 0 10px 25px -5px rgba(11, 25, 44, 0.12);
    --shadow-glow: 0 0 20px rgba(255, 101, 0, 0.2);

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 270px;
    --header-height: 72px;

    /* Dynamic Theme Defaults (Sahara Sunset Orange) */
    --accent-glow: rgba(255, 101, 0, 0.35);
    --theme-gradient: linear-gradient(135deg, #ff8c38 0%, #ff5500 100%);
    --hero-bg: radial-gradient(circle at 15% 20%, #173255 0%, #08111d 75%);
    --hero-glow-1: rgba(255, 101, 0, 0.22);
    --hero-glow-2: rgba(0, 180, 216, 0.18);
}

/* Multi-Theme Color Palettes */
[data-theme="orange"] {
    --primary: #0b192c;
    --primary-light: #1e3e62;
    --primary-dark: #060e18;
    --accent: #ff6500;
    --accent-hover: #e05800;
    --accent-subtle: rgba(255, 101, 0, 0.12);
    --accent-glow: rgba(255, 101, 0, 0.35);
    --theme-gradient: linear-gradient(135deg, #ff8c38 0%, #ff5500 100%);
    --hero-bg: radial-gradient(circle at 15% 20%, #173255 0%, #08111d 75%);
    --hero-glow-1: rgba(255, 101, 0, 0.22);
    --hero-glow-2: rgba(0, 180, 216, 0.18);
}

[data-theme="ocean"] {
    --primary: #071933;
    --primary-light: #13396b;
    --primary-dark: #030e1d;
    --accent: #0284c7;
    --accent-hover: #0369a1;
    --accent-subtle: rgba(2, 132, 199, 0.14);
    --accent-glow: rgba(2, 132, 199, 0.35);
    --theme-gradient: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    --hero-bg: radial-gradient(circle at 15% 20%, #13396b 0%, #040e1d 75%);
    --hero-glow-1: rgba(2, 132, 199, 0.28);
    --hero-glow-2: rgba(56, 189, 248, 0.2);
}

[data-theme="emerald"] {
    --primary: #06231c;
    --primary-light: #0d483a;
    --primary-dark: #031410;
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-subtle: rgba(16, 185, 129, 0.14);
    --accent-glow: rgba(16, 185, 129, 0.35);
    --theme-gradient: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --hero-bg: radial-gradient(circle at 15% 20%, #0d483a 0%, #031410 75%);
    --hero-glow-1: rgba(16, 185, 129, 0.28);
    --hero-glow-2: rgba(52, 211, 153, 0.2);
}

[data-theme="violet"] {
    --primary: #180f2b;
    --primary-light: #2e1c52;
    --primary-dark: #0c0716;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --accent-subtle: rgba(139, 92, 246, 0.14);
    --accent-glow: rgba(139, 92, 246, 0.35);
    --theme-gradient: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
    --hero-bg: radial-gradient(circle at 15% 20%, #2e1c52 0%, #0c0716 75%);
    --hero-glow-1: rgba(139, 92, 246, 0.28);
    --hero-glow-2: rgba(217, 70, 239, 0.2);
}

[data-theme="crimson"] {
    --primary: #230c12;
    --primary-light: #481723;
    --primary-dark: #120508;
    --accent: #f43f5e;
    --accent-hover: #e11d48;
    --accent-subtle: rgba(244, 63, 94, 0.14);
    --accent-glow: rgba(244, 63, 94, 0.35);
    --theme-gradient: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
    --hero-bg: radial-gradient(circle at 15% 20%, #481723 0%, #120508 75%);
    --hero-glow-1: rgba(244, 63, 94, 0.28);
    --hero-glow-2: rgba(251, 113, 133, 0.2);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 700;
    line-height: 1.25;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0b192c 0%, #060e18 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-logo .brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #ff6500 0%, #ff8c38 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(255, 101, 0, 0.35);
}

.brand-badge {
    background: rgba(255, 101, 0, 0.2);
    color: #ff8c38;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.customer-info-card {
    margin: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
}

.customer-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3e62 0%, #00b4d8 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.customer-meta {
    overflow: hidden;
}

.customer-meta .cust-name {
    font-weight: 600;
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
}

.customer-meta .cust-code {
    font-size: 11.5px;
    color: #ff8c38;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    padding: 12px 12px 4px;
    font-weight: 700;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    color: #94a3b8;
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    transition: var(--transition);
}

.nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(255, 101, 0, 0.2) 0%, rgba(255, 101, 0, 0.05) 100%);
    border-left: 3px solid #ff6500;
    font-weight: 600;
}

.nav-item.active i {
    color: #ff6500;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 13.5px;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #ef4444;
    color: #ffffff;
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
}

/* Top Navbar */
.top-navbar {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 20px;
    cursor: pointer;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.quick-tracker-form {
    position: relative;
    width: 320px;
}

.quick-tracker-form input {
    width: 100%;
    height: 42px;
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0 44px 0 18px;
    font-size: 13.5px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.quick-tracker-form input:focus {
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 101, 0, 0.15);
}

.quick-tracker-form button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quick-tracker-form button:hover {
    background: var(--accent);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-header-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 13.5px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 101, 0, 0.25);
    transition: var(--transition);
}

.btn-header-action:hover {
    background: var(--accent-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 101, 0, 0.35);
}

/* Page Content */
.content-body {
    flex: 1;
    padding: 28px 32px;
}

/* Flash Alerts */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    font-weight: 500;
    animation: fadeInDown 0.3s ease;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Metric Cards Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-accent, var(--primary));
}

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

.metric-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.metric-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--icon-bg, var(--primary-light));
    color: var(--icon-color, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.metric-value-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}

.metric-count {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.metric-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
}

.metric-subtext {
    font-size: 12px;
    color: var(--text-muted);
}

/* Surface Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 28px;
    overflow: hidden;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 24px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-subtle);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
    background: var(--warning-subtle);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-info {
    background: var(--info-subtle);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-primary {
    background: rgba(11, 25, 44, 0.08);
    color: var(--primary);
    border: 1px solid rgba(11, 25, 44, 0.15);
}

.badge-danger {
    background: var(--danger-subtle);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Modern Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
}

.table th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

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

.table tbody tr:hover {
    background: #f8fafc;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-light);
    color: #ffffff;
}

.btn-accent {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 101, 0, 0.25);
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #ffffff;
}

.btn-outline {
    background: #ffffff;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-danger-outline {
    background: transparent;
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.btn-danger-outline:hover {
    background: #ef4444;
    color: #ffffff;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-control, .form-select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

textarea.form-control {
    height: auto;
    padding: 12px 14px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 101, 0, 0.15);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

/* Pick Booking Form 4-Column Grid System */
.booking-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 22px;
}

.booking-grid .col-span-2 {
    grid-column: span 2;
}

@media (max-width: 1080px) {
    .booking-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .booking-grid .col-span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .booking-grid {
        grid-template-columns: 1fr;
    }
    .booking-grid .col-span-2 {
        grid-column: span 1;
    }
}

/* Status Progress Bar */
.status-progress-card {
    background: linear-gradient(135deg, #0b192c 0%, #1e3e62 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
}

.status-progress-title {
    color: #ffffff;
    font-size: 17px;
    margin-bottom: 18px;
}

.multi-progress-bar {
    height: 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    overflow: hidden;
    margin-bottom: 16px;
}

.multi-progress-bar .bar-segment {
    height: 100%;
    transition: width 0.6s ease;
}

.status-legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-label {
    font-size: 12px;
    color: #94a3b8;
}

.legend-value {
    font-weight: 700;
    font-size: 14px;
    color: #ffffff;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.period-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    padding: 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}

.period-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.period-pill:hover {
    color: var(--primary);
}

.period-pill.active {
    background: var(--primary);
    color: #ffffff;
}

/* Timeline */
.timeline-container {
    position: relative;
    padding: 20px 0;
}

.timeline-step {
    position: relative;
    padding-left: 60px;
    margin-bottom: 30px;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 36px;
    bottom: -30px;
    width: 2px;
    background: var(--border-color);
}

.timeline-step:last-child::before {
    display: none;
}

.timeline-icon-box {
    position: absolute;
    left: 0;
    top: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
    transition: var(--transition);
}

.timeline-step.completed .timeline-icon-box {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.timeline-step.current .timeline-icon-box {
    background: #ff6500;
    border-color: #ff6500;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(255, 101, 0, 0.5);
    animation: pulseGlow 1.8s infinite;
}

.timeline-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.timeline-meta {
    font-size: 12.5px;
    color: var(--text-secondary);
    display: flex;
    gap: 16px;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 25, 44, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.modal-content {
    background: #ffffff;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

/* Printable Invoice Styles */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .sidebar, .top-navbar, .no-print, .btn, .alert {
        display: none !important;
    }
    .main-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .content-body {
        padding: 0 !important;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 101, 0, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 101, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 101, 0, 0);
    }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
    .mobile-menu-btn {
        display: block;
    }
    .quick-tracker-form {
        display: none;
    }
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .content-body {
        padding: 16px;
    }
    .top-navbar {
        padding: 0 16px;
    }
}

/* Global Theme Selector Component */
.theme-selector-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 100px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.theme-selector-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 2px;
}

.theme-selector-label i {
    color: var(--accent);
    font-size: 0.76rem;
    transition: color 0.3s ease;
}

.theme-swatches {
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-swatch {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
    padding: 0;
}

.theme-swatch:hover {
    transform: scale(1.25);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.theme-swatch.active {
    transform: scale(1.22);
    box-shadow: 0 0 0 2.5px var(--accent), 0 2px 6px rgba(0, 0, 0, 0.25);
}

.theme-swatch.active::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0.85;
}

.swatch-orange { background: #ff6500; }
.swatch-ocean { background: #0284c7; }
.swatch-emerald { background: #10b981; }
.swatch-violet { background: #8b5cf6; }
.swatch-crimson { background: #f43f5e; }

