@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=IBM+Plex+Mono:wght@400;500&family=Archivo:wght@300;400;500;600&display=swap');

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --bg:         #0c0b09;
  --bg2:        #111009;
  --surface:    #161410;
  --surface2:   #1d1b16;
  --border:     #2a2720;
  --border2:    #363228;
  --text:       #e8e2d6;
  --text2:      #a09880;
  --text3:      #5c5748;
  --accent:     #c9a96e;
  --accent-lo:  rgba(201,169,110,0.1);
  --accent-dim: rgba(201,169,110,0.35);
  --red:        #c0503a;
  --red-lo:     rgba(192,80,58,0.1);
  --green:      #6a9e6f;
  --green-lo:   rgba(106,158,111,0.1);

  --font-serif: 'Libre Baskerville', Georgia, serif;
  --font-sans:  'Archivo', sans-serif;
  --font-mono:  'IBM Plex Mono', monospace;

  --max-w:      1100px;
  --radius:     6px;
  --radius-lg:  10px;
  --transition: 0.15s ease;
}

/* ── Base ────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.75; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Nav ─────────────────────────────────────────────────────── */
nav {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky; top: 0;
  background: var(--bg);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  color: var(--text2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links a:hover { color: var(--text); opacity: 1; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.btn-primary:hover { background: #d4b57a; border-color: #d4b57a; opacity: 1; color: var(--bg); }

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border-color: var(--border2);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text3); opacity: 1; }

.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn-danger:hover { background: var(--red-lo); opacity: 1; }

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 14px; }

/* ── Form elements ───────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 300;
  padding: 11px 14px;
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent-dim);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c5748' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ── Card ────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* ── Table ───────────────────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 0 16px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }

/* ── Badge / Pill ────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-active  { background: var(--green-lo); color: var(--green); }
.badge-revoked { background: var(--red-lo);   color: var(--red);   }
.badge-trial   { background: var(--surface2); color: var(--text3); }
.badge-pro     { background: var(--accent-lo); color: var(--accent); }
.badge-studio  { background: rgba(100,130,200,0.1); color: #8aabdc; }

/* ── Monospace key display ───────────────────────────────────── */
.key-display {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--accent);
  letter-spacing: 0.04em;
  word-break: break-all;
}

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid;
  margin-bottom: 16px;
}
.alert-error   { background: var(--red-lo);   border-color: var(--red);   color: var(--red);   }
.alert-success { background: var(--green-lo); border-color: var(--green); color: var(--green); }
.alert-info    { background: var(--accent-lo);border-color: var(--accent-dim); color: var(--accent); }

/* ── Usage bar ───────────────────────────────────────────────── */
.usage-bar {
  height: 4px;
  background: var(--border2);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.usage-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.usage-bar-fill.danger { background: var(--red); }

/* ── Page header ─────────────────────────────────────────────── */
.page-header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 14px;
  color: var(--text2);
  margin-top: 6px;
}

/* ── Divider ─────────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── Utility ─────────────────────────────────────────────────── */
.text-muted  { color: var(--text2); }
.text-small  { font-size: 12px; }
.text-mono   { font-family: var(--font-mono); font-size: 12px; }
.flex        { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8  { margin-top:  8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom:  8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav-links { display: none; }
  .card { padding: 20px; }
}
