/* ═══════════════════════════════════════════════════════════════
   PropFlow Theme System - Modern SaaS CRM Design
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* ── Colors ─────────────────────────────────────────────────── */
    --primary: #2563EB;
    --primary-50: #EFF6FF;
    --primary-100: #DBEAFE;
    --primary-700: #1D4ED8;
    --accent: #14B8A6;
    --accent-50: #F0FDFA;
    --success: #22C55E;
    --success-50: #F0FDF4;
    --warning: #F59E0B;
    --warning-50: #FFFBEB;
    --danger: #EF4444;
    --danger-50: #FEF2F2;
    --purple: #8B5CF6;
    --purple-50: #F5F3FF;
    --pink: #EC4899;
    /* ── Sidebar ────────────────────────────────────────────────── */
    --sidebar-bg: #F8FAFC;
    --sidebar-text: #64748B;
    --sidebar-hover: #F1F5F9;
    --sidebar-active: #EFF6FF;
    --sidebar-border: #E2E8F0;
    /* ── Surfaces ───────────────────────────────────────────────── */
    --bg: #F1F5F9;
    --surface: #FFFFFF;
    --surface-2: #F8FAFC;
    /* ── Borders ────────────────────────────────────────────────── */
    --border: #E2E8F0;
    --border-2: #CBD5E1;
    /* ── Text ───────────────────────────────────────────────────── */
    --text-1: #0F172A;
    --text-2: #475569;
    --text-3: #94A3B8;
    /* ── Shadows ────────────────────────────────────────────────── */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.07), 0 4px 6px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.06);
    /* ── Border Radius ──────────────────────────────────────────── */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    /* ── Typography ────────────────────────────────────────────── */
    --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    /* ── Chart ────────────────────────────────────────────── */
    --chart-primary-enquiry: #3B82F6;
    --chart-primary-enquiry-light: #60A5FA;
    --chart-primary-booking: #22C55E;
    --chart-primary-booking-light: #4ADE80;
    --chart-bg: #FFFFFF;
    --chart-border: #E5E7EB;
    --chart-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --chart-shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.12);
    --chart-label-color: #1E293B;
    --chart-axis-color: #64748B;
    --chart-grid-color: rgba(226,232,240,.3);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg: #080D16;
    --surface: #111827;
    --surface-2: #162032;
    --border: #1C2B40;
    --border-2: #243548;
    --text-1: #F1F5F9;
    --text-2: #94A3B8;
    --text-3: #475569;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
    /* Dark mode sidebar */
    --sidebar-bg: #0F172A;
    --sidebar-text: #94A3B8;
    --sidebar-hover: #1C2B40;
    --sidebar-active: #1E3A8A;
    --sidebar-border: #1C2B40;
    /* Chart adjustments for dark mode */
    --chart-bg: #1E293B;
    --chart-border: #334155;
    --chart-shadow: 0 2px 8px rgba(0,0,0,.3);
    --chart-shadow-hover: 0 12px 24px rgba(0,0,0,.5);
    --chart-label-color: #E2E8F0;
    --chart-axis-color: #94A3B8;
    --chart-grid-color: rgba(148,163,184,.15);
}

/* ═══════════════════════════════════════════════════════════════
   Global & Reset
   ═══════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.5;
    transition: background 0.2s, color 0.2s;
}

/* ═══════════════════════════════════════════════════════════════
   Layout
   ═══════════════════════════════════════════════════════════════ */

.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 256px;
    min-width: 256px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 10;
    transition: width 0.25s;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.topbar {
    height: 62px;
    min-height: 62px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: var(--shadow-sm);
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

/* ═══════════════════════════════════════════════════════════════
   Sidebar
   ═══════════════════════════════════════════════════════════════ */

.sidebar-logo {
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--sidebar-border);
}

.logo-mark {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ri-quill-pen-ai-line:before {
    content: "\f597";
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #2563EB, #14B8A6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.logo-name {
    color: #0F172A;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

[data-theme="dark"] .logo-name {
    color: #F1F5F9;
}

.logo-sub {
    font-size: 9.5px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.nav-section {
    padding: 12px 10px 4px;
}

.nav-label {
    font-size: 9.5px;
    font-weight: 700;
    color: #94A3B8;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    padding: 0 8px;
    margin-bottom: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--sidebar-text);
    font-size: 13px;
    font-weight: 500;
    position: relative;
    text-decoration: none;
    user-select: none;
}

    .nav-item:hover {
        background: var(--sidebar-hover);
        color: var(--primary);
    }

    .nav-item.active {
        background: var(--sidebar-active);
        color: var(--primary);
        font-weight: 600;
    }

        .nav-item.active::before {
            content: "";
            position: absolute;
            left: 0;
            top: 7px;
            bottom: 7px;
            width: 3px;
            background: var(--primary);
            border-radius: 0 3px 3px 0;
        }

    .nav-item i {
        font-size: 16px;
        width: 20px;
        text-align: center;
        flex-shrink: 0;
    }

.nav-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

    .nav-badge.red {
        background: rgba(239, 68, 68, 0.15);
        color: #FC8181;
    }

    .nav-badge.blue {
        background: rgba(37, 99, 235, 0.2);
        color: #93C5FD;
    }

.sidebar-footer {
    margin-top: auto;
    padding: 10px 10px 12px;
    border-top: 1px solid var(--sidebar-border);
}

.user-tile {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

    .user-tile:hover {
        background: var(--sidebar-hover);
    }

.u-name {
    color: #0F172A;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .u-name {
    color: #F1F5F9;
}

.u-role {
    color: #94A3B8;
    font-size: 11px;
}

/* ═══════════════════════════════════════════════════════════════
   Topbar
   ═══════════════════════════════════════════════════════════════ */

.tb-search {
    flex: 1;
    max-width: 380px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 12px;
    height: 38px;
    transition: all 0.2s;
}

    .tb-search:focus-within {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

    .tb-search i {
        color: var(--text-3);
        font-size: 15px;
        flex-shrink: 0;
    }

    .tb-search input {
        border: none;
        background: none;
        outline: none;
        font-family: var(--font);
        font-size: 13.5px;
        color: var(--text-1);
        width: 100%;
    }

        .tb-search input::placeholder {
            color: var(--text-3);
        }

.tb-kbd {
    font-size: 11px;
    color: var(--text-3);
    padding: 1px 7px;
    border: 1px solid var(--border);
    border-radius: 5px;
    white-space: nowrap;
}

.tb-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-2);
    transition: all 0.15s;
    position: relative;
    font-size: 15px;
}

    .icon-btn:hover {
        background: var(--surface-2);
        color: var(--text-1);
    }

    .icon-btn .dot {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 7px;
        height: 7px;
        background: var(--danger);
        border-radius: 50%;
        border: 2px solid var(--surface);
    }

.tb-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
    margin: 0 6px;
}

/* ═══════════════════════════════════════════════════════════════
   Page Header
   ═══════════════════════════════════════════════════════════════ */

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -0.6px;
}

.page-sub {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 3px;
    font-weight: 400;
}

.page-acts {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 16px;
    height: 37px;
    border-radius: 9px;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

    .btn-primary:hover {
        background: var(--primary-700);
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    }

.btn-secondary {
    background: var(--surface);
    color: var(--text-1);
    border: 1px solid var(--border);
}

    .btn-secondary:hover {
        background: var(--surface-2);
        border-color: var(--border-2);
    }

.btn-ghost {
    background: none;
    color: var(--text-2);
    border: none;
    padding: 0 10px;
}

    .btn-ghost:hover {
        background: var(--surface-2);
        color: var(--text-1);
    }

.btn-sm {
    height: 31px;
    padding: 0 12px;
    font-size: 12.5px;
    border-radius: 7px;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

    .btn-danger:hover {
        background: #DC2626;
    }

/* ═══════════════════════════════════════════════════════════════
   KPI Cards
   ═══════════════════════════════════════════════════════════════ */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 18px 18px 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    cursor: default;
}

    .kpi-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

    .kpi-card::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
    }

    .kpi-card.c-blue::after {
        background: linear-gradient(90deg, #2563EB, #60A5FA);
    }

    .kpi-card.c-amber::after {
        background: linear-gradient(90deg, #F59E0B, #FDE68A);
    }

    .kpi-card.c-teal::after {
        background: linear-gradient(90deg, #14B8A6, #5EEAD4);
    }

    .kpi-card.c-green::after {
        background: linear-gradient(90deg, #22C55E, #86EFAC);
    }

    .kpi-card.c-red::after {
        background: linear-gradient(90deg, #EF4444, #F87171);
    }

    .kpi-card.c-purple::after {
        background: linear-gradient(90deg, #8B5CF6, #C4B5FD);
    }

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 14px;
}

    .kpi-icon.blue {
        background: var(--primary-50);
        color: var(--primary);
    }

    .kpi-icon.amber {
        background: var(--warning-50);
        color: var(--warning);
    }

    .kpi-icon.teal {
        background: var(--accent-50);
        color: var(--accent);
    }

    .kpi-icon.green {
        background: var(--success-50);
        color: var(--success);
    }

    .kpi-icon.red {
        background: var(--danger-50);
        color: var(--danger);
    }

    .kpi-icon.purple {
        background: var(--purple-50);
        color: var(--purple);
    }

.kpi-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -1.2px;
    line-height: 1;
    margin-bottom: 5px;
}

.kpi-lbl {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 500;
}

.kpi-trend {
    position: absolute;
    top: 16px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}

    .kpi-trend.up {
        background: var(--success-50);
        color: var(--success);
    }

    .kpi-trend.dn {
        background: var(--danger-50);
        color: var(--danger);
    }

    .kpi-trend.neu {
        background: var(--warning-50);
        color: var(--warning);
    }

/* ═══════════════════════════════════════════════════════════════
   Dashboard Grid & Cards
   ═══════════════════════════════════════════════════════════════ */

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
}

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.dash-card-head {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-1);
}

.dash-card-body {
    padding: 16px 20px;
}

.span2 {
    grid-column: span 2;
}

/* ═══════════════════════════════════════════════════════════════
   Pipeline / Funnel
   ═══════════════════════════════════════════════════════════════ */

.funnel-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 11px;
}

.funnel-lbl {
    width: 110px;
    font-size: 12px;
    color: var(--text-2);
    font-weight: 500;
    text-align: right;
    flex-shrink: 0;
}

.funnel-wrap {
    flex: 1;
    height: 30px;
    background: var(--surface-2);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.funnel-bar {
    height: 100%;
    border-radius: 5px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.funnel-n {
    width: 38px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
    text-align: right;
    flex-shrink: 0;
}

.funnel-conv {
    width: 44px;
    font-size: 11px;
    color: var(--text-3);
    text-align: right;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Dashboard Chart
   ═══════════════════════════════════════════════════════════════ */

.chart-card {
    background: var(--chart-bg);
    border: 1px solid var(--chart-border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--chart-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/*.chart-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #3B82F6, #22C55E);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .chart-card:hover {
        box-shadow: var(--chart-shadow-hover);
        border-color: #D1D5DB;
        transform: translateY(-2px);
    }

        .chart-card:hover::before {
            transform: scaleX(1);
        }*/

/* Chart Card Header - Premium Design */
.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
    position: relative;
}

.chart-card-title-section {
    flex: 1;
}

.chart-card-title {
    font-size: 16px;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chart-card-subtitle {
    font-size: 11px;
    color: #64748B;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.chart-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

    .chart-card-icon.enquiry {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.1));
        color: #3B82F6;
        border: 1px solid rgba(59, 130, 246, 0.2);
    }

    .chart-card-icon.booking {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(74, 222, 128, 0.1));
        color: #22C55E;
        border: 1px solid rgba(34, 197, 94, 0.2);
    }

.chart-card:hover .chart-card-icon {
    transform: scale(1.05);
}

/* Chart Stats Bar - Enhanced */
.chart-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-radius: 10px;
    border: 1px solid #E2E8F0;
}

.chart-stat-item {
    text-align: center;
}

.chart-stat-label {
    font-size: 9px;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 700;
    display: block;
}

.chart-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: #0F172A;
    background: linear-gradient(135deg, #3B82F6, #22C55E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* Chart Container - Increased Height */
.chart-container {
    position: relative;
    width: 100%;
    height: 320px;
    margin-top: 14px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 10px;
    padding: 4px 0;
}

.chart-canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Responsive Grid - Desktop & Tablet */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Large Desktop - Keep 2 columns */
@media (min-width: 1400px) {
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        max-width: 950px;
    }

    .chart-container {
        height: 340px;
    }
}

/* Medium Desktop */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
        max-width: 900px;
    }

    .chart-card {
        padding: 16px;
    }

    .chart-container {
        height: 320px;
    }
}

/* Tablet Portrait */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 600px;
    }

    .chart-card {
        padding: 15px;
    }

    .chart-card-title {
        font-size: 15px;
    }

    .chart-card-subtitle {
        font-size: 10px;
    }

    .chart-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 10px;
    }

    .chart-stat-value {
        font-size: 18px;
    }

    .chart-container {
        height: 300px;
    }
}

/* Tablet Landscape / Smaller Devices */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 16px;
        max-width: 100%;
    }

    .chart-card {
        padding: 14px;
    }

    .chart-card-header {
        margin-bottom: 10px;
        gap: 10px;
    }

    .chart-card-title {
        font-size: 14px;
        font-weight: 700;
    }

    .chart-card-subtitle {
        font-size: 10px;
    }

    .chart-card-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .chart-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 10px;
        margin-bottom: 10px;
    }

    .chart-stat-label {
        font-size: 8px;
        margin-bottom: 3px;
    }

    .chart-stat-value {
        font-size: 16px;
    }

    .chart-container {
        height: 280px;
        margin-top: 8px;
    }
}

/* Mobile - Medium Size */
@media (max-width: 600px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 14px;
        max-width: 100%;
    }

    .chart-card {
        padding: 12px;
        border-radius: 11px;
    }

    .chart-card-header {
        margin-bottom: 8px;
        gap: 8px;
        flex-direction: column;
    }

    .chart-card-title-section {
        flex: 1;
    }

    .chart-card-title {
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .chart-card-subtitle {
        font-size: 9px;
    }

    .chart-card-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
        align-self: flex-start;
    }

    .chart-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 10px;
        margin-bottom: 8px;
    }

    .chart-stat-label {
        font-size: 8px;
        margin-bottom: 2px;
        line-height: 1.1;
    }

    .chart-stat-value {
        font-size: 15px;
        line-height: 1;
    }

    .chart-container {
        height: 260px;
        margin-top: 6px;
        padding: 2px 0;
    }
}

/* Mobile - Small Size */
@media (max-width: 480px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 12px;
        max-width: 100%;
    }

    .chart-card {
        padding: 10px;
    }

    .chart-card-title {
        font-size: 12px;
    }

    .chart-card-subtitle {
        font-size: 8px;
    }

    .chart-card-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .chart-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        padding: 8px;
        margin-bottom: 6px;
    }

    .chart-stat-label {
        font-size: 7px;
    }

    .chart-stat-value {
        font-size: 14px;
    }

    .chart-container {
        height: 240px;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .charts-grid {
        gap: 8px;
        max-width: 100%;
    }

    .chart-card {
        padding: 8px;
        border-radius: 9px;
    }

    .chart-card-title {
        font-size: 11px;
    }

    .chart-container {
        height: 220px;
    }
}

/* Enhanced Animation */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chart-card {
    animation: slideUpFade 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

    .chart-card:nth-child(2) {
        animation-delay: 0.1s;
    }

.chart-card-icon {
    animation: slideInRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Chart Tooltip - Premium Styling */
.chartjs-tooltip {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
    border-radius: 10px;
    padding: 14px 18px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

.chartjs-tooltip-title {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 14px;
    color: #FFFFFF;
}

.chartjs-tooltip-value {
    color: #E2E8F0;
    font-size: 13px;
}

.chartjs-tooltip-percentage {
    color: #94A3B8;
    font-size: 12px;
    margin-top: 4px;
}

/* Value Labels - Premium Typography */
.chart-value-label {
    position: absolute;
    font-size: 13px;
    font-weight: 700;
    color: #1E293B;
    transform: translateX(-50%);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Loading State */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 320px;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-radius: 10px;
    color: #64748B;
    font-size: 13px;
    font-weight: 500;
}

/* No Data State */
.chart-no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 320px;
    color: #94A3B8;
    text-align: center;
}

    .chart-no-data i {
        font-size: 56px;
        margin-bottom: 16px;
        opacity: 0.4;
    }

/* Legend - Professional Styling */
.chart-legend {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #F1F5F9;
    display: flex;
    gap: 24px;
    justify-content: center;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #64748B;
    font-weight: 500;
}

.chart-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Export Button - Subtle Design */
.chart-export-btn {
    background: none;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 8px 14px;
    color: #64748B;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

    .chart-export-btn:hover {
        background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
        border-color: #D1D5DB;
        color: #1E293B;
    }

/* Comparison Badge */
.chart-comparison {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(74, 222, 128, 0.05));
    color: #22C55E;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

    .chart-comparison.down {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(248, 113, 113, 0.05));
        color: #EF4444;
        border-color: rgba(239, 68, 68, 0.2);
    }

/* Print Styles */
@media print {
    .chart-card {
        box-shadow: none;
        border: 1px solid #E5E7EB;
        break-inside: avoid;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .chart-card,
    .chart-card::before,
    .chart-card-icon {
        animation: none;
        transition: none;
    }
}

[data-theme="dark"] .chart-card {
    background: var(--chart-bg);
    border-color: var(--chart-border);
}

[data-theme="dark"] .chart-card-title {
    background: linear-gradient(135deg,#fff,#E2E8F0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .chart-card-subtitle,
[data-theme="dark"] .chart-stat-label {
    color: #94A3B8;
}

[data-theme="dark"] .chart-stats {
    background: linear-gradient(135deg,#0F172A,#1E293B);
    border-color: #334155;
}

[data-theme="dark"] .chart-stat-value {
    background: linear-gradient(135deg,#60A5FA,#4ADE80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .chart-container {
    background: linear-gradient( 180deg, rgba(15,23,42,.3) 0%, rgba(30,41,59,0) 100% );
}

[data-theme="dark"] .year-select-wrap select {
    background: #1E293B;
    border: 1px solid #334155;
    color: #F1F5F9;
}

    [data-theme="dark"] .year-select-wrap select:hover {
        background: #243548;
        border-color: #475569;
    }

[data-theme="dark"] .year-select-wrap i {
    color: #94A3B8;
}
/* Interactive Hover Effects */
.chart-card {
    cursor: default;
}

    .chart-card * {
        transition: color 0.2s ease, opacity 0.2s ease;
    }

/* Grid Lines Enhancement */
.chart-grid-line {
    stroke: rgba(226, 232, 240, 0.2);
    stroke-dasharray: 4, 4;
}

/* Stat Item Hover */
.chart-stat-item {
    transition: all 0.3s ease;
}

    .chart-stat-item:hover {
        transform: translateY(-2px);
    }

/* Card Badge */
.chart-card-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
    color: white;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.year-select-wrap {
    position: relative;
    display: inline-block;
}

    .year-select-wrap i.left-icon {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 15px;
        color: #64748B;
        pointer-events: none;
    }

    .year-select-wrap i.chevron {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 13px;
        color: #64748B;
        pointer-events: none;
    }

    .year-select-wrap select {
        appearance: none;
        -webkit-appearance: none;
        background: #F8FAFC;
        border: 1px solid #E2E8F0;
        border-radius: 8px;
        padding: 7px 32px 7px 32px;
        font-size: 13px;
        font-weight: 500;
        color: #0F172A;
        cursor: pointer;
        min-width: 106px;
        outline: none;
        transition: border-color 0.15s, box-shadow 0.15s;
    }

        .year-select-wrap select:hover {
            border-color: #CBD5E1;
            background: #FFFFFF;
        }

        .year-select-wrap select:focus {
            border-color: #3B82F6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
        }


/* ═══════════════════════════════════════════════════════════════
   Activity
   ═══════════════════════════════════════════════════════════════ */

.act-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

    .act-item:last-child {
        border-bottom: none;
    }

.act-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.act-txt {
    font-size: 13px;
    color: var(--text-1);
    line-height: 1.5;
}

    .act-txt strong {
        font-weight: 600;
    }

.act-time {
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   Lead Source
   ═══════════════════════════════════════════════════════════════ */

.ls-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 11px;
}

.ls-lbl {
    width: 96px;
    font-size: 12px;
    color: var(--text-2);
    font-weight: 500;
    flex-shrink: 0;
}

.ls-wrap {
    flex: 1;
    height: 7px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden;
}

.ls-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.ls-n {
    width: 28px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-1);
    text-align: right;
    flex-shrink: 0;
}

.ls-pct {
    width: 38px;
    font-size: 11px;
    color: var(--text-3);
    text-align: right;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Enquiries - Toolbar
   ═══════════════════════════════════════════════════════════════ */

.enq-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.srch {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 12px;
    height: 38px;
    flex: 1;
    max-width: 300px;
    transition: all 0.2s;
}

    .srch:focus-within {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

    .srch i {
        color: var(--text-3);
    }

    .srch input {
        border: none;
        background: none;
        outline: none;
        font-family: var(--font);
        font-size: 13.5px;
        color: var(--text-1);
        width: 100%;
    }

.fchip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 13px;
    height: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

    .fchip:not(.sort-filter-select, .sort-filter-btn):hover {
        border-color: var(--primary);
        color: var(--primary);
    }

    .fchip.active {
        background: var(--primary-50);
        border-color: var(--primary);
        color: var(--primary);
    }

.fchip-count {
    background: var(--primary);
    color: white;
    border-radius: 20px;
    padding: 0 6px;
    font-size: 10.5px;
    font-weight: 700;
    margin-left: 3px;
    line-height: 18px;
}

.dchip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 13px;
    height: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.vtoggle {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-left: auto;
    flex-shrink: 0;
}

.vbtn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-3);
    transition: all 0.15s;
    font-size: 15px;
}

    .vbtn.active {
        background: var(--primary);
        color: white;
    }

/* ═══════════════════════════════════════════════════════════════
   Enquiry Cards
   ═══════════════════════════════════════════════════════════════ */

.enq-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.enq-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

    .enq-card:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-3px);
        border-color: rgba(37, 99, 235, 0.3);
    }

.enq-accent {
    height: 4px;
    flex-shrink: 0;
}

    .enq-accent.open {
        background: linear-gradient(90deg, #2563EB, #60A5FA);
    }

    .enq-accent.new {
        background: linear-gradient(90deg, #14B8A6, #5EEAD4);
    }

    .enq-accent.hold {
        background: linear-gradient(90deg, #F59E0B, #FDE68A);
    }

    .enq-accent.lost {
        background: linear-gradient(90deg, #EF4444, #F87171);
    }

    .enq-accent.booked {
        background: linear-gradient(90deg, #22C55E, #86EFAC);
    }

    .enq-accent.junk {
        background: linear-gradient(90deg, #A3A3A3, #D4D4D8);
    }

.enq-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.enq-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.enq-av {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.enq-nm {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 2px;
}

.enq-ph {
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 4px;
}

    .enq-ph i {
        font-size: 11px;
    }

/* ─── Badges ─────────────────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.b-open {
    background: rgba(37, 99, 235, 0.1);
    color: #2563EB;
}

.b-new {
    background: rgba(20, 184, 166, 0.1);
    color: #14B8A6;
}

.b-booked {
    background: rgba(34, 197, 94, 0.1);
    color: #22C55E;
}

.b-lost {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.b-hold {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.b-junk {
    background: rgba(148, 163, 184, 0.1);
    color: #94A3B8;
}

.b-success {
    background: var(--success-50);
    color: var(--success);
}
/* ─── Follow-up Alert Bar ───────────────────────────────────── */

.fu-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 8px;
    margin-bottom: 11px;
    font-size: 12px;
    font-weight: 600;
}

.fu-overdue {
    background: rgba(239, 68, 68, 0.07);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.18);
}

.fu-today {
    background: rgba(245, 158, 11, 0.07);
    color: #F59E0B;
    border: 1px solid rgba(245, 158, 11, 0.18);
}

.fu-upcoming {
    background: rgba(20, 184, 166, 0.07);
    color: #14B8A6;
    border: 1px solid rgba(20, 184, 166, 0.18);
}

.fu-completed {
    background: rgba(16, 185, 129, 0.07);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.fu-hold {
    background: rgba(139, 92, 246, 0.07);
    color: #8B5CF6;
    border: 1px solid rgba(139, 92, 246, 0.18);
}

/* ─── Lead Score ───────────────────────────────────────────── */

.score-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.score-lbl {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 600;
    white-space: nowrap;
}

.score-pips {
    display: flex;
    gap: 3px;
}

.score-pip {
    width: 18px;
    height: 4px;
    border-radius: 2px;
}

.score-tag {
    font-size: 11px;
    font-weight: 700;
}

/* ─── Meta Grid ──────────────────────────────────────────────── */

.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-bottom: 12px;
}

.meta-i {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-k {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    font-weight: 700;
}

.meta-v {
    font-size: 12.5px;
    color: var(--text-1);
    font-weight: 500;
}

    .meta-v.ov {
        color: #EF4444;
        font-weight: 700;
    }

    .meta-v.as {
        color: #2563EB;
    }

/* ─── Tags ─────────────────────────────────────────────────── */

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 11px;
    color: var(--text-2);
    font-weight: 500;
}

/* ─── Quick Actions ──────────────────────────────────────── */

.qa {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-top: 11px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.qa-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-2);
    transition: all 0.15s;
    font-family: var(--font);
}

    .qa-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-50);
    }

    .qa-btn.p {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
    }

        .qa-btn.p:hover {
            background: var(--primary-700);
        }

.btn-edit {
    background: #6366F1;
    color: white;
    border-color: #6366F1;
}

    .btn-edit:hover {
        background: #4F46E5;
        border-color: #4F46E5;
        color: white;
    }

.btn-booking {
    background: #10B981;
    border-color: #10B981;
    color: #fff;
}

    .btn-booking:hover {
        background: #059669;
        border-color: #059669;
        color: white;
    }

.btn-edit,
.btn-booking {
    transition: all .2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

    .btn-edit:hover,
    .btn-booking:hover {
        transform: translateY(-1px);
    }





.qa-btn i {
    font-size: 12px;
}

.qa-sp {
    margin-left: auto;
}

@media (max-width: 576px) {

    .qa {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Hide spacer on mobile */
    .qa-sp {
        display: none;
    }

    .qa-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Avatar
   ═══════════════════════════════════════════════════════════════ */

.av {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

    .av.lg {
        width: 40px;
        height: 40px;
        font-size: 13px;
    }

    .av.xl {
        width: 46px;
        height: 46px;
        font-size: 15px;
    }

/* ═══════════════════════════════════════════════════════════════
   Modals
   ═══════════════════════════════════════════════════════════════ */

.mo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

    .mo-overlay.open {
        display: flex;
    }

.modal {
    background: var(--surface);
    border-radius: var(--r-xl);
    width: 100%;
    max-width: 640px;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: mIn 0.22s ease;
}

    .modal.lg {
        max-width: 820px;
    }

@keyframes mIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.mo-head {
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-shrink: 0;
}

.mo-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -0.3px;
}

.mo-sub {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 3px;
}

.mo-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}

.mo-foot {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.close-x {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: none;
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-2);
    transition: all 0.15s;
    font-size: 15px;
}

    .close-x:hover {
        background: var(--danger-50);
        color: var(--danger);
    }

/* ═══════════════════════════════════════════════════════════════
   Forms
   ═══════════════════════════════════════════════════════════════ */

.fg {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.fg-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

    .fg-2 .fg {
        margin-bottom: 0;
    }

.fg.full {
    grid-column: span 2;
}

.fl {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
}

    .fl span {
        color: var(--danger);
    }

.fi {
    height: 40px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    padding: 0 13px;
    font-family: var(--font);
    font-size: 13.5px;
    color: var(--text-1);
    background: var(--surface);
    outline: none;
    transition: all 0.2s;
    width: 100%;
}

    .fi:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

    .fi::placeholder {
        color: var(--text-3);
    }

textarea.fi {
    height: auto;
    padding: 10px 13px;
    resize: vertical;
    min-height: 84px;
}

select.fi {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2394A3B8' stroke-width='2.5' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 30px;
}

.f-section {
    margin-bottom: 22px;
}

.f-sec-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-100);
    display: flex;
    align-items: center;
    gap: 7px;
}

/* ─── Type Chips ────────────────────────────────────────────── */

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    transition: all 0.15s;
    background: none;
    font-family: var(--font);
}

    .chip:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

    .chip.active {
        border-color: var(--primary);
        background: var(--primary-50);
        color: var(--primary);
        font-weight: 700;
    }

.pchip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s;
    background: none;
    font-family: var(--font);
}

    .pchip.hi {
        color: var(--danger);
        border-color: rgba(239, 68, 68, 0.25);
    }

        .pchip.hi.active {
            background: var(--danger-50);
            border-color: var(--danger);
        }

    .pchip.md {
        color: var(--warning);
        border-color: rgba(245, 158, 11, 0.25);
    }

        .pchip.md.active {
            background: var(--warning-50);
            border-color: var(--warning);
        }

    .pchip.lo {
        color: var(--success);
        border-color: rgba(34, 197, 94, 0.25);
    }

        .pchip.lo.active {
            background: var(--success-50);
            border-color: var(--success);
        }

/* ─── Checkbox Custom ──────────────────────────────────────── */

.chk-lbl {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 11px 13px;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    transition: all 0.15s;
}

    .chk-lbl:hover {
        border-color: var(--primary);
    }

    .chk-lbl input {
        display: none;
    }

.chk-box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    font-size: 11px;
    color: white;
    font-weight: 700;
}

.chk-lbl input:checked ~ .chk-box {
    background: var(--primary);
    border-color: var(--primary);
}

    .chk-lbl input:checked ~ .chk-box::after {
        content: "✓";
    }

.chk-txt {
    font-size: 13.5px;
    color: var(--text-1);
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   Follow-up Module
   ═══════════════════════════════════════════════════════════════ */

.fu-profile {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px;
    background: var(--surface-2);
    border-radius: var(--r-md);
    margin-bottom: 18px;
    border: 1px solid var(--border);
}

.overdue-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
    white-space: nowrap;
}

/* ─── Timeline ─────────────────────────────────────────────── */

.tl {
    position: relative;
    padding-left: 22px;
}

    .tl::before {
        content: "";
        position: absolute;
        left: 5px;
        top: 8px;
        bottom: 8px;
        width: 2px;
        background: var(--border);
        border-radius: 1px;
    }

.tl-item {
    position: relative;
    padding-bottom: 24px;
    margin-bottom: 24px;
}

    .tl-item:not(:last-child)::after {
        content: "";
        position: absolute;
        left: -12px;
        bottom: 0;
        width: calc(100% + 12px);
        border-bottom: 1px dashed rgba(148, 163, 184, 0.35);
    }

    .tl-item:last-child {
        padding-bottom: 0;
    }

.tl-dot {
    position: absolute;
    left: -19px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--surface);
    top: 4px;
}

    .tl-dot.blue {
        background: var(--primary);
    }

    .tl-dot.gray {
        background: var(--text-3);
    }

    .tl-dot.green {
        background: var(--success);
    }

.tl-txt {
    font-size: 13px;
    color: var(--text-2);
}

.tl-time {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}

/* ─── Kanban ───────────────────────────────────────────────── */

.kb-board {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 10px;
    align-items: flex-start;
}

.kb-col {
    min-width: 254px;
    width: 254px;
    flex-shrink: 0;
}

.kb-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 13px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md) var(--r-md) 0 0;
    border-bottom: none;
}

.kb-col-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 7px;
}

.kb-cnt {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-2);
}

.kb-body {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--r-md) var(--r-md);
    padding: 7px;
    min-height: 180px;
}

.kb-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 11px;
    margin-bottom: 7px;
    cursor: pointer;
    transition: all 0.15s;
}

    .kb-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.kb-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 5px;
}

/* ═══════════════════════════════════════════════════════════════
   Team List
   ═══════════════════════════════════════════════════════════════ */

.team-row {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 13px;
}

    .team-row:last-child {
        margin-bottom: 0;
    }

.team-stat {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   Utility Classes
   ═══════════════════════════════════════════════════════════════ */

.div {
    height: 1px;
    background: var(--border);
    margin: 18px 0;
}

/* ─────────────────────────────── */
/* Pagination */
/* ─────────────────────────────── */
@media (max-width: 768px) {
    .pgn {
        flex-direction: column;
        align-items: center;
        padding: 12px 0;
        justify-content: center;
    }

    .pgn-info {
        font-size: 12px;
        text-align: center;
        width: 100%;
    }

    .pgn-pages {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .pgn-perpage {
        width: 100%;
        justify-content: center;
    }
}

.pgn-perpage {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-2);
}

.pgn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 22px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.pgn-info {
    font-size: 13px;
    color: var(--text-3);
}

.pgn-pages {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ═══════════════════════════════════════════════════════════════
   Follow-up Module Styles
   ═══════════════════════════════════════════════════════════════ */

.fu-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fu-header {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 10px;
}

    .fu-header i {
        font-size: 18px;
    }

.fu-header-danger {
    color: var(--danger);
}

.fu-badge {
    font-size: 11px;
    color: var(--text-2);
    font-weight: 500;
    background: rgba(37, 99, 235, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: auto;
}

.fu-alert {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid var(--danger);
    font-size: 12px;
    color: var(--danger);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .fu-alert i {
        font-size: 13px;
    }

.tl-content {
    flex: 1;
}

.tl-head {
    display: flex;
    gap: 12px;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.tl-info {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex: 1;
}

    .tl-info > div:last-child {
        flex: 1;
        min-width: 0;
    }

.tl-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-1);
    line-height: 1.3;
}

.tl-meta {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
}

.tl-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.tl-note {
    background: var(--bg-subtle);
    padding: 10px 12px;
    border-radius: 7px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary);
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.5;
}

.tl-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 12px;
}

.pri-tag {
    background: rgba(37, 99, 235, 0.07);
    border-color: rgba(37, 99, 235, 0.2);
    color: var(--primary);
}

.email-tag {
    background: rgba(14, 165, 233, 0.07);
    border-color: rgba(14, 165, 233, 0.2);
    color: #0EA5E9;
}

.site-tag {
    background: rgba(34, 197, 94, 0.07);
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.time-tag {
    color: var(--text-3);
}

.overdue-tag {
    color: var(--text-3);
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   Responsive Design
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1280px) {
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .enq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }

    .span2 {
        grid-column: span 1;
    }
}

@media (max-width: 900px) {
    .sidebar {
        display: none;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .enq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .topbar {
        padding: 0 16px;
        gap: 8px;
    }

    .tb-search {
        max-width: 200px;
    }

    .kb-board {
        overflow-x: scroll;
    }

    .fg-2 {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Utility - Scrollbars
   ═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-2);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--border);
    }

#projectDropdownHeader {
    border: none;
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
    background: transparent;
    color: var(--sidebar-text);
}



.input-error {
    border-color: #ef4444 !important;
}

.field-validation-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

.readonly-input {
    background-color: #f3f4f6 !important;
    cursor: not-allowed;
}

.hamburger {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-1);
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    z-index: 19;
}

    .sidebar-overlay.open {
        display: block;
    }

@media (max-width: 900px) {
    .hamburger {
        display: flex;
    }

    .sidebar {
        display: flex !important;
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 20;
        transition: left 0.25s ease;
        box-shadow: var(--shadow-xl);
    }

        .sidebar.open {
            left: 0;
        }
}

@media (max-width: 768px) {
    .mo-foot {
        padding: 12px 16px;
        justify-content: stretch !important;
        flex-wrap: wrap;
        gap: 8px;
    }

        .mo-foot .btn {
            flex: 1 1 auto;
            justify-content: center;
            font-size: 12px;
            padding: 8px 6px;
            min-width: 0;
            text-align: center;
            white-space: nowrap;
        }
}

@media (min-width: 768px) {
    .status-wrap {
        flex-direction: row !important;
    }
}

.flatpickr-current-month {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .flatpickr-monthDropdown-months,
    .flatpickr-current-month .numInput.cur-year {
        height: 32px !important;
        border: 1px solid #D1D5DB !important;
        border-radius: 6px !important;
        background: #fff !important;
        font-size: 14px !important;
        padding: 0 8px !important;
    }

        .flatpickr-monthDropdown-months:focus,
        .flatpickr-current-month .numInput.cur-year:focus {
            border-color: #2563EB !important;
            outline: none !important;
        }

.skeleton-item {
    height: 80px;
    border-radius: 10px;
    margin-bottom: 12px;
    background: linear-gradient( 90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75% );
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 576px) {

    /* Make all form fields one below another */
    .fg-2 {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    /* Full width items */
    .fg.full {
        grid-column: span 1;
    }

    /* Reduce modal padding */
    .mo-body {
        padding: 16px;
    }

    .mo-head,
    .mo-foot {
        padding: 14px 16px;
    }

    /* Buttons stacked vertically */
    .mo-foot {
        flex-direction: column;
    }

        .mo-foot .btn {
            width: 100%;
            justify-content: center;
        }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin {
    display: inline-block;
    animation: spin 1s linear infinite;
}


/* ═══════════════════════════════════════════════════════════════
   Form Desing
   ═══════════════════════════════════════════════════════════════ */
.frm-span-full {
    grid-column: span 2;
}

.frm-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.frm-page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.frm-form-container form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.frm-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

    .frm-card h3 {
        font-size: 16px;
        font-weight: 700;
        margin: 0 0 20px 0;
        color: var(--text-1);
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .frm-card h3 i {
            font-size: 20px;
            color: var(--primary);
        }


.frm-card-main-div {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 20px
}

.frm-input-div {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.frm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.frm-item-grid-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.frm-item-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 1100px;
}

.frm-item-grid-thead-tr {
    background: var(--surface-2);
    border-bottom: 2px solid var(--border)
}

    .frm-item-grid-thead-tr th {
        padding: 12px 10px;
        text-align: center;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-3);
        width: auto;
    }

.frm-item-grid-tr {
    border-bottom: 1px solid var(--border);
    transition: background 150ms
}

    .frm-item-grid-tr td {
        padding: 10px;
    }

.frm-item-grid-td-row-count {
    text-align: center;
    color: var(--text-3);
    background: var(--surface-2);
}

.frm-item-grid-td-input {
    width: 100%;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    text-align: right
}

.frm-item-grid-td-input-disable {
    background: #F3F4F6;
}

.frm-approver-summary-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

.frm-approver-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.frm-summary-card {
    width: 100%;
    max-width: 400px;
    margin-left: auto;
}

.frm-input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--surface);
    color: var(--text-1);
    font-family: inherit;
}

.frm-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3)
}

@media (max-width: 992px) {
    .frm-approver-summary-row {
        grid-template-columns: 1fr;
    }

    .frm-summary-card {
        max-width: none;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .frm-page-head {
        flex-direction: column;
        align-items: stretch;
    }

    .frm-page-actions {
        width: 100%;
    }

        .frm-page-actions > a,
        .frm-page-actions > button {
            flex: 1;
            justify-content: center;
        }

    .frm-grid,
    .frm-approver-grid {
        grid-template-columns: 1fr;
    }

    .frm-card {
        padding: 18px;
    }
    /* Mobile: Fix grid-column span */
    .frm-grid > div[style*="grid-column"] {
        grid-column: auto !important;
    }
    /* Mobile: Ensure inputs are visible and touchable */
    input[type="text"],
    input[type="date"],
    input[type="number"],
    select,
    textarea {
        width: 100% !important;
        padding: 12px 12px !important;
        font-size: 16px !important;
        min-height: 44px !important;
        box-sizing: border-box;
    }

    textarea {
        min-height: 100px !important;
    }
    /* Mobile: Form field wrapper */
    .frm-grid > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 24px;
    }

    .page-sub {
        font-size: 12px;
    }

    .frm-card {
        padding: 16px;
    }

    input[type="text"],
    input[type="date"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
        min-height: 44px !important;
    }
}

@media (max-width: 768px) {
    .frm-span-full {
        grid-column: auto !important;
    }
}
