/* Custom Dashboard Styling - Blazor Model Dashboard */

:root {
    --bg: #f2f5fa;
    --surface: #ffffff;
    --line: #e6ebf3;
    --text: #0f172a;
    --muted: #6b7686;
    --brand: #2563eb;
    --brand-soft: #e8f0ff;
    --ink: #0f1115;
    --dot: #ef4444;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);
    --rail: 72px;
    --rail-open: 236px;
    --gap: 12px;
    --font-scale: 1;

    /* Legacy Mappings */
    --bg-main: var(--bg);
    --bg-card: var(--surface);
    --bg-sidebar: var(--surface);
    --text-primary: var(--text);
    --text-secondary: var(--muted);
    --text-muted: var(--muted);
    --border-color: var(--line);
    --shadow-soft: var(--shadow);
    --font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    --transition-smooth: all 0.22s cubic-bezier(0.3, 0.7, 0.2, 1);
}

/* ─── White Tonalities (Day/Light Mode Eye Care) ─── */
[data-tone="soft"], .tone-soft {
    --surface: #f8fafc;
    --bg: #edf2f7;
    --line: #e2e8f0;
    --shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 6px 20px rgba(15, 23, 42, .04);
    --nyx-paper: #f8fafc;
    --nyx-snow: #edf2f7;
    --nyx-hairline: #e2e8f0;
}

[data-tone="warm"], .tone-warm {
    --surface: #faf8f5;
    --bg: #f3efe8;
    --line: #e7e2d8;
    --shadow: 0 1px 2px rgba(40, 30, 20, .03), 0 6px 20px rgba(40, 30, 20, .04);
    --nyx-paper: #faf8f5;
    --nyx-snow: #f3efe8;
    --nyx-hairline: #e7e2d8;
}

/* ─── Dark Mode Theme Tokens & Global Overrides ───
   Tonalidades oscuras (reutilizan las claves de data-tone):
     pure → "Grafito"     (neutro, por defecto)
     soft → "Medianoche"  (azul profundo)
     warm → "Carbón"      (cálido, descanso nocturno)
   El resto de capas (dark-theme.css) consume SOLO estos tokens. */
[data-theme="dark"], .theme-dark {
    color-scheme: dark;

    /* Superficies (escala de elevación) */
    --bg: #0e1116;
    --surface: #161a21;
    --surface-2: #1c2129;
    --surface-3: #242a34;
    --surface-hover: #242a34;
    --line: #2a313c;
    --line-strong: #3a4352;

    /* Texto */
    --text: #e8ecf2;
    --text-2: #c3cad5;
    --muted: #8d97a7;
    --faint: #667080;

    /* Marca */
    --brand: #5b9bff;
    --brand-strong: #3d84f7;
    --brand-soft: rgba(91, 155, 255, 0.14);
    --brand-ring: rgba(91, 155, 255, 0.35);
    --ink: #e8ecf2;
    --dot: #f87171;

    /* Semánticos (texto / fondo / borde) */
    --ok: #34d399;      --ok-soft: rgba(52, 211, 153, 0.12);     --ok-line: rgba(52, 211, 153, 0.30);
    --warn: #fbbf24;    --warn-soft: rgba(251, 191, 36, 0.12);   --warn-line: rgba(251, 191, 36, 0.30);
    --err: #f87171;     --err-soft: rgba(248, 113, 113, 0.12);   --err-line: rgba(248, 113, 113, 0.30);
    --info: #60a5fa;    --info-soft: rgba(96, 165, 250, 0.12);   --info-line: rgba(96, 165, 250, 0.30);
    --violet: #a78bfa;  --violet-soft: rgba(167, 139, 250, 0.13); --violet-line: rgba(167, 139, 250, 0.32);

    /* Elevación */
    --overlay: rgba(4, 6, 10, 0.72);
    --shadow: 0 10px 30px -4px rgba(0, 0, 0, .75), 0 4px 12px -2px rgba(0, 0, 0, .5), 0 0 0 1px var(--line);
    --shadow-pop: 0 24px 60px -12px rgba(0, 0, 0, .85), 0 8px 24px -4px rgba(0, 0, 0, .6), 0 0 0 1px var(--line-strong);

    /* Legacy Mappings */
    --bg-main: var(--bg);
    --bg-card: var(--surface);
    --bg-sidebar: var(--surface);
    --text-primary: var(--text);
    --text-secondary: var(--muted);
    --text-muted: var(--muted);
    --border-color: var(--line);

    /* Aaply / Asesor Design Tokens (derivados) */
    --nyx-paper: var(--surface);
    --nyx-snow: var(--bg);
    --nyx-ink: var(--text);
    --nyx-carbon: var(--surface-3);
    --nyx-smoke: var(--text-2);
    --nyx-fog: var(--muted);
    --nyx-ash: var(--faint);
    --nyx-mist: var(--line);
    --nyx-hairline: var(--line);
    --nyx-canvas: var(--bg);
}

/* Tonalidad oscura "Grafito" (neutro, estándar) */
[data-theme="dark"][data-tone="pure"], .theme-dark.tone-pure {
    --bg: #0e1116;
    --surface: #161a21;
    --surface-2: #1c2129;
    --surface-3: #242a34;
    --surface-hover: #242a34;
    --line: #2a313c;
    --line-strong: #3a4352;
    --shadow: 0 12px 34px -4px rgba(0, 0, 0, 0.82), 0 4px 14px -2px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-pop: 0 24px 60px -12px rgba(0, 0, 0, 0.92), 0 8px 24px -4px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* Tonalidad oscura "Medianoche" */
[data-theme="dark"][data-tone="soft"], .theme-dark.tone-soft {
    --bg: #0a1020;
    --surface: #111a2c;
    --surface-2: #172238;
    --surface-3: #1e2a44;
    --surface-hover: #1e2a44;
    --line: #243250;
    --line-strong: #31426a;
    --text: #e6ecf6;
    --text-2: #c0cbdc;
    --muted: #8998b2;
    --faint: #63718b;
}

/* Tonalidad oscura "Carbón" (cálida) */
[data-theme="dark"][data-tone="warm"], .theme-dark.tone-warm {
    --bg: #12100e;
    --surface: #1a1816;
    --surface-2: #221f1c;
    --surface-3: #2a2623;
    --surface-hover: #2a2623;
    --line: #342f2a;
    --line-strong: #463f38;
    --text: #efe9e2;
    --text-2: #d2c9be;
    --muted: #a3998d;
    --faint: #7a7166;
    --brand: #6aa3ff;
}

/* Dark Mode Card Overrides for All Panels */
[data-theme="dark"] .premium-card,
[data-theme="dark"] .recording-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .card-panel,
[data-theme="dark"] .audit-card,
[data-theme="dark"] .role-card,
[data-theme="dark"] .kb-card,
[data-theme="dark"] .admin-header,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .sb-head,
[data-theme="dark"] .sb-item,
[data-theme="dark"] .client-card,
[data-theme="dark"] .details-panel,
[data-theme="dark"] .main-bo .card,
[data-theme="dark"] .magnitud-panel,
[data-theme="dark"] .double-calendar-popup,
[data-theme="dark"] .tag-mod,
[data-theme="dark"] .stepper-current-pill,
[data-theme="dark"] .task-row,
[data-theme="dark"] .asesor-hero-card,
[data-theme="dark"] .asesor-kpi-card,
[data-theme="dark"] .table-card,
[data-theme="dark"] .tracking-checkpoint-card,
[data-theme="dark"] .venta-section-card,
[data-theme="dark"] .preview-invoice-card,
[data-theme="dark"] .memo-card-field,
[data-theme="dark"] .asesor-lead-card,
[data-theme="dark"] .timeline-compact-pill,
[data-theme="dark"] .timeline-preview-card,
[data-theme="dark"] .hub-quick-kpi {
    background: var(--surface) !important;
    background-color: var(--surface) !important;
    border-color: var(--line) !important;
    color: var(--text) !important;
}

[data-theme="dark"] .hub-header,
.theme-dark .hub-header,
[data-theme="dark"] .hub-profile-row,
.theme-dark .hub-profile-row {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ── Refined Dark Mode Elevations & Shadows ── */
[data-theme="dark"] .asesor-lead-card,
[data-theme="dark"] .asesor-hero-card,
[data-theme="dark"] .asesor-kpi-card,
[data-theme="dark"] .table-card,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .client-card,
[data-theme="dark"] .details-panel,
[data-theme="dark"] .premium-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .timeline-compact-pill,
[data-theme="dark"] .timeline-preview-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--line) !important;
}

[data-theme="dark"] .asesor-lead-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65), 0 0 16px rgba(0, 152, 242, 0.3) !important;
    border-color: #0098f2 !important;
}

/* ── Dark Mode Text High Contrast ── */
[data-theme="dark"] .text-dark {
    color: #f8fafc !important;
}

[data-theme="dark"] .text-secondary {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-theme="dark"] .card-client-name {
    color: #f8fafc !important;
}

[data-theme="dark"] .card-phone-pill {
    background-color: #162032 !important;
    border-color: #1f293d !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .card-phone-pill i {
    color: #94a3b8 !important;
}

[data-theme="dark"] .card-detail-value {
    color: #f8fafc !important;
}

[data-theme="dark"] .card-detail-label {
    color: #94a3b8 !important;
}

[data-theme="dark"] .btn-hero-cta {
    background: #0098f2 !important;
    border-color: #0098f2 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 152, 242, 0.35) !important;
}

[data-theme="dark"] .btn-hero-cta:hover {
    background: #0080cc !important;
    border-color: #0080cc !important;
}

[data-theme="dark"] .hero-toggle-group,
[data-theme="dark"] .btn-hero-search {
    background: #111827 !important;
    border-color: #1f293d !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .hero-toggle-btn:not(.active) {
    color: #94a3b8 !important;
}

[data-theme="dark"] .hero-toggle-btn.active {
    background: #2563eb !important;
    color: #ffffff !important;
}

[data-theme="dark"] .card-pill-badge {
    background: #162032 !important;
    border-color: #1f293d !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .card-progress-track {
    background-color: #1f293d !important;
}

[data-theme="dark"] .bg-white {
    background-color: #111827 !important;
    border-color: #1f293d !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .bg-light {
    background-color: #162032 !important;
    border-color: #1f293d !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #111827 !important;
    border-color: #1f293d !important;
    color: #f8fafc !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .dropdown-item {
    color: #f8fafc !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

[data-theme="dark"] .recording-card {
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.12) 0%, rgba(17, 24, 39, 0.98) 60%), #111827 !important;
}

[data-theme="dark"] .sb-item:hover,
[data-theme="dark"] .task-row:hover,
[data-theme="dark"] .task-row {
    background: var(--surface-2, #162032) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] .sb-item.active {
    background: rgba(59, 130, 246, 0.22) !important;
    border-color: var(--brand) !important;
}

[data-theme="dark"] input:not(.form-input):not(#login-form input),
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: var(--surface-2, #162032) !important;
    border-color: var(--line) !important;
    color: var(--text) !important;
}

[data-theme="dark"] table th {
    background-color: var(--surface-2, #162032) !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] table td {
    border-color: var(--line) !important;
    color: var(--text) !important;
}

/* Eye-Care Soft / Warm White Overrides for Cards */
[data-tone="soft"]:not([data-theme="dark"]) .premium-card,
[data-tone="soft"]:not([data-theme="dark"]) .stat-card,
[data-tone="soft"]:not([data-theme="dark"]) .sidebar,
[data-tone="soft"]:not([data-theme="dark"]) .sb-head,
[data-tone="soft"]:not([data-theme="dark"]) .sb-item,
[data-tone="soft"]:not([data-theme="dark"]) .client-card,
[data-tone="soft"]:not([data-theme="dark"]) .asesor-hero-card,
[data-tone="soft"]:not([data-theme="dark"]) .asesor-kpi-card,
[data-tone="soft"]:not([data-theme="dark"]) .table-card,
[data-tone="soft"]:not([data-theme="dark"]) .venta-section-card,
[data-tone="soft"]:not([data-theme="dark"]) .asesor-lead-card {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

[data-tone="warm"]:not([data-theme="dark"]) .premium-card,
[data-tone="warm"]:not([data-theme="dark"]) .stat-card,
[data-tone="warm"]:not([data-theme="dark"]) .sidebar,
[data-tone="warm"]:not([data-theme="dark"]) .sb-head,
[data-tone="warm"]:not([data-theme="dark"]) .client-card,
[data-tone="warm"]:not([data-theme="dark"]) .asesor-hero-card,
[data-tone="warm"]:not([data-theme="dark"]) .asesor-kpi-card,
[data-tone="warm"]:not([data-theme="dark"]) .table-card,
[data-tone="warm"]:not([data-theme="dark"]) .venta-section-card,
[data-tone="warm"]:not([data-theme="dark"]) .asesor-lead-card {
    background: #faf8f5 !important;
    border-color: #e7e2d8 !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-family);
    overflow: hidden;
    height: 100vh;
}

/* ---------- Shell App Container ---------- */
.app {
    height: 100vh;
    display: flex;
    gap: var(--gap);
    padding: var(--gap);
    box-sizing: border-box;
    background-color: var(--bg);
    color: var(--text);
    overflow: hidden;
    font-size: calc(14px * var(--font-scale, 1));
    transition: background-color .22s cubic-bezier(0.3, 0.7, 0.2, 1), color .22s cubic-bezier(0.3, 0.7, 0.2, 1);
}

/* ---------- Sidebar Rail ---------- */
.rail {
    width: var(--rail);
    background: var(--surface);
    border-radius: 22px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    padding: 14px 12px;
    overflow: hidden;
    transition: width .22s cubic-bezier(.3, .7, .2, 1);
    flex: none;
    height: 100%;
    z-index: 100;
}

.rail.open {
    width: var(--rail-open);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    padding: 0 8px;
    margin-bottom: 18px;
    user-select: none;
    cursor: pointer;
}

.logo-box {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #0f1115;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .25);
    padding: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo:hover .logo-box {
    transform: scale(1.06);
    box-shadow: 0 4px 10px rgba(15, 23, 42, .35);
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo span {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -.01em;
    color: var(--text);
    opacity: 0;
    white-space: nowrap;
    transition: opacity .15s;
}

.rail.open .logo span {
    opacity: 1;
    transition-delay: .08s;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav.end {
    margin-top: auto;
}

.item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 44px;
    padding: 0 12px;
    border-radius: 14px;
    color: var(--muted);
    white-space: nowrap;
    text-align: left;
    width: 100%;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    transition: background .15s, color .15s;
}

.item:hover {
    background: var(--bg);
    color: var(--text);
}

.item.active,
.item[aria-current="page"] {
    background: var(--brand-soft) !important;
    color: var(--brand) !important;
    font-weight: 600 !important;
}

.item.active::before,
.item[aria-current="page"]::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--brand);
}

.lbl {
    opacity: 0;
    transition: opacity .15s;
    white-space: nowrap;
    font-size: 13.5px;
}

.rail.open .lbl {
    opacity: 1;
    transition-delay: .08s;
}

.rail:not(.open) .item[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: calc(100% + 18px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--ink);
    color: var(--surface);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 8px;
    z-index: 1050;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sep {
    height: 1px;
    background: var(--line);
    margin: 10px 8px;
}

.me {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 14px;
    margin-top: 6px;
    white-space: nowrap;
    text-decoration: none;
    color: var(--text);
    transition: background .15s;
}

.me:hover {
    background: var(--bg);
    color: var(--text);
}

.av {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 13px;
    flex: none;
}

.me small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.me strong {
    font-weight: 600;
    font-size: 13px;
    display: block;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Unified Stroke SVG Icons */
svg.i {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}

/* ---------- Main & Top Navigation ---------- */
.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    height: 100%;
}

.top {
    height: 60px;
    flex: none;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 8px 0 6px;
}

.toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border: none;
    background: none;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.toggle:hover {
    background: var(--surface);
    color: var(--text);
}

.crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
    min-width: 0;
}

.crumbs b {
    color: var(--text);
    font-weight: 600;
}

.crumbs svg {
    width: 14px;
    height: 14px;
}

.search {
    margin: 0 auto;
    width: min(420px, 100%);
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 0 14px;
    background: var(--surface);
    border-radius: 999px;
    box-shadow: var(--shadow);
    color: var(--muted);
    text-align: left;
    border: none;
    cursor: pointer;
    transition: box-shadow .2s ease, transform .15s ease;
}

.search:hover {
    box-shadow: 0 2px 6px rgba(15, 23, 42, .08), 0 10px 28px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.search span {
    flex: 1;
    font-size: 13.5px;
}

.search kbd {
    font: 500 11px Inter, sans-serif;
    background: var(--bg);
    color: var(--muted);
    padding: 3px 8px;
    border-radius: 999px;
}

.tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ic {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border: none;
    background: none;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.ic:hover {
    background: var(--surface);
    color: var(--text);
}

.ic i {
    position: absolute;
    top: 10px;
    right: 11px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot);
    border: 2px solid var(--bg);
}

.pill {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px 0 4px;
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow);
    margin-left: 6px;
    border: none;
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
    transition: box-shadow .2s ease, transform .15s ease;
}

.pill:hover {
    box-shadow: 0 2px 6px rgba(15, 23, 42, .08), 0 10px 28px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.pill .av {
    width: 32px;
    height: 32px;
}

.pill span {
    font-weight: 600;
    font-size: 13px;
}

/* Shell Stage Area where page body lives */
.shell-stage {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 8px 24px 8px;
    display: flex;
    flex-direction: column;
}

.asesor-dashboard-container {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
}

/* Responsive Mobile Layout */
@media (max-width: 760px) {
    .app {
        flex-direction: column-reverse;
        gap: 8px;
        padding: 8px;
    }
    .rail, .rail.open {
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 6px;
        border-radius: 20px;
        overflow-x: auto;
    }
    .logo, .sep, .me, .lbl, .toggle, .pill span, .search kbd, .crumbs .hide {
        display: none !important;
    }
    .nav {
        flex-direction: row;
        flex: 1;
        justify-content: space-around;
    }
    .nav.end {
        margin: 0;
        flex: none;
        flex-direction: row;
    }
    .item {
        width: 44px;
        justify-content: center;
        padding: 0;
    }
    .item.active::before, .item[aria-current="page"]::before {
        display: none;
    }
    .search {
        margin: 0 0 0 auto;
        width: 40px;
        padding: 0;
        justify-content: center;
    }
    .search span {
        display: none;
    }
    .pill {
        padding: 0;
        background: none;
        box-shadow: none;
        margin: 0;
    }
}

.logo-container {
    padding: 16px 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.logo-g {
    width: 100%;
    height: 44px;
    background: transparent;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    padding-left: 8px;
}

.logo-title-text {
    display: none;
    white-space: nowrap;
}

.custom-sidebar.expanded .logo-title-text {
    display: inline-block !important;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    width: 100%;
    padding: 16px 0;
}

.menu-item {
    width: 100%;
    min-height: 42px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.custom-sidebar.expanded .menu-item {
    justify-content: flex-start !important;
    padding: 8px 24px !important;
    white-space: normal;
    line-height: 1.3;
}

.menu-item svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    margin-right: 0;
    flex-shrink: 0;
}

.custom-sidebar.expanded .menu-item svg {
    margin-right: 12px !important;
}

.menu-item:hover {
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.04);
}

.menu-item.active {
    color: #003B5C;
    background-color: var(--neon-accent);
    font-weight: 600;
}

.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #003B5C;
    border-radius: 0 4px 4px 0;
}

/* Sidebar Footer (User Info & Action Buttons) */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    padding: 14px 10px;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.custom-sidebar.expanded .sidebar-footer {
    padding: 16px 16px;
    gap: 12px;
    align-items: stretch;
}

.footer-btn-label,
.user-info-text {
    display: none;
    white-space: nowrap;
}

.custom-sidebar.expanded .footer-btn-label,
.custom-sidebar.expanded .user-info-text {
    display: inline-block !important;
}

.footer-btn {
    width: 100%;
    max-width: 40px;
    min-height: 40px;
    height: auto;
    border-radius: 50%;
    color: var(--text-secondary);
    background: transparent;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

.custom-sidebar.expanded .footer-btn {
    max-width: 100%;
    border-radius: 10px;
    background: #F4F5F7;
    padding: 8px 12px;
    justify-content: flex-start;
    white-space: normal;
    line-height: 1.2;
}

.footer-btn:hover {
    background: rgba(0,0,0,0.06);
    color: var(--text-primary);
}

.footer-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.avatar-container {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%);
}

.avatar-container svg {
    width: 28px;
    height: 28px;
    fill: #FFFFFF;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-container:hover {
    transform: scale(1.08);
    border-color: var(--neon-accent);
    box-shadow: 0 4px 12px rgba(212, 249, 83, 0.3);
}

/* Main Dashboard Area */
.main-content {
    flex-grow: 1;
    min-width: 0;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100vh;
}

/* Top bar navigation tabs */
.top-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-tabs-wrapper {
    display: flex;
    gap: 8px;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
    background-color: #FFFFFF;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.new-chat-btn {
    border: none;
    background-color: var(--neon-accent);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(212, 249, 83, 0.25);
    transition: var(--transition-smooth);
    border: 1px solid rgba(212, 249, 83, 0.1);
    text-decoration: none;
}

.new-chat-btn:hover {
    background-color: var(--neon-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(212, 249, 83, 0.4);
}

.new-chat-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2.5;
}

/* Dashboard Grid System */
.dashboard-grid {
    display: grid;
    grid-template-columns: 3.8fr 6.2fr;
    gap: 24px;
    width: 100%;
}

.grid-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Premium Card Base (Border-less with soft shadow) */
.premium-card {
    background: #FFFFFF;
    border-radius: 16px;
    border: none;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: var(--transition-smooth);
    position: relative;
}

.premium-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Animations definition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-card {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Call Recording Card Specifics */
.recording-card {
    background: radial-gradient(circle at top left, rgba(212, 249, 83, 0.12) 0%, rgba(255, 255, 255, 0.98) 60%), #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    min-height: 490px;
}

.recording-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recording-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.recording-id-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(0, 0, 0, 0.04);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.recording-id-pill svg {
    width: 12px;
    height: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.recording-id-pill svg:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 15px 0;
}

.profile-img-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-img-container svg {
    width: 50px;
    height: 50px;
    fill: #FFFFFF;
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Sentiment Pills in Recording Card */
.sentiment-pills {
    display: flex;
    gap: 12px;
    margin: 10px 0;
}

.sentiment-pill {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.sentiment-pill-icon {
    width: 22px;
    height: 34px;
    border-radius: 16px;
    border: 1.5px solid var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    position: relative;
    transition: var(--transition-smooth);
}

.sentiment-pill-icon::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.sentiment-pill.positive .sentiment-pill-icon::after { top: 6px; }
.sentiment-pill.neutral .sentiment-pill-icon::after { top: 13px; }
.sentiment-pill.negative .sentiment-pill-icon::after { bottom: 6px; }

.sentiment-pill span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.sentiment-pill:hover {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: #A0A5A8;
}

/* Active sentiment pill styles based on mockup */
.sentiment-pill.active {
    background-color: #FFFFFF;
    border-color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.sentiment-pill.active span {
    color: var(--text-primary);
}

.sentiment-pill.active .sentiment-pill-icon {
    border-color: var(--neon-accent-hover);
    background-color: rgba(212, 249, 83, 0.1);
}

.sentiment-pill.active .sentiment-pill-icon::after {
    background-color: #8EB314;
    box-shadow: 0 0 6px var(--neon-accent);
}

/* Timeline/Audio Wave Representation */
.audio-timeline-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.wave-display {
    height: 55px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    border: 1px dashed rgba(0,0,0,0.05);
    cursor: pointer;
}

.wave-curtain-passed {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background-color: rgba(212, 249, 83, 0.15);
    border-right: 2px solid var(--text-primary);
    transition: width 0.1s linear;
    z-index: 1;
}

.wave-handle-dot {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--text-primary);
    border: 2px solid var(--neon-accent);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

.wave-bars-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 16px;
    z-index: 2;
    pointer-events: none;
}

.wave-bar {
    width: 3px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

.wave-curtain-passed ~ .wave-bars-container .wave-bar.passed {
    background-color: var(--text-primary);
}

.time-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Audio Player Bottom Controls */
.audio-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.playback-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.playback-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: #FFFFFF;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.playback-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.playback-btn:hover {
    background-color: rgba(0, 0, 0, 0.03);
    transform: scale(1.05);
}

.playback-btn.play-pause {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background-color: #FFFFFF;
    border-color: var(--text-primary);
}

.playback-btn.play-pause:hover {
    background-color: rgba(0,0,0,0.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.playback-btn.play-pause.playing svg {
    color: var(--text-primary);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    margin: 0 24px;
}

.volume-slider-track {
    flex-grow: 1;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-slider-fill {
    height: 100%;
    background-color: var(--text-primary);
    border-radius: 2px;
    width: 70%;
    position: relative;
}

.volume-slider-fill::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--text-primary);
    border: 2px solid white;
}

/* Completed Tasks Card Specifics */
.completed-tasks-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
}

.tasks-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tasks-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
}

.tasks-count-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.tasks-number {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.tasks-trend {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 2px;
}

.tasks-trend.positive {
    color: #5E7A0C;
}

/* Vertical glowing bar animation chart */
.tasks-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 60px;
}

.task-chart-bar {
    width: 8px;
    background: linear-gradient(180deg, rgba(212, 249, 83, 0.1) 0%, rgba(212, 249, 83, 0.6) 100%);
    border-radius: 4px;
    transition: height 1s cubic-bezier(0.16, 1, 0.3, 1);
    height: 10px; /* default, overwritten by style */
    position: relative;
    cursor: pointer;
}

.task-chart-bar:hover {
    background: linear-gradient(180deg, var(--neon-accent) 0%, var(--neon-accent-hover) 100%);
    box-shadow: 0 0 10px var(--neon-accent);
}

.task-chart-bar.active {
    background: linear-gradient(180deg, var(--neon-accent) 0%, var(--neon-accent-hover) 100%);
    box-shadow: 0 0 8px rgba(212, 249, 83, 0.8);
}

/* Metric Row Sparkline Cards */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.metric-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
}

.metric-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.metric-btn:hover {
    background-color: rgba(0,0,0,0.04);
    color: var(--text-primary);
}

.metric-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.metric-trend {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.metric-value-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.metric-value {
    font-size: 34px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.sparkline-container {
    width: 90px;
    height: 36px;
}

.sparkline-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.sparkline-path {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLine 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.sparkline-dots {
    transition: var(--transition-smooth);
}

/* Visualization Row Layout */
.visuals-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Talk / Listen Ratio Card */
.ratio-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    min-height: 250px;
}

.ratio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ratio-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
}

.ratio-options-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.ratio-value-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.ratio-big-num {
    font-size: 44px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.ratio-subtext {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.ratio-slider-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ratio-slider-track {
    height: 16px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
}

.ratio-slider-fill {
    height: 100%;
    background-color: var(--neon-accent);
    border-radius: 8px 0 0 8px;
    width: 75%;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.ratio-slider-divider {
    width: 3px;
    height: 100%;
    background-color: #FFFFFF;
    position: absolute;
    right: 0;
    top: 0;
}

.ratio-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.ratio-percentages {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Topic Duration / Circular Gauge Card */
.gauge-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
    position: relative;
}

.gauge-chart-container {
    position: relative;
    width: 180px;
    height: 100px;
    margin: 10px auto 0 auto;
    overflow: hidden;
}

.gauge-svg {
    width: 100%;
    height: 100%;
}

.gauge-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.04);
    stroke-width: 10;
    stroke-linecap: round;
}

.gauge-fill {
    fill: none;
    stroke: url(#gaugeGradient);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 220; /* Circumference of half circle r=70 is pi*70 = ~220 */
    stroke-dashoffset: 220;
    animation: drawGauge 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawGauge {
    to {
        stroke-dashoffset: 66; /* 70% fill = 220 * 0.3 = 66 offset */
    }
}

.gauge-text-overlay {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge-sub {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.gauge-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

/* Sentiment Staircase Chart Card (Bottom) */
.sentiment-chart-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sentiment-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sentiment-chart-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
}

.sentiment-chart-filter-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.sentiment-chart-filter-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.staircase-chart-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 170px;
    margin-top: 10px;
    position: relative;
    padding-left: 120px; /* Space for the left labels */
}

.staircase-labels-left {
    position: absolute;
    left: 0;
    bottom: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 0;
}

.staircase-label-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.staircase-label-item:hover {
    color: var(--text-primary);
}

.staircase-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-secondary);
}

.staircase-label-item.positive .staircase-bullet { background-color: var(--neon-accent); }
.staircase-label-item.negative .staircase-bullet { background-color: #C0C8CF; }
.staircase-label-item.neutral .staircase-bullet { background-color: #E2E5E8; }

.staircase-label-item.active {
    color: var(--text-primary);
    font-weight: 700;
}

.staircase-steps {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    flex-grow: 1;
    height: 100%;
}

.staircase-step-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.staircase-step-bar {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.04);
    border-radius: 12px 12px 0 0;
    transition: height 1s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.staircase-step-bar:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

/* Active coloring for staircase elements based on percentages */
.staircase-step-bar.positive-step {
    border-bottom: 4px solid var(--neon-accent);
}

.staircase-step-bar.positive-step.active {
    background: linear-gradient(180deg, rgba(212, 249, 83, 0.15) 0%, rgba(212, 249, 83, 0.02) 100%);
    border: 1.5px solid var(--neon-accent);
    border-bottom: 4px solid var(--neon-accent);
}

.staircase-step-bar.negative-step.active {
    background-color: rgba(0, 0, 0, 0.05);
    border: 1.5px solid #A0A5A8;
}

.staircase-step-bar.neutral-step.active {
    background-color: rgba(0, 0, 0, 0.02);
    border: 1.5px solid #D2D6D9;
}

.staircase-step-val {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.staircase-step-label {
    position: absolute;
    top: -24px;
    left: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Responsiveness adjustments */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .metrics-row {
        grid-template-columns: 1fr;
    }
    .visuals-row {
        grid-template-columns: 1fr;
    }
    .main-content {
        padding: 12px !important;
        max-width: 100vw;
        overflow-x: hidden;
    }
    .custom-sidebar {
        display: none;
    }
    .dashboard-root {
        flex-direction: column;
        overflow-x: hidden;
    }
    select.form-select, input.form-control {
        font-size: 16px !important; /* Prevents auto-zoom on mobile WebKit */
        max-width: 100%;
    }
    .top-navigation {
        padding: 0 4px;
        margin-bottom: 8px;
    }
}

/* Zendesk UI Grid & Cards (Rounded with Soft Shadows) */
.zd-container {
    padding: 28px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
    border: none;
}

.zd-header {
    margin-bottom: 24px;
}

.zd-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.zd-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.zd-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.zd-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border: none;
    border-radius: 12px;
    background-color: #FFFFFF;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.zd-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
    transform: translateY(-2px);
}

.zd-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #F4F5F7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    margin-right: 16px;
    flex-shrink: 0;
}

.zd-card-content {
    display: flex;
    flex-direction: column;
}

.zd-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Accessibility & Keyboard Focus Styles */
:focus-visible {
    outline: 2px solid #003B5C !important;
    outline-offset: 2px !important;
    border-radius: 4px;
}

.btn:focus-visible, 
.form-control:focus-visible, 
.form-select:focus-visible, 
.notification-bell-btn:focus-visible {
    outline: 3px solid #0284c7 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25) !important;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* =========================================================================
   ASESOR DASHBOARD — ESTILOS GLOBALES DE VENTANA DE CHECKPOINTS Y ACCIONES
   ========================================================================= */

/* ── 3-CHECKPOINT SLIDING WINDOW ── */
.checkpoint-window-container {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    max-width: 100%;
}

.cp-window-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.cp-indicator-tag {
    font-size: 0.60rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}
.cp-indicator-tag.prev-tag { color: #16a34a; }
.cp-indicator-tag.current-tag { color: #0284c7; }
.cp-indicator-tag.next-tag { color: #64748b; }

.cp-item-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 9999px;
    font-size: 0.74rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.cp-item-pill.prev-pill {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-weight: 600;
}
.cp-item-pill.current-pill.active-pill {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #93c5fd;
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.15);
    cursor: pointer;
    font-weight: 700;
}
.cp-item-pill.current-pill.active-pill:hover {
    background: #dbeafe;
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2), 0 4px 8px rgba(30, 64, 175, 0.1);
}
.cp-item-pill.current-pill.pending-accept-pill {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fcd34d;
    font-weight: 600;
}
.cp-item-pill.current-pill.blocked-pill {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    cursor: not-allowed;
    font-weight: 600;
}
.cp-item-pill.next-pill {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    opacity: 0.95;
}

/* ── BOTONES DE ACCIÓN EN TABLA ── */
.btn-memo-note {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e !important;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.76rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
    transition: all 0.15s ease;
    text-decoration: none;
}
.btn-memo-note:hover {
    background: #fde68a;
    color: #78350f !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.35);
}
.btn-memo-note i {
    font-size: 0.85rem;
    color: #d97706;
}

.btn-ficha-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46 !important;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.76rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
    transition: all 0.15s ease;
    text-decoration: none;
}
.btn-ficha-action:hover {
    background: #10b981;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.35);
}
.btn-ficha-action i {
    font-size: 0.85rem;
    color: #059669;
}
.btn-ficha-action:hover i {
    color: #ffffff;
}

.btn-assign-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #fef9c3;
    border: 1px solid #eab308;
    color: #854d0e !important;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.76rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(234, 179, 8, 0.2);
    transition: all 0.15s ease;
    text-decoration: none;
}
.btn-assign-action:hover {
    background: #eab308;
    color: #000000 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(234, 179, 8, 0.35);
}
.btn-assign-action i {
    color: #ca8a04;
}

.btn-revert-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #fef2f2;
    border: 1px solid #f87171;
    color: #991b1b !important;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.76rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.15);
    transition: all 0.15s ease;
    text-decoration: none;
}
.btn-revert-action:hover {
    background: #ef4444;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.3);
}

.btn-stage-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-stage-pill.active {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af !important;
}
.btn-stage-pill.active:hover {
    background: #1e40af;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(30, 64, 175, 0.25);
}
.btn-stage-pill.active .stage-tag {
    background: rgba(30, 64, 175, 0.12);
    color: #1e40af;
    padding: 1px 6px;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
    transition: all 0.15s ease;
}
.btn-stage-pill.active:hover .stage-tag {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.btn-stage-pill.closed {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b !important;
}
.btn-stage-pill.closed:hover {
    background: #991b1b;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(153, 27, 27, 0.25);
}
.btn-stage-pill.closed .stage-tag {
    background: rgba(153, 27, 27, 0.12);
    color: #991b1b;
    padding: 1px 6px;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* ─── Global Dark Mode Button Refinements ─── */
[data-theme="dark"] .btn-light,
.theme-dark .btn-light {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}
[data-theme="dark"] .btn-light:hover,
.theme-dark .btn-light:hover {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}
[data-theme="dark"] .btn-outline-dark,
.theme-dark .btn-outline-dark {
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}
[data-theme="dark"] .btn-outline-dark:hover,
.theme-dark .btn-outline-dark:hover {
    background-color: #1e293b !important;
    border-color: #64748b !important;
    color: #f8fafc !important;
}
[data-theme="dark"] .btn-white,
.theme-dark .btn-white {
    background-color: #162032 !important;
    border-color: #1f293d !important;
    color: #f8fafc !important;
}


