/* Palette/type adapted from dashboard/src/tokens.css (MIT, outside cloud/)
   for visual consistency with the rest of Nextora Clips. */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --paper: #010d25;
  --paper-2: #071736;
  --paper-3: #14274d;
  --ink: #fafafa;
  --ink-2: #e3e5e8;
  --muted: #7282a1;
  --rule: #1b2c52;
  --accent: #1693f3;
  --accent-ink: #eaf6ff;
  --ok: #34d399;
  --warn: #f5b642;
  --radius: 10px;
  --radius-input: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--rule);
}
.brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.topnav { display: flex; align-items: center; gap: 20px; }
.topnav a { color: var(--muted); text-decoration: none; }
.topnav a:hover { color: var(--ink); }

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px;
}
/* The agency table (6 columns incl. billing) needs more room than a login
   card does -- widen just the page that holds it, everything else keeps
   the narrower, centered reading width. */
.page:has(.card-wide) { max-width: 1100px; }

.card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 32px;
}
.card.narrow { max-width: 420px; margin: 0 auto; }

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: lowercase;
  margin: 0 0 8px;
}

h1 {
  font-size: 28px;
  color: var(--ink);
  margin: 0 0 12px;
  text-transform: lowercase;
}

.muted { color: var(--muted); font-size: 14px; }

.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.row-form { display: flex; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.row-form .input-field { flex: 1; min-width: 180px; }
.inline-form { display: inline; margin: 0; }
.row-form-tight { display: inline-flex !important; gap: 6px; }
.input-sm { padding: 5px 8px; font-size: 12px; width: 110px; }

.input-field {
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius-input);
  color: var(--ink);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
}
.input-field:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-input);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-quiet, .link-btn {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-2);
  border-radius: var(--radius-input);
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.btn-quiet:hover, .link-btn:hover { border-color: var(--accent); color: var(--ink); }
.link-btn { border: none; padding: 0; text-decoration: underline; color: var(--muted); }

.notice {
  border-radius: var(--radius-input);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}
.notice-warn { background: rgba(245, 182, 66, 0.12); color: var(--warn); border: 1px solid rgba(245, 182, 66, 0.3); }
.notice-ok { background: rgba(52, 211, 153, 0.12); color: var(--ok); border: 1px solid rgba(52, 211, 153, 0.3); }

.badge {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: lowercase;
}
.badge-ok { background: rgba(52, 211, 153, 0.15); color: var(--ok); }
.badge-warn { background: rgba(245, 182, 66, 0.15); color: var(--warn); }
.badge-accent { background: rgba(22, 147, 243, 0.15); color: var(--accent); }
.badge-danger { background: rgba(248, 113, 113, 0.15); color: #f87171; }

.readout-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 20px 0; }
.readout-list dt { color: var(--muted); font-size: 13px; }
.readout-list dd { margin: 0; color: var(--ink); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  vertical-align: top;
}
.table th { color: var(--muted); font-weight: 500; text-transform: lowercase; }
.row-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.manage { position: relative; }
.manage summary {
  list-style: none;
  display: inline-block;
}
.manage summary::-webkit-details-marker { display: none; }
.manage[open] summary { border-color: var(--accent); color: var(--ink); }
.manage-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  background: var(--paper-3);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.manage-panel .row-form-tight { display: flex !important; }
.manage-panel .input-sm { width: auto; flex: 1; }
.manage-hint { margin: 0; }

.btn-tiny { padding: 3px 8px; font-size: 11px; margin-top: 4px; }
.billing-amount { margin-top: 6px; }
.billing-amount .input-sm { width: 100px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }

.signed-in-as { margin: -4px 0 4px; }

.section-title {
  font-size: 13px;
  color: var(--ink-2);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  margin: 32px 0 4px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.section-title:first-of-type { margin-top: 24px; padding-top: 0; border-top: none; }
.section-empty { margin: 8px 0 0; font-size: 13px; }

.hero { text-align: center; padding: 40px 0 56px; }
.hero-title {
  font-size: 40px;
  color: var(--ink);
  margin: 8px 0 16px;
  text-transform: lowercase;
  line-height: 1.15;
}
.hero-sub { color: var(--muted); font-size: 16px; max-width: 560px; margin: 0 auto 32px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-primary, .hero-actions .btn-quiet {
  padding: 12px 22px;
  font-size: 15px;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn-primary.btn-accent { background: var(--ok); color: #04150e; }
.btn-primary.btn-accent:hover { filter: brightness(1.08); }
.hero-note { margin-top: 16px; font-size: 12px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.feature-title { font-size: 16px; color: var(--ink); margin: 4px 0 8px; text-transform: lowercase; }

.signup-footnote { margin-top: 16px; }
.signup-footnote a { color: var(--accent); }
