/* XyberHub HRIS — tema "pinus & daun"
   Satu keluarga huruf (Plus Jakarta Sans), angka tabular untuk jam & statistik. */
:root {
  --pine: #0E4D40;        /* utama: tombol, menu aktif */
  --pine-deep: #0A3A30;   /* header mobile, hover */
  --ink: #15302A;         /* teks utama */
  --ink-2: #5A6E68;       /* teks sekunder */
  --mint: #EAF4EF;        /* latar sapaan & sorotan lembut */
  --leaf: #C7E59A;        /* aksen daun */
  --leaf-ink: #2F4A12;
  --paper: #FFFFFF;
  --canvas: #F5F8F6;
  --line: #DCE7E1;
  --amber: #B7791F;  --amber-bg: #FBF0DC;
  --clay: #B4432F;   --clay-bg: #FBE6E1;
  --ok: #1F7A55;     --ok-bg: #E1F3EA;
  --radius-lg: 20px; --radius: 12px; --radius-sm: 8px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --pine: #5FB89B; --pine-deep: #0C2621; --ink: #E3EEE9; --ink-2: #9DB3AB;
    --mint: #15332C; --leaf: #8FBF5A; --leaf-ink: #10200A;
    --paper: #13221E; --canvas: #0D1916; --line: #24403A;
    --amber: #E3A94F; --amber-bg: #3A2C14; --clay: #E9826E; --clay-bg: #3B1E18;
    --ok: #6FD3A4; --ok-bg: #133A2B;
    color-scheme: dark;
  }
  .btn-primary, .nav-link.active, .clock-card, .login-side { color: #08201A !important; }
  .clock-card .muted, .login-side p { color: rgba(8, 32, 26, .72) !important; }
  .clock-card .times div { background: rgba(0,0,0,.12) !important; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--canvas); }
a { color: var(--pine); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 .75em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; border-radius: 4px; }
[data-lucide], svg.lucide { width: 18px; height: 18px; stroke-width: 1.9; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Kerangka web ---------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--paper) 263px, var(--line) 263px, var(--line) 264px, transparent 264px); }
.sidebar { background: var(--paper); border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--pine); color: #fff; display: grid; place-items: center; font-weight: 800; }
.nav-group { margin-bottom: 18px; }
.nav-group-title { font-size: .78rem; color: var(--ink-2); padding: 0 10px 6px; font-weight: 600; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); font-weight: 500; font-size: .93rem; }
.nav-link:hover { background: var(--mint); text-decoration: none; }
.nav-link.active { background: var(--pine); color: #fff; }
.nav-link .count { margin-left: auto; background: var(--leaf); color: var(--leaf-ink); border-radius: 99px; font-size: .72rem; font-weight: 700; padding: 1px 8px; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.scrim { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 28px; background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: var(--ink-2); }
.topbar .search input { border: 0; background: transparent; padding: 9px 0; width: 100%; font: inherit; color: var(--ink); outline: none; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--mint); text-decoration: none; }
.icon-btn .dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--clay); color: #fff; font-size: .65rem; font-weight: 700; display: grid; place-items: center; }
.me-chip { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.me-chip:hover { text-decoration: none; }
.me-chip b { display: block; font-size: .9rem; line-height: 1.2; }
.me-chip span.role { font-size: .78rem; color: var(--ink-2); }
.menu-toggle { display: none !important; }
.content { padding: 26px 28px 48px; max-width: 1320px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Komponen ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head a { font-size: .87rem; font-weight: 600; }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 18px; }
.mt { margin-top: 18px; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .label { color: var(--ink-2); font-size: .86rem; display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat .value small { font-size: .9rem; font-weight: 500; color: var(--ink-2); }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); }
.stat-strip .stat { padding: 16px 20px; }
.stat-strip .stat + .stat { border-left: 1px solid var(--line); }

/* Sapaan pembuka dashboard */
.hero { background: var(--mint); border-radius: var(--radius-lg); padding: 26px 28px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.hero h1 { font-size: 1.75rem; max-width: 22ch; }
.hero p { color: var(--ink-2); max-width: 52ch; margin: 6px 0 0; }
.hero-illus { width: 210px; height: auto; color: var(--pine); }

/* Jam & kartu absen: elemen paling menonjol */
.clock-card { background: var(--pine); color: #fff; border-radius: var(--radius-lg); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.clock-card .muted { color: rgba(255,255,255,.72); }
.clock { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.clock-card .times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.clock-card .times div { background: rgba(255,255,255,.1); border-radius: var(--radius); padding: 10px 12px; font-size: .82rem; }
.clock-card .times b { display: block; font-size: 1.2rem; font-variant-numeric: tabular-nums; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none !important; line-height: 1.2; white-space: nowrap; }
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-deep); color: #fff !important; }
.btn-leaf { background: var(--leaf); color: var(--leaf-ink); }
.btn-leaf:hover { filter: brightness(.95); }
.btn-ghost { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--mint); }
.btn-danger { background: var(--clay-bg); color: var(--clay); }
.btn-sm { padding: 6px 11px; font-size: .84rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
form.inline { display: inline; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn, .pill-wait { background: var(--amber-bg); color: var(--amber); }
.pill-no { background: var(--clay-bg); color: var(--clay); }
.pill-muted { background: var(--canvas); color: var(--ink-2); border: 1px solid var(--line); }
.pill-leaf { background: var(--leaf); color: var(--leaf-ink); }

.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--leaf); color: var(--leaf-ink); font-weight: 700; object-fit: cover; flex: none; }
.avatar-sm { width: 30px; height: 30px; font-size: .72rem; }
.avatar-md { width: 38px; height: 38px; font-size: .85rem; }
.avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person span { font-size: .8rem; color: var(--ink-2); }

.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: .82rem; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--mint) 50%, transparent); }
.table .r { text-align: right; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; padding-bottom: 0; }
.list li:first-child { padding-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { display: block; }
.date-chip { width: 46px; flex: none; text-align: center; border-radius: 10px; background: var(--mint); padding: 6px 0; line-height: 1.1; }
.date-chip b { display: block; font-size: 1.15rem; }
.date-chip span { font-size: .7rem; color: var(--ink-2); }

.bar-row { display: grid; grid-template-columns: 120px 1fr 44px; align-items: center; gap: 10px; font-size: .88rem; margin: 8px 0; }
.bar { height: 8px; background: var(--canvas); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.bar span { display: block; height: 100%; background: var(--pine); border-radius: 99px; }
.weekbars { display: flex; align-items: flex-end; gap: 10px; height: 120px; padding-top: 8px; }
.weekbars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: .75rem; color: var(--ink-2); }
.weekbars span { width: 100%; max-width: 34px; background: var(--leaf); border-radius: 8px 8px 4px 4px; min-height: 4px; }
.weekbars div:last-child span { background: var(--pine); }

.empty { text-align: center; padding: 32px 16px; color: var(--ink-2); }
.empty svg { width: 32px; height: 32px; margin-bottom: 8px; color: var(--pine); }

/* Formulir */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .87rem; }
.field .hint { font-size: .8rem; color: var(--ink-2); }
.input { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 18%, transparent); }
textarea.input { min-height: 96px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: 10px; }
.check input { width: 18px; height: 18px; accent-color: var(--pine); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .input { width: auto; min-width: 150px; padding: 8px 12px; }

.segmented { display: inline-flex; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.segmented label { cursor: pointer; font-weight: 600; font-size: .88rem; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 7px 16px; border-radius: 8px; }
.segmented input:checked + span { background: var(--paper); color: var(--pine); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.segmented input:focus-visible + span { outline: 3px solid var(--leaf); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.active { color: var(--pine); border-color: var(--pine); }
.tabs a:hover { text-decoration: none; color: var(--ink); }

.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-weight: 500; }
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--clay-bg); color: var(--clay); }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 100; transition: .25s ease; max-width: calc(100% - 32px); pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--clay); color: #fff; }

dialog.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(560px, calc(100% - 24px)); background: var(--paper); color: var(--ink); }
dialog.modal::backdrop { background: rgba(10, 30, 25, .45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }

/* Kamera absensi */
.camera { position: relative; aspect-ratio: 3 / 4; max-height: 380px; background: #0b1714; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; color: #9DB3AB; margin: 0 auto; width: 100%; text-align: center; padding: 0; }
.camera video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera img { width: 100%; height: 100%; object-fit: cover; }
.geo-line { display: flex; align-items: center; gap: 8px; font-size: .88rem; padding: 10px 12px; border-radius: 10px; background: var(--canvas); border: 1px solid var(--line); margin: 12px 0; }
.geo-line.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.geo-line.bad { background: var(--clay-bg); color: var(--clay); border-color: transparent; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-side { background: var(--pine); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-side h1 { font-size: 2.5rem; max-width: 13ch; margin: 28px 0 12px; }
.login-side p { color: rgba(255,255,255,.75); max-width: 40ch; }
.login-side .brand { color: inherit; padding: 0; }
.login-side .brand-mark { background: var(--leaf); color: var(--leaf-ink); }
.login-form { display: grid; place-items: center; padding: 32px 20px; background: var(--paper); }
.login-form form { width: 100%; max-width: 380px; }
.demo-accounts { font-size: .82rem; color: var(--ink-2); border-top: 1px solid var(--line); margin-top: 20px; padding-top: 14px; }
.demo-accounts code { color: var(--ink); }

.pagination { display: flex; gap: 4px; list-style: none; padding: 0; margin: 16px 0 0; flex-wrap: wrap; }
.pagination li a, .pagination li span { display: block; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); }
.pagination li.active a { background: var(--pine); color: #fff; border-color: var(--pine); }

.prose { max-width: 70ch; white-space: pre-line; line-height: 1.7; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; font-size: .92rem; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 500; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 18px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--pine); border: 2px solid var(--paper); }

/* FullCalendar */
.fc { --fc-border-color: var(--line); --fc-today-bg-color: var(--mint); --fc-button-bg-color: var(--paper); --fc-button-border-color: var(--line); --fc-button-text-color: var(--ink); --fc-button-active-bg-color: var(--pine); --fc-button-active-border-color: var(--pine); --fc-button-hover-bg-color: var(--mint); --fc-button-hover-border-color: var(--line); --fc-page-bg-color: var(--paper); --fc-neutral-bg-color: var(--canvas); font-size: .88rem; }
.fc .fc-button { font-weight: 600; border-radius: 8px; text-transform: none; box-shadow: none !important; }
.fc .fc-button-primary:not(:disabled).fc-button-active { color: #fff; }
.fc .fc-button-primary:hover { color: var(--ink); }
.fc .fc-toolbar-title { font-size: 1.2rem; font-weight: 700; }
.fc-event { border-radius: 6px; padding: 1px 4px; cursor: pointer; }
.fc a { color: inherit; }

/* ---------- Responsif ---------- */
@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; left: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .sidebar.open + .scrim { display: block; position: fixed; inset: 0; background: rgba(10,30,25,.4); z-index: 40; }
  .menu-toggle { display: grid !important; }
  .topbar { padding: 12px 16px; }
  .topbar .search, .me-chip > div { display: none; }
  .content { padding: 18px 16px 40px; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; padding: 22px; }
  .hero-illus { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .stat-strip .stat + .stat { border-left: 0; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 860px) { .app { background: none; } }
[hidden] { display: none !important; }

/* ---------- Modul kepegawaian, penggajian, offboarding ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--canvas); border: 1px solid var(--line); overflow: hidden; min-width: 90px; }
.progress span { display: block; height: 100%; background: var(--pine); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .tick { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); background: var(--paper); display: grid; place-items: center; cursor: pointer; flex: none; color: transparent; padding: 0; }
.checklist .tick:hover { border-color: var(--pine); }
.checklist .done .tick { background: var(--pine); border-color: var(--pine); color: #fff; }
.checklist .done .t-title { text-decoration: line-through; color: var(--ink-2); }
.checklist .tick:disabled { cursor: not-allowed; opacity: .6; }
.checklist .grow { flex: 1; min-width: 0; }
.money { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.callout { background: var(--mint); border-radius: var(--radius); padding: 14px 16px; font-size: .9rem; }
.callout.warn { background: var(--amber-bg); color: var(--amber); }
.tab-count { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--canvas); border: 1px solid var(--line); font-size: .72rem; text-align: center; color: var(--ink-2); }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.stack-sm { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.stack-sm .btn { width: 100%; }

/* ---------- KPI ---------- */
.stepper { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 0; overflow-x: auto; padding-bottom: 4px; }
.step { position: relative; padding: 0 10px 0 0; }
.step::before { content: ""; position: absolute; top: 15px; left: 34px; right: 0; height: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step.done::before { background: var(--pine); }
.step .dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--paper); border: 2px solid var(--line); color: var(--ink-2); }
.step.done .dot { background: var(--pine); border-color: var(--pine); color: #fff; }
.step.open .dot { border-color: var(--pine); color: var(--pine); box-shadow: 0 0 0 4px var(--leaf); }
.step b { display: block; font-size: .86rem; margin-top: 8px; line-height: 1.25; }
.step span { display: block; font-size: .74rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.step.open b { color: var(--pine); }
.grade { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; font-weight: 800; font-size: .9rem; }
.grade-A { background: var(--pine); color: #fff; } .grade-B { background: var(--leaf); color: var(--leaf-ink); }
.grade-C { background: var(--mint); color: var(--pine); } .grade-D { background: var(--amber-bg); color: var(--amber); } .grade-E { background: var(--clay-bg); color: var(--clay); }
.rating { display: inline-flex; gap: 4px; }
.rating label { cursor: pointer; }
.rating input { position: absolute; opacity: 0; pointer-events: none; }
.rating span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); font-weight: 700; font-size: .88rem; background: var(--paper); }
.rating input:checked + span { background: var(--pine); border-color: var(--pine); color: #fff; }
.rating input:focus-visible + span { outline: 3px solid var(--leaf); }
.rating .sugg { border-style: dashed; border-color: var(--pine); }
.score-big { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.weight-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.weight-total.bad { color: var(--clay); } .weight-total.ok { color: var(--ok); }
.ind-table .input { padding: 7px 9px; font-size: .88rem; }
.ind-table td { vertical-align: top; padding: 8px 6px; }
.dist { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: end; height: 190px; }
.dist div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; position: relative; }
.dist .bar-actual { width: 100%; max-width: 48px; border-radius: 8px 8px 3px 3px; background: var(--pine); min-height: 3px; }
.dist .bar-target { position: absolute; left: 50%; transform: translateX(-50%); width: 64px; border-top: 2px dashed var(--amber); }
.dist small { color: var(--ink-2); }
