/* ============================================================================
   ANCHOR PROPERTY MANAGEMENT — "Proptech Indigo" identity.
   Loaded only for the propmgmt pack. A modern property-management SaaS look
   (AppFolio/Buildium/DoorLoop lineage): cool violet-tinted field, deep INDIGO
   surfaces & table headers (the brand anchor), warm AMBER accent for attention/
   money, Space Grotesk display (techy, geometric — unique among the packs), crisp
   9px radii. Deliberately unlike realestate (navy/serif-free Outfit) — violet
   hue + Space Grotesk set it apart.
   ============================================================================ */
:root {
    --accent: #4338ca;            /* indigo */
    --accent-bright: #6366f1;
    --accent-deep: #312e81;
    --accent-soft: #e7e7fb;       /* pale indigo */
    --amber: #cf8330;             /* warm amber (attention / money) */
    --amber-bright: #e09a44;
    --amber-soft: #f6e8d3;
    --bg: #f1f1f8;                /* cool violet-tinted light */
    --panel: #ffffff;
    --ink: #20222e;
    --ink-soft: #5e6175;
    --line: #e3e3ef;
    --side: #232150;             /* deep indigo rail */
    --side-ink: #a8a6cf;
    --side-ink-bright: #ffffff;
    --display-font: "Space Grotesk", "Inter", sans-serif;
    --radius: 9px;
    --shadow: 0 1px 2px rgba(32,34,46,.06), 0 14px 32px -22px rgba(49,46,129,.5);
}

body {
    font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background-color: var(--bg);
    background-image:
        radial-gradient(1000px 560px at 100% -12%, rgba(99,102,241,.10), transparent 60%),
        radial-gradient(820px 520px at -8% 112%, rgba(207,131,48,.06), transparent 55%);
    background-attachment: fixed;
}

/* ---------------- Sidebar: deep indigo rail ---------------- */
.side { background: linear-gradient(185deg, #2c2a63, #1a183b 92%); border-right: 1px solid rgba(0,0,0,.3); }
.brand { border-bottom: 1px solid rgba(255,255,255,.10); margin: -2px -6px 14px; padding: 6px 14px 16px; }
.brand-mark {
    background: linear-gradient(150deg, var(--accent-bright), var(--accent-deep)); color: #fff;
    border-radius: 9px; font-family: var(--display-font); font-weight: 700;
    box-shadow: 0 4px 12px -3px rgba(99,102,241,.6);
}
.brand-name { font-family: var(--display-font); font-weight: 700; letter-spacing: -.3px; font-size: 16px; }
.brand-pack { font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--amber-bright); opacity: .95; }
.nav-link { border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--side-ink); }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: linear-gradient(90deg, var(--accent-deep), var(--accent-bright)); color: #fff; box-shadow: inset 3px 0 0 var(--amber-bright), 0 4px 14px -5px rgba(99,102,241,.7); }
.nav-link.active .nav-ico { opacity: 1; color: #fff; }
.side-foot { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .5; }

/* ---------------- Topbar ---------------- */
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(32,34,46,.03); }
.client-id strong { font-family: var(--display-font); font-weight: 700; letter-spacing: -.3px; }
.client-id .dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(207,131,48,.18); }

/* ---------------- Page header ---------------- */
.page-head { margin-bottom: 22px; }
.page-head h1 { font-family: var(--display-font); font-weight: 700; letter-spacing: -.6px; font-size: 28px; color: var(--accent-deep); }
.page-head .sub { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.page-head .back { color: var(--accent-bright); font-weight: 600; }
.page-head.row .head-tools .btn { border-radius: 8px; }

/* ---------------- KPI cards ---------------- */
.kpis { gap: 14px; }
.kpi-card {
    position: relative; border: 1px solid var(--line); border-radius: 11px;
    background: var(--panel); box-shadow: var(--shadow); padding: 18px 20px; overflow: hidden;
}
.kpi-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep));
}
.kpi-ic { color: var(--accent); background: var(--accent-soft); border-radius: 9px; padding: 6px; top: 15px; right: 15px; opacity: 1; }
.kpi-ic svg { width: 18px; height: 18px; }
.kpi-lab { text-transform: uppercase; letter-spacing: .07em; font-size: 10.5px; font-weight: 700; color: var(--ink-soft); }
.kpi-num { font-family: var(--display-font); font-weight: 700; font-size: 30px; letter-spacing: -1px; color: var(--accent-deep); margin-top: 4px; }
.kpi-delta { font-size: 11.5px; margin-top: 5px; font-weight: 600; color: var(--ink-soft); }
.kpi-delta.up { color: #2f7a52; } .kpi-delta.down { color: #c0533a; }

/* ---------------- Panels ---------------- */
.rpanel { border-radius: 11px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--panel); }
.panel-h { background: var(--panel); border-bottom: 1px solid var(--line); padding: 14px 18px; }
.panel-h h3 {
    font-family: var(--display-font); font-weight: 700; font-size: 15px; letter-spacing: -.3px; color: var(--accent-deep);
    display: flex; align-items: center; gap: 9px;
}
.panel-h h3::before {
    content: ""; width: 9px; height: 9px; flex: none; border-radius: 3px;
    background: linear-gradient(135deg, var(--amber-bright), var(--amber));
}
.panel-sub { font-weight: 400; }
.panel-act a { color: var(--accent-bright); font-weight: 700; font-size: 12px; }

/* ---------------- Tables: INDIGO header (brand anchor) ---------------- */
table.data.card, table.data { border-radius: 9px; }
table.data thead th {
    background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep));
    color: #edeefb; border-bottom: 2px solid var(--amber);
    text-transform: uppercase; letter-spacing: .06em; font-size: 10px; font-weight: 700; padding: 12px 14px;
}
table.data thead th:first-child { border-top-left-radius: 9px; }
table.data thead th:last-child  { border-top-right-radius: 9px; }
table.data td { border-bottom: 1px solid #eef0f6; font-size: 13px; }
table.data tbody tr:nth-child(even) td { background: #f7f7fc; }
table.data tbody tr.clickable:hover td { background: var(--accent-soft); }

/* ---------------- Badges ---------------- */
.badge { border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; font-weight: 700; padding: 3px 9px; }
/* success / green */
.badge-occupied, .badge-active, .badge-paid, .badge-completed, .badge-approved, .badge-current,
.badge-pass, .badge-signed, .badge-resolved, .badge-on-file, .badge-leased, .badge-renewed,
.badge-acknowledged, .badge-preferred { background: #d7ecdb; color: #2f6b42; }
/* danger / red */
.badge-vacant, .badge-overdue, .badge-denied, .badge-fail, .badge-ended, .badge-escalated,
.badge-canceled, .badge-expired, .badge-emergency, .badge-late-rent, .badge-notice-to-quit,
.badge-off-market, .badge-past, .badge-unpaid, .badge-lease-violation, .badge-non-renewal { background: #f6dcd6; color: #b0482f; }
/* amber / attention + in-motion */
.badge-make-ready, .badge-due, .badge-partial, .badge-pending, .badge-expiring, .badge-screening,
.badge-in-progress, .badge-scheduled, .badge-assigned, .badge-high, .badge-issued, .badge-onboarding,
.badge-notice, .badge-sent, .badge-draft, .badge-issues-found, .badge-applicant, .badge-new,
.badge-month-to-month, .badge-renewal-offer { background: var(--amber-soft); color: #8a5a1e; }
/* indigo / info — types & neutral */
.badge-open, .badge-portal, .badge-online-ach, .badge-tenant, .badge-owner, .badge-rent,
.badge-fixed, .badge-individual, .badge-llc { background: var(--accent-soft); color: var(--accent-deep); }
/* neutral / slate */
.badge-low, .badge-normal, .badge-other, .badge-withdrawn, .badge-off-file, .badge-inactive,
.badge-warranty, .badge-money-order, .badge-check, .badge-cash, .badge-card { background: #e6e7ee; color: #4f5466; }

/* vendor trades / wo + expense categories / unit types / property types — tints */
.badge-plumbing, .badge-hvac, .badge-electrical, .badge-appliance, .badge-roofing, .badge-pest,
.badge-pest-control, .badge-snow, .badge-snow-removal, .badge-general, .badge-general-handyman,
.badge-turnover, .badge-repairs, .badge-utilities { background: var(--accent-soft); color: var(--accent-deep); }
.badge-landscaping, .badge-cleaning, .badge-supplies { background: #dbe7e0; color: #356152; }
.badge-taxes, .badge-insurance, .badge-mgmt-fee, .badge-deposit, .badge-pet-fee, .badge-parking,
.badge-utility, .badge-late-fee { background: var(--amber-soft); color: #8a5a1e; }
.badge-single-family, .badge-duplex, .badge-multi-family, .badge-apartment, .badge-condo,
.badge-townhouse, .badge-commercial { background: var(--accent-soft); color: var(--accent-deep); }
/* inspection / notice / doc / lease term types — neutral-indigo */
.badge-move-in, .badge-move-out, .badge-periodic, .badge-drive-by, .badge-lease, .badge-addendum,
.badge-inspection, .badge-w-9, .badge-entry-notice, .badge-email, .badge-text, .badge-call,
.badge-partnership, .badge-trust, .badge-institutional, .badge-ach, .badge-wire, .badge-vendor,
.badge-outbound, .badge-inbound { background: #e6e7ee; color: #4f5466; }

/* ---------------- Atoms / buttons ---------------- */
.pill { border-radius: 6px; background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; font-weight: 600; font-size: 11px; }
.rprogress { height: 8px; background: #e2e3ee; border-radius: 999px; }
.rprogress i { background: linear-gradient(90deg, var(--accent), var(--amber)); }
.datebox { background: linear-gradient(170deg, var(--accent), var(--accent-deep)); color: #fff; border-radius: 9px; border-bottom: 2px solid var(--amber); }
.datebox b { font-family: var(--display-font); font-weight: 700; }
.datebox span { color: var(--amber-bright); }
.avatar { border-radius: 9px; background: linear-gradient(150deg, var(--accent-bright), var(--accent-deep)); font-family: var(--display-font); font-weight: 700; }
.feed-dot { background: var(--amber); }
.btn { border-radius: 8px; font-weight: 700; }
.btn-primary { background: var(--accent); border-color: var(--accent); box-shadow: 0 6px 16px -7px rgba(67,56,202,.8); }
.btn-primary:hover { background: var(--accent-deep); }
.detail.card { border-radius: 9px; }
.detail-key { background: #f4f4fa; font-weight: 600; }
.stars { color: var(--amber); }
