/* Mise · komponenter som alla vyer delar.
   Regler: vita kort på linne utan ramar (mjuk skugga), pillerknappar, saffran bara på .btn.primary,
   färg i etiketter och brickor bara när den betyder något. */

/* ── sidhuvud i vyn ───────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 0 22px; }
.page-head h1 { font-size: var(--fs-2xl); }
.page-head p { color: var(--ink-3); margin-top: 6px; font-size: var(--fs-md); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── rutnät ───────────────────────────────────────────────── */
.grid { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.g-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.stack-v { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt { margin-top: var(--gap); }
.mt-lg { margin-top: 28px; }
@media (max-width: 1280px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .g3, .g-2-1, .g-1-2, .g-3-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .g2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .g4 { grid-template-columns: minmax(0, 1fr); } }

/* ── kort ─────────────────────────────────────────────────── */
.card { background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: 20px 22px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.tight { padding: 16px 18px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 28px; }
.card.flush .card-head { padding: 18px 22px 0; }
.card-head h2, .card-head h3 { font-size: var(--fs-lg); letter-spacing: -0.015em; }
.card-head .sub { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 2px; font-family: var(--font); font-weight: 400; letter-spacing: 0; }
.card-head .end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-sm); }

/* mörkt identitetsfält (används sparsamt: överst i en vy) */
.band { background: var(--side); color: var(--side-ink); border-radius: var(--r-xl); padding: 22px 24px; position: relative; overflow: hidden; }
.band .muted { color: var(--side-ink-2); }
.band h2 { color: #fff; }

/* ── ikonbricka ───────────────────────────────────────────── */
.tile { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--well); color: var(--ink-2); }
.tile.sm { width: 28px; height: 28px; border-radius: 8px; }
.tile.lg { width: 42px; height: 42px; border-radius: 12px; }
.tile.mat { background: var(--d-mat-soft); color: var(--d-mat); }
.tile.dryck { background: var(--d-dryck-soft); color: var(--d-dryck); }
.tile.personal { background: var(--d-personal-soft); color: var(--d-personal); }
.tile.gast { background: var(--d-gast-soft); color: var(--d-gast); }
.tile.inkop { background: var(--d-inkop-soft); color: var(--d-inkop); }
.tile.ekonomi { background: var(--d-ekonomi-soft); color: var(--d-ekonomi); }
.tile.system { background: var(--d-system-soft); color: var(--d-system); }
.tile.ok { background: var(--ok-soft); color: var(--ok-text); }
.tile.warn { background: var(--warn-soft); color: var(--warn-text); }
.tile.err { background: var(--err-soft); color: var(--err-text); }

/* ── knappar ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px; border-radius: var(--pill);
  background: var(--panel); color: var(--ink); font-weight: 600; font-size: 13.5px; white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line-2); transition: background .15s, box-shadow .15s, transform .1s;
}
.btn:hover { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.dark { background: var(--ink); color: #fff; box-shadow: none; }
.btn.dark:hover { background: #2C2A36; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.danger { color: var(--err-text); }
.btn.danger-solid { background: var(--err-text); color: #fff; }
.btn.danger-solid:hover { filter: brightness(1.08); }
.btn.danger.armed { background: var(--err-text); color: #fff; }
.edit-danger-note { font-size: 13px; color: var(--err-text); margin-right: auto; align-self: center; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; gap: 5px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.band .btn:not(.primary) { background: rgba(255,255,255,.08); color: var(--side-ink); box-shadow: none; }
.band .btn:not(.primary):hover { background: rgba(255,255,255,.14); }
.link { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.link:hover { text-decoration-color: var(--ink); }
.more-link { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 600; font-size: var(--fs-sm); }
.more-link:hover { color: var(--ink); }

/* segmenterad väljare (period, vy) */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--pill); background: var(--well); }
.seg button { height: 30px; padding: 0 13px; border-radius: var(--pill); font-size: 13px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); }
.band .seg { background: rgba(255,255,255,.07); }
.band .seg button { color: var(--side-ink-2); }
.band .seg button.on { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }

/* flikar (riktiga, role=tab) */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line-2); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; height: 40px; font-weight: 600; font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.tabs .count { margin-left: 6px; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }

/* chip (filter) */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--pill); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.chip:hover { box-shadow: inset 0 0 0 1px var(--line-3); color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── etiketter och punkter ────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: var(--pill); font-size: 11.5px; font-weight: 600; background: var(--well); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok-text); }
.badge.warn { background: var(--warn-soft); color: var(--warn-text); }
.badge.err { background: var(--err-soft); color: var(--err-text); }
.badge.info { background: var(--info-soft); color: var(--info-text); }
.badge.dark { background: var(--ink); color: #fff; }
.badge .i { width: 12px; height: 12px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.err { background: var(--err); } .dot.info { background: var(--info); }
.unit-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; flex: none; }

/* förändring mot jämförelse */
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.delta.up { color: var(--ok-text); }
.delta.down { color: var(--err-text); }
.delta.flat { color: var(--ink-3); }

/* ── nyckeltal ────────────────────────────────────────────── */
.kpi { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-label { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; font-weight: 500; }
.kpi-value { font-family: var(--font-display); font-weight: 650; font-size: 30px; letter-spacing: -0.03em; line-height: 1.1; white-space: nowrap; }
.kpi-value small { font-size: 16px; font-weight: 600; color: var(--ink-3); letter-spacing: -0.01em; margin-left: 3px; }
.kpi-sub { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 12.5px; flex-wrap: wrap; }
.band .kpi-label, .band .kpi-sub { color: var(--side-ink-2); }
.band .kpi-value { color: #fff; }
.band .kpi-value small { color: var(--side-ink-2); }

/* mätare mot mål */
.meter { position: relative; height: 6px; border-radius: 6px; background: var(--well); overflow: visible; }
.meter > i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--ink); }
.meter > b { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: var(--ink); opacity: .55; }
.meter.ok > i { background: var(--ok); } .meter.warn > i { background: var(--warn); } .meter.err > i { background: var(--err); }

/* ── tabeller ─────────────────────────────────────────────── */
.table-wrap { position: relative; overflow-x: auto; }
.tbl { font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 22px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 22px; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .c { text-align: center; }
.tbl .muted { color: var(--ink-3); }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--panel-2); }
.tbl tfoot td { font-weight: 650; border-top: 1px solid var(--line-2); border-bottom: 0; }
.tbl .name { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.tbl .name small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }

/* ── listor ───────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item.click { cursor: pointer; border-radius: 10px; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
.list-item.click:hover { background: var(--panel-2); }
.li-main { min-width: 0; flex: 1; }
.li-main b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-main span { display: block; color: var(--ink-3); font-size: 12.5px; }
.li-end { text-align: right; flex: none; }
.li-end b { display: block; font-weight: 650; }
.li-end span { display: block; color: var(--ink-3); font-size: 12px; }

/* ── avatar ───────────────────────────────────────────────── */
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; background: hsl(var(--h, 250) 55% 92%); color: hsl(var(--h, 250) 45% 32%); }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.side .avatar { background: hsl(var(--h, 250) 35% 30%); color: hsl(var(--h, 250) 70% 88%); }
.av-stack { display: inline-flex; }
.av-stack .avatar { box-shadow: 0 0 0 2px var(--panel); }
.av-stack .avatar + .avatar { margin-left: -7px; }

/* ── formulär ─────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 12px; border: 0;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; transition: box-shadow .15s;
}
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A7684' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.input:hover, .select:hover, .textarea:hover { box-shadow: inset 0 0 0 1px var(--line-3); }
.input:focus, .select:focus, .textarea:focus { box-shadow: inset 0 0 0 1.5px var(--ink); }
.input.sm, .select.sm { height: 32px; border-radius: 10px; font-size: 13px; }
.input-wrap { position: relative; }
.input-wrap > .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input-wrap > .input { padding-left: 36px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* stegräknare */
.stepper { display: inline-flex; align-items: center; border-radius: var(--pill); box-shadow: inset 0 0 0 1px var(--line-2); background: var(--panel); }
.stepper button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); }
.stepper button:hover { background: var(--hover); color: var(--ink); }
.stepper input { width: 46px; text-align: center; border: 0; background: none; font-weight: 650; font-variant-numeric: tabular-nums; }
.stepper input:focus { outline: none; }

/* växel */
.switch { position: relative; width: 38px; height: 22px; border-radius: 22px; background: var(--line-3); flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }

/* ── lager: meny, låda, notis ─────────────────────────────── */
.pop { position: fixed; z-index: 120; min-width: 220px; max-width: 340px; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-3), 0 0 0 1px var(--line); padding: 6px; animation: popIn .16s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.pop-title { font-size: 11.5px; font-weight: 600; color: var(--ink-3); padding: 8px 10px 4px; }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500; }
.pop-item:hover, .pop-item.kb { background: var(--hover); }
.pop-item .end { margin-left: auto; color: var(--ink-3); }
.pop-item small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 400; }
.pop-sep { height: 1px; background: var(--line); margin: 6px 4px; }

.sheet-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 100; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { position: fixed; z-index: 110; top: 10px; right: 10px; bottom: 10px; width: min(560px, calc(100vw - 20px)); background: var(--panel); border-radius: 22px; box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: sheetIn .3s var(--ease); }
.sheet.wide { width: min(820px, calc(100vw - 20px)); }
@keyframes sheetIn { from { transform: translateX(30px); opacity: 0; } }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; }
.sheet-head h2 { font-size: var(--fs-xl); }
.sheet-head p { color: var(--ink-3); margin-top: 4px; }
.sheet-head .x { margin-left: auto; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 22px 22px; }
.sheet-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .sheet, .sheet.wide { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; animation-name: sheetUp; }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
}

.modal { position: fixed; z-index: 110; left: 50%; top: 12vh; transform: translateX(-50%); width: min(640px, calc(100vw - 24px)); max-height: 76vh; background: var(--panel); border-radius: 20px; box-shadow: var(--shadow-3); display: flex; flex-direction: column; overflow: hidden; animation: popIn .18s var(--ease); }

.toasts { position: fixed; z-index: 140; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
/* med en låda öppen hamnar notiserna överst så att de inte täcker lådans knappar */
.has-sheet .toasts { bottom: auto; top: 18px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--shadow-3); font-size: 13.5px; font-weight: 500; animation: toastIn .3s var(--ease); pointer-events: auto; }
.toast .i { color: var(--accent); }
.toast button { color: var(--accent); font-weight: 650; margin-left: 6px; }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } }

/* ── tomt läge och notiser i flödet ───────────────────────── */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 16px; color: var(--ink-3); }
.empty .tile { margin-bottom: 4px; }
.empty b { color: var(--ink); font-size: 15px; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--panel-2); color: var(--ink-2); font-size: 13.5px; }
.note.warn { background: var(--warn-soft); color: #6B4206; }
.note.err { background: var(--err-soft); color: #7A231C; }
.note.ok { background: var(--ok-soft); color: #0F5238; }
.note.info { background: var(--info-soft); color: #1C3F8C; }

/* ── diagram ──────────────────────────────────────────────── */
.chart { position: relative; width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .ax { font-size: 11px; fill: var(--ink-3); font-family: var(--font); }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .bl { stroke: var(--axis); stroke-width: 1; }
.chart-tip { position: absolute; pointer-events: none; z-index: 5; background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 10px; font-size: 12px; line-height: 1.4; box-shadow: var(--shadow-3); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity .12s; }
.chart-tip.on { opacity: 1; }
.chart-tip b { font-weight: 650; }
.chart-tip .tr { display: flex; align-items: center; gap: 6px; }
.chart-tip .tr i { width: 8px; height: 8px; border-radius: 2px; }
.chart-tip .tr span { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.legend i.line { height: 2px; border-radius: 2px; width: 14px; }
.legend i.dash { height: 0; border-top: 2px dashed var(--ink); width: 14px; border-radius: 0; }

/* ── hjälpklasser ─────────────────────────────────────────── */
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.strong { font-weight: 650; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hide-sm { }
@media (max-width: 760px) { .hide-sm { display: none !important; } }
.only-sm { display: none !important; }
@media (max-width: 760px) { .only-sm { display: revert !important; } }

/* stapel i tabellcell */
.barcell { position: relative; display: block; height: 6px; border-radius: 6px; background: var(--well); min-width: 60px; }
.barcell > i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; }
.barcell > b { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 2px; background: var(--ink); opacity: .6; }
.spark { display: inline-block; vertical-align: middle; }

/* text i statusfärg (t.ex. procent över mål i tabeller) */
.t-ok { color: var(--ok-text); font-weight: 650; }
.t-warn { color: var(--warn-text); font-weight: 650; }
.t-err { color: var(--err-text); font-weight: 650; }

/* ── redigering: formulär, ändringar, historik ────────────── */
.input-suffix { position: relative; display: flex; align-items: center; }
.input-suffix .input { padding-right: 44px; }
.input-suffix > span { position: absolute; right: 12px; color: var(--ink-3); font-size: 13px; pointer-events: none; }
.form-section { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }
.form-section b { font-family: var(--font-display); font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.form-section span { color: var(--ink-3); font-size: 12.5px; }
.form-toggle { min-height: 40px; }
.field .err-msg { display: none; font-size: 12px; color: var(--err-text); font-weight: 600; }
.field.has-err .err-msg { display: block; }
.field.has-err .input, .field.has-err .select, .field.has-err .textarea { box-shadow: inset 0 0 0 1.5px var(--err); }
.edit-why { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.edit-changes:empty { display: none; }
.edit-changes { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); font-size: 13px; }
.edit-ch-title { display: flex; align-items: center; gap: 6px; font-weight: 650; margin-bottom: 6px; }
.edit-changes ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.edit-changes li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.edit-changes li > span { color: var(--ink-3); min-width: 120px; }
.edit-changes s, .hist-ch s { color: var(--ink-3); }

.hist { display: flex; flex-direction: column; }
.hist-row { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hist-row:last-child { border-bottom: 0; }
.hist-main { min-width: 0; flex: 1; font-size: 13px; }
.hist-top { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.hist-top b { font-weight: 650; }
.hist-at { margin-left: auto; font-size: 12px; white-space: nowrap; }
.hist-ch { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.hist-ch li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hist-why { margin-top: 6px; color: var(--ink-2); font-size: 12.5px; }
.hist-empty { display: flex; align-items: center; gap: 6px; padding: 8px 0; }
.hist-more { margin-top: 10px; }
.tile.info { background: var(--info-soft); color: var(--info-text); }
