/* VITAL Suite — Command Center Layout (v2) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Rubik:wght@400;500;700&display=swap');

:root {
    /* ── Dark Mode — flat/muted register ── */
    /* Brand: Navy #1B2A4A, Gold #C9A94E */
    --navy: #8CA0B8;           /* Muted navy text — headings on dark bg */
    --navy-bg: #1B2A4A;        /* RIT Brand Navy — header bg */
    --blue: #6B8FB0;           /* Muted steel blue (desaturated) */
    --gold: #C9A94E;           /* RIT Brand Gold */
    --near-black: #D4D4D4;     /* Soft white text */
    --med-gray: #8A8A8A;       /* Secondary text */
    --light-bg: #1A1A1A;       /* Page background (matches Claude) */
    --white: #2A2A2A;          /* Card surfaces (matches Claude) */
    --border-gray: #3A3A3A;    /* Subtle borders */
    --status-green: #5B9A6F;   /* Muted sage green (flat register reference) */
    --status-amber: #C49A3C;   /* Muted warm amber */
    --status-red: #B85C5C;     /* Muted brick red — flat register */

    /* Surfaces & overlays */
    --surface-hover: rgba(255,255,255,0.05);
    --surface-raised: #303030;
}

body {
    font-family: 'Rubik', 'Calibri', Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--near-black);
    margin: 0;
    padding: 0;
}

/* ─── Header Bar — Logo | VITAL Suite | Meta ────────────── */
.dashboard-header {
    background-color: #1A1A1A;
    color: #D4D4D4;
    padding: 14px 48px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-bottom: 3px solid var(--gold);
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.header-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.kpi-badge {
    border-radius: 4px;
    padding: 4px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
    color: #FFFFFF;
}

.kpi-badge .badge-value {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.kpi-badge .badge-label {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    text-align: right;
}

/* ─── Command Center Grid (60/40) ───────────────────────── */
.cmd-grid {
    display: grid;
    grid-template-columns: 60fr 40fr;
    gap: 16px;
    padding: 20px 48px;
}

/* ─── Panels (shared card style) ────────────────────────── */
.panel {
    background: var(--white);
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 1px solid var(--border-gray);
    margin-bottom: 16px;
}

.panel:last-child {
    margin-bottom: 0;
}

.panel-title {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-gray);
}

/* ─── Daily 3 — Prominent Top Section ───────────────────── */
.daily3-item {
    display: flex;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-gray);
}

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

.daily3-rank {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    opacity: 0.65;
    min-width: 36px;
    padding-top: 2px;
}

.daily3-details {
    flex: 1;
}

.daily3-name {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    display: inline;
}

.daily3-company {
    font-size: 12px;
    color: var(--med-gray);
    margin-top: 2px;
}

.daily3-action {
    font-size: 13px;
    color: var(--near-black);
    margin-top: 6px;
    font-style: italic;
    line-height: 1.4;
}

.daily3-meta {
    text-align: center;
    margin-left: 12px;
    min-width: 32px;
}

.daily3-days {
    font-size: 10px;
    color: var(--med-gray);
    margin-top: 4px;
}

/* Action Type Badges */
.type-badge {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #1A1A1A;
    border-radius: 3px;
    padding: 1px 6px;
    text-transform: uppercase;
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.type-badge.billing {
    background-color: var(--status-red);
}

.type-badge.sales {
    background-color: var(--gold);
    color: #1A1A1A;
}

.type-badge.relationship {
    background-color: var(--blue);
}

/* ─── Queue 4-10 ────────────────────────────────────────── */
.queue-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-gray);
    font-size: 12px;
}

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

.queue-rank {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--blue);
    min-width: 24px;
}

.queue-name {
    font-weight: 500;
    color: var(--navy);
    min-width: 140px;
}

.queue-reason {
    color: var(--med-gray);
    flex: 1;
}

.queue-days {
    color: var(--med-gray);
    font-size: 11px;
    min-width: 28px;
    text-align: right;
}

/* ─── Blocked Panel ─────────────────────────────────────── */
.blocked-panel {
    background: var(--white);
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border-left: 3px solid var(--status-red);
    margin-bottom: 16px;
}

.blocked-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--status-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.blocked-item {
    font-size: 12px;
    color: var(--med-gray);
    padding: 4px 0;
}

.blocked-item strong {
    font-weight: 500;
    color: var(--near-black);
}

/* ─── Pipeline Bars ─────────────────────────────────────── */
.pipe-row {
    margin-bottom: 14px;
}

.pipe-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 4px;
}

.pipe-label {
    color: var(--med-gray);
}

.pipe-val {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--navy);
}

.pipe-bar {
    height: 8px;
    background: var(--border-gray);
    border-radius: 4px;
    overflow: hidden;
}

.pipe-fill {
    height: 100%;
    border-radius: 4px;
}

.pipe-total {
    border-top: 1px solid var(--border-gray);
    padding-top: 10px;
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

/* ─── Relationship Health Bar ───────────────────────────── */
.health-bar {
    display: flex;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.health-legend {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--med-gray);
    margin-bottom: 8px;
}

/* ─── Pulse Expandable Contact Lists ───────────────────── */
.pulse-details {
    margin-top: 6px;
    border-radius: 4px;
    overflow: hidden;
}
.pulse-details[open] {
    background: var(--surface-raised);
    border: 1px solid var(--border-gray);
}
.pulse-summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 8px;
    list-style: none;
    user-select: none;
}
.pulse-summary::-webkit-details-marker { display: none; }
.pulse-summary::before {
    content: "▸ ";
    font-size: 10px;
}
.pulse-details[open] > .pulse-summary::before {
    content: "▾ ";
}
.pulse-contact-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 8px 8px;
}
.pulse-contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 11px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.pulse-contact-row:last-child { border-bottom: none; }
.pulse-contact-name {
    color: var(--navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 75%;
}
.pulse-contact-days {
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

/* ─── Key Metrics List ──────────────────────────────────── */
.metric-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-gray);
}

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

.metric-label {
    flex: 1;
    font-size: 12px;
    color: var(--med-gray);
}

.metric-val {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
}

/* ─── Financials Section (preserved from v1) ────────────── */
.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    border-bottom: 1px solid var(--border-gray);
    padding-bottom: 8px;
    padding-left: 48px;
    padding-right: 48px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 20px 48px;
}

.kpi-card {
    background: var(--white);
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 1px solid var(--border-gray);
    border-left: 3px solid var(--navy);
    transition: box-shadow 0.2s;
}

.kpi-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.kpi-card .kpi-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--navy);
    margin-bottom: 6px;
}

.kpi-card .kpi-value {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.1;
}

.kpi-card .kpi-trend {
    font-size: 12px;
    color: var(--med-gray);
    margin-top: 4px;
}

.kpi-card.alert-red { border-left-color: var(--status-red); }
.kpi-card.alert-yellow { border-left-color: var(--status-amber); }
.kpi-card.alert-green { border-left-color: var(--status-green); }

/* ─── Panel Grid (used by Financials/Forecast) ──────────── */
.panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 48px;
    margin-bottom: 20px;
}

/* ─── Automation Health Bar ──────────────────────────────── */
.automation-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 48px 24px;
}

.auto-card {
    background: var(--white);
    border-radius: 6px;
    padding: 12px 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 1px solid var(--border-gray);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.auto-dot.green { background: var(--status-green); }
.auto-dot.yellow { background: var(--status-amber); }
.auto-dot.red { background: var(--status-red); }
.auto-dot.unknown { background: var(--border-gray); }

.auto-name {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--navy);
}

.auto-meta {
    font-size: 10px;
    color: var(--med-gray);
}

/* ─── Client Portfolio Section ──────────────────────────── */

/* Compact summary bar */
.pf-summary-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 8px 48px 16px;
    flex-wrap: wrap;
}

.pf-stat-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Portfolio table */
.pf-table {
    width: calc(100% - 64px);
    margin: 0 32px 24px;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
}

.pf-table thead {
    border-bottom: 2px solid var(--border-gray);
}

.pf-th {
    font-size: 11px;
    font-weight: 600;
    color: var(--med-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    white-space: nowrap;
}

.pf-table tbody tr {
    border-bottom: 1px solid var(--border-gray);
    transition: background 0.15s;
}

.pf-table tbody tr:hover {
    background: var(--surface-hover);
}

.pf-table td {
    padding: 10px 12px;
    font-size: 13px;
    vertical-align: middle;
}

.pf-td-name {
    min-width: 160px;
}

.pf-td-center {
    text-align: center;
}

.pf-td-stage {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--near-black);
}

/* (old card styles removed — using table layout now) */


/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .cmd-grid { grid-template-columns: 1fr; }
    .kpi-row { grid-template-columns: repeat(2, 1fr); }
    .panel-grid { grid-template-columns: 1fr; }
    .automation-bar { grid-template-columns: repeat(2, 1fr); }
    .header-badges { display: none; }
    .pf-table { font-size: 12px; }
    .pf-summary-bar { padding: 8px 16px 12px; }
}

@media (max-width: 600px) {
    .kpi-row { grid-template-columns: 1fr; }
    .automation-bar { grid-template-columns: 1fr; }
    .dashboard-header { padding: 12px 16px; }
    .cmd-grid { padding: 12px 16px; }
    .panel-grid { padding: 0 16px 16px; }
    .pf-table { font-size: 11px; }
    .pf-th { padding: 6px 8px; }
    .pf-table td { padding: 8px; }
    .pf-summary-bar { flex-direction: column; gap: 8px; padding: 8px 16px 12px; }
    .signals-grid { grid-template-columns: 1fr; }
}

/* Tier legend — compact inline */
.pf-tier-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 48px 10px;
    font-family: 'Inter', sans-serif;
}

/* ── PREDICTIVE SIGNALS — "What's Coming" ── */

.signals-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.signals-header-row .section-title {
    font-weight: 400;
}

.signals-summary {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 400;
}

.signals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.signal-band {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    overflow: hidden;
}

.signal-band-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--surface-raised);
    border-bottom: 1px solid var(--border-gray);
    font-weight: 400;
}

.signal-band-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.signal-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--med-gray);
    font-weight: 500;
}

.signal-items {
    padding: 4px 0;
}

.signal-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-gray);
    transition: background 0.15s;
}

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

.signal-item:hover {
    background: var(--surface-hover);
}

.signal-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.2;
    margin-top: 1px;
}

.signal-content {
    flex: 1;
    min-width: 0;
}

.signal-desc {
    font-size: 13px;
    font-weight: 600;
    color: var(--near-black);
    line-height: 1.4;
    margin-bottom: 3px;
}

.signal-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}

.signal-who {
    color: var(--med-gray);
    font-weight: 500;
}

.signal-cat {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.signal-action {
    font-size: 12px;
    color: var(--med-gray);
    font-weight: 500;
    margin-top: 4px;
    font-style: italic;
    opacity: 0.8;
}

.signal-days {
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    min-width: 40px;
    text-align: right;
    line-height: 1.2;
    margin-top: 1px;
}

/* ─── Cloud Dashboard: Company Selector (dark mode) ─── */
/* Targets Dash dash-dropdown classes (modern Dash, NOT react-select Select-*).
   Verified against live DOM at localhost:8051 on 2026-04-07.
   Local dashboard has no dcc.Dropdown — unscoped menu rules cannot affect it. */

#company-selector.dash-dropdown {
    background-color: #2A2A2A !important;
    border: 1px solid #3A3A3A !important;
    color: #D4D4D4 !important;
    height: 38px;
    padding: 0 12px !important;
}
#company-selector .dash-dropdown-value,
#company-selector .dash-dropdown-value-item {
    color: #D4D4D4 !important;
}
#company-selector .dash-dropdown-trigger-icon {
    color: #C9A94E !important;
    fill: #C9A94E !important;
}

/* Options menu — unscoped because it may portal outside #company-selector. */
.dash-dropdown-content,
.dash-dropdown-options {
    background-color: #2A2A2A !important;
    border: 1px solid #3A3A3A !important;
    color: #D4D4D4 !important;
}
.dash-dropdown-option,
.dash-options-list-option {
    background-color: #2A2A2A !important;
    color: #D4D4D4 !important;
    padding: 8px 12px;
}
.dash-dropdown-option:hover,
.dash-options-list-option:hover {
    background-color: #1B2A4A !important;
    color: #FFFFFF !important;
}
.dash-dropdown-option.selected,
.dash-options-list-option.selected {
    background-color: #C9A94E !important;
    color: #1A1A1A !important;
    font-weight: 600;
}
.dash-dropdown-search,
.dash-dropdown-search-container input {
    background-color: #2A2A2A !important;
    color: #D4D4D4 !important;
    border-color: #3A3A3A !important;
}

/* ─── Login Page: Chrome Autofill Override ──────────────── */
/* Chrome forces a light background on autofilled inputs.
   This overrides it to match the dark login card. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #1A1A1A inset !important;
    -webkit-text-fill-color: #FFFFFF !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: #FFFFFF !important;
}

/* Also target Dash dcc.Input wrappers on the login form */
input[name="email"]:-webkit-autofill,
input[name="password"]:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #1A1A1A inset !important;
    -webkit-text-fill-color: #FFFFFF !important;
}

/* ─── Login polish (round 2) ────────────────────────────── */



/* Focus ring */
input[name="email"]:focus,
input[name="password"]:focus {
    border-color: #C9A94E !important;
    box-shadow: 0 0 0 1px rgba(201,169,78,0.3) !important;
    outline: none !important;
}

/* Password toggle icon — proper vertical centering */
#pw-toggle {
    position: absolute !important;
    right: 14px !important;
    top: 38px !important;
    cursor: pointer !important;
    opacity: 0.5 !important;
    z-index: 10 !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center !important;
}
#pw-toggle:hover {
    opacity: 0.9 !important;
}

/* ─── Time Window Selector (pill/segmented control) ─────── */

.time-pills {
    display: flex !important;
    justify-content: flex-end !important;
}

.time-pills label {
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 20px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
    letter-spacing: 1px !important;
    color: #8A8A8A !important;
    background: transparent !important;
    border: 1px solid #3A3A3A !important;
    margin-left: -1px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    text-transform: uppercase !important;
}

.time-pills label:first-child {
    border-radius: 4px 0 0 4px !important;
    margin-left: 0 !important;
}

.time-pills label:last-child {
    border-radius: 0 4px 4px 0 !important;
}

/* Hide the actual radio dot */
.time-pills input[type="radio"] {
    display: none !important;
}

/* Active/selected state */
.time-pills label:has(input:checked) {
    background: #C9A94E !important;
    color: #1A1A1A !important;
    border-color: #C9A94E !important;
    z-index: 1 !important;
}

/* Hover on non-selected */
.time-pills label:not(:has(input:checked)):hover {
    background: rgba(255,255,255,0.05) !important;
    color: #FFFFFF !important;
}

/* ─── Header right column — compact ────────────────────── */
.header-meta {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 0 !important;
    line-height: 1.1 !important;
    padding-top: 2px !important;
}


/* ═══════════════════════════════════════════════════════════════
   VISUAL ROUND 3 — Comprehensive overrides
   ═══════════════════════════════════════════════════════════════ */

/* ─── LOGIN INPUTS: Fix double padding + red text ───────────── */

/* The Dash dcc.Input renders as:
     <div class="dash-input-container dash-input" style="inline styles...">
       <input class="dash-input-element" id="email" ...>
     </div>
   The container has padding+border from inline styles.
   The inner input must NOT have its own padding/border. */

.dash-input-element {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    color: #FFFFFF !important;
    width: 100% !important;
    font-size: 14px !important;
    font-family: inherit !important;
    box-shadow: none !important;
}

/* Kill Dash/browser red on :invalid and :required */
.dash-input-element:invalid,
.dash-input-element:required,
.dash-input-element:-moz-ui-invalid {
    color: #FFFFFF !important;
    box-shadow: none !important;
}

/* Placeholder color */
.dash-input-element::placeholder {
    color: #666 !important;
    opacity: 1 !important;
}

/* Container is the visual border */
.dash-input-container {
    border: 1px solid #3A3A3A !important;
    border-radius: 6px !important;
    background-color: #1A1A1A !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

/* Gold focus ring on container when input inside is focused */
.dash-input-container:focus-within {
    border-color: #F1B91B !important;
    box-shadow: 0 0 0 2px rgba(241, 185, 27, 0.15) !important;
}

/* Chrome autofill override — keep dark background */
.dash-input-element:-webkit-autofill,
.dash-input-element:-webkit-autofill:hover,
.dash-input-element:-webkit-autofill:focus {
    -webkit-text-fill-color: #FFFFFF !important;
    -webkit-box-shadow: 0 0 0 1000px #1A1A1A inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
    caret-color: #FFFFFF !important;
}

/* ─── TIME SELECTOR: Polished segmented control ─────────────── */

/* Outer container */
.time-pills {
    display: inline-flex !important;
    gap: 0 !important;
    background: #1E1E1E !important;
    border-radius: 8px !important;
    padding: 3px !important;
    border: 1px solid #333 !important;
}

/* RadioItems wrapper — Dash renders labels inside */
.time-pills .dash-radioitems {
    display: flex !important;
    gap: 0 !important;
}

/* Each label (pill segment) */
.time-pills label {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    color: #888 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    background: transparent !important;
    border: none !important;
    white-space: nowrap !important;
    margin: 0 !important;
    line-height: 1 !important;
}

/* Hide radio dots */
.time-pills input[type="radio"] {
    display: none !important;
}

/* Hover state */
.time-pills label:hover {
    color: #CCC !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Active/selected pill — gold */
.time-pills label:has(input:checked) {
    background: #F1B91B !important;
    color: #1A1A1A !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* ─── HEADER: Single-line right section ─────────────────────── */

/* The header-meta container: name, sync, sign out on one line */
.header-meta {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
}

/* User name */
.header-meta .user-name {
    color: #FFFFFF !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

/* Last sync */
.header-meta .sync-time {
    color: #888 !important;
    font-size: 10px !important;
}

/* Sign out link */
.header-meta .sign-out-link {
    color: #888 !important;
    font-size: 10px !important;
    text-decoration: none !important;
    border: 1px solid #3A3A3A !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
    transition: all 0.15s ease !important;
}
.header-meta .sign-out-link:hover {
    color: #CCC !important;
    border-color: #666 !important;
}

/* ─── PASSWORD TOGGLE: Eye icon position ────────────────────── */
#pw-toggle {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
    z-index: 10 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
}

/* Password field wrapper needs relative positioning */
#password {
    padding-right: 40px !important;
}


/* ═══════════════════════════════════════════════════════════════
   VISUAL ROUND 4 — Targeted overrides (2026-04-12)
   Root causes verified via live DOM inspection.
   ═══════════════════════════════════════════════════════════════ */

/* ─── FIX 1: Login input double padding ────────────────────────
   The container (div.dash-input-container) has inline padding:14px 16px.
   A prior rule input[name="email/password"] ALSO sets padding:14px 16px on
   the INNER input, creating double padding (the "vertical lines").
   Fix: Zero out BOTH. Container padding → 0 (override inline).
   Inner input → 0 with higher specificity than all prior rules.
   The container's inline border/border-radius/background still apply. */

/* Override container inline padding — this is the VISUAL padding box */
div.dash-input-container.dash-input {
    padding: 12px 16px !important;
}

/* Kill inner input padding with maximum specificity */
input[name="email"].dash-input-element,
input[name="password"].dash-input-element,
#email.dash-input-element,
#password.dash-input-element {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100% !important;
    height: auto !important;
    line-height: 1.4 !important;
}

/* ─── FIX 2: Eye icon vertical alignment ───────────────────────
   Parent is 53px (19px label + 34px input container).
   top:50% → 26.5px puts icon in the label zone.
   top:23px centers the 26px icon in the 34px input area. */

#pw-toggle {
    top: 23px !important;
    transform: none !important;
}

/* ─── FIX 3: Time pills — aggressive selectors ────────────────
   The className="time-pills" will be added to the WRAPPER div.
   Dash's inline labelStyle competes, so all overrides need !important.
   Also target by RadioItems ID as fallback. */

/* Wrapper: the div containing the RadioItems */
.time-pills,
div:has(> #time-period-selector) {
    display: inline-flex !important;
    background: #1E1E1E !important;
    border-radius: 8px !important;
    padding: 3px !important;
    border: 1px solid #333 !important;
}

/* The RadioItems container itself */
.time-pills > div,
#time-period-selector {
    display: flex !important;
    gap: 0 !important;
    align-items: stretch !important;
}

/* Each label (pill segment) — must beat Dash inline labelStyle */
.time-pills label,
#time-period-selector label {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    color: #888 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    background: transparent !important;
    border: none !important;
    white-space: nowrap !important;
    margin: 0 !important;
    margin-right: 0 !important;
    line-height: 1 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Hide radio dots */
.time-pills input[type="radio"],
#time-period-selector input[type="radio"] {
    display: none !important;
}

/* Hover state */
.time-pills label:hover,
#time-period-selector label:hover {
    color: #CCC !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Active/selected pill — gold */
.time-pills label:has(input:checked),
#time-period-selector label:has(input:checked) {
    background: #F1B91B !important;
    color: #1A1A1A !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* ─── FIX 4: Header single-line layout ─────────────────────────
   The className="header-meta" will be added in Python.
   Also target by child selectors as fallback. */

.header-meta {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
}

.header-meta .user-name {
    color: #FFFFFF !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

.header-meta .sync-time {
    color: #888 !important;
    font-size: 10px !important;
}

.header-meta .sign-out-link,
.header-meta a[href="/auth/logout"] {
    color: #888 !important;
    font-size: 10px !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: 1px solid #3A3A3A !important;
    border-radius: 4px !important;
    padding: 2px 8px !important;
    transition: all 0.15s ease !important;
}
.header-meta .sign-out-link:hover,
.header-meta a[href="/auth/logout"]:hover {
    color: #CCC !important;
    border-color: #666 !important;
}


/* ═══════════════════════════════════════════════════════════════
   VISUAL ROUND 5 — CSS-only fix (2026-04-12)
   Verified selectors from live DOM inspection.
   No Python code changes. No regex. Just CSS.
   ═══════════════════════════════════════════════════════════════ */

/* ─── 1. Login inputs: kill inner input padding ────────────────
   Container div has inline style padding:14px 16px (provides visual spacing).
   Rule `input[name="email"]` adds ANOTHER 14px 16px with !important.
   ID selectors (#email) beat attribute selectors in specificity.
   Result: container pads, input fills cleanly. No double-padding lines. */

#email,
#password {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
    font-family: 'Rubik', sans-serif !important;
    color: #FFFFFF !important;
    line-height: 1.4 !important;
}

/* Container: ensure consistent padding, border, focus ring */
div.dash-input-container.dash-input {
    padding: 12px 16px !important;
    background-color: #1A1A1A !important;
    border: 1px solid #3A3A3A !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
}
div.dash-input-container.dash-input:focus-within {
    border-color: #F1B91B !important;
    box-shadow: 0 0 0 1px rgba(241, 185, 27, 0.3) !important;
}

/* ─── 2. Eye icon alignment ───────────────────────────────────
   Parent: 53px (19px label + 34px input container).
   Old: top:50%=26.5px + translateY(-50%)=-13px → visual 13.5px (IN the label zone!)
   Fix: top:23px centers the 26px icon in the 34px input starting at y=19. */

#pw-toggle {
    top: 23px !important;
    transform: none !important;
    right: 12px !important;
    position: absolute !important;
    cursor: pointer !important;
    z-index: 5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ─── 3. Time pills ───────────────────────────────────────────
   Target by RadioItems ID (#time-period-selector).
   No className needed — CSS :has() and ID selectors do the work.
   Must use !important to beat Dash's inline labelStyle. */

/* The wrapper div containing the RadioItems */
div:has(> #time-period-selector) {
    display: inline-flex !important;
    background: #1E1E1E !important;
    border-radius: 8px !important;
    padding: 3px !important;
    border: 1px solid #333 !important;
    align-self: flex-end !important;
}

/* The RadioItems flex container */
#time-period-selector {
    display: flex !important;
    gap: 2px !important;
    align-items: stretch !important;
}

/* Each label = one pill */
#time-period-selector label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 5px 14px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    color: #888 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    background: transparent !important;
    border: none !important;
    white-space: nowrap !important;
    margin: 0 !important;
    margin-right: 0 !important;
    line-height: 1 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Hide the radio dots */
#time-period-selector input[type="radio"] {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    position: absolute !important;
}

/* Hover */
#time-period-selector label:hover {
    color: #CCC !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

/* Active / selected pill — gold background */
#time-period-selector label:has(input:checked) {
    background: #F1B91B !important;
    color: #1A1A1A !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* ─── 4. Header: single-line user info ────────────────────────
   Targets the div that CONTAINS the sign-out link.
   No className needed — CSS :has() finds it. */

/* The div wrapping greeting + sync + sign-out */
div:has(> a[href="/auth/logout"]) {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    white-space: nowrap !important;
}

/* User name (the div showing display_name) */
div:has(> a[href="/auth/logout"]) > div:first-child {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #FFFFFF !important;
}

/* Sync time text */
div:has(> a[href="/auth/logout"]) > div:nth-child(2) {
    font-size: 10px !important;
    color: #888 !important;
}

/* Sign-out link */
a[href="/auth/logout"] {
    font-size: 10px !important;
    color: #888 !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: 1px solid #3A3A3A !important;
    border-radius: 4px !important;
    padding: 3px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
}
a[href="/auth/logout"]:hover {
    color: #CCC !important;
    border-color: #666 !important;
}

/* ─── 5. Reduce header height ─────────────────────────────────
   Cut padding so header is tighter, less floating whitespace. */

/* Target the main header bar (the outermost dark strip at top) */
.header,
div[style*="padding: 16px"],
div[style*="padding: 20px"] {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* The header row flex container */
.header > div,
div:has(> img[src*="logo"]) {
    align-items: center !important;
}


/* === VISUAL ROUND 6 — header position + time pills cleanup === */

/* 6A: Time pills — NO borders. Clean segmented control. */
div:has(> #time-period-selector) {
    border: none !important;
    background: #252525 !important;
    box-shadow: none !important;
}
#time-period-selector label {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #777 !important;
}
#time-period-selector label:has(input:checked) {
    background: #F1B91B !important;
    color: #1A1A1A !important;
    border: none !important;
    box-shadow: none !important;
}
#time-period-selector label:hover {
    border: none !important;
}

/* 6B: Header user info — push to far right, align under dropdown */
div:has(> a[href="/auth/logout"]) {
    margin-left: auto !important;
    justify-content: flex-end !important;
    text-align: right !important;
}


/* === VISUAL ROUND 7 — pill borders nuclear fix + header two-line layout === */

/* 7A: Time pills — NUCLEAR border removal.
   Previous rounds used targeted selectors but borders persist.
   This uses every possible specificity weapon: ID, :has(), *, !important.
   If the browser can render a border on anything inside this container, this kills it. */

/* Kill borders on the outer wrapper */
div:has(> #time-period-selector),
div:has(> #time-period-selector) * {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    outline: none !important;
    outline-width: 0 !important;
    box-shadow: none !important;
}

/* Re-apply ONLY the container background (no border) */
div:has(> #time-period-selector) {
    background: #252525 !important;
    border-radius: 8px !important;
    padding: 3px !important;
}

/* Re-apply pill styles (selected state gets gold background, not border) */
#time-period-selector label {
    background: transparent !important;
    color: #777 !important;
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
}
#time-period-selector label:has(input:checked) {
    background: #F1B91B !important;
    color: #1A1A1A !important;
    font-weight: 700 !important;
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
#time-period-selector label:hover {
    color: #CCC !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: none !important;
    border-width: 0 !important;
}

/* 7B: Header right section — two-line layout for long names.
   Line 1: Name (left) + sync time (right of name)
   Line 2: SIGN OUT button (right-aligned)
   The dropdown (company selector) gets a reduced height.
   The user-info block wraps into two rows under the dropdown. */

/* Reduce dropdown height */
div:has(> a[href="/auth/logout"]) .Select-control,
div:has(> a[href="/auth/logout"]) .dash-dropdown .Select-control {
    min-height: 32px !important;
    height: 32px !important;
}
div:has(> a[href="/auth/logout"]) .Select-value,
div:has(> a[href="/auth/logout"]) .Select-placeholder {
    line-height: 30px !important;
    font-size: 13px !important;
}

/* User info container — wrap into two lines */
div:has(> a[href="/auth/logout"]) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px 14px !important;
    margin-left: auto !important;
    justify-content: flex-end !important;
    max-width: 320px !important;
}

/* Line 1: Name — left-aligned within the block */
div:has(> a[href="/auth/logout"]) > div:first-child {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #FFFFFF !important;
    flex: 1 1 auto !important;
    text-align: left !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Sync time text — sits next to name on line 1 */
div:has(> a[href="/auth/logout"]) > div:nth-child(2) {
    font-size: 10px !important;
    color: #888 !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
}

/* Sign Out link — forces to line 2, right-aligned */
a[href="/auth/logout"] {
    font-size: 10px !important;
    color: #888 !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: 1px solid #3A3A3A !important;
    border-radius: 4px !important;
    padding: 3px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    margin-left: auto !important;
    flex: 0 0 auto !important;
}
a[href="/auth/logout"]:hover {
    color: #CCC !important;
    border-color: #666 !important;
}

/* Tighter header padding */
.header,
div[style*="padding: 16px"],
div[style*="padding: 20px"] {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}
