/* CoeurStrike Insights — editorial dark theme */

:root {
  --bg: #0e0f12;
  --bg-elev: #16181d;
  --bg-elev-2: #1d2027;
  --line: #292d36;
  --line-soft: #20232b;
  --text: #e8e6df;
  --text-dim: #9ea0a8;
  --text-faint: #6b6d75;
  --accent: #d4a017;     /* warm gold — single accent */
  --accent-soft: #3a2e0e;
  --danger: #c9483a;
  --ok: #6aa564;
  --radius: 4px;
  --shadow: 0 1px 0 rgba(255,255,255,.03), 0 8px 24px rgba(0,0,0,.4);
  --font-serif: "Fraunces", "Times New Roman", serif;
  --font-sans: "Inter Tight", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(212,160,23,.05), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(212,160,23,.03), transparent 60%);
}

/* ---- nav --------------------------------------------------------------- */
.topnav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(14,15,18,.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--text); }
.brand-mark { color: var(--accent); font-size: 22px; line-height: 1; }
.brand-name { font-family: var(--font-serif); font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.brand-sub { color: var(--text-faint); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.navspacer { flex: 1; }
.navuser { display: inline-flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 14px; }
.inline-form { display: inline; margin: 0; }

.pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--text-dim);
}
.pill-admin { color: var(--accent); border-color: var(--accent-soft); background: rgba(212,160,23,.06); }
.pill-customer { color: var(--text-dim); }
.pill-ro { color: var(--text-faint); border-style: dashed; }

/* ---- layout ------------------------------------------------------------ */
.container {
  flex: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

.pagefoot {
  border-top: 1px solid var(--line-soft);
  padding: 22px 32px;
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: .04em;
  display: flex;
  gap: 10px;
}
.pagefoot .dot { color: var(--line); }

/* ---- type -------------------------------------------------------------- */
h1.display, .display-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -.025em;
  margin: 0 0 8px;
}
h1.display em, .display-title em {
  font-style: italic;
  color: var(--accent);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.lede {
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.5;
  color: var(--text-dim);
  max-width: 62ch;
  font-weight: 400;
}

h2.section {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -.015em;
  margin: 48px 0 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
h2.section .count {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--text-faint);
}

/* ---- cards & panels ---------------------------------------------------- */
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.customer-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, background .15s;
}
.customer-card:hover { border-color: var(--accent-soft); background: var(--bg-elev-2); }
.customer-card .cname {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -.01em;
}
.customer-card .cslug {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  word-break: break-all;
}
.customer-card .ctrls {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ---- tables ------------------------------------------------------------ */
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.tbl th, table.tbl td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
}
table.tbl th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
  border-bottom-color: var(--line);
}
table.tbl tr:hover td { background: rgba(255,255,255,.015); }
table.tbl td.mono { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); }
table.tbl td.actions { text-align: right; white-space: nowrap; }

/* ---- forms ------------------------------------------------------------- */
.form-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 34px;
  box-shadow: var(--shadow);
}
.form-card.wider { max-width: 560px; }

.form-card h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -.02em;
  margin: 0 0 4px;
}
.form-card .sub {
  color: var(--text-faint);
  font-size: 13px;
  margin-bottom: 24px;
}

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 6px;
}
input[type=text], input[type=email], input[type=password], select {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  margin-bottom: 18px;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,160,23,.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--accent);
  color: #1a1407;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: .01em;
  transition: filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn-block { width: 100%; justify-content: center; padding: 12px; }
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--line);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); filter: none; }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(201,72,58,.4);
}
.btn-danger:hover { background: rgba(201,72,58,.08); filter: none; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ---- flashes ----------------------------------------------------------- */
.flashes { margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.flash {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--text-dim);
  background: var(--bg-elev);
  border-radius: var(--radius);
  font-size: 14px;
}
.flash-success { border-left-color: var(--ok); }
.flash-error   { border-left-color: var(--danger); color: var(--text); }

/* ---- file manager ------------------------------------------------------ */
.crumbs {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 22px;
  word-break: break-all;
}
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: var(--line); margin: 0 6px; }

.fm-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}
.fm-toolbar form { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.fm-toolbar input[type=text],
.fm-toolbar input[type=file] {
  margin: 0;
  padding: 7px 10px;
  font-size: 13px;
}

.fm-row-icon { color: var(--accent); margin-right: 6px; }
.fm-row-dir  { color: var(--text-dim); margin-right: 6px; }

.url-banner {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--text-dim);
  margin-bottom: 24px;
  word-break: break-all;
}
.url-banner strong { color: var(--accent); font-weight: 500; }

/* ---- public landing ---------------------------------------------------- */
.hero {
  padding: 80px 0 60px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 40px 0; }
}
.hero .art {
  font-family: var(--font-serif);
  font-size: 280px;
  line-height: .8;
  color: var(--accent);
  opacity: .14;
  text-align: right;
  user-select: none;
}
.cta-row { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* small utilities */
.mt-0 { margin-top: 0; }
.mt-l { margin-top: 32px; }
.row-flex { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--text-faint); font-size: 13px; }
