:root {
  --ink: #121917;
  --muted: #52605c;
  --line: #d8e0dc;
  --bg: #eef2f0;
  --panel: #ffffff;
  --brand: #0b5e57;
  --brand-ink: #083f3a;
  --brand-2: #0f9f91;
  --gold: #c98a3e;
  --gold-bright: #e3a947;
  --good: #16794d;
  --warn: #a76200;
  --bad: #b42318;
  --info: #2358a6;
  --shadow: 0 18px 45px rgba(18, 25, 23, 0.08);
  --radius: 10px;
  /* One family app-wide (see the auth screens' redesign note below for why):
     --font-display exists only so every heading/number call site that was
     written against it doesn't need touching again, not because headings
     get a different typeface from body text. */
  --font-display: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--bg); letter-spacing: 0; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
::selection { background: #BFE0DA; }

/* Legacy form/button primitives — still used by pages not yet migrated to
   the .btn/.card/.row-list system below. Nothing here is removed; the
   premium classes are additive so a page can be migrated independently of
   any other. */
button, .button { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 8px; padding: 10px 14px; font-weight: 700; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 8px; font: inherit; }
button.primary, .primary { background: var(--brand); border-color: var(--brand); color: white; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; font: inherit; background: #fff; color: var(--ink); }
textarea { min-height: 90px; resize: vertical; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ---------- App shell (premium — used by every real page via layout()) ---------- */

.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.sidebar {
  background: #0D1D1B; color: #E7EEEC;
  display: flex; flex-direction: column; gap: 24px;
  padding: 20px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; }
.sidebar-brand .brand-mark { width: 24px; height: 24px; border-radius: 7px; }
.sidebar-brand span { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: #fff; letter-spacing: -0.01em; }
.sidebar-label { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: #7E9490; padding: 10px 10px 6px; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #C5D4D0; font-size: 13.5px; font-weight: 500; }
.sidebar nav a svg { width: 16px; height: 16px; flex: none; opacity: 0.85; }
.sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar nav a.active { background: var(--brand); color: #fff; }
.sidebar-footer { margin-top: auto; display: grid; gap: 10px; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 9px; background: rgba(255,255,255,0.05); }
.sidebar-user .avatar { width: 28px; height: 28px; font-size: 11px; }
.sidebar-user .who { display: grid; line-height: 1.25; min-width: 0; }
.sidebar-user .who strong { font-size: 12.5px; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .who span { font-size: 11px; color: #8EA39E; }
.sidebar .logout { margin: 0; }
.sidebar .logout button { width: 100%; background: transparent; color: #fff; border-color: rgba(255,255,255,0.18); }

.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; color: var(--gold-bright); flex: none; }
.brand-mark.sm { width: 24px; height: 24px; border-radius: 7px; }

.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; border-bottom: 1px solid var(--line);
  background: var(--bg); position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; font-size: 22px; margin: 0; }
.topbar .topbar-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar .user-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 13px; font-size: 13px; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: #C3CFCA; }

.page { padding: 28px 32px 56px; max-width: 1180px; }

.menu-toggle { display: none; }
.shell-scrim { display: none; }
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 248px;
    transform: translateX(-100%); transition: transform .2s ease; z-index: 30;
  }
  .sidebar.open { transform: translateX(0); }
  .shell-scrim { display: none; position: fixed; inset: 0; background: rgba(8,16,14,0.45); z-index: 25; }
  .shell-scrim.open { display: block; }
  .menu-toggle { display: grid; place-items: center; }
  .topbar { padding: 14px 16px; }
  .page { padding: 18px 16px 90px; }
  .topbar h1 { font-size: 18px; }
}

/* ---------- Premium primitives (additive — opt in per page) ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; font: inherit;
}
.btn:hover { border-color: #BFCCC7; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(11,94,87,0.07); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-full { width: 100%; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; margin-right: 6px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.good { background: #E4F3EA; color: #16794D; }
.badge.warn { background: #FBEFDD; color: #A76200; }
.badge.bad  { background: #FBE6E3; color: #B42318; }
.badge.info { background: #E6EEF9; color: #2358A6; }
.badge.neutral { background: #EDF1EF; color: var(--muted); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.card-head h1, .card-head h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em; font-size: 17px; margin: 0; }
.card-head .eyebrow { font-size: 11.5px; color: var(--muted); margin: 0 0 3px; text-transform: uppercase; letter-spacing: .02em; }

.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-tile .label { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.stat-tile .value { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: 30px; font-weight: 600; letter-spacing: -0.01em; line-height: 1; }
.stat-tile .delta { font-size: 11.5px; margin-top: 7px; color: var(--muted); }
.stat-tile .delta.up { color: #16794D; }
.stat-tile .delta.down { color: #B42318; }

.row-list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-top: 1px solid var(--line); }
.row:first-child { border-top: none; }
a.row { color: inherit; }
a.row:hover { background: rgba(11,94,87,0.035); margin: 0 -10px; padding-left: 14px; padding-right: 14px; border-radius: 8px; }
.row .main-col { flex: 1; min-width: 0; }
.row .title { font-size: 13.5px; font-weight: 600; }
.row .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.row .tail { display: flex; align-items: center; gap: 10px; flex: none; }
/* For a .tail that's free text rather than a badge/count (an email
   address, say) — without this, long values like a full email don't
   wrap or shrink and force the row (and the page) wider than the
   viewport at phone widths. */
.row .tail.truncate { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.row .rank { width: 28px; flex: none; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--muted); text-align: center; }

/* Workflow Builder step reordering: a visible grab handle for pointer/
   drag users, plus always-present up/down buttons so keyboard and touch
   users (no native drag gesture on most mobile browsers) have an equally
   real way to reorder — not a degraded fallback bolted on after. */
.step-row { cursor: grab; }
.step-row.dragging { opacity: 0.5; }
.step-handle { flex: none; display: grid; place-items: center; width: 20px; color: var(--muted); }
.step-move-buttons { display: flex; flex-direction: column; gap: 1px; flex: none; }
.step-move-buttons button { display: grid; place-items: center; width: 22px; height: 15px; padding: 0; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.step-move-buttons button:first-child { border-radius: 5px 5px 0 0; }
.step-move-buttons button:last-child { border-radius: 0 0 5px 5px; border-top: none; }
.step-move-buttons button:hover:not(:disabled) { background: var(--bg); color: var(--ink); }
.step-move-buttons button:disabled { opacity: 0.35; cursor: not-allowed; }
.step-move-buttons button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; position: relative; z-index: 1; }
#stepOrderStatus { font-weight: 600; }
.row.row-top .rank { color: var(--gold-bright); }
.row.row-highlight { background: rgba(11,94,87,0.06); margin: 0 -10px; padding-left: 14px; padding-right: 14px; border-radius: 8px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs a, .tabs button { background: none; border: none; cursor: pointer; padding: 10px 4px; margin-right: 18px; font-size: 13.5px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; position: relative; top: 1px; font: inherit; }
.tabs a.active, .tabs button.active { color: var(--ink); border-bottom-color: var(--brand); }

.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; color: #fff; background: var(--brand); }

.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; }

/* Shared 401/403/404/500 state (see html.ts errorPage()) — rendered inside
   the normal page shell, so it reads as one more screen in the product
   rather than a dead end. */
.error-state { max-width: 460px; margin: 48px auto; padding: 8px 4px 0; text-align: center; display: grid; justify-content: center; gap: 4px; }
.error-icon { width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; margin: 0 auto 10px; border: 1px solid var(--line); }
.error-icon.warn { background: #FBF2E6; color: var(--warn); }
.error-icon.bad { background: #FBE6E3; color: var(--bad); }
.error-icon.info { background: #EAF1FB; color: var(--info); }
.error-state .badge { margin: 2px auto 14px; }
.error-state h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; font-size: 22px; margin: 0 0 10px; }
.error-desc { color: var(--muted); margin: 0 0 6px; line-height: 1.55; }
.error-context { font-size: 12.5px; color: var(--muted); margin: 0 0 4px; }
.error-roles { font-size: 12.5px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 14px 0 0; text-align: left; }
.error-roles strong { color: var(--ink); }
.error-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
@media (max-width: 480px) {
  .error-state { margin: 28px auto; }
  .error-actions { flex-direction: column; }
  .error-actions .btn { width: 100%; }
}

label.field { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: none; }
.muted { color: var(--muted); }

/* ---------- Legacy page-body classes (kept for pages not yet migrated) ---------- */

.hero-panel, .detail-head { background: linear-gradient(135deg, #ffffff, #edf7f5); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 26px; display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 18px; }
.hero-panel h1, .detail-head h1 { margin: 0; font-size: 32px; line-height: 1.1; }
.eyebrow { text-transform: uppercase; color: var(--brand); font-weight: 900; font-size: 12px; margin: 0 0 8px; }
.readiness-ring { width: 150px; height: 150px; border-radius: 50%; border: 14px solid #d9eee9; border-top-color: var(--brand); display: grid; place-items: center; text-align: center; background: white; flex: 0 0 auto; }
.readiness-ring strong { font-size: 30px; }
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.panel, .metric, .login-card, .mobile-hero, .progress-card, .task-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 18px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; }
.section-head h1 { margin: 0; font-size: 26px; line-height: 1.15; }
.panel h1, .panel h2 { margin-top: 0; }
.metric span { color: var(--muted); font-weight: 800; font-size: 13px; }
.metric strong { display: block; font-size: 32px; margin-top: 8px; }
.location-list, .stack, .phone-stack { display: grid; gap: 12px; }
.location-row, .table-row, .exception-card, .source-link, .notification { border: 1px solid var(--line); border-radius: 8px; padding: 13px; display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 10px; background: #fff; transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
.location-row:hover, .table-row:hover, .exception-card:hover, .source-link:hover, .notification:hover { transform: translateY(-1px); border-color: #b8cfca; box-shadow: 0 10px 24px rgba(22, 33, 31, 0.08); }
.exception-card { align-items: flex-start; flex-direction: column; border-left: 4px solid var(--warn); }
.exception-card.critical { border-left-color: var(--bad); }
/* ---------- Auth (login gate + tenant login) ----------
   Deliberately off the Fraunces display face used elsewhere: a sign-in
   screen is read once per session, under time pressure, often on a phone —
   it should read like infrastructure, not a magazine cover. Hierarchy here
   comes from a left-aligned block, generous but not loose spacing, and one
   weight step between elements — not a second typeface. */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.auth-frame { width: 100%; max-width: 368px; display: grid; gap: 22px; }
.auth-brand { display: inline-flex; align-items: center; gap: 9px; justify-self: start; }
.auth-brand .brand-mark { width: 26px; height: 26px; border-radius: 7px; }
.auth-brand strong { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px 26px; box-shadow: 0 1px 2px rgba(18, 25, 23, 0.05); display: grid; gap: 22px; }
.login-org { font-size: 12.5px; font-weight: 600; color: var(--brand); margin: 0; }
.login-card h1 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; margin: 2px 0 0; }
.login-card .lead { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0; }
.login-form { display: grid; gap: 14px; }
.login-field { display: grid; gap: 6px; position: relative; }
.login-field label { font-size: 13px; font-weight: 500; color: var(--ink); }
.login-field input { height: 40px; border-radius: 8px; border: 1px solid var(--line); padding: 0 12px; font-size: 14.5px; background: #fff; color: var(--ink); transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.login-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 94, 87, 0.13); }
.login-field.has-toggle input { padding-right: 42px; }
.password-toggle { position: absolute; right: 4px; bottom: 4px; width: 32px; height: 32px; display: grid; place-items: center; border: none; background: transparent; color: var(--muted); cursor: pointer; border-radius: 6px; }
.password-toggle:hover { background: var(--bg); color: var(--ink); }
.password-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.login-submit { height: 40px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.login-alert { font-size: 13px; line-height: 1.5; padding: 10px 12px; border-radius: 8px; background: #fdecec; color: #9a2a1f; border: 1px solid #f6cfc9; }
.auth-frame .login-footnote { text-align: center; font-size: 13px; color: var(--muted); margin: 0; }
.auth-frame .login-footnote a { color: var(--brand); font-weight: 500; }
.login-demo { display: grid; gap: 4px; margin-top: -4px; }
.login-demo summary { font-size: 12.5px; color: var(--muted); cursor: pointer; width: fit-content; }
.login-demo div { display: grid; gap: 3px; margin-top: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.employee .shell { grid-template-columns: minmax(320px, 480px); justify-content: center; background: #eef7f4; }
.employee .main { padding: 14px; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

.employee-topbar { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 2px 10px; margin-bottom: 4px; }
.employee-topbar strong { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em; font-size: 15px; flex: 1; }
.employee-topbar form { margin: 0; }
.employee-topbar button { border: none; background: none; padding: 6px 4px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }

.bottom-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto; }
.bottom-tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 10px; border-radius: 10px; color: var(--muted); font-size: 10.5px; font-weight: 600; min-width: 56px; }
.bottom-tabs a.active { color: var(--brand); }
.bottom-tabs a:active { background: rgba(11,94,87,0.08); }
.mobile-hero { background: linear-gradient(135deg, #083f3a, var(--brand)); color: white; margin-bottom: 12px; }
.mobile-hero h1 { margin: 8px 0 18px; font-size: 26px; }
.mobile-hero p { color: #d7f3ec; margin: 0; }
.task-card { display: grid; gap: 8px; border-left: 5px solid var(--brand); }
.task-card.critical { border-left-color: var(--bad); }
.bar { background: #e5eeeb; height: 10px; border-radius: 999px; overflow: hidden; margin: 10px 0; }
.bar i { display: block; height: 100%; background: var(--brand); }
.xp-pill { display: inline-flex; margin-top: 8px; background: #edf7f5; padding: 8px 10px; border-radius: 999px; font-weight: 900; }
.privacy, .alert { border-radius: 8px; padding: 12px; background: #fff5e8; color: #724200; border: 1px solid #ffdca7; }
.alert.info { background: #eaf2ff; color: #1f4d92; border-color: #cfe0ff; }
.alert.warn { margin-bottom: 14px; }
.evidence-row, .ledger-line, .audit-line, .settings-list span { display: grid; gap: 3px; border-bottom: 1px solid var(--line); padding: 11px 0; }
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  display: grid;
  gap: 4px;
  cursor: pointer;
  background: var(--bg);
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--brand-2); }
.dropzone.dragover { border-color: var(--brand); background: #edf7f5; }
.evidence-upload-row progress { height: 8px; accent-color: var(--brand); }
.checkline { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink); }
.checkline input { width: auto; }
.required { color: var(--bad); font-size: 11px; font-weight: 900; }
.filters { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
.empty { color: var(--muted); border: 1px dashed var(--line); padding: 18px; border-radius: 8px; margin-top: 12px; }
.full { width: 100%; margin-top: 12px; }
.source-link span { color: var(--muted); }

@media (max-width: 900px) {
  .cols-2, .cols-3, .filters { grid-template-columns: 1fr; }
  .section-head, .table-row, .location-row { align-items: flex-start; flex-direction: column; }
  .hero-panel, .detail-head { align-items: flex-start; flex-direction: column; }
  .hero-panel h1, .detail-head h1 { font-size: 26px; }
  .two-col { grid-template-columns: 1fr; }
  /* A card-head with two action buttons (Workflow Builder's index page:
     "AI ile taslak oluştur" + "+ Yeni prosedür") squeezed each button into
     roughly half the available width at phone widths, wrapping each
     button's own label across two lines instead of using the space
     sensibly — stack them full-width instead. */
  .card-head-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .card-head-actions .btn { width: 100%; }
}

/* ---------- Rewards (manager + employee) ---------- */

.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.reward-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; align-content: start; }
.reward-card.is-inert { opacity: 0.88; }
.reward-art { height: 58px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; color: #fff; overflow: hidden; }
.reward-art .reward-art-icon { opacity: 0.85; }
.reward-art.type-gift_card { background: linear-gradient(135deg, var(--brand-2), var(--brand-ink)); }
.reward-art.type-shopping_allowance { background: linear-gradient(135deg, #3a73c9, #16335e); }
.reward-art.type-achievement_badge { background: linear-gradient(135deg, var(--gold-bright), #8a5a1e); }
.reward-art.type-generic { background: linear-gradient(135deg, #64756f, #32403b); }
.reward-card .reward-title { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em; font-size: 15px; margin: 0; }
.reward-card .reward-desc { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.5; }
.reward-card .reward-cost-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.reward-card .reward-cost { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; font-size: 19px; font-variant-numeric: tabular-nums; }
.reward-card .reward-cost small { font-size: 11px; color: var(--muted); font-weight: 500; }
.reward-card .reward-meta-line { font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.reward-badge-corner { position: absolute; top: 12px; right: 12px; }
.reward-card form { margin: 0; }
.reward-card .btn-full { width: 100%; }

.budget-bar-track { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; border: 1px solid var(--line); }
.budget-bar-fill { height: 100%; background: var(--brand); border-radius: 999px; }
.budget-bar-fill.over { background: var(--bad); }

.fulfillment-form { display: grid; gap: 8px; grid-template-columns: 1fr 2fr auto; align-items: end; }
.fulfillment-form label.field { margin: 0; }

@media (max-width: 720px) {
  .reward-grid { grid-template-columns: 1fr; }
  .fulfillment-form { grid-template-columns: 1fr; }
}
