:root {
  --bg: #0d1117;
  --paper: #161b22;
  --ink: #f0f6fc;
  --muted: #8b949e;
  --line: #30363d;
  --forest: #ccff00;
  --forest-ink: #0d1117;
  --side: #090d12;
  --side-text: #dee2ec;
  --warn: #f0b429;
  --danger: #ff7b72;
  --ok: #4edea3;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  font-family: "Lexend", "Inter", "Avenir Next", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }

.site-nav, .panel, .card, .auth-card { background: var(--paper); }
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 6vw; position: sticky; top: 0; z-index: 5;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.04em; text-decoration: none; font-size: 20px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger, .nav-close { display: none; }
.nav-links { display: flex; gap: 10px; align-items: center; }
.hero { padding: 72px 6vw 40px; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 36px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 76px); line-height: 0.95; letter-spacing: -0.05em; margin: 0 0 16px; }
.lead { font-size: 18px; color: var(--muted); max-width: 560px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.wrap { padding: 10px 6vw 64px; }
.card { border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 0 18px; border-radius: 14px; border: 0; background: var(--forest); color: var(--forest-ink);
  text-decoration: none; font-weight: 700; cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { min-height: 38px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(480px, 100%); border-radius: 28px; padding: 28px; border: 1px solid var(--line); box-shadow: var(--shadow); }
label { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; min-height: 52px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--paper); padding: 12px 14px; color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { margin: 0; font-weight: 600; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; }
.error { color: var(--danger); font-size: 13px; }
.okmsg { background: #12352a; color: var(--ok); border-radius: 12px; padding: 12px 14px; }

.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-text); padding: 22px 14px; overflow-y: auto; max-height: 100vh; }
.side a { display: block; text-decoration: none; color: var(--side-text); border-radius: 12px; padding: 11px 12px; margin-bottom: 4px; }
.side a.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; }
.nav-scrim { display: none; }
.side a.active, .side a:hover { background: #21262d; color: var(--forest); }
.main { padding: 28px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpis span, .kpi span { display: block; color: var(--muted); font-size: 13px; }
.kpis strong, .kpi strong { display: block; font-size: 28px; letter-spacing: -0.04em; margin-top: 6px; }
table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 18px; overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 8px; background: #21262d; color: var(--forest); font-size: 12px; font-weight: 700; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.builder { display: grid; gap: 12px; }
.move { display: grid; grid-template-columns: 1.4fr 90px 90px auto; gap: 8px; align-items: center; }
.hit { display: block; width: 100%; text-align: left; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 6px; cursor: pointer; }
@media (max-width: 800px) { .move { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px; }
.doc { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }

@media (max-width: 900px) {
  .hero, .grid-3, .kpis, .split, .shell { grid-template-columns: 1fr; }
  .main { padding: 16px; }
  .site-nav { padding: 14px 16px; position: sticky; }
  .nav-burger, .nav-close {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px;
    border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-weight: 700; cursor: pointer;
  }
  .nav-close { border-color: #3a433c; background: transparent; color: var(--side-text); margin-bottom: 12px; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 16px 16px;
    background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .nav-toggle:checked ~ .site-nav .nav-links { display: flex; }
  .side {
    position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(300px, 88vw);
    transform: translateX(-105%); transition: transform .2s ease; overflow: auto;
    display: flex; flex-direction: column; padding: 18px 14px;
  }
  .nav-toggle:checked ~ .shell .side { transform: none; }
  .nav-toggle:checked ~ .shell .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(23, 26, 23, 0.45); z-index: 20; }
  .side a { display: block; white-space: normal; margin: 0 0 4px; }
  .admin-burger { margin-bottom: 14px; }
}

/* OkFitness ERP */
.admin-body {
  --bg: #0f141b;
  --paper: #1b2027;
  --paper-low: #171c23;
  --paper-high: #252a32;
  --paper-highest: #30353d;
  --side: #090f15;
  --ink: #f5f7fb;
  --muted: #aeb5c0;
  --line: rgba(255, 255, 255, .075);
  --forest: #c3f400;
  --ok: #4edea3;
  --cyan: #55e6f0;
  --danger: #ff8c84;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", sans-serif;
}
.admin-body h1, .admin-body h2, .admin-body h3, .admin-body .brand, .admin-body .metric-card > strong { font-family: "Lexend", sans-serif; }
.admin-body h1, .admin-body h2, .admin-body h3, .admin-body p { margin-top: 0; }
.admin-body .shell { grid-template-columns: 276px minmax(0, 1fr); }
.admin-body .side {
  position: sticky; top: 0; height: 100vh; max-height: none; padding: 0;
  display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid rgba(255,255,255,.04);
}
.side-scroll { padding: 24px 16px 12px; overflow-y: auto; }
.side-brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px 24px; }
.side-brand .brand { margin: 0; padding: 0; color: #fff; font-size: 18px; white-space: nowrap; }
.side-brand .brand img { width: 28px; height: 28px; }
.side-brand .brand em { color: var(--forest); font-style: normal; }
.live-pill {
  color: #243000; background: var(--forest); border-radius: 999px; padding: 4px 7px;
  font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
}
.admin-body .side a:not(.brand) {
  min-height: 43px; padding: 10px 12px; margin-bottom: 3px; display: flex; align-items: center; gap: 11px;
  color: #abb3bf; font-size: 13px; font-weight: 600; border: 1px solid transparent; transition: .18s ease;
}
.admin-body .side a .material-symbols-outlined { font-size: 20px; }
.admin-body .side a.active, .admin-body .side a:not(.brand):hover {
  background: var(--forest); color: #1e2800; border-color: rgba(195,244,0,.4);
}
.nav-count { margin-left: auto; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #a52929; color: #fff; font-size: 10px; }
.side-footer { padding: 12px 16px 18px; border-top: 1px solid var(--line); }
.system-state { display: flex; align-items: center; gap: 8px; border-radius: 12px; background: var(--paper); padding: 11px; color: #dce1e9; font-size: 11px; }
.system-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); box-shadow: 0 0 0 4px rgba(195,244,0,.08); }
.system-state b { margin-left: auto; color: var(--forest); font-size: 9px; text-transform: uppercase; }
.side-logout {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 8px; padding: 10px 11px;
  color: #aeb5c0; background: transparent; border: 0; border-radius: 10px; cursor: pointer; font-weight: 600;
}
.side-logout:hover { background: var(--paper); color: var(--danger); }
.side-logout .material-symbols-outlined { font-size: 19px; }
.admin-workspace { min-width: 0; }
.admin-topbar {
  height: 66px; position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 30px; background: rgba(9,15,21,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px);
}
.global-search { position: relative; width: min(520px, 48vw); }
.global-search form { display: block; }
.icon-button { text-decoration: none; }
.global-search .material-symbols-outlined { position: absolute; left: 13px; top: 10px; color: #828b98; font-size: 20px; }
.global-search input {
  min-height: 40px; height: 40px; padding: 0 14px 0 42px; border: 1px solid transparent; border-radius: 12px; background: var(--paper);
  font-size: 12px; color: #fff;
}
.global-search input:focus { outline: none; border-color: rgba(195,244,0,.5); }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.currency-pill, .period-chip {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 11px; padding: 8px 11px;
  background: var(--paper-high); color: #e7eaf0; font-size: 11px; font-weight: 700; white-space: nowrap;
}
.period-chip .material-symbols-outlined { color: var(--ok); font-size: 17px; }
.icon-button { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 11px; background: transparent; color: #aeb5c0; }
.icon-button i { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--forest); }
.admin-profile { display: flex; align-items: center; gap: 10px; }
.admin-profile > span { display: flex; flex-direction: column; align-items: flex-end; }
.admin-profile b { font-size: 11px; }
.admin-profile small { color: var(--forest); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.admin-profile > div { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #1a1f26; font-weight: 800; }
.admin-body .main { width: 100%; max-width: 1680px; margin: 0 auto; padding: 30px 32px 64px; }
.admin-body .okmsg { position: relative; margin: 0 0 18px; border: 1px solid rgba(78,222,163,.22); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin-bottom: 7px; font-size: clamp(25px, 3vw, 34px); line-height: 1.12; letter-spacing: -.035em; }
.page-heading p, .panel-heading p { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--forest); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.eyebrow time { color: #8e97a4; text-transform: none; letter-spacing: 0; font-weight: 500; }
.danger-eyebrow { color: var(--danger); }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px rgba(195,244,0,.08); animation: erp-pulse 1.8s infinite; }
.danger-eyebrow .pulse-dot { box-shadow: 0 0 0 5px rgba(255,140,132,.08); }
@keyframes erp-pulse { 50% { opacity: .45; transform: scale(.82); } }
.heading-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.erp-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 15px; border: 0;
  border-radius: 12px; font-size: 12px; font-weight: 800; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.erp-button .material-symbols-outlined { font-size: 18px; }
.erp-button.primary { background: var(--forest); color: #1d2700; box-shadow: 0 8px 24px rgba(195,244,0,.09); }
.erp-button.secondary { background: var(--paper-high); color: #eef0f4; }
.erp-button.compact { min-height: 34px; padding: 0 11px; font-size: 10px; }
.erp-button.full { width: 100%; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric-card {
  position: relative; min-width: 0; overflow: hidden; padding: 19px; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(145deg, rgba(37,42,50,.82), rgba(23,28,35,.88)); box-shadow: 0 13px 32px rgba(0,0,0,.13);
}
.metric-card::after { content: ""; position: absolute; top: -35px; right: -28px; width: 92px; height: 92px; border-radius: 50%; background: rgba(195,244,0,.045); filter: blur(3px); }
.danger-card::after { background: rgba(255,140,132,.08); }
.metric-label { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #aeb5c0; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .075em; }
.metric-icon, .compact-icon, .policy-icon {
  display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--paper-highest);
}
.metric-icon .material-symbols-outlined { font-size: 20px; }
.lime { color: var(--forest); background-color: rgba(195,244,0,.1); }
.green { color: var(--ok); background-color: rgba(78,222,163,.1); }
.cyan { color: var(--cyan); background-color: rgba(85,230,240,.1); }
.red { color: var(--danger); background-color: rgba(255,140,132,.1); }
.slate { color: #c6ccd5; background-color: var(--paper-highest); }
.metric-card > strong { display: block; margin: 16px 0 15px; font-size: clamp(24px, 2.3vw, 34px); line-height: 1; letter-spacing: -.045em; white-space: nowrap; }
.metric-card > strong small { color: #8e97a4; font: 500 14px "Inter", sans-serif; letter-spacing: 0; }
.metric-card > .date-metric { font-size: clamp(18px, 1.6vw, 24px); }
.green-text { color: var(--ok) !important; }
.danger-text { color: var(--danger) !important; }
.metric-card footer { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 10px; }
.metric-card footer em { color: #89929f; font-style: normal; text-align: right; }
.metric-card footer a { color: var(--danger); text-decoration: none; font-weight: 700; }
.positive, .negative, .neutral { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.positive { color: var(--ok); }
.negative { color: var(--danger); }
.neutral { color: #dce1e8; }
.positive .material-symbols-outlined, .negative .material-symbols-outlined, .neutral .material-symbols-outlined { font-size: 14px; }
.danger-badge, .status-chip {
  display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 5px 8px; border-radius: 999px;
  color: #c8ced7; background: var(--paper-highest); font-size: 8px; line-height: 1; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; white-space: nowrap;
}
.danger-badge { color: var(--danger); background: rgba(147,0,10,.32); }
.status-chip .material-symbols-outlined { font-size: 13px; }
.status-chip.success, .status-chip.paid, .status-chip.dispute-resolved { color: var(--ok); background: rgba(78,222,163,.1); }
.status-chip.accent, .status-chip.scheduled { color: var(--forest); background: rgba(195,244,0,.1); }
.status-chip.invoiced, .status-chip.dispute-under_review { color: var(--cyan); background: rgba(85,230,240,.1); }
.status-chip.dispute-open { color: var(--danger); background: rgba(255,140,132,.1); }
.status-chip.dispute-rejected { color: #aeb5c0; }
.compact-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.compact-metrics article { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper-low); }
.compact-icon { width: 42px; height: 42px; }
.compact-metrics small { display: block; margin-bottom: 3px; color: #969fab; font-size: 10px; }
.compact-metrics strong { font: 700 20px "Lexend", sans-serif; }
.dashboard-split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr); gap: 18px; margin-bottom: 18px; }
.erp-panel { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 19px; background: var(--paper); box-shadow: 0 14px 38px rgba(0,0,0,.13); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { margin: 3px 0 0; font-size: 17px; letter-spacing: -.025em; }
.panel-heading h3 { margin: 0; font-size: 14px; }
.section-kicker { color: var(--forest); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.insight-visual { position: relative; min-height: 235px; overflow: hidden; border-radius: 14px; background: radial-gradient(circle at 68% 52%, rgba(195,244,0,.16), transparent 28%), linear-gradient(135deg, #0a0f15, #131b22); }
.insight-grid { position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 31px 31px; mask-image: linear-gradient(to right, #000, transparent); }
.insight-orbit { position: absolute; border: 1px solid rgba(195,244,0,.25); border-radius: 50%; }
.orbit-one { width: 270px; height: 270px; right: 6%; top: -20px; }
.orbit-two { width: 155px; height: 155px; right: 14%; top: 38px; box-shadow: 0 0 45px rgba(195,244,0,.08) inset; }
.insight-copy { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; }
.insight-copy span { color: var(--forest); font-size: 8px; font-weight: 800; letter-spacing: .18em; }
.insight-copy strong { margin: 8px 0; font: 800 clamp(28px,4vw,45px) "Lexend", sans-serif; letter-spacing: -.05em; }
.insight-copy small { color: #9da6b2; }
.telemetry-badge { position: absolute; left: 28px; bottom: 20px; display: flex; align-items: center; gap: 7px; color: #aeb6c1; font-size: 9px; }
.telemetry-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.insight-footer { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }
.insight-footer div + div { border-left: 1px solid var(--line); }
.insight-footer small { display: block; margin-bottom: 5px; color: #9099a6; font-size: 9px; }
.insight-footer strong { font: 700 15px "Lexend", sans-serif; }
.activity-panel { display: flex; flex-direction: column; }
.activity-list { display: grid; gap: 9px; }
.activity-item { position: relative; display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 10px; align-items: start; padding: 11px; border-radius: 12px; background: var(--paper-low); }
.activity-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--forest); background: rgba(195,244,0,.1); }
.activity-icon .material-symbols-outlined { font-size: 17px; }
.activity-item strong { display: block; overflow: hidden; color: #f3f5f8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.activity-item p { overflow: hidden; margin: 4px 0; color: #8f98a5; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.activity-item b { color: var(--forest); font-size: 10px; }
.activity-item time { color: #747e8b; font-size: 8px; white-space: nowrap; }
.panel-link { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: auto; padding-top: 14px; color: #c9ced6; font-size: 10px; font-weight: 700; text-decoration: none; }
.panel-link .material-symbols-outlined { font-size: 15px; }
.erp-table-wrap { width: 100%; overflow-x: auto; border-radius: 13px; }
.erp-table { min-width: 720px; border-radius: 0; background: transparent; }
.erp-table th { padding: 12px 13px; border: 0; background: #11171e; color: #89929f; font-size: 8px; letter-spacing: .07em; }
.erp-table th:first-child { border-radius: 10px 0 0 10px; }
.erp-table th:last-child { border-radius: 0 10px 10px 0; }
.erp-table td { padding: 14px 13px; border-bottom-color: var(--line); color: #dfe3e9; font-size: 10px; vertical-align: middle; }
.erp-table tbody tr { transition: background .15s ease; }
.erp-table tbody tr:hover { background: rgba(255,255,255,.02); }
.erp-table .numeric { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.package-name, .person-cell { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.package-name > span { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 9px; color: var(--forest); background: rgba(195,244,0,.1); font-weight: 800; }
.package-name strong, .person-cell strong { display: block; margin-bottom: 3px; color: #f5f6f8; }
.package-name small, .person-cell small { display: block; color: #858f9c; font-size: 8px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 150px; color: #808a96; text-align: center; }
.empty-state .material-symbols-outlined { margin-bottom: 8px; color: #525d69; font-size: 32px; }
.empty-state strong { color: #b6bdc7; font-size: 12px; }
.empty-state p { margin: 5px 0 0; font-size: 10px; }
.empty-state.inline { min-height: 50px; }
.rule-banner {
  display: flex; align-items: center; gap: 15px; margin-bottom: 16px; padding: 16px 18px; border: 1px solid rgba(195,244,0,.13);
  border-radius: 17px; background: linear-gradient(90deg, rgba(195,244,0,.08), var(--paper-low) 45%);
}
.rule-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; color: var(--forest); background: rgba(195,244,0,.1); }
.rule-banner strong { display: block; margin-bottom: 3px; font-size: 11px; }
.rule-banner p { margin: 0; color: #969faa; font-size: 10px; line-height: 1.45; }
.rule-flow { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.rule-flow span { padding: 7px 9px; border-radius: 9px; background: var(--paper-high); color: #dfe3e9; font-size: 9px; font-weight: 700; white-space: nowrap; }
.rule-flow i { width: 25px; height: 1px; background: var(--forest); }
.totals-inline { display: flex; gap: 18px; }
.totals-inline span { color: #8f98a5; font-size: 9px; text-align: right; }
.totals-inline b { display: block; margin-top: 4px; color: #fff; font-size: 11px; }
.payout-table { min-width: 1180px; }
.accent-column { color: var(--forest) !important; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 35px; height: 35px; border-radius: 50%; color: #273100; background: var(--forest); font-weight: 800; }
.iban { display: block; color: #d7dbe2; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; white-space: nowrap; }
.bank-state { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: #818b97; font-size: 8px; }
.bank-state i { width: 5px; height: 5px; border-radius: 50%; }
.bank-state.ready i { background: var(--ok); }
.bank-state.missing { color: var(--danger); }
.bank-state.missing i { background: var(--danger); }
.table-subtext { display: block; margin-top: 3px; color: #828c99; font-size: 8px; }
.muted { color: #9aa3af !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.status-select { min-height: 34px; width: 118px; padding: 7px 25px 7px 10px; border-color: var(--line); border-radius: 9px; background: var(--paper-high); font-size: 9px; font-weight: 800; }
.status-select.status-scheduled { color: var(--forest); }
.status-select.status-invoiced { color: var(--cyan); }
.status-select.status-paid { color: var(--ok); }
.policy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.policy-grid article { padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.policy-icon { width: 42px; height: 42px; margin-bottom: 14px; }
.policy-grid h3 { margin-bottom: 7px; font-size: 13px; }
.policy-grid p { margin-bottom: 0; color: #929ba7; font-size: 10px; line-height: 1.6; }
.case-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(290px, .75fr); gap: 18px; margin-bottom: 18px; }
.case-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.case-id { display: flex; align-items: center; gap: 11px; }
.case-id > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--danger); color: #360000; font: 800 17px "Lexend",sans-serif; }
.case-id > div > div { display: flex; align-items: center; gap: 8px; }
.case-id h2 { margin: 0; font-size: 17px; }
.case-id p { margin: 4px 0 0; color: #828c98; font-size: 9px; }
.case-parties { display: grid; grid-template-columns: 1fr 34px 1fr; gap: 10px; align-items: center; margin: 17px 0; }
.case-parties > div { display: flex; align-items: center; gap: 10px; padding: 13px; border-radius: 13px; background: var(--paper-low); }
.case-parties > div > div { min-width: 0; }
.case-parties small { color: #7f8996; font-size: 8px; text-transform: uppercase; }
.case-parties strong { display: block; margin: 2px 0; font-size: 11px; }
.case-parties p { overflow: hidden; margin: 0; color: #9099a5; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.case-parties > div > b { margin-left: auto; font-size: 10px; white-space: nowrap; }
.danger-avatar { color: #3e0500; background: var(--danger); }
.party-arrow { display: grid; place-items: center; color: #69737f; }
.party-arrow .material-symbols-outlined { font-size: 18px; }
.rating { display: inline-flex; align-items: center; color: var(--forest); }
.rating .material-symbols-outlined { font-size: 14px; font-variation-settings: "FILL" 1; }
.statement { padding: 15px; border-radius: 13px; background: var(--paper-high); }
.statement > div { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: #b5bcc6; font-size: 9px; }
.statement > div .material-symbols-outlined { font-size: 16px; }
.statement time { margin-left: auto; color: #7f8996; }
.statement blockquote { margin: 0 0 10px; padding: 13px; border-left: 2px solid var(--forest); border-radius: 0 9px 9px 0; background: #11171d; color: #e2e5ea; font-size: 11px; font-style: italic; line-height: 1.65; }
.reason-chip { display: inline-flex; padding: 5px 8px; border-radius: 7px; background: var(--paper-highest); color: #c6ccd4; font-size: 8px; font-weight: 700; text-transform: capitalize; }
.case-timeline { margin-top: 18px; }
.case-timeline h3 { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.case-timeline h3 .material-symbols-outlined { color: var(--forest); font-size: 17px; }
.case-timeline > div { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.case-timeline i { width: 8px; height: 8px; margin-top: 3px; border: 2px solid #56606c; border-radius: 50%; }
.case-timeline i.done { border-color: var(--ok); background: var(--ok); }
.case-timeline i.active { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(195,244,0,.08); }
.case-timeline strong, .case-timeline small { display: block; }
.case-timeline strong { font-size: 9px; }
.case-timeline small { margin-top: 3px; color: #7f8996; font-size: 8px; }
.case-timeline b { color: #919aa6; font-size: 8px; }
.case-sidebar { display: grid; gap: 18px; align-content: start; }
.resolution-form h2 { margin: 4px 0 7px; font-size: 18px; }
.resolution-form p { color: #919aa6; font-size: 10px; line-height: 1.55; }
.resolution-form label { margin-top: 13px; color: #c8ced7; font-size: 9px; }
.resolution-form select, .resolution-form textarea, .inline-editor select, .inline-editor textarea { min-height: 42px; border-radius: 10px; background: var(--paper-low); font-size: 10px; }
.resolution-form textarea { min-height: 115px; }
.resolution-form .erp-button { margin-top: 12px; }
.score-ring {
  --score: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 130px; height: 130px; margin: 6px auto 18px;
  border-radius: 50%; background: radial-gradient(circle closest-side, var(--paper) 76%, transparent 77%), conic-gradient(var(--forest) calc(var(--score) * 1%), var(--paper-highest) 0);
}
.score-ring strong { font: 800 30px "Lexend",sans-serif; }
.score-ring small { color: #8b95a2; font-size: 8px; text-transform: uppercase; }
.coach-risk dl { margin: 0; }
.coach-risk dl div { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-size: 9px; }
.coach-risk dt { color: #8d97a4; }
.coach-risk dd { margin: 0; font-weight: 700; }
.empty-hero { display: flex; flex-direction: column; align-items: center; margin-bottom: 18px; padding: 50px 20px; text-align: center; }
.empty-hero > .material-symbols-outlined { color: var(--ok); font-size: 42px; }
.empty-hero h2 { margin: 9px 0 5px; font-size: 18px; }
.empty-hero p { margin: 0; color: #8d97a3; font-size: 10px; }
.case-number { color: var(--forest); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.clamp-text { display: -webkit-box; max-width: 240px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #9ba4b0; line-height: 1.4; }
.inline-editor { position: relative; }
.inline-editor summary { color: var(--forest); cursor: pointer; font-weight: 700; list-style: none; }
.inline-editor summary::-webkit-details-marker { display: none; }
.inline-editor[open] form {
  position: absolute; z-index: 8; right: 0; top: 24px; width: 260px; padding: 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--paper-high); box-shadow: var(--shadow);
}
.inline-editor select, .inline-editor textarea { margin-bottom: 8px; }
.inline-editor textarea { min-height: 80px; }

@media (max-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-split, .case-layout { grid-template-columns: 1fr; }
  .case-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .admin-body .shell { display: block; }
  .admin-body .side {
    position: fixed; z-index: 30; width: min(300px, 88vw); height: 100vh; transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .admin-body .nav-toggle:checked ~ .shell .side { transform: none; }
  .admin-body .nav-toggle:checked ~ .shell .nav-scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.65); }
  .admin-body .nav-close { display: inline-flex; margin: 0 10px 10px; }
  .admin-topbar { height: 58px; padding: 0 16px; }
  .global-search { width: min(420px, 62vw); }
  .currency-pill, .admin-profile > span { display: none; }
  .admin-body .main { padding: 22px 16px 48px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { justify-content: flex-start; }
  .compact-metrics { grid-template-columns: repeat(2, 1fr); }
  .rule-banner { align-items: flex-start; }
  .rule-flow { display: none; }
}

@media (max-width: 620px) {
  .global-search { display: none; }
  .topbar-actions { margin-left: auto; }
  .metric-grid, .compact-metrics, .policy-grid, .case-sidebar { grid-template-columns: 1fr; }
  .metric-card > strong { font-size: 29px; }
  .insight-visual { min-height: 210px; }
  .orbit-one { right: -36%; }
  .orbit-two { right: -5%; }
  .insight-copy { left: 18px; }
  .telemetry-badge { left: 18px; }
  .panel-heading { flex-direction: column; }
  .totals-inline { width: 100%; justify-content: space-between; }
  .case-heading { flex-direction: column; }
  .case-parties { grid-template-columns: 1fr; }
  .party-arrow { transform: rotate(90deg); }
  .case-parties > div > b { display: none; }
  .rule-banner { padding: 14px; }
}
