/* ============================================================================
   EVERLETRIC — "Live Wire" identity (commercial electrical).
   Loaded only for the everletric pack. Graphite/near-black control surfaces,
   high-vis ELECTRIC YELLOW action color (dark text on yellow = electrical
   signage), Sora display type, a faint circuit-grid motif. Distinct from every
   other pack (no one else uses yellow + Sora).
   ============================================================================ */
:root {
    --accent: #f4c20d;            /* electric yellow */
    --accent-deep: #caa008;
    --accent-soft: #fdf3cf;
    --wire: #1b1f27;              /* graphite ink for text-on-light accents */
    --bolt: #2563eb;              /* secondary electric blue */
    --bg: #eef0f3;               /* cool graphite-gray field */
    --panel: #ffffff;
    --ink: #171b22;
    --ink-soft: #5b6675;
    --line: #dfe3e9;
    --graphite: #14171d;
    --side: #101319;             /* near-black control rail */
    --side-ink: #9aa6b6;
    --side-ink-bright: #ffffff;
    --display-font: "Sora", "Segoe UI", sans-serif;
    --radius: 7px;
    --shadow: 0 1px 2px rgba(16,19,25,.06), 0 12px 28px -20px rgba(16,19,25,.55);
}

body {
    font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
    background-color: var(--bg);
    /* faint circuit grid */
    background-image:
        linear-gradient(rgba(37,99,235,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37,99,235,.04) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* ---------------- Sidebar: control rail ---------------- */
.side { background: linear-gradient(180deg, #141821, #0c0f14); border-right: 1px solid #000; }
.brand { border-bottom: 1px solid rgba(255,255,255,.07); margin: -2px -6px 14px; padding: 6px 14px 16px; }
.brand-mark { background: var(--accent); color: var(--graphite); border-radius: 7px; font-family: var(--display-font); font-weight: 800;
    box-shadow: 0 0 0 3px rgba(244,194,13,.22), 0 0 14px -2px rgba(244,194,13,.5); }
.brand-name { font-family: var(--display-font); font-weight: 700; letter-spacing: -.2px; }
.brand-pack { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); opacity: .9; }
.nav-link { border-radius: 6px; font-size: 12.5px; font-weight: 600; color: #9aa6b6; border-left: 3px solid transparent; padding-left: 9px; }
.nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-link.active { background: linear-gradient(90deg, rgba(244,194,13,.20), transparent); color: #fff; border-left-color: var(--accent); }
.nav-link.active .nav-ico { color: var(--accent); opacity: 1; }
.side-foot { text-transform: uppercase; letter-spacing: .13em; font-size: 9.5px; opacity: .5; }

/* ---------------- Topbar ---------------- */
.topbar { background: var(--panel); border-bottom: 2px solid var(--graphite); }
.client-id strong { font-family: var(--display-font); font-weight: 700; letter-spacing: -.2px; }
.client-id .dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(244,194,13,.22); }

/* ---------------- Page header ---------------- */
.page-head { position: relative; margin-bottom: 22px; padding-left: 15px; }
.page-head::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 5px;
    background: linear-gradient(180deg, var(--accent), var(--accent-deep)); border-radius: 2px; box-shadow: 0 0 10px -1px rgba(244,194,13,.6); }
.page-head h1 { font-family: var(--display-font); font-weight: 700; letter-spacing: -.4px; font-size: 25px; color: var(--graphite); }
.page-head .sub { text-transform: uppercase; letter-spacing: .07em; font-size: 11.5px; color: var(--ink-soft); }
.page-head .back { color: var(--accent-deep); font-weight: 600; }

/* ---------------- KPI cards ---------------- */
.kpis { gap: 12px; }
.kpi-card { position: relative; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); padding: 16px 18px; }
.kpi-ic { color: var(--graphite); background: var(--accent-soft); border-radius: 6px; padding: 5px; top: 13px; right: 13px; }
.kpi-ic svg { width: 18px; height: 18px; }
.kpi-lab { text-transform: uppercase; letter-spacing: .09em; font-size: 10.5px; font-weight: 700; color: var(--ink-soft); }
.kpi-num { font-family: var(--display-font); font-weight: 700; font-size: 30px; color: var(--graphite); }
.kpi-delta { font-size: 10.5px; margin-top: 5px; font-weight: 600; }

/* ---------------- Panels ---------------- */
.rpanel { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel-h { background: var(--panel); border-bottom: 1px solid var(--line); padding: 13px 16px; }
.panel-h h3 { font-family: var(--display-font); font-weight: 700; font-size: 14px; color: var(--graphite); display: flex; align-items: center; gap: 9px; }
.panel-h h3::before { content: ""; width: 11px; height: 11px; flex: none; background: var(--accent);
    clip-path: polygon(40% 0, 100% 0, 60% 45%, 100% 45%, 25% 100%, 45% 55%, 0 55%); }   /* lightning bolt */
.panel-act a { text-transform: uppercase; letter-spacing: .05em; font-size: 11px; font-weight: 700; color: var(--accent-deep); }

/* ---------------- Tables ---------------- */
table.data.card, table.data { border-radius: var(--radius); }
table.data thead th { background: var(--graphite); color: #d7dde6; border-bottom: 3px solid var(--accent);
    text-transform: uppercase; letter-spacing: .06em; font-size: 10px; font-weight: 700; padding: 11px 14px; }
table.data thead th:first-child { border-top-left-radius: var(--radius); }
table.data thead th:last-child { border-top-right-radius: var(--radius); }
table.data td { border-bottom: 1px solid #eef1f4; font-size: 13px; }
table.data tbody tr:nth-child(even) td { background: #fafbfc; }
table.data tbody tr.clickable:hover td { background: #fffbe8; }

/* ---------------- Badges ---------------- */
.badge { border-radius: 4px; text-transform: uppercase; letter-spacing: .03em; font-size: 10px; font-weight: 700; padding: 3px 8px; }
.badge-won, .badge-approved, .badge-paid, .badge-active, .badge-complete, .badge-completed,
.badge-pass, .badge-final, .badge-closed, .badge-issued { background: #dcf2e4; color: #1c7a44; }
.badge-lost, .badge-declined, .badge-rejected, .badge-fail, .badge-overdue, .badge-canceled,
.badge-cancelled, .badge-expired, .badge-void, .badge-critical, .badge-emergency, .badge-rejected,
.badge-not-submitted { background: #fbe0da; color: #a5341f; }
.badge-en-route, .badge-on-site, .badge-inspections, .badge-dispatched, .badge-in-progress,
.badge-partial, .badge-pending, .badge-same-day, .badge-high, .badge-preventive-maintenance { background: #fdf0c8; color: #8a6a04; }
.badge-lead, .badge-qualified, .badge-estimating, .badge-bid-submitted, .badge-draft, .badge-sent,
.badge-scheduled, .badge-applied, .badge-preconstruction, .badge-unassigned, .badge-normal,
.badge-prospect { background: #e6edfb; color: #2550b0; }
.badge-master-electrician, .badge-gold, .badge-commercial-pm { background: #fdf3cf; color: #7a5e05; }
.badge-journeyman, .badge-silver, .badge-commercial, .badge-commercial-project,
.badge-on-hold, .badge-closeout, .badge-warranty { background: #eef1f5; color: #44525f; }

/* ---------------- Atoms / buttons ---------------- */
.pill { border-radius: 4px; background: #eef1f5; border-color: var(--line); color: var(--graphite); text-transform: uppercase; letter-spacing: .03em; font-size: 10.5px; font-weight: 600; }
.rprogress { height: 8px; background: #dde2e8; border-radius: 999px; }
.rprogress i { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }
.datebox { background: var(--graphite); color: #fff; border-radius: 6px; }
.datebox b { font-family: var(--display-font); }
.datebox span { color: var(--accent); }
.avatar { border-radius: 6px; background: var(--graphite); color: var(--accent); font-family: var(--display-font); font-weight: 700; }
.feed-dot { background: var(--accent); }
.btn { border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; font-size: 12px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--graphite); box-shadow: 0 0 0 1px rgba(244,194,13,.3); }
.btn-primary:hover { background: var(--accent-deep); color: #fff; }
.detail.card { border-radius: var(--radius); }
.detail-key { background: #f5f6f8; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.panel-act a:hover, .page-head .back:hover { color: var(--graphite); }
