/* The Paradox Labs theme - the same tokens and fonts as the website's
   web/src/app/globals.css (violet void, plasma/violet accents, Chakra Petch
   headings, IBM Plex Sans text). Change them there first, then here. */

:root {
  --bg: #0a0714;
  --panel: #140e24;
  --panel-2: #1b1430;
  --border: rgba(237, 233, 247, 0.09);
  --text: #ede9f7;
  --muted: #9b93b8;
  --accent: #a855f7;   /* plasma */
  --accent-2: #7c3aed; /* violet */
  --ok: #3ecf8e;
  --warn: #f0b94a;
  --danger: #f06a6a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
h1, h2 { font-family: "Chakra Petch", "IBM Plex Sans", sans-serif; }
code { font-family: "IBM Plex Mono", ui-monospace, monospace; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.wrap { max-width: 880px; margin: 0 auto; padding: 32px 20px 80px; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; padding-bottom: 16px; position: relative; }
/* The seam: the website's plasma-to-violet rule, under the page header. */
header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 25%, var(--accent-2) 75%, transparent);
}
header h1 { font-size: 22px; margin: 0; letter-spacing: 0.01em; }
.btn, #signin .btn {
  display: inline-block;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}
.btn:hover { box-shadow: 0 10px 30px -12px rgba(168, 85, 247, 0.6); transform: translateY(-1px); }
.btn[disabled] { opacity: 0.6; cursor: default; box-shadow: none; transform: none; }
.card { transition: border-color 0.25s, box-shadow 0.25s; }
.card:hover { border-color: rgba(168, 85, 247, 0.35); box-shadow: 0 14px 40px -18px rgba(168, 85, 247, 0.25); }
@media (prefers-reduced-motion: reduce) { .btn, .card { transition: none; } .btn:hover { transform: none; } }
#orgSwitcher select { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; }

section { margin-bottom: 36px; }
h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 12px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.card .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.card.locked .dot { background: var(--danger); }
.card.past_due .dot { background: var(--warn); }
.card .main { flex: 1; min-width: 0; }
.card .name { font-weight: 600; }
.card .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card .reason { color: var(--warn); font-size: 13px; margin-top: 4px; }
.card a.action,
.card button.action {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.card a.action:hover,
.card button.action:hover { border-color: var(--accent); }

.card.unowned { opacity: 0.7; }
.card.unowned .dot { background: var(--border); }
.card .price { color: var(--muted); font-size: 13px; margin-top: 2px; }

.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

#signin {
  text-align: center;
  padding: 80px 20px;
}
#signin .btn { margin-top: 16px; }

.placeholder {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
}

/* Cart. Same card vocabulary as the sections above it, one row per item. */
.cart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.cart-row .name { font-weight: 600; flex: 1; min-width: 0; }
.cart-row .meta { color: var(--muted); font-size: 13px; }
.cart-row .cart-price { color: var(--text); font-size: 13px; white-space: nowrap; }
.cart-row button.action {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.cart-row button.action:hover { border-color: var(--accent); }

.cart-bundle { color: var(--accent); font-size: 14px; margin-top: 10px; font-weight: 600; }
.cart-total { font-size: 18px; font-weight: 600; margin-top: 6px; }
.cart-error { color: var(--danger); font-size: 14px; margin-top: 10px; }
#payment { margin-top: 16px; }
#payBtn { margin-top: 12px; }

#checkoutBtn { margin-top: 14px; cursor: pointer; }
#checkoutBtn[disabled] { opacity: 0.6; cursor: default; }

/* Plan picker on a card that offers more than one. */
.card .plan-select {
  margin-top: 6px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  max-width: 100%;
}
.card .plan-select:hover { border-color: var(--accent); }

/* Policy text on the agreement gate. Scrollable so a long document does not
   push the accept button off the end of the page. */
.policy-text {
  white-space: pre-wrap;
  max-height: 46vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.placeholder a { color: var(--accent); }

/* Brand row: the website's fox-and-flask badge and PARADOXLABS wordmark. */
.brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--text); text-decoration: none; }
.brand img { border-radius: 50%; box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.35), 0 4px 14px rgba(168, 85, 247, 0.3); }
.brand .wm { font-family: "Chakra Petch", sans-serif; font-weight: 600; letter-spacing: 0.04em; font-size: 16px; }
.seam-text { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
