@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700&family=Figtree:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --ink: #07090f;
  --ink-2: #0e121b;
  --panel: rgba(18, 23, 34, 0.78);
  --panel-solid: #121722;
  --line: rgba(212, 184, 150, 0.14);
  --line-strong: rgba(212, 184, 150, 0.28);
  --text: #f3eee6;
  --muted: #9aa3b5;
  --brass: #e0c49a;
  --brass-deep: #b89562;
  --ok: #7dcea0;
  --warn: #e8c36a;
  --danger: #e8929a;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --font-display: 'Bricolage Grotesque', Georgia, serif;
  --font-body: 'Figtree', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font: 15px/1.55 var(--font-body);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(224, 196, 154, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(90, 120, 160, 0.18), transparent 50%),
    linear-gradient(180deg, var(--ink-2), var(--ink) 40%, #05070c);
  background-attachment: fixed;
}

a { color: var(--brass); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.shell, header.top, main {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

header.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0 12px;
  gap: 16px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}
.brand-logo {
  display: block;
  height: 28px;
  width: auto;
}
.brand-logo.tiny { height: 18px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.brand strong { font-size: 1.35rem; font-weight: 700; }
.brand span { color: var(--muted); font: 500 0.78rem/1.2 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; }

nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

h1, h2, h3 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 0.45em;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); line-height: 1.05; max-width: 18ch; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

.lede {
  color: var(--muted);
  max-width: 42rem;
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
}

.panel, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin: 16px 0;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  padding: 48px 0 20px;
  animation: rise 0.7s ease both;
}

.trial-box {
  margin: 8px 0 22px;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: linear-gradient(165deg, rgba(224, 196, 154, 0.12), transparent 55%), var(--panel-solid);
  box-shadow: var(--shadow);
}
.trial-box h2 { margin-bottom: 0.3em; }
.trial-steps {
  margin: 0 0 16px;
  padding-left: 1.2em;
  color: var(--muted);
}
.trial-steps li { margin: 4px 0; }
.trial-box form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.trial-box form label { margin: 0; }
.trial-box form input { margin: 6px 0 0; }
.trial-box form button { margin-bottom: 2px; white-space: nowrap; }
@media (max-width: 640px) {
  .trial-box form { grid-template-columns: 1fr; }
}
.proofs, .shots { margin: 36px 0 8px; }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.proof-card, .shot-grid figure {
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-solid);
  overflow: hidden;
}
.proof-card img, .shot-grid img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.proof-card h3 { margin: 12px 16px 4px; }
.proof-card p { margin: 0 16px 16px; color: var(--muted); font-size: 0.92rem; }
.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.shot-grid img { height: 200px; }
.shot-grid figcaption {
  padding: 10px 14px 14px;
  color: var(--muted);
  font-size: 0.86rem;
}
.onboard-panel { margin-top: 20px; }

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.plan {
  position: relative;
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255,255,255,0.03), transparent 40%), var(--panel-solid);
  transition: border-color 0.2s, transform 0.2s;
}
.plan:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.plan .slots { color: var(--muted); margin: 0 0 12px; font-size: 0.92rem; }
.plan .price {
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--brass);
}
.plan .year { color: var(--muted); font-size: 0.85rem; margin: 6px 0 0; }
.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.plan-actions button {
  flex: 1 1 auto;
  padding: 9px 12px;
  font-size: 0.85rem;
}

.price-box {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 16px;
  margin: 4px 0 10px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(224, 196, 154, 0.08);
}
.price-label {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.price-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--brass);
  letter-spacing: -0.03em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge.active, .badge.issued, .badge.open { color: var(--ok); border-color: rgba(125, 206, 160, 0.35); background: rgba(125, 206, 160, 0.08); }
.badge.revoked, .badge.suspended, .badge.expired { color: var(--danger); border-color: rgba(232, 146, 154, 0.35); background: rgba(232, 146, 154, 0.08); }
.badge.pending { color: var(--warn); border-color: rgba(232, 195, 106, 0.35); background: rgba(232, 195, 106, 0.08); }
.badge.closed, .badge.cancelled { color: var(--muted); border-color: var(--line); background: rgba(255,255,255,0.04); }

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
input, select, textarea {
  width: 100%;
  margin: 6px 0 14px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(7, 9, 15, 0.65);
  color: var(--text);
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brass-deep);
  box-shadow: 0 0 0 3px rgba(224, 196, 154, 0.15);
}

button, .btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: 600 0.95rem/1 var(--font-body);
  border-radius: 12px;
  padding: 11px 16px;
  color: #1a140c;
  background: linear-gradient(135deg, #f0d7b0, var(--brass-deep));
  box-shadow: 0 8px 24px rgba(184, 149, 98, 0.25);
  transition: transform 0.15s, filter 0.15s;
}
button:hover, .btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
button.quiet, .btn.quiet {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
button.danger, .btn.danger {
  background: rgba(232, 146, 154, 0.12);
  color: var(--danger);
  border: 1px solid rgba(232, 146, 154, 0.3);
  box-shadow: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 4px 14px;
}
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid .span-2 { grid-column: span 1; } }

.table-wrap { overflow-x: auto; margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
td.mono, .mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 0.82rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions button { padding: 7px 10px; font-size: 0.78rem; }

.muted { color: var(--muted); font-size: 0.9rem; }
.error { color: var(--danger); }
.ok { color: var(--ok); }

.who-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 8px 0 4px;
}
.who-bar strong { font-family: var(--font-display); }

/* —— Admin shell —— */
body.admin-body {
  min-height: 100vh;
  margin: 0;
}
.admin-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0 24px 24px;
  box-sizing: border-box;
}
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0 12px;
  gap: 16px;
}
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: stretch;
}
.admin-main {
  min-width: 0;
}
@media (max-width: 860px) {
  .admin-layout { grid-template-columns: 1fr; }
}

.side-nav {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
}
.side-nav button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--muted);
  border: 0;
  box-shadow: none;
  padding: 11px 12px;
  border-radius: 12px;
  font-weight: 600;
}
.side-nav button:hover { background: rgba(255,255,255,0.04); color: var(--text); transform: none; filter: none; }
.side-nav button.active {
  background: linear-gradient(135deg, rgba(224,196,154,0.18), rgba(224,196,154,0.06));
  color: var(--brass);
  border: 1px solid var(--line-strong);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.stat .label { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.stat .value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin-top: 4px;
  letter-spacing: -0.03em;
}

.login-stage {
  min-height: 0;
  display: block;
  padding: 8px 0 24px;
}
.login-panel {
  width: min(420px, 100%);
  animation: rise 0.55s ease both;
}
.login-panel h2 { margin-bottom: 0.2em; }
.login-panel .lede { margin-bottom: 1.2rem; font-size: 0.95rem; }

.email-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.email-cell .company { color: var(--muted); font-size: 0.8rem; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.section-enter { animation: rise 0.45s ease both; }

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}
button.linkish, .linkish {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--brass) !important;
  padding: 0 !important;
  font-weight: 600;
  text-decoration: underline;
  transform: none !important;
}
button.linkish:hover { filter: none !important; }

.contact-link {
  color: var(--brass);
  font-weight: 600;
  font-size: 0.92rem;
  margin-right: 4px;
  text-decoration: none;
}
.contact-link:hover { text-decoration: underline; }
.contact-line { margin-top: -0.6rem; }
.contact-panel { margin-top: 18px; scroll-margin-top: 24px; }
.contact-panel form { display: grid; gap: 12px; max-width: 560px; }

.downloads-panel { margin-top: 8px; }
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.download-grid .btn {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  margin: 4px 0 10px;
}
.download-grid .btn:hover { text-decoration: none; }

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--brass); font-weight: 600; }
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 16px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.92rem;
  line-height: 1.45;
}
.check-row input[type="checkbox"] {
  width: auto;
  margin: 3px 0 0;
  accent-color: var(--brass-deep);
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 28px 0 8px;
  align-items: start;
}
.legal-nav {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
}
.legal-nav a {
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}
.legal-nav a:hover { background: rgba(255,255,255,0.04); color: var(--text); text-decoration: none; }
.legal-nav a.active {
  background: linear-gradient(135deg, rgba(224,196,154,0.18), rgba(224,196,154,0.06));
  color: var(--brass);
  border: 1px solid var(--line-strong);
}
.legal-article { padding: 32px 36px 40px; }
.legal-article h1 { max-width: none; font-size: clamp(1.8rem, 3vw, 2.4rem); margin-top: 0.2em; }
.legal-article section + section {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.legal-article h2 { margin-top: 1.4em; font-size: 1.15rem; }
.legal-article p, .legal-article li { color: #e8e4dc; }
.legal-article ul { padding-left: 1.2em; }
.legal-article li { margin: 0.4em 0; }
.legal-kicker {
  margin: 0 0 8px;
  font: 700 0.75rem/1 var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}
.legal-end { margin: 40px 0 0; }
.brand { text-decoration: none; color: inherit; }
a.brand:hover { text-decoration: none; }

@media (max-width: 800px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .legal-article { padding: 22px; }
}

.ticket-card { margin: 0 0 14px; box-shadow: none; }
.ticket-card .who-bar { margin-bottom: 8px; }
.ticket-thread {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}
.ticket-msg {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
}
.ticket-msg.admin { border-color: rgba(184, 149, 98, 0.35); }
.ticket-msg p { margin: 0; white-space: pre-wrap; }
.ticket-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.ticket-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}
.ticket-actions-row label { flex: 1 1 160px; margin: 0; }
.ticket-list { display: grid; gap: 12px; }
.ticket-reply { display: grid; gap: 10px; margin-top: 4px; }
.ticket-reply textarea { min-height: 84px; }
.ticket-reply-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ticket-desk-panel { padding: 22px 24px 20px; }
.ticket-desk-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}
.ticket-desk-head h2 { margin: 0; }
.ticket-desk-head .legal-kicker { margin: 0 0 6px; }
.ticket-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ticket-counts span {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ticket-counts strong { color: var(--text); font-size: 0.85rem; letter-spacing: 0; }
.ticket-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(240px, 1.4fr) 140px 140px 160px;
  gap: 12px;
  align-items: end;
}
.ticket-toolbar label span,
.ticket-search span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ticket-search input {
  background: rgba(7, 9, 15, 0.55);
  border-color: var(--line-strong);
}
.ticket-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 14px 0 8px;
}
.ticket-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.chip:hover { transform: none; filter: none; color: var(--text); }
.chip.active {
  color: #1a140c;
  background: linear-gradient(135deg, #f0d7b0, var(--brass-deep));
  border-color: transparent;
}
.ticket-recent {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
  margin: 4px 0 8px;
}
.ticket-recent-label {
  width: 100%;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.recent-pill {
  border: 1px solid var(--line);
  background: rgba(224, 196, 154, 0.06);
  color: var(--brass);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.78rem;
  box-shadow: none;
}
.recent-pill:hover { transform: none; filter: none; }
.ticket-meta { margin: 0 0 10px; font-size: 0.82rem; }
.ticket-split {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 16px;
  min-height: 520px;
}
.ticket-inbox, .ticket-detail {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(7, 9, 15, 0.35);
  min-height: 520px;
}
.ticket-inbox { overflow: auto; padding: 8px; }
.ticket-row {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 1px solid transparent;
  box-shadow: none;
  border-radius: 12px;
  padding: 12px 12px 11px;
}
.ticket-row:hover { transform: none; filter: none; background: rgba(255,255,255,0.04); }
.ticket-row.active {
  background: linear-gradient(135deg, rgba(224,196,154,0.16), rgba(224,196,154,0.04));
  border-color: var(--line-strong);
}
.ticket-row .row-top, .ticket-row .row-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.ticket-row .email { color: var(--brass); font-size: 0.82rem; font-weight: 700; }
.ticket-row .when { color: var(--muted); font-size: 0.72rem; }
.ticket-row .subject { color: var(--text); font-weight: 600; }
.ticket-row .preview { color: var(--muted); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-detail { padding: 18px 20px 16px; display: flex; flex-direction: column; }
.ticket-detail-head { margin-bottom: 12px; }
.ticket-detail-head h3 { margin: 4px 0 0; font-size: 1.25rem; }
.ticket-timeline {
  display: grid;
  gap: 0;
  overflow: auto;
  flex: 1;
  padding-right: 4px;
}
.timeline-item {
  position: relative;
  padding: 0 0 16px 22px;
  border-left: 1px solid var(--line);
  margin-left: 7px;
}
.timeline-item:last-child { padding-bottom: 4px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px rgba(224, 196, 154, 0.12);
}
.timeline-item.status::before { background: var(--warn); }
.timeline-item.reply::before { background: var(--ok); }
.timeline-item .muted { margin: 0 0 4px; font-size: 0.75rem; }
.ticket-empty {
  display: grid;
  place-items: center;
  min-height: 420px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}
.ticket-empty strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 6px; }
@media (max-width: 1100px) {
  .ticket-toolbar { grid-template-columns: 1fr 1fr; }
  .ticket-split { grid-template-columns: 1fr; min-height: 0; }
  .ticket-inbox, .ticket-detail { min-height: 280px; }
}
