:root {
  --paper: #f3ede3;
  --paper-2: #ebe2d5;
  --surface: #fffdf9;
  --surface-2: #faf5ed;
  --ink: #20262b;
  --ink-2: #343d43;
  --muted: #7d7468;
  --muted-2: #a49a8c;
  --line: #e4dbcd;
  --line-strong: #d5c8b6;
  --coral: #d97757;
  --coral-dark: #bd5d40;
  --coral-soft: #f6e3da;
  --green: #4d8065;
  --green-soft: #e2efe7;
  --amber: #a8752b;
  --amber-soft: #f6ead5;
  --red: #b84f46;
  --red-soft: #f6e0dc;
  --blue: #52758c;
  --blue-soft: #e3edf2;
  --radius: 16px;
  --shadow: 0 18px 46px rgba(47, 38, 28, 0.08);
  --shadow-sm: 0 6px 18px rgba(47, 38, 28, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.eyebrow {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: var(--muted);
}
code {
  font-family: var(--mono);
  background: rgba(32, 38, 43, 0.07);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
}

/* ---------------------------------------------------------
   Login
   --------------------------------------------------------- */
.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  background: var(--paper);
}
.login-art {
  position: relative;
  min-height: 100vh;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #f9f2e8;
  background:
    radial-gradient(ellipse 620px 420px at 78% 72%, rgba(217, 119, 87, 0.44), transparent 68%),
    radial-gradient(ellipse 460px 340px at 12% 8%, rgba(108, 141, 124, 0.3), transparent 65%),
    linear-gradient(150deg, #1d2428 0%, #252e32 52%, #1a2024 100%);
}
.login-art::before,
.login-art::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 245, 230, 0.11);
  border-radius: 50%;
  pointer-events: none;
}
.login-art::before {
  width: 680px;
  height: 680px;
  right: -220px;
  bottom: -260px;
}
.login-art::after {
  width: 460px;
  height: 460px;
  right: -110px;
  bottom: -150px;
}
.login-art-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; position: relative; z-index: 1; }
.admin-brand { display: flex; align-items: center; gap: 12px; }
.admin-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #f4eadc;
  color: #1f2529;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.06em;
}
.admin-brand b { display: block; font-size: 16px; letter-spacing: 0.08em; }
.admin-brand small { display: block; margin-top: 3px; font-size: 8px; letter-spacing: 0.22em; opacity: 0.58; }
.env-badge {
  font-size: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 245, 230, 0.2);
  background: rgba(255, 245, 230, 0.08);
  letter-spacing: 0.08em;
}
.login-copy { position: relative; z-index: 1; margin: auto 0; padding: 70px 0; }
.login-copy .eyebrow { color: rgba(249, 242, 232, 0.52); }
.login-copy h1 {
  margin: 18px 0 20px;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.055em;
  font-weight: 650;
}
.login-copy p:last-child {
  margin: 0;
  max-width: 430px;
  line-height: 1.9;
  color: rgba(249, 242, 232, 0.64);
  font-size: 14px;
}
.login-metrics { position: relative; z-index: 1; display: flex; gap: 44px; }
.login-metrics b { display: block; font-size: 22px; letter-spacing: -0.03em; }
.login-metrics span { display: block; margin-top: 5px; font-size: 10px; color: rgba(249, 242, 232, 0.52); letter-spacing: 0.08em; }
.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 40px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 38%),
    var(--paper);
}
.login-card { width: min(400px, 100%); }
.login-card-head { margin-bottom: 30px; }
.login-card-head h2 { margin: 10px 0 8px; font-size: 27px; letter-spacing: -0.035em; }
.login-card-head p:last-child { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.field { display: block; margin-bottom: 16px; }
.field > span,
.field[data-image-upload] > label > span { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; color: var(--ink-2); letter-spacing: 0.04em; }
.field[data-image-upload] > label { display: block; }
.field[data-image-upload] > label + label { margin-top: 10px; }
.field[data-image-upload] > img { margin-top: 8px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 253, 249, 0.74);
  border-radius: 11px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--coral);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.12);
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.65; }
.field small { display: block; margin-top: 6px; color: var(--muted-2); font-size: 10.5px; line-height: 1.6; }
.form-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  line-height: 1.5;
}
.login-hint { margin: 16px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: center; }
.back-to-site { font-size: 11px; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform 0.12s, background 0.18s, border-color 0.18s, color 0.18s, opacity 0.18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--coral); color: #fff; box-shadow: 0 8px 18px rgba(217, 119, 87, 0.22); }
.btn.primary:hover { background: var(--coral-dark); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: #111619; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn.ghost:hover { background: rgba(255, 253, 249, 0.7); border-color: var(--muted-2); }
.btn.soft { background: var(--coral-soft); color: var(--coral-dark); }
.btn.soft:hover { background: #f2d7ca; }
.btn.small { padding: 7px 11px; font-size: 11.5px; border-radius: 8px; }
.btn.wide { width: 100%; padding: 13px 18px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.danger-text { color: var(--red); }
.icon-button {
  border: 1px solid var(--line-strong);
  background: transparent;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.menu-toggle { display: none; }

/* ---------------------------------------------------------
   Shell
   --------------------------------------------------------- */
.app-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: #1f2529;
  color: rgba(249, 244, 236, 0.78);
  padding: 24px 16px 20px;
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 26px; }
.sidebar-brand .admin-brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; background: var(--coral); color: #fff; }
.sidebar-brand b { display: block; font-size: 13px; color: #fbf6ee; letter-spacing: 0.06em; }
.sidebar-brand small { display: block; margin-top: 2px; font-size: 7px; letter-spacing: 0.2em; color: rgba(249, 244, 236, 0.38); }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group {
  margin: 18px 10px 7px;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(249, 244, 236, 0.3);
  font-weight: 700;
}
.side-nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: rgba(249, 244, 236, 0.62);
  border-radius: 9px;
  padding: 10px 11px;
  font-size: 12.5px;
  transition: background 0.16s, color 0.16s;
}
.side-nav button:hover { background: rgba(255, 255, 255, 0.055); color: #fbf6ee; }
.side-nav button.active { background: rgba(217, 119, 87, 0.15); color: #f8e9e0; }
.side-nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--coral);
}
.nav-ico { width: 17px; height: 17px; display: inline-grid; place-items: center; opacity: 0.75; }
.nav-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-foot {
  margin-top: auto;
  padding: 24px 10px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 10px;
  color: rgba(249, 244, 236, 0.34);
}
.sidebar-foot a { color: rgba(249, 244, 236, 0.58); text-decoration: none; }
.sidebar-foot a:hover { color: #fff; }
.sidebar-foot .side-logout {
  border: 0;
  background: transparent;
  color: rgba(249, 244, 236, 0.58);
  padding: 0;
  text-align: left;
  font-size: 10px;
}
.sidebar-foot .side-logout:hover { color: #f3b9a8; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 30px;
  border-bottom: 1px solid rgba(213, 200, 182, 0.55);
  background: rgba(243, 237, 227, 0.88);
  backdrop-filter: blur(14px);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 13px; }
.topbar h1 { margin: 4px 0 0; font-size: 21px; letter-spacing: -0.035em; }
.topbar-note { font-size: 10px; color: var(--muted); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(77, 128, 101, 0.12); }
.admin-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 253, 249, 0.65); }
.admin-chip .avatar { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 11px; }
.admin-chip b { display: block; font-size: 11px; line-height: 1.2; }
.admin-chip span:not(.avatar) { display: block; font-size: 9px; color: var(--muted); margin-top: 2px; }
.view { padding: 28px 30px 48px; }
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 20px; }
.view-head h2 { margin: 5px 0 0; font-size: 26px; letter-spacing: -0.04em; }
.view-head p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.view-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel {
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid rgba(228, 219, 205, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.panel-pad { padding: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px 0; }
.panel-head h3 { margin: 0; font-size: 14px; letter-spacing: -0.01em; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; }
.panel-body { padding: 18px 20px 20px; }

/* ---------------------------------------------------------
   Dashboard
   --------------------------------------------------------- */
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { padding: 16px 16px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.stat-card .label { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; color: var(--muted); }
.stat-card .label .mini { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--coral); }
.stat-card .label svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.stat-card b { display: block; margin-top: 12px; font-size: 25px; letter-spacing: -0.045em; font-weight: 650; }
.stat-card small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 9.5px; }
.stat-card.accent { background: var(--ink); color: #fff; border-color: var(--ink); }
.stat-card.accent .label { color: rgba(255, 255, 255, 0.55); }
.stat-card.accent .label .mini { background: rgba(255, 255, 255, 0.1); color: #f0b09c; }
.stat-card.accent small { color: rgba(255, 255, 255, 0.4); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr); gap: 16px; margin-bottom: 16px; }
.chart { height: 190px; padding: 16px 20px 10px; display: flex; align-items: flex-end; gap: 10px; }
.chart-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.chart-bar-wrap { height: 140px; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart-bar { width: min(28px, 64%); min-height: 3px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--coral), #e9a086); opacity: 0.85; transition: height 0.4s ease; }
.chart-col.today .chart-bar { background: linear-gradient(180deg, var(--ink), #596267); opacity: 1; }
.chart-label { font-size: 9px; color: var(--muted-2); white-space: nowrap; }
.chart-value { font-size: 9.5px; color: var(--muted); font-weight: 650; }
.mini-list { display: flex; flex-direction: column; gap: 1px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(228, 219, 205, 0.6); }
.mini-row:last-child { border-bottom: 0; }
.mini-row img { width: 34px; height: 42px; object-fit: cover; border-radius: 6px; background: var(--paper-2); }
.mini-row .grow { min-width: 0; flex: 1; }
.mini-row b { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row span { display: block; margin-top: 3px; font-size: 9.5px; color: var(--muted); }
.mini-row em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--coral-dark); }
.status-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.status-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 6px 9px; font-size: 10px; color: var(--ink-2); }
.status-chip b { color: var(--ink); }
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 11px; border-radius: 10px; background: var(--surface-2); border: 1px solid rgba(228, 219, 205, 0.7); }
.todo-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); margin-top: 5px; flex: none; }
.todo-item b { font-size: 11px; }
.todo-item p { margin: 3px 0 0; font-size: 10px; color: var(--muted); line-height: 1.55; }

/* ---------------------------------------------------------
   Tables / filters
   --------------------------------------------------------- */
.filter-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filter-bar input, .filter-bar select {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 11.5px;
  outline: none;
  min-height: 34px;
}
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.1); }
.filter-bar input[type="search"] { min-width: 210px; }
.filter-bar .spacer { flex: 1; }
.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 680px; }
table.data th {
  text-align: left;
  padding: 11px 14px;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 245, 237, 0.62);
  white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid rgba(228, 219, 205, 0.64); font-size: 12px; vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background 0.14s; }
table.data tbody tr:hover { background: rgba(255, 253, 249, 0.95); }
table.data .num { font-family: var(--mono); font-size: 11.5px; text-align: right; white-space: nowrap; }
table.data .actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
table.data .muted { color: var(--muted); }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.thumb { width: 38px; height: 48px; border-radius: 7px; object-fit: cover; background: var(--paper-2); flex: none; }
.thumb.round { width: 34px; height: 34px; border-radius: 50%; }
.cell-main b { display: block; font-size: 12px; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-main span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.gray { background: #eee8df; color: var(--muted); }
.badge.coral { background: var(--coral-soft); color: var(--coral-dark); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.pagination .pages { display: flex; gap: 5px; }
.pagination button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; min-width: 28px; height: 28px; padding: 0 8px; font-size: 10.5px; color: var(--ink-2); }
.pagination button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination button:disabled { opacity: 0.4; cursor: default; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.8; }
.empty b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.loading { padding: 54px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.loading::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto 12px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.summary-strip div { padding: 10px 12px; border-radius: 9px; background: var(--surface-2); }
.summary-strip span { display: block; font-size: 9.5px; color: var(--muted); }
.summary-strip b { display: block; margin-top: 4px; font-size: 17px; letter-spacing: -0.03em; }

/* ---------------------------------------------------------
   Drawer / forms
   --------------------------------------------------------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(27, 31, 34, 0.32); backdrop-filter: blur(2px); z-index: 60; animation: fade-in 0.18s; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100vw);
  background: var(--surface);
  z-index: 61;
  box-shadow: -24px 0 60px rgba(28, 24, 19, 0.16);
  display: flex;
  flex-direction: column;
  animation: slide-in 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slide-in { from { transform: translateX(36px); opacity: 0.5; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 24px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -0.03em; }
.drawer-head p { margin: 5px 0 0; font-size: 11px; color: var(--muted); }
.drawer-close { border: 0; background: var(--surface-2); width: 32px; height: 32px; border-radius: 50%; font-size: 17px; color: var(--muted); }
.drawer-close:hover { background: var(--paper-2); color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 24px 28px; }
.drawer-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.section-title { margin: 24px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 10px; letter-spacing: 0.16em; color: var(--muted); font-weight: 700; }
.section-title:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--line); }
.info-grid div { background: var(--surface); padding: 12px 14px; }
.info-grid span { display: block; font-size: 9.5px; color: var(--muted); }
.info-grid b { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; word-break: break-all; }
.detail-note { padding: 12px 14px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 11px; line-height: 1.7; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 0; width: 1px; background: var(--line); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); margin-top: 3px; flex: none; z-index: 1; }
.timeline-item.done .timeline-dot { background: var(--green); border-color: var(--green); }
.timeline-item.current .timeline-dot { background: var(--coral); border-color: var(--coral); box-shadow: 0 0 0 4px rgba(217, 119, 87, 0.13); }
.timeline-item b { font-size: 11.5px; }
.timeline-item span { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.identity-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(228, 219, 205, 0.7); }
.identity-row:last-child { border-bottom: 0; }
.identity-row img, .identity-row .letter { width: 30px; height: 30px; border-radius: 8px; }
.identity-row .letter { display: grid; place-items: center; background: var(--surface-2); color: var(--coral-dark); font-size: 11px; font-weight: 700; }
.identity-row .grow { flex: 1; }
.identity-row b { display: block; font-size: 11.5px; }
.identity-row span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 9.5px; padding: 4px 7px; border-radius: 5px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* ---------------------------------------------------------
   Toast / responsive
   --------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 18px);
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(20, 24, 26, 0.26);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
  max-width: min(560px, 90vw);
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mobile-overlay { display: none; }

@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .app-view { grid-template-columns: 200px minmax(0, 1fr); }
  .view, .topbar { padding-left: 20px; padding-right: 20px; }
  .topbar-note, .admin-chip div { display: none; }
}
@media (max-width: 820px) {
  .app-view { display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }
  .sidebar.open { transform: none; }
  .menu-toggle { display: grid; }
  .mobile-overlay { display: block; position: fixed; inset: 0; background: rgba(20, 24, 26, 0.3); z-index: 25; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .topbar { padding-top: 14px; padding-bottom: 14px; }
  .topbar-right .btn.ghost { display: none; }
}
@media (max-width: 760px) {
  .login-view { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; padding: 30px 22px; }
  .view { padding: 18px 14px 40px; }
  .topbar { padding: 12px 14px; }
  .topbar h1 { font-size: 18px; }
  .view-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card b { font-size: 21px; }
  .form-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .filter-bar input[type="search"] { min-width: 0; flex: 1; }
  .drawer { width: 100vw; }
  .drawer-head, .drawer-body { padding-left: 18px; padding-right: 18px; }
}

html[data-rental-v1] #sideNav :is(.nav-group, button:not([data-view="orders"], [data-view="photos"], [data-view="makeupBookings"], [data-view="deposits"], [data-view="merchants"], [data-view="shops"], [data-view="products"], [data-view="homepage"])),
html[data-rental-v1] .login-hint {
  display: none;
}

html:not([data-makeup-v1]) #sideNav [data-view="makeupBookings"],
html[data-rental-v1]:not([data-photography-v1]) #sideNav [data-view="photos"],
html:not([data-shops-v1]) #sideNav .shops-v1-only,
html[data-rental-v1]:not([data-shops-v1]) #sideNav [data-view="products"] { display: none; }


html:not([data-home-v1]) .home-v1-only { display: none; }
.home-editor { padding: 20px; display: grid; gap: 14px; }
.home-editor fieldset { border: 1px solid #dededb; border-radius: 8px; padding: 12px; min-width: 0; }
.home-editor [data-home-list] { display: grid; gap: 12px; }
.home-editor .story-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.home-card-toggle { display: inline-block; margin-bottom: 12px; }
