/* Hexadata admin: layout follows the VyonaTech CMS, colours follow the Hexadata website palette */
:root {
  --ink: #1e1b3a;
  --ink-2: #2a2660;
  --muted: #605d7a;
  --line: #e6e2f5;
  --line-soft: #f0edfa;
  --bg: #f6f5fd;
  --card: #ffffff;
  --tint: #f4f2ff;
  --tint-2: #eeebff;
  --tint-3: #ddd7fe;
  --accent: #6d5df6;
  --accent-2: #5848e6;
  --accent-deep: #4b3bd8;
  --sky: #7cc7ff;
  --peach: #ff9a76;
  --nav: #1e1b4b;
  --nav-2: #13113a;
  --nav-text: #d8d2fe;
  --ok: #10915a;
  --warn: #b7791f;
  --danger: #d23b3b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(30, 27, 75, 0.05), 0 8px 24px -12px rgba(30, 27, 75, 0.16);
  --display: 'Fraunces', Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 0.75rem; }
img { max-width: 100%; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--tint-2); padding: 1px 6px; border-radius: 5px; }
::selection { background: var(--accent); color: #fff; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 5px 0; }
.lead { color: var(--muted); max-width: 72ch; margin: 0; line-height: 1.55; }
.subhead { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin: 18px 0 10px; }
.req { color: var(--peach); }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 268px; flex-shrink: 0; background: linear-gradient(180deg, var(--nav), var(--nav-2));
  color: var(--nav-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; color: #fff; text-decoration: none !important; }
.brand strong { display: block; font-size: 22px; }
/* website wordmark: hairline "hexa" into heavy "data" (Outfit) */
.wordmark { font-family: 'Outfit', var(--sans, sans-serif); letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.wordmark span { font-weight: 200; }
.wordmark b { font-weight: 800; }
.brand small { display: block; color: var(--sky); font-size: 11px; letter-spacing: 0.08em; font-weight: 600; }
.sidebar nav { padding: 6px 12px; flex: 1; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; color: #8a85b8; padding: 16px 10px 6px; font-weight: 700; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; color: var(--nav-text); font-weight: 500; font-size: 15px;
  text-decoration: none !important; transition: background 0.15s, color 0.15s;
}
.nav-link + .nav-link { margin-top: 2px; }
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-link.active { background: linear-gradient(90deg, rgba(109, 93, 246, 0.45), rgba(109, 93, 246, 0.12)); color: #fff; box-shadow: inset 2px 0 0 var(--sky); }
.nav-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; opacity: 0.9; }
.badge { margin-left: auto; background: rgba(255, 255, 255, 0.1); color: var(--nav-text); border-radius: 99px; font-size: 11px; padding: 1px 8px; font-weight: 700; }
.nav-link.active .badge { background: var(--accent); color: #fff; }
.sidebar-foot { padding: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); display: grid; gap: 10px; }
.sidebar-foot .linkish { color: #a9a3d6; font-size: 12.5px; }
.sidebar-foot .linkish:hover { color: #fff; }
.sidebar-scrim { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 24px 32px 6px; }
.topbar h1 { font-family: var(--display); font-size: 1.75rem; font-weight: 600; color: var(--nav); }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 3px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-2); }
.menu-btn { display: none; border: 0; background: var(--card); border-radius: 8px; width: 38px; height: 38px; font-size: 18px; box-shadow: var(--shadow); cursor: pointer; color: var(--ink); }
.content { padding: 16px 32px 60px; display: grid; gap: 18px; align-content: start; }
.flashes { padding: 0 32px; display: grid; gap: 8px; margin-top: 10px; }
.flashes:empty { display: none; }

/* ---------- cards & layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.row-inline { display: flex; align-items: center; gap: 6px; }
.stack { display: grid; gap: 8px; }
.stack-sm { display: grid; gap: 8px; margin-top: 12px; }
.card > .stack-sm:first-child { margin-top: 0; }

.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; transition: transform 0.15s, border-color 0.15s; }
.stat:hover { transform: translateY(-2px); border-color: var(--tint-3); }
.stat strong { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 600; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat:first-child { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; border: 0; position: relative; overflow: hidden; }
.stat:first-child::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 199, 255, 0.55), transparent 70%); }
.stat:first-child span { color: rgba(255, 255, 255, 0.82); }

.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-link { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink); text-decoration: none !important; transition: border-color 0.15s, background 0.15s; }
.quick-link:hover { border-color: var(--accent); background: var(--tint); }
.quick-link strong { display: block; margin-bottom: 2px; }
.quick-link span { color: var(--muted); font-size: 12.5px; }

.details { display: grid; grid-template-columns: 90px 1fr; gap: 8px 16px; margin: 0 0 8px; }
.details dt { color: var(--muted); font-weight: 600; }
.details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--tint-2); color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-used { background: var(--tint-2); color: var(--accent-2); }

.tabs { display: flex; gap: 4px; background: var(--tint-2); padding: 4px; border-radius: 10px; flex-wrap: wrap; }
.tab { padding: 7px 12px; border-radius: 7px; color: var(--muted); font-weight: 600; text-decoration: none !important; }
.tab span { opacity: 0.7; font-size: 12px; margin-left: 5px; }
.tab:hover { color: var(--ink); }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(30, 27, 75, 0.1); }

/* ---------- section lists ---------- */
.section-list { display: grid; gap: 8px; }
.section-card {
  display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s;
}
.section-card:hover { border-color: var(--tint-3); box-shadow: 0 4px 14px -8px rgba(109, 93, 246, 0.45); }
.section-card .grow { display: grid; gap: 2px; color: inherit; text-decoration: none !important; }
.section-card .grow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev-right { font-size: 22px; color: #b7acfd; line-height: 1; padding-left: 4px; }
.drag { cursor: grab; color: #b7acfd; letter-spacing: -3px; user-select: none; padding: 0 4px; font-size: 14px; }
.list-thumb { width: 60px; height: 42px; border-radius: 7px; overflow: hidden; background: var(--tint-2); flex-shrink: 0; }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- forms ---------- */
.label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--ink-2); }
.help { color: var(--muted); font-size: 12px; margin: 4px 0 6px; line-height: 1.45; }
.input {
  width: 100%; border: 1px solid #dcd7ef; border-radius: 9px; padding: 9px 11px; font: inherit; color: var(--ink); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109, 93, 246, 0.18); }
.input[readonly] { background: var(--tint); }
textarea.input { resize: vertical; line-height: 1.5; }
.input-sm { padding: 6px 10px; font-size: 13px; }
select.input { cursor: pointer; }
.prefix-input { display: flex; align-items: stretch; }
.prefix-input span { background: var(--tint-2); border: 1px solid #dcd7ef; border-right: 0; border-radius: 9px 0 0 9px; padding: 9px 10px; color: var(--muted); font-size: 12.5px; white-space: nowrap; display: flex; align-items: center; }
.prefix-input .input { border-radius: 0 9px 9px 0; }
.search .input { min-width: 240px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #dcd7ef; background: #fff; color: var(--ink);
  border-radius: 9px; padding: 9px 15px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none !important; transition: all 0.15s; white-space: nowrap;
}
.btn:hover { border-color: var(--tint-3); background: var(--tint); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #8f7cfb); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -10px rgba(109, 93, 246, 0.85); }
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-2), #7c68f5); color: #fff; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c6c6; }
.btn-danger:hover { background: #fdf2f2; border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--tint-2); border-color: transparent; color: var(--ink); }
.btn-ghost-light { background: rgba(255, 255, 255, 0.06); color: var(--nav-text); border-color: rgba(255, 255, 255, 0.14); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.24); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 12px 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-2); cursor: pointer; }
.danger-text { color: var(--danger); }
.icon-btn { width: 30px; height: 30px; border-radius: 7px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2); font-size: 15px; font-weight: 600; display: inline-grid; place-items: center; text-decoration: none !important; }
.icon-btn:hover:not(:disabled) { background: var(--tint-2); color: var(--ink); }
.icon-btn.danger:hover { background: #fdecec; color: var(--danger); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.upload-btn { cursor: pointer; }

/* ---------- editor ---------- */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.editor-main { display: grid; gap: 18px; min-width: 0; }
.editor-main > * { min-width: 0; }
.editor-side { display: grid; gap: 14px; position: sticky; top: 18px; }
.editor-side .subhead { margin-top: 0; }
.unsaved { color: var(--warn); font-weight: 700; margin-top: 10px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }

.list { display: grid; gap: 8px; }
.list-items { display: grid; gap: 8px; }
.list-items:empty { display: none; }
.list-item { border: 1px solid var(--line); border-radius: 10px; background: #fcfbff; }
.item-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line-soft); }
.item-toggle { flex: 1; text-align: left; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer; padding: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { display: inline-block; transition: transform 0.15s; color: var(--muted); }
.item-tools { display: flex; gap: 2px; flex-shrink: 0; }
.item-body { padding: 14px; }
.list-item.collapsed .item-body { display: none; }
.list-item.collapsed .item-head { border-bottom: 0; }
.list-item.collapsed .chev { transform: rotate(-90deg); }
.nav-item .item-head { border-bottom: 0; gap: 8px; padding: 8px; }
.nav-item .input { width: auto; min-width: 0; flex: 1 1 0; }
.nav-item .input:first-of-type { flex: 0 0 28%; }
.btn-add { justify-self: start; border-style: dashed; color: var(--accent-2); }
.sortable-ghost { opacity: 0.4; }

.picker { display: flex; gap: 12px; align-items: flex-start; }
.picker-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.picker-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.thumb { width: 128px; height: 84px; border-radius: 9px; border: 1px solid var(--line); background: repeating-conic-gradient(var(--tint) 0% 25%, #fff 0% 50%) 50% / 14px 14px; overflow: hidden; display: grid; place-items: center; flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb span { font-size: 11px; color: var(--muted); }

/* ---------- flash ---------- */
.flash { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; font-weight: 600; border: 1px solid; transition: opacity 0.6s; }
.flash button { border: 0; background: none; font-size: 18px; cursor: pointer; color: inherit; opacity: 0.6; }
.flash-success { background: #eaf8f0; border-color: #bfe8d0; color: #0c6b43; }
.flash-error { background: #fdeeee; border-color: #f3c7c7; color: #a42727; }
.flash-warning { background: #fff6e5; border-color: #f5dcaa; color: #8a5a0b; }
.flash ul.plain li { padding: 2px 0; }

/* ---------- media ---------- */
.dropzone { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 2px dashed var(--tint-3); background: var(--tint); flex-wrap: wrap; box-shadow: none; }
.dropzone.over { border-color: var(--accent); background: var(--tint-2); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.media-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.media-img { display: block; aspect-ratio: 4 / 3; background: repeating-conic-gradient(var(--tint) 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.media-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-meta { padding: 12px; display: grid; gap: 6px; justify-items: start; }
.media-meta strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-row { display: flex; gap: 6px; width: 100%; }

/* ---------- picker modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(19, 17, 58, 0.6); display: grid; place-items: center; z-index: 50; padding: 20px; backdrop-filter: blur(3px); }
.modal[hidden] { display: none; }
.modal-card { background: #fff; border-radius: 16px; width: min(920px, 100%); max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head .input { max-width: 260px; margin-left: auto; }
.modal-body { padding: 14px 18px; overflow-y: auto; flex: 1; min-height: 240px; }
.modal-foot { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pick { border: 1.5px solid var(--line); border-radius: 10px; background: #fff; padding: 6px; cursor: pointer; display: grid; gap: 6px; font: inherit; text-align: center; transition: border-color 0.15s, transform 0.15s; }
.pick:hover { border-color: var(--accent); transform: translateY(-1px); }
.pick.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109, 93, 246, 0.18); }
.pick img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--tint); }
.pick span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- dashboard & lists ---------- */
.setup-banner { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; align-items: center; background: #fff8e8; border: 1px solid #f5dcaa; color: #7a4d06; border-radius: var(--radius); padding: 16px 20px; }
.setup-banner li { padding: 3px 0; }
.table { width: 100%; border-collapse: collapse; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td:first-child { width: 44px; }
.right { text-align: right; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--tint); }
.row-link:hover td:first-child { border-radius: 9px 0 0 9px; }
.row-link:hover td:last-child { border-radius: 0 9px 9px 0; }
.pill-count { background: var(--tint-2); color: var(--accent-2); min-width: 30px; text-align: center; }
.pill-home { background: #e8f3ff; color: #1f6fb2; }
.pill-hire { background: #fff0ea; color: #c2552e; }
.pill-featured { background: linear-gradient(135deg, var(--accent), #8f7cfb); color: #fff; }
.list-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--tint-2); color: var(--accent-2); display: grid; place-items: center; flex-shrink: 0; }
.list-icon.sm { width: 34px; height: 34px; border-radius: 9px; }
.num { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--sky)); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 13px; flex-shrink: 0; }
.activity li { display: flex; gap: 4px; flex-wrap: wrap; }
.empty { text-align: center; padding: 30px 10px; }
.empty h2 { margin-bottom: 8px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--tint); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; max-height: 236px; overflow-y: auto; padding: 8px; border: 1px solid #dcd7ef; border-radius: 10px; background: #fcfbff; }
.icon-choice { cursor: pointer; }
.icon-choice input { position: absolute; opacity: 0; pointer-events: none; }
.icon-choice span { display: grid; place-items: center; height: 44px; border-radius: 9px; color: var(--ink-2); border: 1.5px solid transparent; transition: all 0.12s; }
.icon-choice:hover span { background: var(--tint-2); }
.icon-choice input:checked + span { background: linear-gradient(135deg, var(--accent), #8f7cfb); color: #fff; box-shadow: 0 6px 14px -8px rgba(109, 93, 246, 0.9); }
.icon-choice input:focus-visible + span { border-color: var(--accent); }

.nav-item .nav-type { flex: 0 0 168px; }
.menu-bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow-x: auto; }
.menu-bar strong { font-size: 19px; margin-right: 12px; color: var(--nav); }
.menu-links { display: flex; gap: 18px; flex: 1; color: var(--muted); font-weight: 500; white-space: nowrap; }
.menu-cta { background: linear-gradient(135deg, var(--accent), #8f7cfb); color: #fff; border-radius: 99px; padding: 7px 16px; font-weight: 600; white-space: nowrap; }

.refresh-status { display: flex; align-items: center; gap: 8px; margin: -6px 0 14px; color: var(--muted); }
.refresh-status span { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.refresh-status.bad span { background: var(--danger); }
.refresh-status.bad { color: var(--danger); }

/* ---------- sign in: split screen with honeycomb stage ---------- */
body.auth { background: var(--nav-2); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); min-height: 100vh; }
.auth-stage {
  position: relative; overflow: hidden; color: #fff; padding: 36px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background: radial-gradient(circle at 12% 8%, rgba(75, 59, 216, 0.85), transparent 45%), radial-gradient(circle at 85% 95%, rgba(109, 93, 246, 0.55), transparent 40%), radial-gradient(circle at 95% 10%, rgba(124, 199, 255, 0.25), transparent 30%), linear-gradient(160deg, var(--nav), var(--nav-2));
}
.hexfield { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-stage > *:not(.hexfield) { position: relative; }
.stage-top { display: flex; align-items: center; gap: 12px; }
.stage-top strong { display: block; font-size: 24px; }
.stage-top small { color: var(--sky); font-weight: 600; font-size: 12px; letter-spacing: 0.06em; }
.stage-copy { max-width: 560px; }
.stage-eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--tint-3); font-weight: 600; font-size: 13.5px; margin-bottom: 18px; }
.stage-eyebrow span { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(90deg, var(--accent), var(--peach)); }
.stage-copy h2 { font-family: var(--display); font-weight: 500; font-size: clamp(34px, 3.6vw, 52px); line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 30px; }
.stage-copy h2 em { font-style: italic; background: linear-gradient(90deg, #b7acfd, var(--sky) 60%, var(--peach)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.term { border-radius: 14px; background: rgba(12, 10, 40, 0.62); border: 1px solid rgba(183, 172, 253, 0.18); backdrop-filter: blur(8px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7); max-width: 500px; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid rgba(183, 172, 253, 0.12); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff7a6b; }
.term-bar i:nth-child(2) { background: #ffc56b; }
.term-bar i:nth-child(3) { background: #6be3a4; }
.term-bar span { margin-left: 8px; font: 12px 'JetBrains Mono', ui-monospace, monospace; color: #8a85b8; }
.term-body { margin: 0; padding: 14px 16px 16px; min-height: 150px; font: 13px/1.75 'JetBrains Mono', ui-monospace, monospace; color: #d8d2fe; white-space: pre-wrap; }
.t-prompt { color: var(--peach); font-weight: 500; }
.t-ok { color: #6be3a4; font-weight: 500; }
.t-wait { color: var(--sky); font-weight: 500; }
.t-cursor { display: inline-block; width: 8px; height: 15px; background: var(--sky); vertical-align: -2px; margin-left: 2px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.stage-foot { display: flex; align-items: center; gap: 10px; color: #a9a3d6; font-size: 13px; flex-wrap: wrap; }
.stage-foot b { color: var(--tint-3); font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #6be3a4; box-shadow: 0 0 0 0 rgba(107, 227, 164, 0.6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(107, 227, 164, 0); } 100% { box-shadow: 0 0 0 0 rgba(107, 227, 164, 0); } }

.auth-panel { display: grid; place-items: center; padding: 40px 28px; background: radial-gradient(circle at 80% 0%, var(--tint-2), transparent 50%), var(--bg); }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-family: var(--display); font-weight: 600; font-size: 2rem; color: var(--nav); margin: 2px 0 6px; letter-spacing: -0.02em; }
.auth-card > .muted { margin-bottom: 22px; }
.auth-card .flash { margin-bottom: 16px; }
.greet { color: var(--accent-2); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0; }

.hexlock { position: relative; width: 84px; height: 88px; margin: 10px 0 18px 10px; }
.hexlock svg { width: 100%; height: 100%; overflow: visible; }
.hexlock .cell { fill: #fff; stroke: var(--tint-3); stroke-width: 0.9; stroke-linejoin: round; transform-box: fill-box; transform-origin: center; transition: fill 0.25s, stroke 0.25s, transform 0.35s cubic-bezier(.34, 1.56, .64, 1); }
.hexlock .cell.on { stroke-width: 1.3; transform: scale(1.04); }
.hexlock .cell-a.on { fill: #d8d2fe; stroke: #d8d2fe; }
.hexlock .cell-b.on { fill: url(#hl-g); stroke: url(#hl-g); }
.hexlock .cell-c.on { fill: var(--peach); stroke: var(--peach); }
.hexlock-ring { position: absolute; inset: -12px -14px; border-radius: 50%; border: 2px solid transparent; transition: all 0.4s; pointer-events: none; }
.hexlock.full .hexlock-ring { border-color: rgba(109, 93, 246, 0.25); box-shadow: 0 0 0 6px rgba(109, 93, 246, 0.07), 0 10px 30px -8px rgba(109, 93, 246, 0.6); }
.hexlock.full svg { animation: settle 0.6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes settle { 40% { transform: rotate(-8deg) scale(1.06); } }
.hexlock.unlocking svg { animation: unlock 1.2s ease-in-out infinite; }
@keyframes unlock { 0% { transform: rotate(0); } 60% { transform: rotate(60deg) scale(0.94); } 100% { transform: rotate(60deg); } }
.hexlock.denied .cell { fill: #fde2e2; stroke: #f3a3a3; }
.hexlock-hint { color: var(--muted); font-size: 12.5px; margin: 0 0 18px; min-height: 18px; }
.auth-card.denied { animation: shake 0.45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.auth-form { display: grid; gap: 14px; }
.auth-label { display: block; font-weight: 600; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.auth-label small { color: var(--muted); font-weight: 500; }
.auth-input { display: flex; align-items: center; gap: 10px; padding: 0 12px; background: #fff; border: 1.5px solid #dcd7ef; border-radius: 12px; transition: border-color 0.15s, box-shadow 0.15s; color: var(--muted); }
.auth-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(109, 93, 246, 0.14); color: var(--accent-2); }
.auth-input input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 13px 0; font: inherit; font-size: 15px; color: var(--ink); background: transparent; }
.reveal { border: 0; background: none; padding: 6px; margin-right: -6px; border-radius: 8px; cursor: pointer; color: var(--muted); display: grid; }
.reveal:hover { background: var(--tint-2); color: var(--ink); }
.caps[hidden] { display: none; }
.caps { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--warn); }
.remember { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.remember input { width: 16px; height: 16px; accent-color: var(--accent); }
.auth-submit { margin-top: 4px; border-radius: 12px; padding: 14px 20px; font-size: 15.5px; justify-content: space-between; }
.auth-submit .arrow { transition: transform 0.2s; }
.auth-submit:hover .arrow { transform: translateX(4px); }
.auth-submit.busy { opacity: 0.85; pointer-events: none; }
.auth-meta { display: grid; gap: 6px; margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 12.5px; }
.auth-meta span { display: flex; align-items: center; gap: 8px; }
.auth-meta svg { color: var(--accent); flex-shrink: 0; }

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-stage { padding: 22px 20px 26px; gap: 16px; }
  .stage-copy h2 { font-size: 28px; margin-bottom: 0; }
  .term, .stage-foot, .stage-eyebrow { display: none; }
  .auth-panel { padding: 28px 16px 40px; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-side { position: static; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; transform: translateX(-100%); transition: transform 0.2s; }
  .sidebar.open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, 0.4); }
  .sidebar.open + .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(19, 17, 58, 0.4); }
  .menu-btn { display: block; }
  .topbar, .content, .flashes { padding-left: 16px; padding-right: 16px; }
  .grid-2, .quick { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields, .fields-3 { grid-template-columns: 1fr; }
  .search .input { min-width: 0; }
  .search { flex: 1; }
  .toolbar .row-inline { width: 100%; }
  .section-card { gap: 10px; padding: 10px; }
  .section-card .row-inline form { display: none; }
  .section-card .list-thumb { width: 48px; height: 36px; }
  .nav-item .item-head { flex-wrap: wrap; }
  .nav-item .input { flex: 1 1 100% !important; }
  .picker { flex-direction: column; }
  .setup-banner { grid-template-columns: 1fr; }
  .nav-type { flex: 1 1 100%; }
  .section-card .pill { display: none; }
}
.flash.fade { opacity: 0.55; }

/* ---------- enquiries & history ---------- */
.pill-status-new { background: #fff1e8; color: #c2551f; }
.pill-status-contacted { background: var(--tint-2); color: var(--accent-2); }
.pill-status-closed { background: #e8f6ef; color: var(--ok); }
.inquiry-row { text-decoration: none !important; }
.inquiry-row .pill { flex-shrink: 0; min-width: 78px; text-align: center; }
.inquiry-row.is-new strong { color: var(--nav); }
.message-body { white-space: normal; line-height: 1.6; overflow-wrap: anywhere; background: var(--tint); border-radius: 10px; padding: 14px 16px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
@media (max-width: 560px) {
  .inquiry-row .pill { min-width: 0; }
  .inquiry-row > .muted.nowrap { display: none; }
}

/* ---------- pages & tools ---------- */
.page-row { text-decoration: none !important; }
.page-row .pill-count { flex-shrink: 0; }
.row-inline.wrap { flex-wrap: wrap; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; border-color: #f3c9c9; }
.danger-zone h2 { margin-bottom: 4px; }
.danger-zone .muted { margin: 0; }
.db-tables li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.db-tables li:last-child { border-bottom: 0; }
.grid-2 > .card h2 + .muted { margin: 6px 0 14px; }
@media (max-width: 560px) {
  .page-row > .muted.nowrap { display: none; }
}
.danger-zone form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.danger-zone .input { width: auto; min-width: 190px; }
.grid-2 > .card form + .refresh-status, .grid-2 > .card form + .muted, .grid-2 > .card .refresh-status + .muted { margin-top: 12px; }
