/* Online Travels — unified site stylesheet.
 *
 * Single source of truth for landing, legal, help, status, recovery and
 * the FastAPI web cabinet. Hosted at https://www.onlinetravels.pro/_assets/site.css
 * and referenced by absolute URL from every subdomain so all pages
 * stay visually identical regardless of which nginx vhost serves them.
 */

:root {
  --bg: #f7f7f5;
  --bg-alt: #ffffff;
  --fg: #1a1d1f;
  --fg-muted: #6b7280;
  --accent: #2c5e6f;
  --accent-strong: #1f4754;
  --accent-soft: rgba(44, 94, 111, 0.08);
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  --radius: 14px;
  --radius-sm: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-alt: #181b21;
    --fg: #e8eaee;
    --fg-muted: #98a0aa;
    --accent: #6ec1d6;
    --accent-strong: #95d2e2;
    --accent-soft: rgba(110, 193, 214, 0.12);
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 36px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

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

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 22px 64px;
}

main.narrow { max-width: 720px; }
/* The unified cabinet/marketing page width. We picked 980px as a single
 * value rather than juggling separate "wide for dashboard, narrow for
 * text" containers, because mixing 1100px wrappers with 760px reading
 * blocks inside them produced the visually-misaligned layout the user
 * called out — hero on full width, text centered, cards on full width
 * again. 980px is wide enough for the billing table (5 columns) and
 * a 3-up KPI grid, narrow enough that prose blocks read naturally
 * without forcing a max-width override on every section. */
main.cabinet { max-width: 980px; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.6rem; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2rem 0 0.6rem; letter-spacing: -0.01em; font-weight: 600; }
h3 { font-size: 1.05rem; line-height: 1.35; margin: 0 0 0.3rem; font-weight: 600; }

p, ul, ol { margin: 0 0 1rem; }
p.lead { font-size: 1.1rem; color: var(--fg-muted); }

ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.3rem; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 1px 6px; border-radius: 4px;
  word-break: break-all;
}

/* ------------------------------------------------------------------
 * Site header (unified across all pages, including the web cabinet)
 * ----------------------------------------------------------------*/

header.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-alt) 78%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  position: sticky; top: 0; z-index: 10;
}

header.site-header .inner {
  max-width: 980px; margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

header.site-header .brand {
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
  white-space: nowrap;
}
header.site-header .brand:hover { text-decoration: none; }

header.site-header .primary-nav {
  display: flex;
  flex: 1;
  gap: 16px;
  flex-wrap: wrap;
}
header.site-header .primary-nav a {
  color: var(--fg-muted);
  white-space: nowrap;
}
header.site-header .primary-nav a:hover,
header.site-header .primary-nav a.is-active {
  color: var(--fg);
  text-decoration: none;
}

header.site-header .header-cta {
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
header.site-header .header-cta:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  background: var(--accent-strong);
}

@media (max-width: 640px) {
  header.site-header .inner { gap: 10px; }
  header.site-header .primary-nav { order: 3; flex-basis: 100%; gap: 12px; font-size: 0.92rem; }
  header.site-header .brand { flex: 1; }
}

/* ------------------------------------------------------------------
 * Hero blocks
 * ----------------------------------------------------------------*/

.hero { padding: 36px 0 24px; }
.hero .eyebrow {
  display: inline-block;
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem;
  color: var(--accent); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
  font-weight: 600;
}
.hero h1 { font-size: 2.5rem; margin: 6px 0 14px; }
.hero .tagline { font-size: 1.4rem; color: var(--fg-muted); margin: 0 0 14px; font-weight: 500; }
.hero .lead { max-width: 620px; }

.hero-compact { padding: 18px 0 8px; }
.hero-compact h1 { font-size: 2rem; margin-top: 4px; }

/* ------------------------------------------------------------------
 * Buttons / CTAs
 * ----------------------------------------------------------------*/

.cta-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px;
}
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 500; font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary {
  background: var(--bg-alt); color: var(--fg);
  border-color: var(--border);
}

/* ------------------------------------------------------------------
 * Cards / lists / tables
 * ----------------------------------------------------------------*/

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 16px 0 8px;
}
.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.card .icon { font-size: 1.6rem; line-height: 1; margin-bottom: 8px; display: block; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--fg-muted); margin: 0; font-size: 0.95rem; }

.facts ul { list-style: none; padding: 0; }
.facts li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg-muted);
  position: relative;
  padding-left: 26px;
}
.facts li:last-child { border-bottom: 0; }
.facts li::before {
  content: "·"; color: var(--accent); position: absolute;
  left: 8px; top: 6px; font-size: 1.4rem; line-height: 1;
}

.links {
  margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px;
}
.links a {
  display: inline-block;
  padding: 8px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-size: 0.92rem;
  transition: background 0.15s ease;
}
.links a:hover { background: var(--accent-soft); text-decoration: none; }

table {
  width: 100%; border-collapse: collapse;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 8px 0 16px;
}
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
th { background: var(--accent-soft); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.status-ok { color: #1f8a4c; font-weight: 500; }
.status-bad { color: #c92a2a; font-weight: 500; }
@media (prefers-color-scheme: dark) {
  .status-ok { color: #4ade80; }
  .status-bad { color: #f87171; }
}

/* Cards used by status / landing for component grids */
.schedule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.schedule .day {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.schedule .day h3 {
  color: var(--accent); font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px;
}
.schedule .day ul { list-style: none; padding: 0; margin: 0; }
.schedule .day li { padding: 4px 0; color: var(--fg-muted); font-size: 0.95rem; border-bottom: 1px solid var(--border); }
.schedule .day li:last-child { border-bottom: 0; }

.price-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin: 12px 0;
}
.price-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.price-card .name { color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.82rem; margin-bottom: 8px; }
.price-card .price { font-size: 2rem; font-weight: 700; color: var(--accent); margin: 4px 0 10px; }
.price-card .descr { color: var(--fg-muted); font-size: 0.92rem; margin: 0; }

.contacts ul { list-style: none; padding: 0; }
.contacts li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.contacts li:last-child { border-bottom: 0; }
.contacts .icon { display: inline-block; width: 28px; }

.intro-text { font-size: 1.05rem; color: var(--fg-muted); margin-bottom: 1.4rem; }

.intro-block {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 8px 0 20px;
  color: var(--fg-muted);
  box-shadow: var(--shadow);
}
.intro-block p:last-child { margin-bottom: 0; }
.intro-block ol, .intro-block ul { color: var(--fg); }

.text-block {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.text-block > h2 { margin-top: 0; }
.text-block ol, .text-block ul { padding-left: 1.4rem; }
.text-block li { margin-bottom: 0.4rem; }
.text-block p:last-child { margin-bottom: 0; }

.notes-list { display: flex; flex-direction: column; gap: 12px; }
.note {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
}
.note-date {
  display: inline-block;
  font-size: 0.78rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.06em;
  font-weight: 600;
  background: var(--accent-soft);
  padding: 3px 10px; border-radius: 999px;
  margin-bottom: 8px;
}
.note h3 { font-size: 1.05rem; margin: 0 0 6px; }
.note p { color: var(--fg-muted); margin: 0; font-size: 0.95rem; }

.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.status-dot-ok { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
.status-dot-bad { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.18); }

.about-section {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow);
}
.about-section p { color: var(--fg-muted); }
.about-section p:last-child { margin-bottom: 0; }

.back-link { display: inline-block; margin-top: 16px; color: var(--fg-muted); }
.back-link:hover { color: var(--fg); }

/* ------------------------------------------------------------------
 * Forms (web cabinet)
 * ----------------------------------------------------------------*/

.form-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.form-card .form-row { margin: 0 0 14px; }
.form-card label {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 6px;
}
.form-card input[type=text],
.form-card input[type=password],
.form-card input[type=number],
.form-card input[type=tel] {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-card .form-actions {
  margin-top: 6px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Submit + naked button styling — applies inside .form-card AND on any
 * standalone form inside main.cabinet (security tab, notifications tab,
 * confirm screens), so we don't have to wrap every action in a form-card.
 * Default = primary; .btn-secondary on the same element flips it. */
main.cabinet form button[type=submit],
main.cabinet form button:not([type]),
.form-card button[type=submit],
.form-card button:not([type]),
.cabinet-action-btn {
  display: inline-block;
  padding: 10px 18px;
  font: inherit;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
main.cabinet form button[type=submit]:hover,
main.cabinet form button:not([type]):hover,
.form-card button[type=submit]:hover,
.form-card button:not([type]):hover,
.cabinet-action-btn:hover {
  transform: translateY(-1px);
  background: var(--accent-strong);
}
/* Secondary tone for less-loud actions: change-password CTA, "back",
 * "cancel", "regenerate codes". */
main.cabinet form button.btn-muted,
.form-card button.btn-muted,
.cabinet-action-btn.btn-muted {
  background: var(--bg-alt);
  color: var(--fg);
  border-color: var(--border);
  box-shadow: none;
}
main.cabinet form button.btn-muted:hover,
.form-card button.btn-muted:hover,
.cabinet-action-btn.btn-muted:hover {
  background: var(--accent-soft);
}
main.cabinet form button.btn-danger,
.cabinet-action-btn.btn-danger {
  background: #c92a2a;
}
main.cabinet form button.btn-danger:hover,
.cabinet-action-btn.btn-danger:hover {
  background: #a01717;
}
@media (prefers-color-scheme: dark) {
  main.cabinet form button.btn-danger,
  .cabinet-action-btn.btn-danger { background: #ef4444; }
  main.cabinet form button.btn-danger:hover,
  .cabinet-action-btn.btn-danger:hover { background: #dc2626; }
}

/* Forms outside .form-card still need usable text inputs / selects in
 * the cabinet — this matches .form-card input styling so the security
 * and notifications tabs don't render naked HTML controls. */
main.cabinet form select,
main.cabinet form input[type=text],
main.cabinet form input[type=password],
main.cabinet form input[type=email],
main.cabinet form input[type=number],
main.cabinet form input[type=tel] {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
main.cabinet form select:focus,
main.cabinet form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
main.cabinet form .form-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.form-card .form-help {
  color: var(--fg-muted);
  font-size: 0.88rem;
  margin: 0;
}
.form-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #b91c1c;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.92rem;
}
@media (prefers-color-scheme: dark) {
  .form-error { color: #fda4a4; background: rgba(248, 113, 113, 0.10); border-color: rgba(248, 113, 113, 0.30); }
}
.form-success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #15803d;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.92rem;
}
@media (prefers-color-scheme: dark) {
  .form-success { color: #86efac; background: rgba(74, 222, 128, 0.10); border-color: rgba(74, 222, 128, 0.30); }
}
.subscription-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.subscription-card h2 { margin-top: 0; font-size: 1.15rem; }
.subscription-card p { margin: 6px 0; }
.account-id-pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 0.92rem;
}

/* ------------------------------------------------------------------
 * Cabinet — tab navigation strip
 * ----------------------------------------------------------------*/

.cabinet-tabs {
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
  border-bottom: 1px solid var(--border);
  margin: 0 0 22px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.cabinet-tabs::-webkit-scrollbar { height: 4px; }
.cabinet-tabs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.cabinet-tabs a {
  padding: 10px 12px;
  color: var(--fg-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  font-size: 0.95rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.cabinet-tabs a:hover {
  color: var(--fg);
  text-decoration: none;
}
.cabinet-tabs a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 500;
}
.cabinet-tabs .logout-tab {
  margin-left: auto;
  border-bottom-color: transparent;
  color: var(--fg-muted);
}
.cabinet-tabs .logout-tab:hover { color: #c92a2a; }
@media (prefers-color-scheme: dark) {
  .cabinet-tabs .logout-tab:hover { color: #f87171; }
}
@media (max-width: 640px) {
  .cabinet-tabs a { padding: 8px 10px; font-size: 0.9rem; }
}

/* ------------------------------------------------------------------
 * Cabinet dashboard — KPI grid widgets
 * ----------------------------------------------------------------*/

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}
.kpi-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi-card .kpi-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  color: var(--fg-muted);
}
.kpi-card .kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.kpi-card .kpi-sub {
  font-size: 0.88rem;
  color: var(--fg-muted);
}

/* Landing-page feature cards — same visual language as the cabinet's
 * KPI cards (eyebrow label / big headline / muted description) but
 * with room for an emoji icon next to the title. Used in
 * static-onlinetravels/build.py LANDING_BODY. */
.feature-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.feature-card .feature-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 600;
}
.feature-card .feature-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fg);
}
.feature-card .feature-title .feature-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.feature-card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
}

/* ------------------------------------------------------------------
 * Progress bars (traffic usage on the dashboard)
 * ----------------------------------------------------------------*/

.progress {
  width: 100%;
  height: 8px;
  background: var(--accent-soft);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0 4px;
}
.progress > .progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress > .progress-bar.is-warn { background: #d97706; }
.progress > .progress-bar.is-bad  { background: #dc2626; }

/* ------------------------------------------------------------------
 * Cabinet — copyable code rows
 * ----------------------------------------------------------------*/

.code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 6px 0 12px;
}
.code-row code {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  word-break: break-all;
  white-space: pre-wrap;
  display: block;
}
.code-row .copy-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-size: 0.88rem;
  white-space: nowrap;
}
.code-row .copy-link:hover { background: var(--accent-soft); text-decoration: none; }

/* ------------------------------------------------------------------
 * QR code container
 * ----------------------------------------------------------------*/

.qr-block {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: inline-block;
  text-align: center;
  margin: 10px 0;
}
.qr-block svg {
  display: block;
  width: 220px;
  height: 220px;
  background: #fff;
  border-radius: var(--radius-sm);
}
.qr-block .qr-caption {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--fg-muted);
}

/* ------------------------------------------------------------------
 * Bot link cards (notifications tab + recovery)
 * ----------------------------------------------------------------*/

.bot-link-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bot-link-card .bot-name { font-weight: 600; }
.bot-link-card .bot-state {
  font-size: 0.84rem;
  color: var(--fg-muted);
}
.bot-link-card .bot-state.is-ok    { color: #1f8a4c; }
.bot-link-card .bot-state.is-warn  { color: #c2410c; }
.bot-link-card .bot-state.is-bad   { color: #c92a2a; }
@media (prefers-color-scheme: dark) {
  .bot-link-card .bot-state.is-ok    { color: #4ade80; }
  .bot-link-card .bot-state.is-warn  { color: #fb923c; }
  .bot-link-card .bot-state.is-bad   { color: #f87171; }
}

/* ------------------------------------------------------------------
 * Billing history table
 * ----------------------------------------------------------------*/

.billing-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  margin: 8px 0 16px;
}
.billing-table {
  margin: 0;
  border: 0;
  border-radius: 0;
  font-size: 0.92rem;
  min-width: 720px;
}
.billing-table th, .billing-table td {
  padding: 10px 12px;
  vertical-align: top;
}
.billing-table td code {
  font-size: 0.82rem;
  padding: 1px 6px;
  background: var(--accent-soft);
  border-radius: 4px;
  white-space: nowrap;
  word-break: keep-all;
}
.billing-table td.billing-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 500;
}
.billing-table td.billing-when {
  white-space: nowrap;
  color: var(--fg-muted);
}
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-ok      { background: rgba(34,197,94,0.12);  color: #15803d; }
.badge-pending { background: rgba(234,179,8,0.14);  color: #a16207; }
.badge-bad     { background: rgba(239,68,68,0.10);  color: #b91c1c; }
.badge-muted   { background: var(--accent-soft);    color: var(--fg-muted); }
@media (prefers-color-scheme: dark) {
  .badge-ok      { color: #86efac; }
  .badge-pending { color: #fde68a; }
  .badge-bad     { color: #fca5a5; }
}

/* ------------------------------------------------------------------
 * Site footer (unified across all pages)
 * ----------------------------------------------------------------*/

footer.site-footer {
  margin-top: 64px;
  padding: 36px 22px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--fg-muted);
  font-size: 0.92rem;
}
footer.site-footer .inner {
  max-width: 980px;
  margin: 0 auto;
}
footer.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
  margin-bottom: 22px;
}
footer.site-footer .footer-col strong {
  display: block;
  color: var(--fg);
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}
footer.site-footer .footer-col p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--fg-muted);
}
footer.site-footer .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
footer.site-footer .footer-col li {
  margin-bottom: 6px;
  font-size: 0.9rem;
}
footer.site-footer .footer-col a {
  color: var(--fg-muted);
}
footer.site-footer .footer-col a:hover {
  color: var(--accent);
  text-decoration: underline;
}
footer.site-footer .footer-bottom {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.84rem;
}
footer.site-footer .footer-bottom .copyright { margin: 0; }
footer.site-footer .footer-bottom .footer-cta {
  color: var(--accent);
  font-weight: 500;
}
