/* Web Backup & Restore - warm honey/amber accent (default brand), ink #1c1b1f.
   Layout follows the admin style guide: floating dark-glass sidebar + warm, soft dashboard. */

:root {
  --ink: #1f1d1a;
  --ink-2: #4a463e;
  --muted: #7d7667;
  --line: rgb(60 50 20 / 10%);
  --cream: #faf6ee;
  --paper: #f7f4ea;
  --honey: #f5c84c;            /* honey highlight (fills only, never small text on cream) */
  --honey-soft: #fbe9a8;
  --honey-deep: #d99a0b;
  --blue: #a8530a;             /* accent: active menu, primary buttons (white text 5.4:1) */
  --blue-deep: #8a4208;
  --sky: #e8960f;
  --green: #86ad5c;
  --ok: #3f7a2a;
  --warn: #9a6a00;
  --bad: #b3322a;
  --dark: #1c1b1f;
  --glass: rgb(22 24 33 / 88%);
  --radius: 24px;
  --sidebar-w: 264px;
  --sidebar-w-collapsed: 72px;
  --gap: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-size: 15px; line-height: 1.5;
  background:
    radial-gradient(1100px 620px at 100% -8%, rgb(245 200 76 / 38%), transparent 62%),
    radial-gradient(900px 560px at -6% 108%, rgb(232 150 15 / 12%), transparent 60%),
    linear-gradient(135deg, #f8f5ec 0%, #f7efd9 60%, #f6e7b0 100%);
  background-attachment: fixed;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 500; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------------ sidebar */
.sidebar {
  position: fixed; z-index: 40; top: var(--gap); left: var(--gap); bottom: var(--gap);
  width: var(--sidebar-w); display: flex; flex-direction: column; overflow: hidden;
  color: #fff; background: var(--glass); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgb(255 255 255 / 8%); border-radius: 20px;
  box-shadow: 0 30px 60px -22px rgb(8 10 20 / 60%), 0 2px 0 rgb(255 255 255 / 4%) inset;
  transition: width .25s var(--ease), transform .25s var(--ease);
}
.sb-top { padding: 16px 14px 10px; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo-tile {
  width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: none;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 30%), 0 8px 22px -6px rgb(232 150 15 / 70%), 0 0 26px -2px rgb(245 200 76 / 45%);
}
.logo-tile img { width: 26px; height: 27px; display: block; }
.brand-name { font-weight: 700; font-size: 17px; line-height: 1.1; letter-spacing: -.01em; white-space: nowrap; }
.brand-sub { font-size: 11.5px; color: rgb(255 255 255 / 50%); white-space: nowrap; }
.brand-text { min-width: 0; flex: 1; }
.sb-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  color: rgb(255 255 255 / 85%); background: rgb(255 255 255 / 7%); transition: background .15s;
}
.icon-btn:hover { background: rgb(255 255 255 / 14%); color: #fff; }
.count-dot {
  position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #20222c;
}
.collapse-pill {
  height: 28px; padding: 0 12px 0 8px; border-radius: 14px; border: 0; background: #fff; color: var(--blue);
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; white-space: nowrap;
}
.collapse-pill .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.user-card {
  margin: 12px 0 0; padding: 10px 12px; display: flex; align-items: center; gap: 10px; border-radius: 14px;
  background: rgb(255 255 255 / 6%); color: #fff; text-decoration: none !important; transition: background .15s;
}
.user-card:hover { background: rgb(255 255 255 / 10%); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13px;
  color: #10202c; background: linear-gradient(135deg, var(--sky), var(--green) 60%, var(--honey));
}
.user-meta { flex: 1; min-width: 0; line-height: 1.25; }
.user-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 12px; color: rgb(255 255 255 / 50%); text-transform: capitalize; }
.user-card > .ic { color: rgb(255 255 255 / 45%); width: 16px; }
.sidebar .menu-search {
  margin-top: 12px; width: 100%; height: 38px; border-radius: 19px; border: 1px solid rgb(255 255 255 / 8%);
  background: rgb(0 0 0 / 22%); color: #fff; padding: 0 16px 0 40px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  outline: none;
}
.sidebar .menu-search::placeholder { color: rgb(255 255 255 / 40%); }
.sidebar .menu-search:focus { border-color: rgb(232 150 15 / 70%); }
.search-wrap { position: relative; }
.search-wrap .ic { position: absolute; left: 14px; top: 20px; color: rgb(255 255 255 / 45%); width: 16px; height: 16px; }

.sb-scroll { flex: 1; overflow-y: auto; padding: 4px 14px 8px; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / 20%) transparent; }
.nav-label {
  margin: 18px 0 6px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgb(255 255 255 / 45%);
  white-space: nowrap; overflow: hidden;
}
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; height: 42px; margin: 0 -14px; padding: 0 28px;
  color: rgb(255 255 255 / 80%); font-size: 14px; text-decoration: none !important; white-space: nowrap; cursor: pointer;
  background: transparent; border: 0; width: calc(100% + 28px); text-align: left; transition: background .15s, color .15s;
}
.nav-item:hover { color: #fff; background: rgb(255 255 255 / 6%); }
.nav-item.active { color: #fff; background: var(--blue); font-weight: 600; }
.nav-item .ic { opacity: .95; }
.nav-item .badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #e5484d; color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.nav-item .badge.soft { background: rgb(255 255 255 / 14%); font-weight: 600; }
.nav-item[hidden], .nav-label[hidden] { display: none; }
.sb-bottom { border-top: 1px solid rgb(255 255 255 / 7%); padding: 6px 14px 10px; }
.sb-bottom .nav-item { height: 40px; }
.sb-expand {
  display: none; position: absolute; right: -2px; top: 26px; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: var(--blue); place-items: center; box-shadow: 0 4px 12px rgb(0 0 0 / 30%);
}
.sb-expand .ic { width: 14px; height: 14px; stroke-width: 2.8; }

/* collapsed rail */
.sidebar.collapsed { width: var(--sidebar-w-collapsed); }
.sidebar.collapsed .brand-text, .sidebar.collapsed .collapse-pill, .sidebar.collapsed .user-meta,
.sidebar.collapsed .user-card > .ic, .sidebar.collapsed .search-wrap, .sidebar.collapsed .nav-item span.lbl,
.sidebar.collapsed .nav-item .badge, .sidebar.collapsed .sb-tools .icon-btn { display: none; }
.sidebar.collapsed .sb-top { padding: 16px 0 6px; }
.sidebar.collapsed .brand { justify-content: center; }
.sidebar.collapsed .user-card { margin: 12px auto 0; padding: 6px; width: 48px; justify-content: center; background: transparent; }
.sidebar.collapsed .sb-scroll { padding: 0 12px; overflow: visible; }
.sidebar.collapsed .nav-label { text-align: center; font-size: 9px; letter-spacing: .06em; margin: 14px 0 4px; }
.sidebar.collapsed .nav-item { margin: 4px 0; padding: 0; width: 48px; height: 44px; justify-content: center; border-radius: 12px; }
.sidebar.collapsed .nav-item.active { background: var(--blue); }
.sidebar.collapsed .sb-bottom { padding: 6px 12px 10px; }
.sidebar.collapsed .sb-expand { display: grid; }
.sidebar.collapsed .nav-item::after {
  content: attr(data-tip); position: absolute; left: 58px; top: 50%; transform: translateY(-50%); background: #111; color: #fff;
  padding: 5px 10px; border-radius: 8px; font-size: 12.5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5;
}
.sidebar.collapsed .nav-item:hover::after { opacity: 1; }
.sidebar.collapsed .sb-scroll { overflow: visible; }
.sidebar.collapsed { overflow: visible; }
.sidebar.collapsed .sb-top, .sidebar.collapsed .sb-bottom, .sidebar.collapsed .sb-scroll { border-radius: 20px; }

/* ------------------------------------------------------------------ main */
.main { margin-left: calc(var(--sidebar-w) + var(--gap) * 2 + 18px); padding: 30px 36px 70px 12px; max-width: 1380px; transition: margin-left .25s var(--ease); }
body.rail .main { margin-left: calc(var(--sidebar-w-collapsed) + var(--gap) * 2 + 18px); }
.topbar { display: none; }
.scrim { display: none; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px 0 10px; border-radius: 15px; font-size: 13px;
  background: rgb(255 255 255 / 65%); border: 1px solid rgb(255 255 255 / 80%); color: var(--ink-2);
}
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgb(134 173 92 / 25%); }
.chip .dot.bad { background: #e5484d; box-shadow: 0 0 0 3px rgb(229 72 77 / 22%); }
.chip .dot.warn { background: #e6a817; box-shadow: 0 0 0 3px rgb(230 168 23 / 25%); }
.greeting { font-size: clamp(30px, 4vw, 42px); font-weight: 400; letter-spacing: -.02em; margin: 14px 0 4px; line-height: 1.12; }
.greeting b { font-weight: 600; }
.lede { color: var(--muted); font-size: 15.5px; max-width: 640px; }
h1.page-title { font-size: clamp(26px, 3vw, 34px); font-weight: 450; letter-spacing: -.02em; margin: 14px 0 4px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.pilltabs { display: inline-flex; padding: 4px; border-radius: 22px; background: rgb(255 255 255 / 55%); border: 1px solid rgb(255 255 255 / 80%); }
.pilltabs a { height: 34px; padding: 0 18px; display: inline-flex; align-items: center; border-radius: 17px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.pilltabs a:hover { background: rgb(255 255 255 / 70%); }
.pilltabs a.on { background: var(--ink); color: #fff; }
.round-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 75%); border: 1px solid rgb(255 255 255 / 85%); color: var(--ink); position: relative; }
.round-btn:hover { background: #fff; text-decoration: none; }
.round-btn .count-dot { border-color: #f6f1dd; }

/* ------------------------------------------------------------------ cards & grid */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(12, 1fr); }
.card {
  background: rgb(255 255 255 / 76%); border-radius: var(--radius); padding: 22px 24px; position: relative;
  box-shadow: 0 1px 0 rgb(255 255 255 / 90%) inset, 0 16px 34px -18px rgb(70 55 10 / 28%);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.card.dark { background: var(--dark); color: #f4f1ea; box-shadow: 0 22px 40px -20px rgb(10 10 20 / 55%); }
.card.flat { box-shadow: none; background: rgb(255 255 255 / 60%); }
.card-title { font-size: 14px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card.dark .card-title { color: rgb(255 255 255 / 75%); }
.card-title .sub { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.go { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); border: 1px solid var(--line); flex: none; }
.go:hover { background: var(--ink); color: #fff; text-decoration: none; }
.card.dark .go { background: rgb(255 255 255 / 10%); color: #fff; border: 0; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; }
.rise { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* KPI strip */
.kpi-strip { margin-bottom: 20px; }
.kpi-pills { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.kpi-pill { min-height: 38px; border-radius: 19px; display: inline-flex; align-items: center; padding: 6px 16px; font-size: 13.5px; font-weight: 500; position: relative; overflow: hidden; line-height: 1.25; }
.kpi-pill.dark { background: var(--ink); color: #fff; flex: 1.6 1 140px; }
.kpi-pill.honey { background: var(--honey); color: var(--ink); flex: 1.2 1 120px; }
.kpi-pill.stripe { color: var(--ink); flex: 1 1 110px; background: repeating-linear-gradient(-45deg, rgb(31 29 26 / 14%) 0 2px, transparent 2px 8px), rgb(255 255 255 / 55%); }
.kpi-pill.outline { border: 1.5px solid var(--ink); color: var(--ink); flex: .9 1 100px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.kpi { display: flex; align-items: flex-end; gap: 12px; min-width: 0; }
.kpi .big { font-size: clamp(34px, 4vw, 50px); font-weight: 300; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.kpi .big small { font-size: .42em; font-weight: 400; letter-spacing: 0; margin-left: 3px; color: var(--ink-2); }
.kpi .cap { font-size: 12.5px; color: var(--muted); line-height: 1.3; padding-bottom: 4px; }
.kpi .cap b { display: block; color: var(--ink-2); font-weight: 600; font-size: 13px; }

/* chart */
.chart { height: 190px; display: flex; align-items: flex-end; gap: 5px; position: relative; padding-top: 34px; }
.bar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; min-width: 0; }
.bar { width: min(100%, 9px); border-radius: 6px; background: #2b2926; opacity: .86; transform-origin: bottom; animation: grow .8s var(--ease) both; animation-delay: calc(var(--i) * 14ms); transition: opacity .15s, background .15s; }
.bar.empty { background: rgb(31 29 26 / 18%); opacity: 1; }
.bar.bad { background: #e5484d; }
.bar.hl, .bar-col:hover .bar { background: var(--honey); opacity: 1; box-shadow: 0 6px 16px -4px rgb(185 190 0 / 70%); }
.bar-col .tip {
  position: absolute; bottom: calc(var(--h) + 8px); left: 50%; transform: translate(-50%, 4px); white-space: nowrap; pointer-events: none;
  background: var(--ink); color: #fff; padding: 5px 10px; border-radius: 12px; font-size: 12px; opacity: 0; transition: .15s; z-index: 2;
}
.bar-col .tip b { color: var(--honey); font-weight: 600; margin-right: 4px; }
.bar-col:nth-last-child(-n+5) .tip { left: auto; right: -4px; transform: translate(0, 4px); }
.bar-col:nth-last-child(-n+5) .tip.show, .bar-col:nth-last-child(-n+5):hover .tip { transform: none; }
.bar-col:nth-child(-n+4) .tip { left: -4px; transform: translate(0, 4px); }
.bar-col:nth-child(-n+4):hover .tip { transform: none; }
.bar-col .tip.show, .bar-col:hover .tip { opacity: 1; transform: translate(-50%, 0); }
.bar-col:hover .tip.show:not(:hover) { z-index: 3; }
.chart-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ring */
.ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ring { position: relative; width: 176px; height: 176px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: rgb(31 29 26 / 8%); }
.ring .arc { stroke: var(--honey-deep); stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.ring .arc.run { stroke: var(--sky); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-center .t { font-size: 34px; font-weight: 300; letter-spacing: -.03em; line-height: 1.05; }
.ring-center .s { font-size: 12px; color: var(--muted); max-width: 110px; line-height: 1.25; }
.ring-actions { display: flex; gap: 10px; align-items: center; }
.play { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .15s; }
.play:hover { transform: scale(1.07); }
.play[disabled] { opacity: .35; cursor: not-allowed; transform: none; }
.ring-stage { font-size: 12.5px; color: var(--ink-2); text-align: center; min-height: 18px; }

/* check list (dark card) */
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.todo li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgb(255 255 255 / 7%); font-size: 14px; }
.todo li:last-child { border-bottom: 0; }
.tick { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px solid rgb(255 255 255 / 30%); color: transparent; }
.tick .ic { width: 14px; height: 14px; stroke-width: 3; }
.todo li.ok .tick { background: var(--honey); border-color: var(--honey); color: var(--ink); }
.todo li.fail .tick { border-color: #ff6b6b; color: #ff6b6b; }
.todo li .why { margin-left: auto; font-size: 12px; color: rgb(255 255 255 / 55%); text-align: right; }
.counter { font-size: 46px; font-weight: 300; letter-spacing: -.03em; line-height: 1; }
.counter small { font-size: .45em; color: rgb(255 255 255 / 50%); }
.alert-line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; margin-top: 8px; font-size: 13.5px; background: rgb(255 255 255 / 7%); }
.alert-line.bad { background: rgb(229 72 77 / 18%); }
.alert-line.warn { background: rgb(230 168 23 / 16%); }
.alert-line b { display: block; font-weight: 600; }
.alert-line span { color: rgb(255 255 255 / 70%); }

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 4px; }
.cal .day { min-height: 56px; border-radius: 14px; padding: 6px 7px; font-size: 12px; background: rgb(255 255 255 / 55%); display: flex; flex-direction: column; gap: 3px; color: var(--ink-2); }
.cal .day.out, .cal .day.future { background: transparent; color: rgb(125 118 103 / 55%); }
.cal .day.today { outline: 2px solid var(--ink); }
.cal .ev { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 9px; align-self: flex-start; background: var(--ink); color: #fff; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.cal .ev.monthly { background: var(--honey); color: var(--ink); }
.cal .ev.warn { background: #f3d58a; color: #4b3200; }
.cal .ev.fail { background: #e5484d; color: #fff; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 6px; vertical-align: -1px; }

/* lists & tables */
.run-list { list-style: none; margin: 0; padding: 0; }
.run-list li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.run-list li:last-child { border-bottom: 0; }
.run-list .what { flex: 1; min-width: 0; }
.run-list .what b { font-weight: 600; text-transform: capitalize; }
.run-list .what div { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-list .when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.stat-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--green); }
.stat-dot.warning { background: #e6a817; } .stat-dot.failed { background: #e5484d; } .stat-dot.running { background: var(--sky); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.table-card { padding: 8px 8px 12px; overflow: hidden; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 16px; white-space: nowrap; }
table.t td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
table.t tbody tr { transition: background .12s; }
table.t tbody tr:hover { background: rgb(255 255 255 / 70%); }
table.t tr.link { cursor: pointer; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.clip { max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12px; font-weight: 600; background: rgb(31 29 26 / 8%); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: rgb(134 173 92 / 25%); color: #2f5a1c; }
.pill.warning, .pill.warn { background: rgb(230 168 23 / 22%); color: #6b4800; }
.pill.failed, .pill.bad { background: rgb(229 72 77 / 16%); color: #8d1f1a; }
.pill.honey { background: var(--honey); color: var(--ink); }
.pill.blue { background: rgb(232 150 15 / 18%); color: #8a4208; }
.pill.dark { background: var(--ink); color: #fff; }
.pill.running { background: rgb(232 150 15 / 18%); color: #8a4208; }
.empty { text-align: center; color: var(--muted); padding: 38px 10px; }

/* forms & buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 20px;
  border: 1px solid transparent; font-size: 14px; font-weight: 600; cursor: pointer; background: var(--ink); color: #fff; text-decoration: none !important; transition: transform .12s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--blue); }
.btn.honey { background: var(--honey); color: var(--ink); }
.btn.ghost { background: rgb(255 255 255 / 70%); color: var(--ink); border-color: var(--line); }
.btn.danger { background: #b3322a; }
.btn.small { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 16px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .lbl-t { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.hint { font-size: 12.5px; color: var(--muted); }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 14px; border-radius: 14px; border: 1px solid rgb(60 50 20 / 16%); background: rgb(255 255 255 / 85%); outline: none;
}
textarea { min-height: 96px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgb(168 83 10 / 20%); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: rgb(31 29 26 / 20%); position: relative; transition: .2s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgb(0 0 0 / 30%); }
.switch input:checked { background: var(--blue); }
.switch input:checked::after { left: 21px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chips a { height: 32px; padding: 0 14px; border-radius: 16px; display: inline-flex; align-items: center; font-size: 13px; background: rgb(255 255 255 / 60%); color: var(--ink-2); border: 1px solid var(--line); text-decoration: none; }
.chips a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1; }
.toolbar input[type=search], .toolbar input[type=text] { max-width: 340px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 4px; font-size: 13px; color: var(--muted); }
.pager .btns { display: flex; gap: 8px; }
.crumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--ink-2); } .crumbs .sep { opacity: .5; }

/* flash */
.flashes { display: grid; gap: 10px; margin-bottom: 18px; }
.flash { padding: 12px 16px; border-radius: 16px; display: flex; gap: 10px; align-items: center; font-size: 14px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 24px -16px rgb(0 0 0 / 30%); }
.flash.ok { border-left: 5px solid var(--green); } .flash.bad { border-left: 5px solid #e5484d; background: #fff6f5; }
.flash.warn { border-left: 5px solid #e6a817; } .flash.info { border-left: 5px solid var(--sky); }

/* mailbox browser */
.split { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; }
.folders { list-style: none; margin: 0; padding: 0; }
.folders a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.folders a:hover { background: rgb(255 255 255 / 70%); }
.folders a.on { background: var(--ink); color: #fff; }
.folders .n { font-size: 12px; opacity: .65; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tile { display: block; color: var(--ink); text-decoration: none !important; transition: transform .15s var(--ease), box-shadow .15s; }
.tile:hover { transform: translateY(-3px); }
.tile .tn { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.tile .tm { color: var(--muted); font-size: 13px; margin-top: 4px; }
.tile .ti { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--honey-soft); color: #5b5f00; margin-bottom: 14px; }
.msg-head { display: grid; grid-template-columns: 90px 1fr; gap: 6px 14px; font-size: 14px; }
.msg-head dt { color: var(--muted); text-align: right; } .msg-head dd { margin: 0; word-break: break-word; }
.msg-frame { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
pre.msg-text { white-space: pre-wrap; word-wrap: break-word; font: 14px/1.6 ui-monospace, Consolas, monospace; margin: 0; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; max-height: 560px; overflow: auto; }
.att { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink); }
.att:hover { background: var(--honey-soft); text-decoration: none; }
.callout { padding: 14px 18px; border-radius: 16px; background: var(--honey-soft); color: #44470a; font-size: 14px; display: flex; gap: 12px; align-items: center; }
.callout.bad { background: rgb(229 72 77 / 14%); color: #7a1f1a; }

/* auth screens */
body.auth { display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(440px, 100%); padding: 34px 34px 30px; }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.auth-brand .logo-tile { width: 54px; height: 54px; border-radius: 16px; box-shadow: 0 10px 28px -8px rgb(232 150 15 / 55%), 0 0 30px -4px rgb(245 200 76 / 50%); }
.auth-brand .logo-tile img { width: 36px; height: 38px; }
.auth-brand h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
.auth-brand p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.qr { width: 190px; height: 190px; margin: 6px auto 14px; padding: 8px; background: #fff; border-radius: 16px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: 100%; display: block; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.codes code { padding: 10px; text-align: center; background: #fff; border: 1px dashed rgb(60 50 20 / 30%); border-radius: 12px; font-size: 15px; letter-spacing: .04em; }
.otp { text-align: center; font-size: 26px; letter-spacing: .5em; font-family: ui-monospace, Consolas, monospace; }

/* progress */
.meter { height: 10px; border-radius: 5px; background: rgb(31 29 26 / 9%); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 5px; background: var(--honey-deep); }
dialog { border: 0; border-radius: 24px; padding: 26px 28px; max-width: 440px; box-shadow: 0 40px 80px -20px rgb(0 0 0 / 55%); color: var(--ink); }
dialog::backdrop { background: rgb(20 18 10 / 45%); backdrop-filter: blur(3px); }
dialog h3 { font-size: 20px; margin-bottom: 8px; }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; background: var(--dark); color: #fff; padding: 11px 20px 11px 16px; border-radius: 24px; display: flex; gap: 10px; align-items: center; font-size: 14px; transition: .35s var(--ease); }
.toast i { width: 9px; height: 9px; border-radius: 50%; background: var(--honey); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* restore wizard */
.sel-sum { display: flex; gap: 12px; flex-wrap: wrap; }
.sel-sum > div { flex: 1 1 110px; padding: 12px 16px; border-radius: 18px; background: rgb(255 255 255 / 70%); border: 1px solid var(--line); display: grid; }
.sel-sum b { font-size: 28px; font-weight: 400; letter-spacing: -.02em; line-height: 1.15; }
.sel-sum span { font-size: 12.5px; color: var(--muted); }
.choice { display: block; margin-bottom: 12px; cursor: pointer; }
.choice > input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 20px; border: 2px solid var(--line); background: rgb(255 255 255 / 60%); transition: border-color .15s, background .15s, box-shadow .15s; }
.choice-body b { font-size: 15.5px; }
.choice-ic { width: 40px; height: 40px; border-radius: 13px; flex: none; display: grid; place-items: center; background: var(--honey-soft); color: #5b5f00; }
.choice:hover .choice-body { background: #fff; }
.choice > input:checked + .choice-body { border-color: var(--blue); background: #fff; box-shadow: 0 10px 26px -16px rgb(168 83 10 / 55%); }
.choice > input:checked + .choice-body .choice-ic { background: var(--blue); color: #fff; }
.choice > input:focus-visible + .choice-body { outline: 3px solid rgb(168 83 10 / 40%); outline-offset: 2px; }
.steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 16px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps .n { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--honey); color: var(--ink); font-weight: 700; font-size: 14px; }
.steps b { display: block; font-size: 15px; }
.steps span:not(.n) { color: rgb(255 255 255 / 65%); font-size: 13.5px; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile-stat { padding: 18px 20px; border-radius: 22px; background: rgb(255 255 255 / 76%); display: grid; gap: 1px; box-shadow: 0 16px 34px -20px rgb(70 55 10 / 28%); }
.tile-stat b { font-size: 38px; font-weight: 300; letter-spacing: -.03em; line-height: 1.1; }
.tile-stat span { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.tile-stat small { color: var(--muted); font-size: 12.5px; }
.tile-stat.honey { background: var(--honey); }
.tile-stat.honey span, .tile-stat.honey small { color: #3b3d00; }
.tile-stat.bad { background: rgb(229 72 77 / 14%); }
.tile-stat.bad b { color: #8d1f1a; }
.sel-check { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; }
.bulkbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; margin: 0 8px 4px; border-radius: 16px; background: var(--honey-soft); font-size: 14px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1200px) {
  .span-8, .span-7, .span-5, .span-4 { grid-column: span 12; }
  .span-6 { grid-column: span 12; }
  .span-3 { grid-column: span 6; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(calc(-100% - 24px)); width: min(300px, 86vw); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgb(15 15 10 / 45%); }
  .main, body.rail .main { margin-left: 0; padding: 74px 16px 60px; }
  .topbar { display: flex; position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: 58px; padding: 0 14px; align-items: center; gap: 10px;
    background: rgb(247 244 234 / 88%); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .topbar .logo-tile { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; border: 1px solid var(--line); }
  .topbar .logo-tile img { width: 22px; height: 23px; }
  .topbar b { flex: 1; font-size: 16px; }
  .topbar .icon-btn { background: rgb(31 29 26 / 8%); color: var(--ink); }
  .collapse-pill { display: none; }
  .split { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-3 { grid-column: span 12; }
  .stat-tiles { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .cal .day { min-height: 46px; padding: 4px; }
  .msg-head { grid-template-columns: 70px 1fr; }
  table.t.stack thead { display: none; }
  .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- websites (site grid, states, file browser) */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.site-card { display: block; color: var(--ink); text-decoration: none !important; padding: 18px 20px 16px; border-radius: 22px;
  background: rgb(255 255 255 / 80%); box-shadow: 0 1px 0 rgb(255 255 255 / 90%) inset, 0 16px 34px -20px rgb(70 55 10 / 30%);
  transition: transform .18s var(--ease), box-shadow .18s; position: relative; min-width: 0; }
.site-card:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgb(255 255 255 / 90%) inset, 0 22px 38px -20px rgb(70 55 10 / 38%); }
.site-card.gone { background: rgb(255 255 255 / 55%); }
.site-card .sc-top { display: flex; align-items: center; gap: 10px; }
.site-card .sc-name { font-weight: 600; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-card .sc-dom { color: var(--muted); font-size: 13px; margin: 2px 0 0 21px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-card dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; margin: 14px 0 0; font-size: 13px; }
.site-card dt { color: var(--muted); }
.site-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.site-card .sc-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.hdot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: #cfc8b6; box-shadow: 0 0 0 4px rgb(207 200 182 / 30%); }
.hdot.ok { background: var(--green); box-shadow: 0 0 0 4px rgb(134 173 92 / 28%); }
.hdot.warn { background: #e6a817; box-shadow: 0 0 0 4px rgb(230 168 23 / 28%); }
.hdot.bad { background: #e5484d; box-shadow: 0 0 0 4px rgb(229 72 77 / 24%); }
.hdot.idle { background: #b9b2a0; }
.pill.inactive { background: rgb(230 168 23 / 22%); color: #6b4800; }
.pill.deleted { background: rgb(229 72 77 / 14%); color: #8d1f1a; }
.pill.retired, .pill.paused, .pill.idle { background: rgb(31 29 26 / 9%); color: var(--ink-2); }
.pill.active { background: rgb(134 173 92 / 25%); color: #2f5a1c; }
.pill.added { background: rgb(134 173 92 / 25%); color: #2f5a1c; }
.pill.removed { background: rgb(229 72 77 / 14%); color: #8d1f1a; }
.pill.changed { background: rgb(230 168 23 / 22%); color: #6b4800; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: start; font-size: 14px; }
.timeline li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--honey-deep); margin-top: 6px; }
.timeline li.new::before, .timeline li.reactivated::before, .timeline li.resumed::before { background: var(--green); }
.timeline li.deleted::before { background: #e5484d; }
.timeline .when { color: var(--muted); font-size: 12.5px; display: block; }
.fb td:first-child { width: 44%; }
.fb .nm { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fb .nm .ic { width: 18px; height: 18px; flex: none; stroke: var(--muted); }
.fb .nm.dir .ic { stroke: var(--honey-deep); }
.fb .nm a, .fb .nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.danger-zone { border: 1px dashed rgb(229 72 77 / 55%); border-radius: 18px; padding: 16px 18px; background: rgb(229 72 77 / 5%); }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline; margin: 0; }
[hidden] { display: none !important; }
