/* KRYO CMS - dark + ice, same colors as kryopouches.com */

:root {
  --bg: #050505;
  --surface: #0d0d0d;
  --surface-2: #141414;
  --surface-3: #1b1b1b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #ffffff;
  --muted: #8b8b8b;

  --ice: #7be7ff;
  --mint: #8bffe1;
  --ice-soft: rgba(123, 231, 255, 0.12);

  --ok: #8bffe1;
  --warn: #ffd27b;
  --error: #ff7b8f;

  --radius: 18px;
  --radius-sm: 10px;
  --sidebar: 248px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(123, 231, 255, 0.07), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(139, 255, 225, 0.04), transparent 35%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.85em; color: var(--ice); }
.icon { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.link { color: var(--ice); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---------- brand ---------- */

.brand { display: flex; align-items: baseline; gap: 8px; padding: 4px 10px 24px; }
.brand-logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #fff 30%, var(--ice));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ice);
  border: 1px solid rgba(123, 231, 255, 0.35);
  border-radius: 6px;
  padding: 1px 6px;
}

/* ---------- layout ---------- */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 22px 14px;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 30;
  overflow-y: auto;
}

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-section {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 18px 12px 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #c9c9c9;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--surface-2); color: #fff; }
.nav-link.active {
  background: var(--ice-soft);
  color: var(--ice);
  box-shadow: inset 2px 0 0 var(--ice);
}
.sidebar-foot { font-size: 0.75rem; color: var(--muted); padding: 12px; }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 700; font-size: 1.15rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.content { padding: 28px; display: flex; flex-direction: column; gap: 20px; max-width: 1280px; width: 100%; }

.topbar .menu-btn { display: none; }
.sidebar-backdrop { display: none; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: #ddd;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--border-strong); color: #fff; }

.lang-switch { display: flex; align-items: center; gap: 2px; color: var(--muted); }
.lang-switch .icon { margin-right: 4px; }
.lang-switch a {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--muted);
}
.lang-switch a:hover { color: #fff; }
.lang-switch a.active { color: var(--bg); background: var(--ice); }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--border); }
.user-chip:hover { border-color: var(--border-strong); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 0.85rem;
  color: var(--bg);
  background: linear-gradient(135deg, var(--ice), var(--mint));
}
.user-chip-text { display: flex; flex-direction: column; line-height: 1.15; }
.user-chip-text b { font-size: 0.85rem; }
.user-chip-text small { font-size: 0.72rem; color: var(--muted); }

/* ---------- cards ---------- */

.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; }
.card-head .card-title { margin-bottom: 0; }
.card-link { display: block; transition: border-color 0.15s, transform 0.15s; }
.card-link:hover { border-color: rgba(123, 231, 255, 0.4); transform: translateY(-2px); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }

.hero-card {
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(123, 231, 255, 0.2);
  background:
    radial-gradient(circle at 100% 0%, rgba(123, 231, 255, 0.18), transparent 50%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.hero-card h1 { font-size: 1.8rem; margin: 4px 0 6px; }
.eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.18em; color: var(--ice); text-transform: uppercase; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.todo { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.todo a { display: inline-flex; gap: 8px; align-items: center; color: var(--ice); }
.todo a:hover { text-decoration: underline; }


.perm-summary { list-style: none; font-size: 0.85rem; display: flex; flex-direction: column; gap: 4px; margin-top: 8px; color: #c9c9c9; }
.perm-summary b { color: #fff; font-weight: 600; }

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; margin: -6px; padding: 6px; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.row-muted td { opacity: 0.5; }
.row-warn td:first-child { box-shadow: inset 2px 0 0 var(--warn); }

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: #ccc;
  white-space: nowrap;
  vertical-align: middle;
}
.badge-ice { color: var(--ice); border-color: rgba(123, 231, 255, 0.35); background: var(--ice-soft); }
.badge-ok { color: var(--ok); border-color: rgba(139, 255, 225, 0.3); background: rgba(139, 255, 225, 0.08); }
.badge-off { color: var(--error); border-color: rgba(255, 123, 143, 0.3); background: rgba(255, 123, 143, 0.08); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters select, .filters input { width: auto; min-width: 180px; }

/* ---------- forms ---------- */

.form { display: flex; flex-direction: column; gap: 16px; }
.form-narrow { max-width: 860px; }
.form-section { font-size: 0.95rem; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 0.82rem; font-weight: 600; color: #c9c9c9; }
.field-help { font-size: 0.78rem; color: var(--muted); }
.req { color: var(--ice); }
.static { padding: 10px 0; color: var(--muted); }
.card > .field + .field, .card > .check + .field, .card > .field + .check { margin-top: 14px; }
.card > .check + .check { margin-top: 8px; }

input, select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ice);
  box-shadow: 0 0 0 3px var(--ice-soft);
}
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--ice); padding: 0; flex-shrink: 0; }

.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.92rem; }
.check-big {
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}
.check-big input { margin-top: 3px; }

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; transition: opacity 0.15s; }
.perm-grid.disabled { opacity: 0.35; pointer-events: none; }
.perm-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.perm-box legend { font-weight: 700; font-size: 0.85rem; padding: 0 6px; color: var(--ice); }

.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.sticky-actions {
  position: sticky;
  bottom: 0;
  padding: 14px 0;
  background: linear-gradient(transparent, var(--bg) 40%);
}

.danger-zone { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { color: #001014; background: linear-gradient(135deg, var(--ice), var(--mint)); }
.btn-primary:hover { box-shadow: 0 8px 30px rgba(123, 231, 255, 0.3); transform: translateY(-1px); }
.btn-ghost { color: #ddd; background: transparent; border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ice); color: var(--ice); }
.btn-danger { color: var(--error); background: transparent; border-color: rgba(255, 123, 143, 0.4); }
.btn-danger:hover:not(:disabled) { background: rgba(255, 123, 143, 0.1); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* ---------- flash messages ---------- */

.flashes { display: flex; flex-direction: column; gap: 8px; }
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.92rem;
  border-left: 3px solid var(--ice);
}
.flash-success { border-left-color: var(--ok); }
.flash-error { border-left-color: var(--error); background: rgba(255, 123, 143, 0.06); }
.flash-warning { border-left-color: var(--warn); }

/* ---------- login / setup ---------- */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 18px;
}
.auth-top { position: fixed; top: 16px; right: 16px; }
.auth-card {
  width: min(400px, 100%);
  padding: 32px 28px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.9), rgba(10, 10, 10, 0.9));
  box-shadow: var(--shadow), 0 0 80px rgba(123, 231, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-brand { display: flex; align-items: baseline; gap: 8px; justify-content: center; }
.auth-brand .brand-logo { font-size: 2.2rem; }
.auth-title { font-size: 1.3rem; text-align: center; }
.auth-foot { font-size: 0.75rem; color: var(--muted); }

.empty { text-align: center; padding: 48px 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty-code {
  font-family: "Space Grotesk", sans-serif;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #fff, var(--ice));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- mobile ---------- */

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s; }
  .nav-open .sidebar { transform: none; }
  .nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 25; }
  .main { margin-left: 0; }
  .topbar .menu-btn { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  .content { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .user-chip-text, .lang-switch .icon { display: none; }
  .user-chip { padding: 3px; }
  .topbar-right { gap: 6px; }
  .cards { grid-template-columns: 1fr; }
  .filters select, .filters input { flex: 1; min-width: 0; }
}

/* ---------- step 2: lists, detail pages ---------- */

.form-wide { max-width: 1100px; }
.pre { white-space: pre-wrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.card-flush { padding: 8px 10px; }
.card-head.pad { padding: 12px 12px 0; }
.sub-box { border-left: 2px solid var(--ice-soft); padding: 4px 0 4px 16px; margin-top: 4px; }
.sub-box[hidden] { display: none; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 200px; max-width: 420px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--muted);
}
.search:focus-within { border-color: var(--ice); box-shadow: 0 0 0 3px var(--ice-soft); }
.search input { border: 0; background: transparent; padding: 9px 0; box-shadow: none; }
.search input:focus { box-shadow: none; }

.segmented { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.segmented a { padding: 6px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.segmented a:hover { color: #fff; }
.segmented a.active { background: var(--surface-3); color: var(--ice); }

/* whole table row clickable: the first link stretches over the row */
.table-click tbody tr { position: relative; cursor: pointer; }
.table-click .row-link::after { content: ""; position: absolute; inset: 0; }

.country-code {
  display: inline-block; min-width: 28px; text-align: center;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em;
  padding: 1px 5px; border-radius: 5px;
  background: var(--surface-3); color: #ddd; border: 1px solid var(--border);
}

.hero-compact { padding: 20px 24px; }
.hero-compact h1 { font-size: 1.5rem; margin: 0 0 4px; }
.hero-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }

.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 8px 16px; font-size: 0.92rem; }
.kv dt { color: var(--muted); }
.kv dd { word-break: break-word; }

.address { font-style: normal; line-height: 1.6; }

.contacts { display: flex; flex-direction: column; gap: 8px; }
.contact {
  display: grid; grid-template-columns: minmax(160px, 1fr) 2fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg);
}
.contact-main .badge { margin-left: 6px; }
.contact-info { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.contact-info > * { display: inline-flex; align-items: center; gap: 6px; }

.add-box { margin-top: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 12px 14px; }
.add-box summary { cursor: pointer; color: var(--ice); font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; }
.add-box summary::-webkit-details-marker { display: none; }
.add-box[open] summary { margin-bottom: 14px; }

.input-price { width: 120px; text-align: right; padding: 7px 10px; }

.empty .icon { color: var(--ice); opacity: 0.6; }

@media (max-width: 600px) {
  .contact { grid-template-columns: 1fr auto; }
  .contact-info { grid-column: 1 / -1; grid-row: 2; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .search { max-width: none; }
}

/* ---------- password reset ---------- */
.badge-warn { color: var(--warn); border-color: rgba(255, 210, 123, 0.35); background: rgba(255, 210, 123, 0.08); }
.flash-warning { background: rgba(255, 210, 123, 0.06); }
.secret {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 18px;
  margin: 8px 0 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(123, 231, 255, 0.4);
  background: var(--bg);
  color: var(--ice);
  user-select: all;
}
.hint-list { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: #c9c9c9; font-size: 0.92rem; }

/* ---------- step 3: stock ---------- */
.text-warn { color: var(--warn); }
.text-error { color: var(--error); }
.card-warn { border-color: rgba(255, 210, 123, 0.25); }
.card-warn .card-title { color: var(--warn); }
.warn-list { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.92rem; }
.warn-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.stat-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stat {
  display: flex; flex-direction: column; gap: 2px; min-width: 96px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(0, 0, 0, 0.35);
}
.stat span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.stat b { font-size: 1.35rem; }
.stat b.small-b { font-size: 0.95rem; font-weight: 600; }
.hold-note { display: flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--warn); font-weight: 600; }

.qty { font-weight: 700; font-variant-numeric: tabular-nums; }
.qty-in { color: var(--ok); }
.qty-out { color: var(--error); }

.move-form { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(90px, 0.6fr) 2fr auto; gap: 12px; align-items: end; }
.pad-box { padding: 12px; }

@media (max-width: 900px) {
  .move-form { grid-template-columns: 1fr 1fr; }
  .move-form .btn { grid-column: 1 / -1; }
}

/* ---------- step 4: orders ---------- */
.badge-done { color: #fff; background: rgba(255, 255, 255, 0.08); border-color: var(--border-strong); }
.segmented-scroll { overflow-x: auto; max-width: 100%; }
.segmented-scroll a { white-space: nowrap; }
.pad-x { margin-left: 12px; margin-right: 12px; margin-bottom: 12px; }
.grid-2.tight { gap: 12px; }
.check.inline { display: inline-flex; margin-left: 10px; font-size: 0.8rem; }

.steps { list-style: none; display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; counter-reset: step; }
.steps li {
  flex: 1; min-width: 110px; position: relative;
  padding: 8px 10px 8px 34px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); background: rgba(0, 0, 0, 0.3);
  counter-increment: step;
}
.steps li::before {
  content: counter(step); position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.72rem; background: var(--surface-3); color: var(--muted);
}
.steps li.done { color: var(--mint); border-color: rgba(139, 255, 225, 0.25); }
.steps li.done::before { content: "✓"; background: rgba(139, 255, 225, 0.15); color: var(--mint); }
.steps li.current { color: #001014; background: linear-gradient(135deg, var(--ice), var(--mint)); border-color: transparent; }
.steps li.current::before { background: rgba(0, 0, 0, 0.2); color: #001014; }

.next-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-color: rgba(123, 231, 255, 0.25); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.lines-table input, .lines-table select { padding: 7px 9px; font-size: 0.9rem; }
.lines-table td { vertical-align: middle; }
.line-meta { margin-top: 4px; }
.input-qty { width: 76px; text-align: right; }
.del-check { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); cursor: pointer; }
.del-check:has(input:checked) { color: var(--error); }

.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; max-width: 380px; margin: 16px 12px 16px auto; font-variant-numeric: tabular-nums; }
.totals dt { color: #c9c9c9; }
.totals dd { text-align: right; }
.totals .grand { font-size: 1.15rem; font-weight: 800; color: #fff; padding-top: 6px; border-top: 1px solid var(--border-strong); }

.add-line, .pay-form {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-items: end;
}
.pay-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border-strong); }
[hidden] { display: none !important; }

.plan { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.history { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; }

/* ---------- step 5: documents, packages ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.doc-tile {
  display: flex; flex-direction: column; gap: 8px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg);
}
.doc-tile.blocked { opacity: 0.55; }
.doc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.doc-archive { margin-top: 14px; }
.doc-archive summary { cursor: pointer; color: var(--ice); font-weight: 600; font-size: 0.9rem; }
.doc-archive ul { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.input-dim { width: 52px; text-align: right; padding: 7px 6px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-form select { width: auto; padding: 6px 10px; }
.logo-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.logo-preview { width: 110px; height: 110px; object-fit: contain; border-radius: var(--radius-sm); background: #fff; padding: 6px; }
input[type="file"] { width: auto; padding: 7px; }
.lines-table select { min-width: 96px; }
.row-pallet td { background: rgba(123, 231, 255, 0.05); }
.row-child td:first-child { padding-left: 26px; box-shadow: inset 2px 0 0 var(--ice-soft); }

/* ---------- step 6: stats ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.tile span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tile b { font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tile small { color: var(--muted); font-size: 0.78rem; }
.tile-link:hover { border-color: rgba(123, 231, 255, 0.4); }
.tile-warn { border-color: rgba(255, 123, 143, 0.35); }
.tile-warn b { color: var(--error); }
.select-auto { width: auto; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 8px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar-fill { width: 100%; height: 2%; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--ice), rgba(123, 231, 255, 0.25)); transition: height 0.4s; }
.bar span { font-size: 0.7rem; color: var(--muted); }

.top-list { list-style: none; counter-reset: top; display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; }
.top-list li { display: flex; justify-content: space-between; gap: 8px; counter-increment: top; }
.top-list li span::before { content: counter(top) ". "; color: var(--muted); }
.top-list li b { font-variant-numeric: tabular-nums; white-space: nowrap; }

.month-nav { display: flex; align-items: center; gap: 12px; font-size: 1.1rem; }
.flip svg { transform: scaleX(-1); }

/* ---------- step 7: backups ---------- */
.backup-settings { margin: 4px 0 8px; gap: 14px; }
.backup-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.restore-box summary { list-style: none; cursor: pointer; }
.restore-box summary::-webkit-details-marker { display: none; }
.restore-box[open] { flex-basis: 100%; }
.restore-box form { margin-top: 8px; justify-content: flex-end; }
.restore-box input[type="password"] { width: 180px; padding: 6px 10px; }
.upload-row { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border-strong); }
.lead-banner { display: flex; align-items: center; gap: 10px; color: var(--ice); border-color: rgba(123, 231, 255, 0.35); padding: 14px 18px; }
.lead-message { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); }

/* ---------- 2-step login ---------- */
.center { text-align: center; }
.code-input { font-size: 1.6rem; letter-spacing: 0.25em; text-align: center; font-family: ui-monospace, Consolas, monospace; }
.code-inline { width: 180px; font-size: 1.2rem; }
.setup-steps { padding-left: 22px; display: flex; flex-direction: column; gap: 18px; margin-bottom: 14px; }
.setup-steps li::marker { color: var(--ice); font-weight: 800; }
.setup-steps li > * + * { margin-top: 8px; }
.setup-steps li > b, .setup-steps li > span { display: block; }
.qr-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr-box { background: #fff; padding: 8px; border-radius: 10px; line-height: 0; }
.secret-sm { font-size: 0.95rem; padding: 10px; margin: 6px 0 0; word-break: break-all; }
.codes { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.codes li { font-family: ui-monospace, Consolas, monospace; font-size: 1.1rem; padding: 8px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); text-align: center; user-select: all; }

/* dashboard notes */
.btn-xs { padding: 3px 9px; font-size: 0.75rem; }
.note-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.note-form textarea { min-height: 60px; }
.note-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.notes { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.note { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; background: rgba(255, 255, 255, 0.02); }
.note-pinned { border-color: rgba(123, 231, 255, 0.35); background: var(--ice-soft); }
.note-text { white-space: pre-line; overflow-wrap: anywhere; }
.note-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.note-meta .icon { color: var(--ice); vertical-align: -2px; }
.note-actions { display: inline-flex; gap: 6px; }
.note-actions form { display: inline; }

/* bulk actions on lists */
.table .pick { width: 1%; position: relative; z-index: 1; }
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px;
  border-bottom: 1px solid var(--border); background: var(--ice-soft); }
.bulk-bar[hidden] { display: none; }
.bulk-bar select { width: auto; padding: 5px 10px; font-size: 0.8rem; }
.bulk-count { font-weight: 700; margin-right: 6px; }

/* Website content (CMS > Website) */
.site-thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: #000; flex-shrink: 0; }
.site-thumb-sm { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; display: block; background: #000; }
.thumb-cell { width: 64px; }
.page-body { font-family: ui-monospace, Consolas, monospace; font-size: 0.88rem; line-height: 1.5; }
.page-preview { line-height: 1.6; max-width: 760px; }
.page-preview h2 { font-size: 1.1rem; margin: 22px 0 8px; }
.page-preview h3 { font-size: 1rem; margin: 18px 0 6px; }
.page-preview p, .page-preview ul { margin: 0 0 10px; }
.page-preview ul { padding-left: 22px; }
.page-preview a { color: var(--ice); }
