/* Regent account area — shared styles.
 * Matches the marketing site: brand blue #155DFC, white surfaces, soft cards.
 */

:root {
  --brand: #155dfc;
  --brand-hover: #0f4fe0;
  --brand-soft: #eaf1ff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #94a3b8;
  --line: #e2e8f0;
  --surface: #ffffff;
  --bg: #f8fafc;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- top bar ---------------- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.brand-link:hover { text-decoration: none; }

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------------- layout ---------------- */

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.page-narrow { max-width: 440px; }

.page-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.page-sub {
  color: var(--ink-soft);
  margin: 0 0 32px;
  font-size: 15px;
}

/* ---------------- cards ---------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 560px;
}

.plan-card { display: flex; flex-direction: column; gap: 14px; }

.plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-name { font-size: 18px; font-weight: 700; margin: 0; }
.plan-kind {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.plan-price { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.plan-price .per { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.plan-price-note { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

.plan-desc { font-size: 14px; color: var(--ink-soft); margin: 0; }

.plan-meta { font-size: 14px; color: var(--ink-soft); }

.plan-foot { margin-top: auto; padding-top: 6px; }

/* ---------------- badges ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-active { background: var(--ok-soft); color: var(--ok); }
.badge-canceling { background: var(--warn-soft); color: var(--warn); }
.badge-inactive { background: #f1f5f9; color: var(--ink-soft); }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:focus-visible { outline: 3px solid rgba(21, 93, 252, 0.35); outline-offset: 2px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:not([disabled]):hover { background: var(--brand-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:not([disabled]):hover { border-color: var(--ink-faint); }

.btn-link {
  background: none;
  border: none;
  color: var(--brand);
  padding: 0;
  font-weight: 600;
}
.btn-link[disabled] { color: var(--ink-faint); }

.btn-block { width: 100%; }

/* ---------------- forms ---------------- */

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(21, 93, 252, 0.15);
}

.field-hint { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }

.code-input { letter-spacing: 0.35em; text-align: center; font-weight: 700; }

/* ---------------- alerts & banners ---------------- */

.alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 18px;
}
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--brand-soft); color: var(--brand); }
.alert-success { background: var(--ok-soft); color: var(--ok); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
}
.banner .btn { margin-left: auto; }
.banner-info { background: var(--brand-soft); color: var(--brand); }
.banner-success { background: var(--ok-soft); color: var(--ok); }
.banner-warn { background: var(--warn-soft); color: var(--warn); }

/* ---------------- spinner & skeletons ---------------- */

.spinner {
  width: 16px;
  height: 16px;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, #eef2f7 25%, #f6f8fb 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.skel-line { height: 14px; margin-bottom: 12px; }
.skel-line.w40 { width: 40%; }
.skel-line.w60 { width: 60%; }
.skel-line.w80 { width: 80%; }
.skel-btn { height: 42px; width: 100%; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.6s; }
  .skeleton { animation: none; }
  .btn { transition: none; }
}

/* ---------------- footer ---------------- */

.footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 40px;
  font-size: 13px;
  color: var(--ink-faint);
}
