:root {
  --ink:      #2b231b;
  --mute:     #7a6b58;
  --line:     #d8cbb5;
  --soft:     #f4ebdd;
  --bg:       #fbf6ec;
  --accent:   #b89352;
  --accent-ink: #fff;
  --danger:   #b04646;
  --ok:       #4a7a3e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; margin: 0 0 12px; }
h1 { font-size: 28px; }
h2 { font-size: 20px; margin-top: 28px; }
.muted { color: var(--mute); }
.hidden { display: none; }

.topbar {
  display: block;
  padding: 14px 28px 0;
  background: var(--ink);
  color: var(--bg);
  border-bottom: 1px solid var(--accent);
}
.topbar__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  min-width: 0;
}
.topbar__brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-style: italic;
  letter-spacing: 0.04em;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__actions { display: flex; gap: 10px; flex-shrink: 0; align-items: center; }
.topbar__actions form { margin: 0; }

/* Parent group tabs — own row, horizontal scroll on overflow. */
.topbar__groups {
  display: flex;
  gap: 4px;
  margin: 10px -28px 0;
  padding: 0 28px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
  -webkit-overflow-scrolling: touch;
}
.topbar__groups::-webkit-scrollbar { height: 3px; }
.topbar__groups::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 2px; }
.topbar__groups a {
  flex-shrink: 0;
  color: var(--bg);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 4px 4px 0 0;
  white-space: nowrap;
  opacity: 0.65;
  transition: opacity 120ms ease, background 120ms ease;
}
.topbar__groups a:hover { opacity: 1; }
.topbar__groups a.is-active { opacity: 1; background: rgba(255,255,255,0.08); }

/* Child tab sub-row — same horizontal-scroll treatment as the parent. */
.topbar__sub {
  display: flex;
  gap: 4px;
  margin: 0 -28px;
  padding: 0 28px;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.08);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
  -webkit-overflow-scrolling: touch;
}
.topbar__sub::-webkit-scrollbar { height: 3px; }
.topbar__sub::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 2px; }
.topbar__sub a {
  flex-shrink: 0;
  color: var(--bg);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  opacity: 0.7;
  transition: opacity 120ms ease, border-color 120ms ease;
}
.topbar__sub a:hover { opacity: 1; }
.topbar__sub a.is-active { opacity: 1; border-bottom-color: var(--accent); }
.topbar__badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  background: #c0392b;
  color: #fff;
  border-radius: 10px;
  vertical-align: 1px;
}

/* Body must not allow horizontal page scroll — keeps the topbar bg edge-to-edge. */
html, body { overflow-x: hidden; }

@media (max-width: 720px) {
  .topbar { padding: 10px 14px 0; }
  .topbar__brand { font-size: 16px; }
  .topbar__groups, .topbar__sub { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .topbar__groups a { padding: 7px 10px; font-size: 12px; }
  .topbar__sub a { padding: 9px 10px; }
  .topbar__publish .btn, .topbar__actions .btn { font-size: 11px; padding: 6px 10px; }
}

.page { max-width: 1100px; margin: 28px auto; padding: 0 28px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; margin-bottom: 24px; }

.alert { padding: 10px 14px; border-radius: 6px; margin: 12px 0; font-size: 13px; }
.alert--ok    { background: #eaf3e2; color: var(--ok); border: 1px solid #c6dfb6; }
.alert--error { background: #f6dadb; color: var(--danger); border: 1px solid #e2b2b3; }

.crumbs { font-size: 12px; margin-bottom: 8px; }
.crumbs a { color: var(--mute); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg);
  padding: 8px 14px; border-radius: 4px;
  font: inherit; cursor: pointer;
  text-decoration: none;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
}
.btn:hover { opacity: 0.9; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--ghost   { background: transparent; color: inherit; }
.btn--small   { padding: 6px 10px; font-size: 11px; }
.btn--danger  { background: transparent; color: var(--danger); border-color: var(--danger); }

.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field span { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.field input[type=text],
.field input[type=password],
.field input[type=file],
.field textarea {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 4px;
  font-family: inherit; font-size: 14px;
  background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.login-card { max-width: 360px; margin: 60px auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 28px; }

.content-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.content-list a {
  display: block; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink); text-decoration: none;
  background: var(--soft);
}
.content-list a:hover { border-color: var(--accent); }

.json-editor {
  width: 100%; min-height: 480px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.5;
  border: 1px solid var(--line); border-radius: 4px; padding: 12px;
  background: #faf8f4;
  white-space: pre; overflow: auto;
}
.form-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }

/* --- Friendly list editor (services, addons) --- */
.list-rows { display: grid; gap: 14px; margin-bottom: 14px; }
.list-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 2fr);
  gap: 14px 24px;
  align-items: start;
  padding: 16px 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.list-row .field { margin: 0; }
.list-row__field span { font-size: 10px; }
.list-row__field small { font-size: 11px; line-height: 1.35; }
.list-row__remove {
  grid-column: 1 / -1;
  justify-self: start;
  white-space: nowrap;
  margin-top: 2px;
}
.list-actions { margin: 4px 0 16px; }
@media (max-width: 720px) {
  .list-row { grid-template-columns: 1fr; }
}

/* Per-form column layouts — kept as overrides so each form gets a tidy
   desktop grid that fits its field count without wrapping help text. */
form[data-list-form][action*="services"] .list-row {
  grid-template-columns: 130px minmax(0, 1.6fr) 90px 90px minmax(0, 1.8fr);
}
form[data-list-form][action*="addons"] .list-row {
  grid-template-columns: 130px minmax(0, 1.6fr) 90px 90px minmax(0, 1.8fr);
}
form[data-list-form][action*="technicians"] .list-row {
  grid-template-columns: 140px minmax(0, 1.5fr) minmax(0, 1.5fr) 90px;
}
form[data-list-form][action*="faqs"] .list-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}
form[data-list-form][action*="technicians"] .list-row__field--days,
form[data-list-form][action*="technicians"] .list-row .list-row__field:nth-of-type(5),
form[data-list-form][action*="technicians"] .list-row .list-row__field:nth-of-type(6) {
  grid-column: 1 / -1;
}
.list-row__field--textarea textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
  min-height: 64px;
}
.list-row__field--textarea textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Checkbox field — own row, label first then checkbox close together,
   help text wraps to its own line below. */
.list-row__field--checkbox {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0;
}
.list-row__field--checkbox > span {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  order: 1;
}
.list-row__field--checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  order: 2;
}
.list-row__field--checkbox small {
  flex: 1 1 100%;
  order: 3;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 720px) {
  form[data-list-form][action*="services"] .list-row,
  form[data-list-form][action*="addons"] .list-row,
  form[data-list-form][action*="technicians"] .list-row,
  form[data-list-form][action*="faqs"] .list-row {
    grid-template-columns: 1fr;
  }
}

.days-toggle { display: flex; gap: 6px; flex-wrap: wrap; }
.days-toggle__day {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  user-select: none;
}
.days-toggle__day input { margin: 0; accent-color: var(--accent); }
.days-toggle__day:has(input:checked) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.list-row__field--days { border: 0; padding: 0; margin: 0; }
.list-row__field--days legend { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); padding: 0 0 4px; }

/* --- Hours editor --- */
.hours-rows { display: grid; gap: 10px; margin-bottom: 16px; }
.hours-row {
  display: grid;
  grid-template-columns: 110px 110px minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.hours-row__day { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 18px; }
.hours-row__closed { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mute); }
.hours-row__time { display: grid; gap: 2px; }
.hours-row__time span { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.hours-row__time input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.hours-lunch { display: flex; gap: 14px; flex-wrap: wrap; max-width: 480px; margin-bottom: 16px; }
.hours-lunch .field { margin: 0; }
@media (max-width: 720px) {
  .hours-row { grid-template-columns: 1fr 1fr; }
  .hours-row__day { grid-column: 1 / -1; margin-bottom: -4px; }
  form[data-list-form][action*="technicians"] .list-row { grid-template-columns: 1fr; }
}

.upload-form { background: var(--soft); border: 1px dashed var(--line); border-radius: 8px; padding: 16px 18px; margin: 12px 0 24px; }
.upload-form h2 { margin-top: 0; }

.tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.tile.is-dragging { opacity: 0.4; }
.tile.is-drop-target { outline: 2px dashed var(--accent); outline-offset: -4px; }
.tile__thumb { aspect-ratio: 1 / 1; background: var(--soft); display: flex; align-items: center; justify-content: center; cursor: grab; }
.tile__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tile__placeholder { color: var(--mute); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.tile__meta { padding: 12px; display: grid; gap: 8px; }
.tile__meta label { display: grid; gap: 2px; }
.tile__meta span { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.tile__meta input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.tile__actions { display: flex; gap: 8px; }

.log {
  background: #1c1812; color: #f4ebdd;
  border-radius: 6px; padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.5;
  white-space: pre-wrap; overflow: auto;
  max-height: 320px;
}

code { background: var(--soft); padding: 1px 5px; border-radius: 3px; font-size: 12px; }

/* --- Inbox ----------------------------------------------------------- */
.inbox-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.inbox-table th, .inbox-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.inbox-table th { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.inbox-table tr.is-unread td { font-weight: 600; }
.inbox-table a { color: var(--ink); text-decoration: none; }
.inbox-table a:hover { color: var(--accent); }
.pager { display: flex; gap: 8px; margin-top: 16px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 12px 0 24px; font-size: 13px; }
.kv dt { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.kv dd { margin: 0; }
.inbox-body { width: 100%; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.inbox-body--plain { padding: 14px; white-space: pre-wrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; min-height: auto; }
.inbox-body--html { min-height: 480px; }
.inbox-html-wrap { margin: 18px 0 0; }
.inbox-html-wrap > summary { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); cursor: pointer; padding: 6px 0; }
.inbox-html-wrap[open] > summary { color: var(--ink); }

/* --- Logs ------------------------------------------------------------ */
.logs-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.logs-filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.logs-filters label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.logs-filters select, .logs-filters input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.logs-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12px; }
.logs-table th, .logs-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.logs-table th { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.logs-table code { background: var(--soft); padding: 2px 6px; border-radius: 3px; font-size: 11px; }
.logs-row--error td { background: #fcf3f3; }
.logs-row--warn  td { background: #fbf6e6; }
.logs-level { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: var(--soft); }
.logs-level--info  { background: #e8efe5; color: var(--ok); }
.logs-level--warn  { background: #f6e7be; color: #8a6512; }
.logs-level--error { background: #f6dadb; color: var(--danger); }
.logs-meta { background: #1c1812; color: #f4ebdd; border-radius: 4px; padding: 8px 10px; font-size: 11px; line-height: 1.45; max-height: 280px; overflow: auto; margin: 6px 0 0; }
.logs-purge { margin-left: auto; }

/* --- Responsive table → card pattern (logs, bookings, inbox, sent) ---- */
@media (max-width: 720px) {
  .page { padding: 0 14px; margin: 16px auto; }
  .card { padding: 16px; margin-bottom: 16px; }

  .logs-table, .logs-table thead, .logs-table tbody, .logs-table tr, .logs-table td,
  .bookings-table, .bookings-table thead, .bookings-table tbody, .bookings-table tr, .bookings-table td,
  .inbox-table, .inbox-table thead, .inbox-table tbody, .inbox-table tr, .inbox-table td { display: block; }

  .logs-table thead, .bookings-table thead, .inbox-table thead { display: none; }

  .logs-table tr, .bookings-table tr, .inbox-table tr {
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
  }
  .logs-table tr.logs-row--error { background: #fcf3f3; border-color: #e2b2b3; }
  .logs-table tr.logs-row--warn  { background: #fbf6e6; border-color: #e8d8a8; }
  .inbox-table tr.is-unread     { background: #fff8ec; border-color: #e8d8a8; }

  .logs-table td, .bookings-table td, .inbox-table td {
    padding: 4px 0;
    border: 0;
    word-break: break-word;
  }
  .logs-table td:empty, .bookings-table td:empty, .inbox-table td:empty { display: none; }

  .logs-table td::before, .bookings-table td::before, .inbox-table td::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 70px;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mute);
    margin-right: 10px;
    vertical-align: top;
  }
  .logs-table td[data-label='']::before,
  .bookings-table td[data-label='']::before,
  .inbox-table td[data-label='']::before { display: none; }

  .logs-meta { max-height: 200px; }

  /* Filter rows: stack cleanly */
  .bookings-filters label, .logs-filters label { width: 100%; }
  .bookings-filters input[type=text], .bookings-filters select,
  .logs-filters input[type=text], .logs-filters select { width: 100%; }

  .stat-card { padding: 10px 12px; }
  .stat-card__num { font-size: 22px; }
}

/* --- Inbox unread + kind badges -------------------------------------- */
.inbox-dot-cell { width: 14px; padding-right: 0 !important; }
.inbox-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(184, 147, 82, 0.18); }
.badge { display: inline-block; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; font-weight: 500; }
.badge--new      { background: var(--accent); color: var(--accent-ink); margin-left: 8px; }
.badge--email    { background: var(--soft); color: var(--mute); }
.badge--contact  { background: var(--pink-soft); color: #8a4646; }
.badge--cancellation { background: #f6dadb; color: #8a3d3d; }

.reply-form { display: grid; gap: 10px; max-width: 720px; margin: 12px 0 0; }
.reply-form textarea { font-family: inherit; }

.small { font-size: 11px; }

/* --- Bookings -------------------------------------------------------- */
.bookings-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat-card { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.stat-card--total { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stat-card__num { font-family: var(--font-head); font-size: 28px; line-height: 1; }
.stat-card__label { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); margin-top: 6px; }
.stat-card--total .stat-card__label { color: rgba(244, 235, 221, 0.7); }

.bookings-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 12px 0 18px; }
.bookings-filters label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.bookings-filters select, .bookings-filters input[type=text] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }

.bookings-table { width: 100%; border-collapse: collapse; }
.bookings-table th, .bookings-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13px; }
.bookings-table th { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
.bookings-table a { color: var(--ink); text-decoration: none; }
.bookings-table a:hover { color: var(--accent); }

.status-badge { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; font-weight: 500; }
.status-badge--new       { background: #f6dadb; color: var(--danger); }
.status-badge--confirmed { background: #eaf3e2; color: var(--ok); }
.status-badge--completed { background: var(--soft);    color: var(--mute); }
.status-badge--cancelled { background: #efeae3; color: var(--mute); text-decoration: line-through; }
.status-badge--no-show   { background: #f6e7be; color: #8a6512; }

.booking-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.booking-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 36px; }
@media (max-width: 880px) { .booking-grid { grid-template-columns: 1fr; } }
.status-form { display: grid; gap: 8px; max-width: 360px; }
.status-history { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.status-history li { padding: 8px; background: var(--soft); border-radius: 4px; }
.admin-notes { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.admin-notes li { background: var(--soft); border-left: 3px solid var(--accent); border-radius: 4px; padding: 10px 12px; }
.note-form { display: grid; gap: 8px; max-width: 720px; }
.ref-thumb { max-width: 320px; max-height: 320px; border: 1px solid var(--line); border-radius: 4px; display: block; margin-bottom: 6px; }

/* ---------- Push notifications panel (Settings) ---------- */
.push-panel { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.push-panel h2 { margin-top: 0; }
.push-panel__status {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--soft);
  font-size: 13px;
}
.push-panel__status--ok   { background: #e6f1da; color: var(--ok); }
.push-panel__status--warn { background: #f6e2da; color: var(--danger); }
.push-panel__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- In-app push toast (foreground bridge) ---------- */
.gg-toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.gg-toast {
  position: relative;
  display: block;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  padding: 12px 36px 12px 14px;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  pointer-events: auto;
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}
.gg-toast.is-in  { opacity: 1; transform: translateY(0); }
.gg-toast.is-out { opacity: 0; transform: translateY(-8px); }
.gg-toast__title { font-weight: 600; margin-bottom: 2px; color: #fff; }
.gg-toast__body  { color: rgba(255,255,255,0.78); word-wrap: break-word; }
.gg-toast__close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
}
.gg-toast__close:hover { color: #fff; }

/* ---------- Email thread on booking detail / inbox link control ---------- */
.email-thread { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.email-thread__item {
  background: var(--soft);
  border-left: 3px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
}
.email-thread__item--outbound { border-left-color: var(--accent); }
.email-thread__item--inbound  { border-left-color: var(--ok); background: #fff; border: 1px solid var(--line); border-left-width: 3px; }
.email-thread__head {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--mute);
}
.email-thread__direction { font-weight: 600; color: var(--ink); }
.email-thread__subject { font-weight: 500; margin: 2px 0 4px; }
.email-thread__body {
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 6px;
  background: transparent;
  padding: 0;
  color: var(--ink);
}
.email-thread__refs { display: flex; gap: 8px; flex-wrap: wrap; }
.booking-email-form { display: grid; gap: 10px; max-width: 720px; margin: 16px 0 28px; }
.booking-email-form code { font-size: 11px; padding: 1px 5px; border-radius: 3px; background: var(--soft); }

.inbox-link-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.inbox-link-form select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; font: inherit; min-width: 260px; max-width: 100%; }
.inbox-link-banner {
  background: #eaf3e2;
  border: 1px solid #c6dfb6;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- "X new messages — tap to refresh" banner on list pages ---------- */
.list-refresh-banner {
  display: block;
  width: 100%;
  border: 1px solid var(--accent);
  background: #fbeed1;
  color: var(--ink);
  padding: 12px 16px;
  margin: 0 0 16px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
}
.list-refresh-banner::before {
  content: '↻ ';
  margin-right: 4px;
  color: var(--accent);
}
.list-refresh-banner:hover { background: #f7e2b3; }

/* ---------- Confirm modal (replaces window.confirm) ---------- */
.gg-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 35, 27, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 11000;
  opacity: 0;
  transition: opacity 180ms ease, background 180ms ease;
}
.gg-modal__overlay.is-open {
  opacity: 1;
  background: rgba(43, 35, 27, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.gg-modal__dialog {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.45);
  width: min(420px, 100%);
  padding: 24px 24px 18px;
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
}
.gg-modal__overlay.is-open .gg-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.gg-modal__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 8px;
  color: var(--ink);
}
.gg-modal__msg {
  margin: 0 0 18px;
  color: var(--mute);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.gg-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.gg-modal__btn {
  appearance: none;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  min-width: 96px;
}
.gg-modal__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.gg-modal__btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.gg-modal__btn--ghost:hover { border-color: var(--ink); }
.gg-modal__btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.gg-modal__btn--primary:hover { filter: brightness(0.96); }
.gg-modal__btn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.gg-modal__btn--danger:hover { filter: brightness(0.95); }
@media (max-width: 480px) {
  .gg-modal__dialog { padding: 18px 16px 14px; }
  .gg-modal__btn { flex: 1 1 auto; }
}

/* ---------- Email templates friendly editor ---------- */
.email-templates-form { display: grid; gap: 18px; }
.email-tpl {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
}
.email-tpl__head { margin-bottom: 10px; }
.email-tpl__name { margin: 0 0 4px; }
.email-tpl .field span { font-size: 11px; }
.email-tpl textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  background: #fff;
  color: var(--ink);
  resize: vertical;
  min-height: 240px;
}
.email-tpl textarea:focus, .email-tpl input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.merge-fields { margin-top: 4px; padding: 10px 12px; background: #fff; border: 1px dashed var(--line); border-radius: 6px; }
.merge-fields summary { cursor: pointer; font-size: 12px; color: var(--mute); letter-spacing: 0.06em; }
.merge-fields__list { list-style: none; padding: 8px 0 0; margin: 0; display: grid; gap: 6px; }
.merge-fields__list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.merge-fields__chip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  cursor: pointer;
}
.merge-fields__chip:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Reviews friendly editor ---------- */
.reviews-featured {
  background: #fff7e6;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 8px;
}
.reviews-featured__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin-bottom: 10px;
}
.reviews-featured h2 { margin-top: 0; }
.reviews-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 90px;
  gap: 12px 16px;
}
.reviews-row .list-row__field--textarea { grid-column: 1 / -1; }
@media (max-width: 720px) {
  .reviews-featured__grid { grid-template-columns: 1fr; }
  .reviews-row { grid-template-columns: 1fr; }
}

/* OEM battery-saver nudge banner. Anchored bottom-right so it never
   covers the topbar nav, and dismissable. */
.oem-nudge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 360px;
  z-index: 200;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-size: 13px;
  line-height: 1.5;
}
.oem-nudge__body { flex: 1 1 auto; min-width: 0; }
.oem-nudge__body strong { display: block; margin-bottom: 6px; font-size: 14px; }
.oem-nudge__body p { margin: 6px 0 0; }
.oem-nudge__body a { color: var(--accent); font-weight: 500; }
.oem-nudge__close {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: var(--mute);
  padding: 0 4px;
}
.oem-nudge__close:hover { color: var(--ink); }
@media (max-width: 480px) {
  .oem-nudge { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* Inline checkbox row used inside .status-form for the review-request opt-out. */
.field--inline {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  margin: 6px 0 4px;
}
.field--inline input[type="checkbox"] { margin-top: 3px; }
.field--inline span { font-size: 13px; color: var(--ink); line-height: 1.45; }

/* ---------- Finance ---------------------------------------------------- */
.finance-rows { display: grid; gap: 12px; margin-bottom: 14px; }
.finance-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 110px 90px 80px 90px 90px 80px 80px;
  gap: 10px 14px;
  padding: 12px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  align-items: end;
  min-width: 0;
}
.finance-row .field { margin: 0; min-width: 0; }
.finance-row .field input,
.finance-row .field select { width: 100%; min-width: 0; box-sizing: border-box; }
.finance-row__notes { grid-column: span 4; }
.finance-row__remove { grid-column: 1 / -1; justify-self: start; }
.finance-row.is-low-stock { border-left: 3px solid #b22d2d; }
.finance-row--expense {
  grid-template-columns: 130px 130px 110px 110px;
}
@media (max-width: 720px) {
  .finance-row, .finance-row--expense { grid-template-columns: 1fr 1fr; padding: 10px 12px; }
  .finance-row__notes { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .finance-row, .finance-row--expense { grid-template-columns: 1fr; }
}

.finance-recipe {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.finance-recipe.is-no-code { opacity: 0.55; }
.finance-recipe__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.finance-recipe__head h2 { margin: 0; font-size: 18px; }
.finance-recipe__totals { text-align: right; min-width: 160px; }
.finance-recipe__cost   { font-family: var(--font-head); font-size: 22px; }
.finance-recipe__margin { font-size: 13px; color: var(--accent); }
.finance-recipe__table { margin: 8px 0; }
.finance-recipe__footer { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.finance-recipe__extra-form { display: flex; gap: 10px; align-items: end; flex: 1 1 280px; max-width: 420px; }
.finance-recipe__extra-form .field { margin: 0; flex: 1; }

.finance-period {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.finance-period .field { margin: 0; }

.finance-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.finance-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
}
.finance-card__label { color: var(--mute); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; }
.finance-card__value { font-family: var(--font-head); font-size: 28px; margin: 4px 0; }

.finance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(11px, 2vw, 14px);
  table-layout: auto;
}
.finance-table th, .finance-table td { word-break: break-word; }
.finance-table thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mute);
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}
.finance-table tbody td { padding: 10px; border-bottom: 1px solid var(--line); }
.finance-table tbody tr:hover { background: var(--soft); }
.finance-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.finance-pnl { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.finance-pnl__col h2 { margin: 0 0 8px; font-size: 16px; }
.finance-pnl__table { width: 100%; border-collapse: collapse; }
.finance-pnl__table td { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.finance-pnl__table .num { text-align: right; font-variant-numeric: tabular-nums; }
.finance-pnl__sub td { font-weight: 600; border-bottom: 1px solid var(--ink); }
.finance-pnl__total td { font-weight: 700; font-size: 16px; padding-top: 8px; }
.finance-pnl__heading { margin: 16px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--mute); }
.finance-pnl__cats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.finance-pnl__cats li { display: flex; justify-content: space-between; }

.alert--warn { background: #fff7e0; border: 1px solid #d6a23a; color: #6b5a18; padding: 10px 12px; border-radius: 4px; margin-bottom: 12px; }
.req { color: #b22d2d; font-style: normal; margin-left: 2px; }
.field input:invalid:not(:placeholder-shown),
.field select:invalid { border-color: #b22d2d; }

.finance-list-actions { margin: 0 0 14px; }
.finance-table tbody tr.is-low-stock td { background: rgba(178, 45, 45, 0.04); }
.finance-table__actions { white-space: nowrap; text-align: right; width: 70px; }
.finance-table__actions .btn-icon { margin-left: 4px; }
.inline-form { display: inline; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn-icon:hover { background: var(--soft); border-color: var(--accent); color: var(--accent); }
.btn-icon--danger { color: #b22d2d; }
.btn-icon--danger:hover { background: #fbeae9; border-color: #b22d2d; color: #b22d2d; }

/* Native dialog used for stock + expense entry. */
.gg-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  max-width: 520px;
  width: calc(100% - 32px);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}
.gg-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}
.gg-dialog__form { padding: 20px 22px; display: grid; gap: 12px; }
.gg-dialog__title { margin: 0 0 4px; font-size: 18px; }
.gg-dialog__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gg-dialog__form .field { margin: 0; }
.gg-dialog__form .field input,
.gg-dialog__form .field select { width: 100%; box-sizing: border-box; }
.gg-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
@media (max-width: 480px) {
  .gg-dialog__row { grid-template-columns: 1fr; }
}

/* ---------- Customers page --------------------------------------------- */
.back-link {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  text-decoration: none;
}
.back-link:hover { color: var(--ink); }

.customers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.customers-table thead th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}
.customers-table tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.customers-table tbody tr:hover { background: var(--soft); }
.customers-table__link { color: var(--ink); text-decoration: none; }
.customers-table__link:hover { color: var(--accent); }
.customers-table__counts { font-variant-numeric: tabular-nums; }

.customer-review-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.customer-review-form .field { flex: 1 1 280px; min-width: 0; margin: 0; }

.customers-bookings {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 8px;
}
.customers-bookings thead th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}
.customers-bookings tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.customers-bookings tbody tr:hover { background: var(--soft); }

/* ---------- Storage page ------------------------------------------------ */
.page__title { margin: 0 0 16px; }

.storage-hero {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.storage-hero__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.storage-hero__used  { font-family: var(--font-head); font-size: 32px; line-height: 1; }
.storage-hero__sub   { color: var(--mute); font-size: 13px; margin-top: 4px; }
.storage-hero__pct   { font-family: var(--font-head); font-size: 40px; color: var(--accent); }
.storage-hero.is-warn .storage-hero__pct     { color: #b58a16; }
.storage-hero.is-critical .storage-hero__pct { color: #b22d2d; }

.storage-meter {
  position: relative;
  height: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}
.storage-meter__fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, #c9a865, #b89352);
  transition: width 240ms ease;
}
.storage-hero.is-warn .storage-meter__fill     { background: linear-gradient(90deg, #d6a23a, #b58a16); }
.storage-hero.is-critical .storage-meter__fill { background: linear-gradient(90deg, #d65a5a, #b22d2d); }
.storage-meter__threshold {
  position: absolute; top: -2px; bottom: -2px;
  width: 1px;
  background: rgba(0, 0, 0, 0.45);
}

.storage-stack {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 10px;
}
.storage-stack__seg { flex: 1 1 0; min-width: 2px; }

.storage-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--mute);
}
.storage-legend__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  vertical-align: -1px;
  margin-right: 6px;
}

.storage-backup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 13px;
}
.storage-backup code { font-family: var(--font-mono); font-size: 12px; }
.storage-backup__dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.storage-backup__dot.is-ok    { background: #4a9b6e; }
.storage-backup__dot.is-warn  { background: #b58a16; }
.storage-backup__dot.is-stale { background: #b22d2d; }

.storage-cap-row {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 18px;
}
.storage-cap-row .field input { max-width: 140px; }

.storage-categories { display: grid; gap: 12px; }

.storage-cat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.storage-cat[open] { border-color: var(--accent); }
.storage-cat > summary {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.storage-cat > summary::-webkit-details-marker { display: none; }
.storage-cat > summary::before {
  content: '▸';
  color: var(--mute);
  margin-right: 8px;
  transition: transform 120ms ease;
  display: inline-block;
}
.storage-cat[open] > summary::before { transform: rotate(90deg); }
.storage-cat__label { font-weight: 600; }
.storage-cat__count { color: var(--mute); font-size: 13px; }
.storage-cat__size  { font-family: var(--font-mono); font-size: 13px; min-width: 80px; text-align: right; }
.storage-cat__body  { padding: 8px 18px 16px; border-top: 1px solid var(--line); }

.storage-list {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 12px 0;
  max-height: 480px;
  overflow-y: auto;
}
.storage-list__loading,
.storage-list__empty { padding: 18px; font-size: 13px; }

.storage-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 80ms ease;
}
.storage-row__status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #999;
}
.storage-row__status.is-in-use   { background: #4a9b6e; }
.storage-row__status.is-archived { background: #d6a23a; }
.storage-row__status.is-orphan   { background: #b22d2d; box-shadow: 0 0 0 2px rgba(178, 45, 45, 0.18); }
.storage-row:last-child { border-bottom: 0; }
.storage-row:hover { background: rgba(184, 147, 82, 0.08); }
.storage-row.is-selected { background: rgba(184, 147, 82, 0.18); }
.storage-row__check { margin: 0; }
.storage-row__name {
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}
.storage-row__name:hover { color: var(--accent); text-decoration: underline; }
.storage-row__size {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mute);
  min-width: 70px;
  text-align: right;
}
.storage-row__date {
  font-size: 11px;
  color: var(--mute);
  min-width: 70px;
  text-align: right;
}

.storage-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.storage-status-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--mute);
  margin: 8px 0 0;
}
.storage-status-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gg-toast--ok    { border-left: 4px solid #4a9b6e; }
.gg-toast--warn  { border-left: 4px solid #b58a16; }
.gg-toast--error { border-left: 4px solid #b22d2d; }
