/* ==========================================================================
   1. THEME, FONTS & VARIABLES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Brand Colors */
    --brand-charcoal: #121212;
    --brand-charcoal-light: #2c2c2c;
    --brand-gold: #3b7c7b;
    --brand-gold-gradient: linear-gradient(135deg, #3b7c7b, #1f3b3b);
    --brand-gold-hover: linear-gradient(135deg, #2f6665, #163031);

    /* Functional Colors */
    --primary: #0d6efd;
    --success: #198754;
    --warning: #4f8a8b;
    --danger: #dc3545;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;

    /* Dimensions & Effects */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 22px;
    --radius-pill: 999px;
    --shadow-card: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.06);
    --shadow-strong: 0 20px 40px rgba(0, 0, 0, 0.3);
    --app-bg-color: #DCD9D4;
    --app-bg-image:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%),
        radial-gradient(at 50% 0%, rgba(255, 255, 255, 0.10) 0%, rgba(0, 0, 0, 0.50) 50%);
}

/* ==========================================================================
   2. BASE / GLOBAL
   ========================================================================== */
html,
body {
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    background-color: var(--app-bg-color);
    background-image: var(--app-bg-image);
    background-blend-mode: soft-light, screen;
    color: #212529;
    font-size: 14px;
}

body {
    display: flex;
    flex-direction: column;
}

body.gold-theme {
    --brand-gold: #d4af37;
    --brand-gold-gradient: linear-gradient(135deg, #c9a24d, #e1c16e);
    --brand-gold-hover: linear-gradient(135deg, #b7923e, #d4b55f);
    --warning: #ffc107;
}

.customer-mobile-card {
    border-radius: var(--radius-xl);
    box-shadow: 0 14px 30px rgba(16, 24, 40, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.04);
    background: #fff;
}

.customer-mobile-card .card-body {
    padding: var(--space-4);
}

.customer-mobile-card h6 {
    font-size: 1rem;
}

.customer-mobile-card .badge,
.customer-mobile-card .lead-score-badge {
    min-width: unset;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    border-radius: 999px;
}

.customer-mobile-card hr {
    margin: 8px 0;
}

@media (max-width: 576px) {
    .customer-mobile-card {
        box-shadow: 0 10px 24px rgba(16, 24, 40, 0.10);
    }

    .login-card {
        max-width: 100%;
        padding: 24px 20px;
        border-radius: 16px;
    }
}

a {
    text-decoration: none;
    transition: color 0.2s;
}

/* AJAX Loading Skeletons */
.ajax-skeleton-wrap {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    background: #f8fafc;
    border: 1px solid #e6edf5;
    animation: skeletonFadeIn 0.18s ease-out;
}

.ajax-skeleton-line,
.ajax-skeleton-cell,
.ajax-skeleton-chip {
    display: inline-block;
    border-radius: 999px;
    background: linear-gradient(90deg, #e9edf3 20%, #f4f7fb 50%, #e9edf3 80%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.25s ease-in-out infinite;
}

.ajax-skeleton-line {
    display: block;
    height: 12px;
    margin-bottom: var(--space-3);
}

.ajax-skeleton-table {
    display: grid;
    gap: var(--space-2);
}

.ajax-skeleton-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: var(--space-2);
    padding: var(--space-2) 0;
}

.ajax-skeleton-cell {
    height: 11px;
}

.ajax-skeleton-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.ajax-skeleton-chip {
    width: 92px;
    height: 28px;
}

.w-12 {
    width: 12%;
}

.w-14 {
    width: 14%;
}

.w-16 {
    width: 16%;
}

.w-18 {
    width: 18%;
}

.w-20 {
    width: 20%;
}

.w-24 {
    width: 24%;
}

.w-35 {
    width: 35%;
}

.w-40 {
    width: 40%;
}

.w-60 {
    width: 60%;
}

@keyframes skeletonPulse {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

@keyframes skeletonFadeIn {
    from {
        opacity: 0.45;
    }

    to {
        opacity: 1;
    }
}

/* ==========================================================================
   3. NAVBAR
   ========================================================================== */
.navbar-custom {
    flex-shrink: 0;
    background-color: var(--brand-charcoal);
    padding: 0.7rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #fff !important;
}

.navbar-brand .brand-wordmark>span {
    color: #d4af37;
}

.brand-logo-img {
    height: 40px;
    width: auto;
    display: inline-block;
    object-fit: contain;
}

@media (max-width: 768px) {
    .brand-logo-img {
        height: 34px;
    }
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    margin: 0 12px;
    position: relative;
    transition: 0.3s;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: #d4af37 !important;
}

.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 4px;
    left: 0;
    background-color: #d4af37;
    transition: 0.3s;
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
    width: 100%;
}

.btn-logout {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: var(--radius-pill);
    padding: 6px 20px;
    background: transparent;
    transition: 0.3s;
}

.btn-logout:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
}

.bg-warning {
    background-color: var(--brand-gold) !important;
}

.text-warning {
    color: var(--brand-gold) !important;
}

.border-warning {
    border-color: var(--brand-gold) !important;
}

.btn-warning {
    background-color: var(--brand-gold) !important;
    border-color: var(--brand-gold) !important;
    color: #fff !important;
}

.btn-warning:hover {
    background-color: #2f6665 !important;
    border-color: #2f6665 !important;
}

/* ==========================================================================
   4. LAYOUT WRAPPERS
   ========================================================================== */
.app-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: visible;
    height: auto;
    background-color: var(--app-bg-color);
    background-image: var(--app-bg-image);
    background-blend-mode: soft-light, screen;
}

.fixed-header-area,
.app-header-area {
    flex-shrink: 0;
    margin-bottom: 20px;
}

/* Shared scroll frame defaults (use for list/timeline panels) */
.app-scroll-frame,
.flex-scroll-area {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 150px);
    height: auto;
}

/* Shared panel defaults */
.table-scroll-container,
.scrollable-panel {
    flex: 1;
    position: relative;
    background: white;
    border-radius: 12px;
    height: auto;
    overflow: visible;
}

.dashboard-grid {
    display: flex;
    flex-direction: row;
    gap: 20px;
    height: auto;
    min-height: calc(100vh - 150px);
    flex-wrap: wrap;
}

.app-content-wrapper>.dashboard-page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 90px);
    height: auto;
    overflow: visible;
    background: transparent;
    border-radius: 0;
}

body.dashboard-page,
body.dashboard-page .app-content-wrapper,
body.dashboard-page .app-content-wrapper>.dashboard-page {
    background-color: var(--app-bg-color) !important;
    background-image: var(--app-bg-image) !important;
    background-blend-mode: soft-light, screen !important;
}

.app-content-wrapper>.dashboard-page::before,
.app-content-wrapper>.dashboard-page::after {
    content: none;
}

.app-content-wrapper>.dashboard-page>* {
    position: relative;
    z-index: 1;
}

.dashboard-header h2 {
    letter-spacing: -0.02em;
}

.dashboard-header p {
    font-size: 0.95rem;
}

.dashboard-title {
    font-size: clamp(1.3rem, 2.6vw, 2rem);
    line-height: 1.2;
}

.dashboard-subtitle {
    font-size: clamp(0.82rem, 1.4vw, 0.98rem);
}

.dashboard-kpi {
    min-height: 150px;
    border: 1px solid rgba(17, 24, 39, 0.06);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-kpi .card-body {
    padding: 1rem !important;
}

.dashboard-kpi:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 124, 123, 0.22);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.today-highlights-card .card-body {
    gap: 6px;
}

.today-highlight-row {
    border-radius: 10px;
    padding: 6px 10px !important;
    border-top: none !important;
    margin-top: 4px;
    border: 1px solid #edf1f6;
    position: relative;
}

.today-highlight-row:hover {
    background: #f3f6fb;
    border-color: #d8e2ef;
}

.today-highlights-card .today-highlight-row+.today-highlight-row::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.7);
}

.today-highlight-row a {
    display: inline-flex;
    align-items: center;
}

.today-highlight-row a:last-child {
    color: #212529;
    font-size: 1.05rem;
}

#highlightsCustomersLink {
    background: linear-gradient(135deg, #ecfeff 0%, #e0f2fe 100%);
    border-color: #a5f3fc;
}

#highlightsCustomersLink .bi {
    color: #0369a1;
}

#highlightsCustomersLink .premium-value {
    color: #0c4a6e;
}

#highlightsCustomersLink:hover {
    background: linear-gradient(135deg, #cffafe 0%, #bae6fd 100%);
    border-color: #67e8f9;
}

#highlightsDealsLink {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fdba74;
}

#highlightsDealsLink .bi {
    color: #b45309;
}

#highlightsDealsLink .premium-value {
    color: #9a3412;
}

#highlightsDealsLink:hover {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    border-color: #fb923c;
}

#monthlyCustomersLink {
    background: linear-gradient(135deg, #ecfeff 0%, #e0f2fe 100%);
    border-color: #a5f3fc;
}

#monthlyCustomersLink .metric-icon {
    background: rgba(12, 74, 110, 0.14);
    color: #075985;
}

#monthlyCustomersLink #customersAdded {
    color: #0c4a6e;
}

#monthlyCustomersLink:hover {
    background: linear-gradient(135deg, #cffafe 0%, #bae6fd 100%);
    border-color: #67e8f9;
}

#monthlyActiveLink {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-color: #a5b4fc;
}

#monthlyActiveLink .metric-icon {
    background: rgba(55, 48, 163, 0.15);
    color: #4338ca;
}

#monthlyActiveLink #activeDeals {
    color: #3730a3 !important;
}

#monthlyActiveLink:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: #818cf8;
}

#monthlyClosedLink {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fdba74;
}

#monthlyClosedLink .metric-icon {
    background: rgba(154, 52, 18, 0.16);
    color: #b45309;
}

#monthlyClosedLink #dealsClosed {
    color: #9a3412 !important;
}

#monthlyClosedLink:hover {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    border-color: #fb923c;
}

.premium-card {
    position: relative;
    overflow: hidden;
}

.premium-card::after {
    content: "";
    position: absolute;
    inset: -40% -10% auto auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(59, 124, 123, 0.25), transparent 60%);
    pointer-events: none;
}

.today-highlights-card.premium-card::after,
.kpi-monthly.premium-card::after {
    display: none;
}

.premium-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2f2f2f, #1a1a1a);
    color: #fff;
    font-size: 18px;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
}

.premium-eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    color: #6b7280;
}

.premium-chip {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 999px;
    background: #111;
    color: #b9e0df;
}

.chip-amber {
    background: #2f2f2f;
    color: #e2c88a;
    border: 1px solid rgba(226, 200, 138, 0.4);
}

.badge-amber {
    background: linear-gradient(135deg, #d2ad56, #b88a2e);
    color: #fff8e6;
    border: 1px solid rgba(255, 236, 179, 0.35);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(184, 138, 46, 0.35);
}

.premium-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid #eef0f4;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.premium-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.premium-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-success {
    background: #22c55e;
}

.dot-gold {
    background: var(--brand-gold);
}

.premium-value {
    font-weight: 800;
    font-size: 1.1rem;
    color: #111;
}

.premium-select {
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 0.35rem 0.8rem;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.premium-select:focus {
    border-color: rgba(59, 124, 123, 0.45);
    box-shadow: 0 0 0 3px rgba(59, 124, 123, 0.12);
}

.premium-select-toggle {
    min-width: 160px;
    text-align: left;
    color: #111827;
    background-color: #fff;
    border-color: rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
}

.premium-select-toggle:hover,
.premium-select-toggle:focus,
.premium-select-toggle:active {
    background-color: #fff;
    color: #111827;
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.premium-select-toggle::after {
    margin-left: 0.75rem;
}

.premium-metric {
    background: #fafafa;
    border-radius: 10px;
    padding: 6px 10px !important;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.kpi-monthly hr {
    margin: 0.35rem 0 !important;
}

.premium-metric-link {
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.premium-metric-link:hover {
    background: #f4f7fb;
    border-color: #dee7f2;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.premium-metric-link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background: transparent;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.premium-metric-link:hover::before,
.premium-metric-link:focus-visible::before {
    background: var(--brand-gold);
}

.monthly-delta-inline {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.premium-value-main {
    font-size: clamp(1.05rem, 2vw, 1.35rem) !important;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.metric-hint {
    margin: -2px 2px 4px 2px;
    font-size: 0.74rem;
    color: #6b7280;
}

.premium-metric-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
}

.metric-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    background: #f3f4f6;
}

.icon-gold {
    background: rgba(33, 37, 41, 0.14);
}

.icon-blue {
    background: rgba(13, 110, 253, 0.16);
}

.icon-green {
    background: rgba(33, 37, 41, 0.14);
}

.u-pill-strong,
.lead-score-badge,
.priority-badge {
    border-radius: 999px;
    font-weight: 700;
}

.lead-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    height: 24px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    line-height: 1;
}

.lead-score-badge.lead-hot {
    background: #fff3e0;
    color: #9a5b00;
    border-color: rgba(154, 91, 0, 0.28);
}

.lead-score-badge.lead-critical {
    background: #fee2e2;
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.35);
}

.lead-score-badge.lead-warm {
    background: #fef9c3;
    color: #854d0e;
    border-color: rgba(133, 77, 14, 0.28);
}

.lead-score-badge.lead-cold {
    background: #e6f0fb;
    color: #1f4f7a;
    border-color: rgba(31, 79, 122, 0.25);
}

.lead-score-badge.lead-closed {
    background: #e8ecf1;
    color: #374151;
    border-color: rgba(55, 65, 81, 0.25);
}

.lead-score-badge.lead-dead {
    background: #f3f4f6;
    color: #6b7280;
    border-color: rgba(107, 114, 128, 0.25);
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    height: 24px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
}

.priority-badge.priority-immediate {
    background: #fdeaea;
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.25);
}

.priority-badge.priority-high {
    background: #fff1db;
    color: #8a5a00;
    border-color: rgba(138, 90, 0, 0.25);
}

.priority-badge.priority-medium {
    background: #e8f1fb;
    color: #1f5a85;
    border-color: rgba(31, 90, 133, 0.25);
}

.status-badge,
.u-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    height: 24px;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
}

.status-badge.status-success {
    background: rgba(25, 135, 84, 0.12);
    color: #1f7a4f;
    border-color: rgba(25, 135, 84, 0.25);
}

.status-badge.status-info {
    background: rgba(13, 202, 240, 0.12);
    color: #0b7285;
    border-color: rgba(13, 202, 240, 0.25);
}

.status-badge.status-primary {
    background: rgba(13, 110, 253, 0.12);
    color: #1d4ed8;
    border-color: rgba(13, 110, 253, 0.25);
}

.status-badge.status-danger {
    background: rgba(220, 53, 69, 0.12);
    color: #b42318;
    border-color: rgba(220, 53, 69, 0.25);
}

.status-badge.status-warning {
    background: rgba(245, 158, 11, 0.16);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.25);
}

.status-badge.status-secondary {
    background: rgba(108, 117, 125, 0.12);
    color: #6c757d;
    border-color: rgba(108, 117, 125, 0.25);
}

.priority-text {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.priority-text.priority-immediate {
    color: #b91c1c;
}

.priority-text.priority-high {
    color: #8a5a00;
}

.priority-text.priority-medium {
    color: #1f5a85;
}

.success-rate {
    color: #111827;
    font-weight: 700;
}

.empty-state-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 22px;
    border-radius: 14px;
    background: #f8f9fb;
    border: 1px solid #eef0f4;
}

.empty-state-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b7c7b, #1f1f1f);
    color: #fff;
    font-size: 1.1rem;
}

.dashboard-main {
    flex: 0 0 auto;
    min-height: auto;
}

.dashboard-main .dashboard-card {
    min-height: 352px;
    height: auto;
}

.quick-access-list {
    overflow: visible;
}

.quick-access-card .quick-access-list {
    height: calc(100% - 60px);
    overflow-y: auto;
    padding-bottom: 6px;
}

.quick-access-card .card-header,
.agenda-card .card-header {
    position: sticky;
    top: 0;
    z-index: 4;
    background: inherit;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(4px);
}

.quick-access-item {
    transition: background-color 0.2s ease, border-color 0.2s ease;
    border-radius: 10px;
    margin: 4px 10px;
    border: 1px solid #e7ebf2;
    width: calc(100% - 20px);
    min-height: 34px;
    padding-top: 2px;
    padding-bottom: 2px;
    font-size: 1rem;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
}

.quick-access-item:hover {
    background: #f3f6fb;
    border-color: #d8e2ef;
}

.quick-access-card {
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.quick-access-card:hover {
    background: #f3f6fb;
    border-color: #d8e2ef !important;
}

.quick-access-item span:first-child {
    font-weight: 700;
    color: #1f2937;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.quick-access-item span:first-child i {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1d2939;
    background: linear-gradient(135deg, #f4e6be, #e6d298);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 0.82rem;
}

.quick-access-list .quick-access-item+.quick-access-item::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(0, 0, 0, 0.7);
}

.quick-access-item::after {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 8px;
    background: #d7dde8;
}

.quick-access-item:nth-child(1)::after {
    background: #3b82f6;
}

.quick-access-item:nth-child(2)::after {
    background: #f59e0b;
}

.quick-access-item:nth-child(3)::after {
    background: #7c3aed;
}

.quick-access-item:nth-child(4)::after {
    background: #06b6d4;
}

.quick-access-item:nth-child(5)::after {
    background: #10b981;
}

.quick-access-item:nth-child(6)::after {
    background: #ef4444;
}

.agenda-list {
    max-height: 380px;
    overflow-y: auto;
}

.agenda-card {
    display: flex;
    flex-direction: column;
}

.agenda-card .agenda-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 360px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (min-width: 992px) {

    .quick-access-card,
    .agenda-card {
        height: 360px !important;
        max-height: 360px;
    }

    .quick-access-card .quick-access-list,
    .agenda-card .agenda-list {
        min-height: 0;
        overflow-y: auto;
    }
}

.agenda-item {
    border: 1px solid #dde5f0;
    background: linear-gradient(135deg, #f8fbff 0%, #eef3fb 100%);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    padding: 6px 10px !important;
    min-height: 48px;
}

.agenda-item:hover {
    background: linear-gradient(135deg, #f2f7ff 0%, #e7eef9 100%);
    border-color: #c9d7ec;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
}

.agenda-item .text-truncate a {
    font-weight: 600;
}

.agenda-inline-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.94rem;
    line-height: 1.2;
}

.agenda-customer-link {
    font-weight: 700;
    color: #111827;
}

.agenda-owner-inline {
    color: #64748b;
    font-size: 0.8rem;
    margin-left: 6px;
}

.agenda-note-inline {
    color: #6b7280;
    margin-left: 8px;
}

.agenda-item .text-truncate h6 {
    margin-bottom: 0;
    line-height: 1.1;
}

.agenda-item .text-truncate small {
    line-height: 1.1;
}

.agenda-done-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(22, 163, 74, 0.55);
    background: linear-gradient(145deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(4, 120, 87, 0.18);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.agenda-done-btn i {
    font-size: 1.18rem;
    line-height: 1;
    font-weight: 800;
}

.agenda-done-btn:hover {
    background: linear-gradient(145deg, #16a34a 0%, #15803d 100%);
    border-color: rgba(21, 128, 61, 0.65);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(4, 120, 87, 0.24);
}

.agenda-done-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(4, 120, 87, 0.18);
}

.agenda-done-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22), 0 8px 16px rgba(4, 120, 87, 0.24);
}

.dashboard-row-animate {
    animation: dashRowIn 0.35s ease-out both;
}

.dashboard-row-animate:nth-child(1) {
    animation-delay: 0.04s;
}

.dashboard-row-animate:nth-child(2) {
    animation-delay: 0.08s;
}

.dashboard-row-animate:nth-child(3) {
    animation-delay: 0.12s;
}

.dashboard-row-animate:nth-child(4) {
    animation-delay: 0.16s;
}

.dashboard-row-animate:nth-child(5) {
    animation-delay: 0.2s;
}

.dashboard-row-animate:nth-child(6) {
    animation-delay: 0.24s;
}

@keyframes dashRowIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

.live-indicator {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    animation: livePulse 1.6s ease-out infinite;
}

@keyframes livePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.h-full-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px;
    flex: 1;
}

.card-flex-body {
    flex: 1;
    position: relative;
    background: white;
    min-height: 500px;
    height: auto;
    overflow: visible;
}

/* Customer detail: fixed-height cards with inline scroll (desktop) */
.customer-detail-page .h-full-card {
    min-height: 0;
    height: calc(100vh - 180px);
    max-height: calc(100vh - 180px);
}

.customer-detail-page #dynamic-tab-content,
.customer-detail-page #dynamic-tab-content>.card {
    height: 100%;
    max-height: 100%;
}

.customer-detail-page .card-flex-body {
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.customer-detail-page .scrollable-panel {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.customer-detail-page .table-scroll-container {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: auto;
}

/* ==========================================================================
   5. COMPONENTS
   ========================================================================== */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.card-header {
    flex-shrink: 0;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.dashboard-page .card {
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.18)) !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.16),
        var(--shadow-strong),
        0 2px 8px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border-radius: var(--radius-2xl);
}

.dashboard-page .card-header {
    background:
        linear-gradient(160deg, rgba(18, 18, 18, 0.78), rgba(32, 32, 32, 0.72)) !important;
    background-blend-mode: multiply;
    color: #f8fafc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.10),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08);
    border-top-left-radius: var(--radius-2xl);
    border-top-right-radius: var(--radius-2xl);
    position: relative;
    overflow: hidden;
}

.dashboard-page .card-header::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.16;
    background-image: repeating-linear-gradient(-45deg,
            rgba(255, 255, 255, 0.10) 0px,
            rgba(255, 255, 255, 0.10) 1px,
            transparent 1px,
            transparent 7px);
}

.dashboard-page .card-header h6,
.dashboard-page .card-header span,
.dashboard-page .card-header .live-indicator {
    color: #f8fafc !important;
}

.dashboard-page .card-header .live-indicator {
    opacity: 0.9;
}

.dashboard-page .card-header .live-dot {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
}

.dashboard-page .premium-metric,
.dashboard-page .today-highlight-row,
.dashboard-page .quick-access-item,
.dashboard-page .agenda-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.40)) !important;
    border-color: rgba(255, 255, 255, 0.34) !important;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.16),
        0 4px 12px rgba(15, 23, 42, 0.08);
}

.dashboard-page .premium-select,
.dashboard-page .form-select {
    background-color: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
}

.btn {
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.5rem 1.2rem;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
    letter-spacing: 0.02em;
}

.btn:active {
    transform: translateY(0);
}

.btn-gold {
    background: linear-gradient(135deg, #c9a24d, #e1c16e);
    color: #111;
    border: none;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.25);
}

.btn-gold:hover {
    background: linear-gradient(135deg, #b7923e, #d4b55f);
    transform: translateY(-1px);
    color: #000;
}

.btn-charcoal {
    background: var(--brand-charcoal);
    color: #fff;
    border: 1px solid var(--brand-charcoal);
    box-shadow: 0 4px 10px rgba(44, 62, 80, 0.2);
}

.btn-charcoal:hover {
    background: var(--brand-charcoal-light);
    transform: translateY(-1px);
    color: #fff;
}

.btn-outline-subtle {
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-outline-subtle:hover {
    border-color: var(--brand-gold);
    color: #000;
    transform: translateY(-1px);
}

.back-dashboard-btn:hover,
.back-dashboard-btn:focus {
    background: #d4af37 !important;
    border-color: #d4af37 !important;
    color: #111827 !important;
}

.btn-icon-square {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    min-height: unset;
}

.badge {
    min-width: 80px;
    padding: 0.5em 1em;
    font-weight: 600;
    border-radius: var(--radius-pill);
    font-size: 11px;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.avatar-profile {
    width: 60px;
    height: 60px;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: var(--brand-gold-gradient);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
    border: 2px solid #fff;
    flex-shrink: 0;
}

.avatar-compact {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
    flex-shrink: 0;
}

/* ==========================================================================
   6. FORMS & INPUTS
   ========================================================================== */
.form-control,
.form-select,
.form-select-custom {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

input[type="date"] {
    color: #495057;
    font-size: 0.9rem;
}

.search-icon-wrapper {
    position: relative;
    width: 100%;
}

.search-icon-wrapper .bi-search {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #adb5bd;
    z-index: 5;
}

.search-input-padded {
    padding-left: 40px !important;
}

.filter-label,
.form-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    display: block;
    margin-bottom: 4px;
}

.list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px;
}

.toolbar-search {
    flex: 1 1 320px;
    min-width: 220px;
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.toolbar-btn {
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    font-weight: 600;
    transition: all 0.18s ease;
}

.toolbar-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.filter-panel {
    margin-top: 14px;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    background: #f8f9fb;
}

.filter-panel .form-select,
.filter-panel .form-control {
    background: #fff;
}

.is-active-filter {
    border-color: var(--brand-gold) !important;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.18);
}

#activityModal textarea {
    height: 80px;
    min-height: 80px;
    resize: none;
}

/* ==========================================================================
   7. TABLES (BASE + STICKY HEADER)
   ========================================================================== */
.table,
.u-table-base {
    margin-bottom: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.table thead th,
.u-table-base thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 14px 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
}

.table tbody td,
.u-table-base tbody td {
    vertical-align: middle;
    padding: 12px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

.table tbody tr:hover td,
.u-table-base tbody tr:hover td {
    background-color: #f8f1d8;
    cursor: pointer;
}

.table tbody tr:nth-child(even) td,
.u-table-base tbody tr:nth-child(even) td {
    background-color: #f5f8ff;
}

.col-hidden {
    display: none !important;
}

.table-compact th {
    padding: 4px 6px;
    font-size: 0.76rem;
    white-space: nowrap;
}

.table-compact tbody td {
    padding: 1px 2px !important;
    font-size: 0.8rem;
    line-height: 0.85 !important;
    white-space: nowrap;
}

.table-compact .avatar-small {
    display: none !important;
}

.table-compact .avatar-compact {
    display: none !important;
}

.table-compact .customer-name-text {
    font-size: 0.88rem;
    line-height: 0.9;
}

.table-compact .gap-3 {
    gap: 0.4rem !important;
}

.table-compact .badge {
    padding: 0.12rem 0.4rem;
    font-size: 0.7rem;
}

.table-compact .lead-score-badge {
    min-width: 80px;
    height: 20px;
    padding: 0.12rem 0.4rem;
    font-size: 0.7rem;
}

.table-compact .status-badge {
    min-width: 80px;
    height: 20px;
    padding: 0.12rem 0.4rem;
    font-size: 0.7rem;
}

.table-compact .priority-badge {
    min-width: 80px;
    height: 20px;
    padding: 0.12rem 0.4rem;
    font-size: 0.7rem;
}

.table-compact tbody tr {
    height: 24px !important;
}

.table-compact tbody tr td {
    height: 24px !important;
    vertical-align: middle !important;
}

.table-compact .customer-col-name,
.table-compact .col-name {
    width: 180px;
}

.table-compact .col-phone {
    width: 110px;
}

.table-compact .col-material {
    width: 90px;
}

.table-compact .col-status {
    width: 115px;
}

th.action-col,
td.action-cell {
    text-align: center !important;
}

td.action-cell form {
    margin: 0;
    display: flex;
    justify-content: center;
}

td.action-cell .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.customer-col-name,
.col-name {
    width: 260px;
    font-weight: 600;
    color: #212529;
}

.col-phone {
    width: 130px;
}

.col-material {
    width: 60px;
}

.col-status {
    width: 160px;
    text-align: center;
}

.col-customer-type {
    width: 120px;
}

.col-priority {
    width: 110px;
}

.col-client-size {
    width: 110px;
}

.sticky-table-container {
    height: calc(100vh - 280px);
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: white;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.sticky-table-container .table {
    table-layout: fixed;
}

.sticky-table-container .table th,
.sticky-table-container .table td {
    overflow: hidden;
    text-overflow: ellipsis;
}



.table-dark-header th {
    background-color: #212529 !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Default header appearance inside scrollable tables (except dark-header rows) */
.sticky-table-container thead tr:not(.table-dark-header) th {
    background-color: #f8f9fa;
    color: #212529;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   8. TABS & MODALS
   ========================================================================== */
.nav-tabs {
    border-bottom: 1px solid #f0f0f0;
}

.nav-tabs .nav-link {
    border: none;
    color: #888;
    font-weight: 600;
    padding: 12px 20px;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
    color: var(--brand-gold);
}

.nav-tabs .nav-link.active {
    color: var(--brand-gold);
    border-bottom-color: var(--brand-gold);
    background: transparent;
}

/* Mobile reminders tabs: gold underline for active tab */
body.reminders-page .d-md-none .nav-pills .nav-link {
    border-bottom: 3px solid transparent;
    border-radius: 0;
}

body.reminders-page .d-md-none .nav-pills .nav-link.active {
    background: transparent;
    color: var(--brand-gold);
    border-bottom-color: var(--brand-gold);
    box-shadow: none;
}

/* Tasks page: premium desktop tab strip + table parity with customer list */
body.reminders-page .task-tabs {
    padding: 8px 10px 0;
    background: linear-gradient(180deg, #f8fafc, #eff3f8);
    border: 1px solid #e5e7eb;
    border-bottom: 0;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

body.reminders-page .task-tabs .nav-link {
    border-radius: 10px 10px 0 0;
    padding: 11px 16px;
    font-weight: 700;
}

body.reminders-page .task-tabs .nav-link.active {
    background: #fff;
    border-bottom-color: transparent;
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.08);
}

body.reminders-page .task-tab-shell {
    border-color: #e5e7eb !important;
    border-radius: 0 10px 10px 10px !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

body.reminders-page .task-table thead th {
    letter-spacing: 0.04em;
    padding: 10px 12px;
}

body.reminders-page .task-table tbody td {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    padding: 8px 12px;
    line-height: 1.2;
}

body.reminders-page .task-table tbody tr:nth-child(even) td {
    background-color: #f5f8ff;
}

body.reminders-page .task-table tbody tr:hover td {
    background-color: #f8f1d8;
}

body.reminders-page .task-table .task-row-overdue td {
    position: relative;
}

body.reminders-page .task-table .task-row-overdue td:first-child {
    box-shadow: inset 3px 0 0 #ef4444;
}

body.reminders-page .task-table .task-row-completed td:first-child {
    box-shadow: inset 3px 0 0 #94a3b8;
}

body.reminders-page .task-table .btn-sm {
    padding: 0.24rem 0.55rem;
    min-height: 28px;
    font-size: 0.75rem;
}

.tab-content {
    height: 100%;
    width: 100%;
    position: relative;
}

.tab-content>.tab-pane {
    width: 100%;
    position: relative;
    display: none;
}

.tab-content>.tab-pane.active {
    display: block;
}

.crm-modal-header {
    background: var(--brand-charcoal);
    color: #fff;
    padding: 16px 24px;
    border: none;
}

.crm-modal-body {
    padding: 24px;
}

.crm-modal-footer {
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
}

.form-error {
    min-height: 16px;
    margin-top: 4px;
    font-size: 12px;
    color: #dc3545;
}

.modal .is-invalid,
.crm-modal .is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.12) !important;
}

/* Force visible borders on customer create/edit forms (selects were appearing borderless) */
#addCustomerModal .form-control,
#addCustomerModal .form-select,
#editCustomerModal .form-control,
#editCustomerModal .form-select,
.customer-form-page .form-control,
.customer-form-page .form-select {
    border: 1px solid #c9d1da !important;
    background-color: #fff !important;
}

#addCustomerModal .form-control:focus,
#addCustomerModal .form-select:focus,
#editCustomerModal .form-control:focus,
#editCustomerModal .form-select:focus,
.customer-form-page .form-control:focus,
.customer-form-page .form-select:focus {
    border-color: #87a2c6 !important;
    box-shadow: 0 0 0 0.2rem rgba(73, 124, 190, 0.12) !important;
}

.toast-container .toast {
    margin-top: 0.6rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-radius: 10px;
}

/* ==========================================================================
   9. CUSTOMER DETAIL UI
   ========================================================================== */
.customer-header-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.info-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

/* ==========================================================================
   10. TIMELINE
   ========================================================================== */
.timeline-wrapper {
    padding-top: 5px;
}

.timeline-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    position: relative;
}

.timeline-date-col {
    width: 80px;
    text-align: right;
    flex-shrink: 0;
    padding-top: 6px;
}

.timeline-date-text {
    font-weight: 700;
    color: #333;
    font-size: 0.85rem;
    display: block;
    line-height: 1.1;
}

.timeline-time-text {
    font-size: 0.7rem;
    color: #adb5bd;
}

.timeline-divider-col {
    width: 20px;
    position: relative;
    flex-shrink: 0;
}

.timeline-divider-col::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background-color: #f0f0f0;
    z-index: 0;
}

.timeline-row:last-child .timeline-divider-col::before {
    display: none;
}

.timeline-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid var(--brand-gold);
    box-shadow: 0 0 0 2px #fff;
    position: relative;
    z-index: 2;
    margin: 8px auto 0;
}

.timeline-content-col {
    flex-grow: 1;
    min-width: 0;
}

.timeline-card {
    background: #fff;
    border: 1px solid #f1f1f1;
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.01);
    position: relative;
}

/* ==========================================================================
   11. LOGIN PAGE
   ========================================================================== */
body.login-body {
    background-color: var(--app-bg-color);
    background-image: var(--app-bg-image);
    background-blend-mode: soft-light, screen;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    margin: 0;
}

.login-body .login-brand span {
    color: #d4af37;
}

.login-logo-img {
    width: 104px;
    height: 104px;
    object-fit: contain;
    display: inline-block;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 3rem;
    border-radius: 16px;
    background: linear-gradient(160deg, #151515 0%, #0a0a0a 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 5px solid #d4af37;
    position: relative;
    overflow: hidden;
}

.login-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #f8fafc;
}

.login-card p.text-muted {
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 2rem;
    color: rgba(248, 250, 252, 0.72) !important;
}

.login-card .form-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #e5e7eb;
    margin-bottom: 6px;
}

.login-card .form-control {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    color: #f8fafc;
    border-radius: 8px;
    cursor: text;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.login-card .form-control::placeholder {
    color: rgba(248, 250, 252, 0.56);
}

.login-card .form-control:focus {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(212, 175, 55, 0.72);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.16);
    outline: none;
}

.login-card button[type="submit"] {
    margin-top: 1rem;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    border: none;
    background: var(--brand-gold-gradient);
    color: #111;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.login-card button[type="submit"]:hover {
    background: var(--brand-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.login-card button[type="submit"]:active {
    transform: translateY(0);
}

.login-card .alert-danger {
    background-color: #fff5f5;
    border: 1px solid #ffc9c9;
    color: var(--danger);
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
}

.error-403-page .error-403-card {
    max-width: 520px;
}

/* Progressive enhancement for blur-heavy surfaces */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {

    .dashboard-page .card,
    .error-403-page .error-403-card,
    .quick-access-card .card-header,
    .agenda-card .card-header {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(255, 255, 255, 0.92) !important;
    }
}

/* Render large sections lazily for smoother long-page scrolling */
@supports (content-visibility: auto) {

    .sticky-table-container,
    .agenda-list,
    .quick-access-list,
    #customer-list-container,
    #archive-list-container,
    #performance-container {
        content-visibility: auto;
        contain-intrinsic-size: 800px;
    }
}

/* Motion reduction for accessibility and better low-power performance */
@media (prefers-reduced-motion: reduce) {

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

    .dashboard-row-animate,
    .premium-metric-link:hover,
    .quick-access-item:hover,
    .agenda-item:hover,
    .agenda-done-btn:hover,
    .dashboard-kpi:hover,
    .btn:hover {
        transform: none !important;
        box-shadow: none !important;
    }
}

.error-403-logo {
    width: 92px;
    height: 92px;
    object-fit: contain;
}

.error-403-code {
    font-size: 2.3rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #d4af37;
    margin-bottom: 0.45rem;
}

.error-403-page .error-403-card p {
    color: rgba(248, 250, 252, 0.76);
}

.error-403-note {
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.error-403-page .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.45);
    color: #f8fafc;
}

.error-403-page .btn-outline-light:hover {
    border-color: #d4af37;
    color: #111;
    background: #d4af37;
}

/* ==========================================================================
   12. UTILITIES
   ========================================================================== */
.u-surface-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.u-card-pad-sm {
    padding: 12px;
}

.u-card-pad-md {
    padding: 16px;
}

.u-pill-badge {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.u-btn-sm {
    min-height: 32px;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
}

.u-btn-compact {
    min-height: 32px;
    border-radius: 8px;
    font-size: 0.78rem;
}

.u-btn-md {
    min-height: 40px;
    padding: 0.5rem 1.1rem;
    border-radius: 10px;
}

.u-hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.u-hover-lift:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   13. RESPONSIVE OVERRIDES
   ========================================================================== */
@media (max-width: 991px) {

    /* Global unlock window scroll */
    html,
    body {
        overflow: auto !important;
        height: auto !important;
        display: block !important;
    }

    .app-content-wrapper {
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        padding-bottom: 40px;
    }

    /* Layout containers */
    .flex-scroll-area,
    .app-scroll-frame {
        position: static !important;
        height: auto !important;
        overflow: visible !important;
    }

    .dashboard-grid {
        display: block !important;
        height: auto !important;
        gap: 0 !important;
    }

    .h-full-card {
        height: auto !important;
        margin-bottom: 20px;
    }

    /* Tables & panels */
    .table-scroll-container {
        overflow-x: auto !important;
        border: 1px solid #f0f0f0;
    }

    .scrollable-panel {
        position: relative !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding-bottom: 50px;
    }

    body.reminders-page .sticky-table-container {
        height: auto;
        overflow: visible;
    }

    /* Tabs */
    .tab-content,
    .tab-content>.tab-pane {
        height: auto !important;
        overflow: visible !important;
    }

    /* Customer detail header */
    .customer-header-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .customer-header-card>div:first-child {
        width: 100%;
    }

    .customer-header-card>div:last-child {
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: 10px;
    }

    .customer-header-card .btn {
        flex: 1;
    }

    /* Timeline */
    .timeline-date-col {
        width: 55px;
    }

    .timeline-date-text {
        font-size: 0.75rem;
    }

    .timeline-wrapper {
        height: auto !important;
        overflow: visible !important;
    }

    /* Unlock content height for logs/history */
    .card-flex-body {
        height: auto !important;
        min-height: 500px;
        flex: none !important;
        overflow: visible !important;
    }
}

@media (max-width: 768px) {
    .customer-list-toolbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .customer-list-toolbar .toolbar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        justify-content: stretch;
    }

    .customer-list-toolbar .toolbar-actions .btn,
    .customer-list-toolbar .toolbar-actions a {
        width: 100%;
    }

    .customer-list-toolbar [data-view],
    .customer-list-toolbar .dropdown {
        display: none !important;
    }

    .customer-list-toolbar .toolbar-actions .btn-group,
    .customer-list-toolbar .toolbar-actions .dropdown {
        display: none !important;
    }

    .filter-deals-toolbar .btn-group,
    .filter-deals-toolbar .dropdown,
    .filter-deals-toolbar [data-view] {
        display: none !important;
    }

    .filter-deals-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        justify-content: stretch;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .filter-deals-toolbar .btn-group,
    .filter-deals-toolbar .dropdown {
        flex: 0 1 auto;
    }

    .u-btn-compact,
    .filter-deals-toolbar .toolbar-btn {
        font-size: 0.78rem;
        border-radius: 8px;
        min-height: 32px;
        width: 100%;
    }

    .filter-deals-toolbar .toolbar-btn {
        padding: 0.35rem 0.6rem;
    }

    .filter-panel .form-select,
    .filter-panel .form-control {
        padding: 0.45rem 0.65rem;
        font-size: 0.82rem;
    }

    .filter-panel .filter-label {
        font-size: 0.6rem;
        letter-spacing: 0.06em;
    }

    .dashboard-page {
        height: auto;
        overflow: visible;
    }

    .dashboard-main {
        height: auto;
    }

    .quick-access-card .quick-access-list {
        height: auto;
        max-height: none;
    }

    .agenda-card .agenda-list {
        height: auto;
        max-height: 360px;
    }

    /* Customer detail: stack profile + buttons */
    .customer-header-card>.d-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .customer-header-card .d-flex.gap-2 {
        width: 100%;
        display: flex;
        gap: 10px !important;
    }

    .customer-header-card .btn {
        justify-content: center;
    }

    /* Tabs and action buttons */
    .card-header>.d-flex {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
    }

    .nav-tabs {
        width: 100%;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .card-header .d-flex.gap-2 {
        width: 100%;
        justify-content: space-between;
    }

    .card-header .d-flex.gap-2 .btn {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        white-space: nowrap;
    }

    .owner-performance-page .nav-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
        border-bottom: 0;
        overflow: visible;
        margin-bottom: 10px !important;
    }

    .owner-performance-page .nav-tabs .nav-item {
        width: 100%;
    }

    .owner-performance-page .nav-tabs .nav-link {
        width: 100%;
        padding: 10px 8px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #fff;
        text-align: center;
        font-size: 0.8rem;
        line-height: 1.2;
    }

    .owner-performance-page .nav-tabs .nav-link.active {
        border-color: var(--brand-gold);
        background: #fff8e8;
    }

    .owner-performance-page .sticky-table-container {
        height: auto !important;
        overflow: visible !important;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .owner-performance-page .perf-table {
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    .owner-performance-page .perf-table thead {
        display: none;
    }

    .owner-performance-page .perf-table tbody {
        display: block;
        width: 100%;
    }

    .owner-performance-page .perf-table tr {
        display: block;
        width: 100%;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
        overflow: hidden;
    }

    .owner-performance-page .perf-table td {
        padding: 10px 14px;
        border: 0;
        border-bottom: 1px solid #f3f4f6;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        text-align: right;
        white-space: normal;
    }

    .owner-performance-page .perf-table td:last-child {
        border-bottom: 0;
    }

    .owner-performance-page .perf-table td::before {
        content: attr(data-label);
        color: #6b7280;
        font-size: 0.76rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        text-align: left;
    }

    .owner-performance-page .perf-table td:first-child {
        background: linear-gradient(120deg, #fff8e8, #ffffff);
        font-size: 0.98rem;
        font-weight: 700 !important;
        color: #111827 !important;
    }

    .owner-performance-page .perf-table td .badge {
        margin-left: auto;
    }

    .owner-performance-page .perf-table tr.empty-state-row td {
        display: block;
        text-align: center;
        white-space: normal;
        padding: 28px 16px !important;
    }

    .owner-performance-page .perf-table tr.empty-state-row td::before {
        content: none;
    }
}

.today-highlights-card {
    overflow: visible;
}

.today-highlights-card .dropdown-menu {
    z-index: 2000;
}
