/* ============ THEME VARIABLES ============ */
:root {
  /* typography */
  --font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* spacing + sizing */
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

  /* layout */
  --container: min(1480px, calc(100vw - (var(--pad) * 2)));
  --pad: clamp(14px, 2.2vw, 22px);

  /* default (light) */
  --bg: #f8f9fa;
  --surface: #ffffff;
  --text: #111827;
  --muted: rgba(17, 24, 39, 0.72);
  --border: rgba(0, 0, 0, 0.12);

  --primary: #ffbe0b;
  --primary-ink: #1b263b;
  --accent: #fb5607;

  --link: #111827;
  --link-bg: rgba(0, 0, 0, 0.06);
  --link-bg-hover: rgba(0, 0, 0, 0.10);


  /* type scale + control sizing */
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-h1: clamp(28px, 3.2vw, 44px);
  --fs-h2: 18px;

  --btn-pad-y: 14px;
  --btn-pad-x: 16px;

  --input-pad: 12px;
  --card-pad: 18px;



}


/* Everything inside body should render above the diagonal layers */
.nav, .page, .footer {
  position: relative;
  z-index: 1;
}

.seo-blurb {
  display: none;
}



/* Dark theme */
body[data-theme="dark"] {
  --bg: #1b263b;
  --surface: #264653;
  --text: #f8f9fa;
  --muted: rgba(248, 249, 250, 0.75);
  --border: rgba(248, 249, 250, 0.14);

  --primary: #2a9d8f;
  --primary-ink: #06201d;
  --accent: #264653;

  --link: #f8f9fa;
  --link-bg: rgba(248, 249, 250, 0.10);
  --link-bg-hover: rgba(248, 249, 250, 0.16);
}

/* ============ BASE ============ */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  background: var(--bg);
  color: var(--text);
}


a { color: inherit; }

.page {
  width: 100%;
  padding: 0 var(--pad);
  flex: 1; /* pushes footer to bottom, no huge footer spacing */
}


.hint { opacity: 0.85; }
.muted { color: var(--muted); }



/* Page layout */
body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Diagonals sit "behind content", but still visible because nav/footer are transparent */
body::before,
body::after {
  content: "";
  position: absolute;     /* <- important: inside body, not behind the browser canvas */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;             /* background layer inside body */
}

body::before {
  background:
    linear-gradient(135deg,
      transparent 0%,
      transparent 58%,
      var(--primary) 58%,
      var(--primary) 70%,
      transparent 70%,
      transparent 100%);
  opacity: 0.55;
}

body::after {
  background:
    linear-gradient(135deg,
      transparent 0%,
      transparent 66%,
      var(--accent) 66%,
      var(--accent) 74%,
      transparent 74%,
      transparent 100%);
  opacity: 0.30;
}




/* Ensure profile content sits above the diagonal background layers */
.profile-wrap {
  position: relative;
  z-index: 1;
}



/* Dark mode tweak */
body[data-theme="dark"]::before { opacity: 0.35; }
body[data-theme="dark"]::after  { opacity: 0.22; }




/* Generic wrapper used by older templates */
.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(18px, 3.5vw, 44px) var(--pad);
}



/* Profile key/value grid: prevent long values (like emails) overflowing */
.kv {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 8px;
}

.kv > div {
  min-width: 0;              /* IMPORTANT in grid/flex layouts */
}

.kv > div:nth-child(2n) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}


/* simple modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
}

/* THE FIX: use theme colours instead of hard-coded #111 */
.modal {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.28);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-title {
  font-weight: 900;
  font-size: 1.1rem;
}

.xbtn {
  cursor: pointer;
  opacity: 0.75;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--link-bg);
}

.xbtn:hover {
  opacity: 1;
  background: var(--link-bg-hover);
}

/* make form fields look consistent inside modal */
.modal input.btn,
.modal textarea.btn,
.modal select.btn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Optional: slightly separate sections */
.modal .hint {
  color: var(--muted);
}




/* ============ Invoice preview ============ */
/* Invoice totals card: never overflow on small screens */
.invoice-totals {
  width: min(420px, 100%);
  max-width: 100%;
}

/* Allow GST controls to wrap on tiny phones */
.gst-controls {
  flex-wrap: wrap;
}

.gst-controls input#gstrRate,
.gst-controls #gstRate {
  max-width: 100%;
}

/* Optional: make the % input behave nicer on very small screens */
@media (max-width: 380px) {
  .gst-controls #gstRate {
    width: 72px !important;
  }
}



/* Password rule checklist */
.rule-list {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  background: rgba(0,0,0,0.03);
}

.rule-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  margin: 6px 0;
}

.rule-dot {
  width: 18px;
  display: inline-block;
  font-weight: 700;
  line-height: 1.2;
}

.rule-ok { opacity: 1; }
.rule-ok .rule-dot { color: #1a7f37; }   /* green-ish */
.rule-bad { opacity: 0.85; }
.rule-bad .rule-dot { color: #c33; }     /* red-ish */

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}



/* ============ NAV (Upgraded) ============ */
.nav {
  border-bottom: 1px solid var(--border);
  background: transparent;
  backdrop-filter: blur(8px);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-brand {
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.nav-org {
  opacity: 0.75;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.04);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 36ch;
}

body[data-theme="dark"] .nav-org {
  background: rgba(248, 249, 250, 0.08);
}

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap; /* IMPORTANT: stop stacking */
}

.nav-link {
  text-decoration: none;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--link-bg);
  border: 1px solid transparent;
  transition: background 120ms ease, transform 120ms ease, opacity 120ms ease;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--link-bg-hover);
}

.nav-link:active {
  transform: translateY(1px);
}

.nav-link-primary {
  background: var(--primary);
  color: var(--primary-ink);
}

.nav-link-primary:hover {
  opacity: 0.92;
}

/* Hamburger button (hidden on desktop) */
.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  opacity: 0.9;
  border-radius: 2px;
}

/* Mobile dropdown panel */
.nav-mobile {
  display: none;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad) 12px var(--pad);
}

.nav-mobile.is-open {
  display: block;
}

.nav-mobile {
  position: relative;
  z-index: 2;
}

.nav-mobile .nav-m-link {
  display: flex;
  width: 100%;
  padding: 12px 14px;
  margin-top: 8px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  background: var(--surface);
  border: 1px solid var(--border);
}

.nav-mobile .nav-m-link:hover {
  background: rgba(0,0,0,0.04);
}

body[data-theme="dark"] .nav-mobile .nav-m-link:hover {
  background: rgba(248, 249, 250, 0.08);
}

.nav-mobile .nav-m-primary {
  background: var(--primary);
  color: var(--primary-ink);
  border-color: transparent;
}

/* Responsive breakpoint */
@media (max-width: 900px) {
  .nav-links {
    display: none; /* hide desktop links */
  }

  .nav-burger {
    display: inline-flex; /* show hamburger */
  }

  .nav-org {
    display: none; /* optional: hide company pill on small screens */
  }
}

/* Make nav buttons behave exactly like the <a> pills */
.nav-link.nav-logout-btn,
.nav-mobile .nav-m-link.nav-logout-m-btn {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Remove default button quirks */
.nav-link.nav-logout-btn {
  border: 1px solid transparent; /* match .nav-link */
}

.nav-mobile .nav-m-link.nav-logout-m-btn {
  text-align: left; /* match mobile links */
}



/* ===== NAV VISIBILITY (force correct) ===== */
.nav-mobile { display: none !important; }
.nav-links  { display: flex !important; }

@media (max-width: 900px) {
  .nav-links  { display: none !important; }
  .nav-mobile { display: none !important; }  /* hidden until opened */
  .nav-mobile.is-open { display: block !important; }
  .nav-burger { display: inline-flex !important; }
}


/* ============ HERO ============ */
.hero {
  padding: clamp(22px, 4vw, 56px) 0;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(14px, 2.6vw, 26px);
  align-items: start;
}

.hero-title {
  margin: 0 0 10px 0;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.6px;
}

.hero-subtitle {
  margin: 0 0 18px 0;
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--muted);
  max-width: 52ch;
}

.hero-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

/* ============ AUTH PAGES (signup/login/forgot/reset) ============ */
.auth {
  padding: clamp(18px, 3.5vw, 44px) 0;
}

.auth-inner {
  max-width: 560px;       /* <- prevents “full width” weirdness */
  margin: 0 auto;
}

.auth-header {
  margin-bottom: 14px;
}

.auth-title {
  margin: 0 0 8px 0;
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.4px;
  line-height: 1.1;
}

.auth-subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

.auth-card {
  padding: 18px;
}

/* Form structure */
.form {
  display: grid;
  gap: 14px;
}

.field label {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
}

/* Alerts */
.alert {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.alert-error {
  border-color: rgba(204, 51, 51, 0.45);
  background: rgba(204, 51, 51, 0.10);
}



/* ============ DASHBOARD / INDEX ============ */
.dash {
  padding: clamp(18px, 3.5vw, 44px) 0;
}

.dash-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.dash-header {
  margin-bottom: 14px;
}

.dash-title {
  margin: 0;
  font-size: var(--fs-h1);
  letter-spacing: -0.4px;
  line-height: 1.1;
}

.dash-card {
  padding: 18px;
}

.card-title {
  margin: 0 0 10px 0;
  font-size: var(--fs-h2);
}

.kicker {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-actions {
  margin-top: 12px;
  gap: 8px;
}

.job-title {
  margin-top: 8px;
  font-weight: 900;
  font-size: 1.05rem;
}

.job-desc {
  margin-top: 10px;
  white-space: pre-wrap;
}




/* Small helper row under forms */
.auth-links {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
}

.link-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-underline:hover {
  opacity: 0.9;
}




/* ===== Job assignment rows (Remove worker list) ===== */
.assign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body[data-theme="dark"] .assign-row {
  border-bottom-color: rgba(255, 255, 255, 0.10);
}

.assign-info {
  min-width: 0;
  flex: 1;
}

.assign-name {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-meta {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.assign-warn {
  text-align: right;
}

/* Mobile: stack so button never overlaps text */
@media (max-width: 600px) {
  .assign-row {
    flex-direction: column;
    align-items: stretch;
  }

  .assign-name,
  .assign-meta {
    white-space: normal;
  }

  .assign-actions {
    width: 100%;
    align-items: stretch;
  }

  .assign-actions .btn {
    width: 100%;
  }

  .assign-warn {
    text-align: left;
  }
}







/* ============= ADMIN ============ */
.admin-wrap {
  position: relative;
  z-index: 1;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}



/* ============ Features ============ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  max-width: 64ch;
}

.feature {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

body[data-theme="dark"] .feature {
  background: rgba(38, 70, 83, 0.55);
}


.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
  background: var(--surface);
  border: 1px solid var(--border);
}

.feature-title {
  font-weight: 900;
  margin-bottom: 2px;
}

.feature-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

/* ============ CARD ============ */
.card {
  padding: var(--card-pad);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}



/* Bigger, more consistent card sizing on desktop */
.dash-card {
  padding: 22px;
}

@media (max-width: 600px) {
  .dash-card {
    padding: 16px; /* keep mobile comfortable */
  }
}




@media (min-width: 900px) {
  .card {
    padding: 24px;
  }
}


.mini-ui {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.mini-pill {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.04);
  font-weight: 800;
  font-size: 14px;
}

body[data-theme="dark"] .mini-pill {
  background: rgba(248, 249, 250, 0.08);
}

.mini-arrow {
  opacity: 0.7;
  font-weight: 900;
}

/* ============ ROWS + BUTTONS ============ */
.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.row-actions {
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: 12px;
  font-size: var(--fs-body);
  font-weight: 800;
  text-decoration: none;

  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
}


.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.06);
}

body[data-theme="dark"] .btn-outline:hover {
  background: rgba(248, 249, 250, 0.08);
}

.btn-ghost {
  background: var(--link-bg);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--link-bg-hover);
}

/* Inputs that reuse .btn */
input.btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

/* ============ FORMS ============ */
textarea, input, select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--input-pad);
  font-size: var(--fs-body);
  background: var(--surface);
  color: var(--text);
}


label { font-weight: 800; }




/* ===== Week overview (My Work) ===== */
.week-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.week-toggle{
  display:flex;
  gap:8px;
  flex-wrap:nowrap;
}

.week-tab{
  padding:10px 14px;
  border-radius:999px;
}

.week-tab.is-active{
  background: var(--primary);
  color: var(--primary-ink);
}

.week-panel{ display:none; }
.week-panel.is-active{ display:block; }

.week-grid{
  margin-top: 12px;
  display:grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.week-day{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: rgba(0,0,0,0.03);
}

body[data-theme="dark"] .week-day{
  background: rgba(248,249,250,0.06);
}

.week-day-name{
  font-weight: 900;
}

.week-day-date{
  font-size: 12px;
  opacity: 0.85;
}

.week-pill-wrap{
  margin-top: 10px;
}

.week-pill{
  display:inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 800;
}

.week-pill-dim{
  opacity: 0.85;
}

/* Mobile: show 1 week at a time + compact grid */
@media (max-width: 600px){
  .week-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .week-day{
    padding: 10px;
  }
}

/* ===== Week overview toggle (force) ===== */
.week-panel { display: none !important; }
.week-panel.is-active { display: block !important; }

.week-tab.is-active{
  background: var(--primary) !important;
  color: var(--primary-ink) !important;
}



/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 0;
  background: transparent; /* <- let diagonals show */
  backdrop-filter: blur(8px); /* optional */
}


.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px var(--pad); /* smaller */
  font-size: 12px;          /* smaller */
  color: var(--muted);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  :root {
    --fs-body: 14px;
    --fs-small: 12px;
    --fs-h2: 16px;

    --btn-pad-y: 12px;
    --btn-pad-x: 14px;

    --input-pad: 10px;
    --card-pad: 14px;
    --radius: 12px;
  }

  .row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}



.hint { font-size: var(--fs-small); }



@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }
}


/* ============ BILLING PAGE ============ */
.billing-wrap {
  max-width: 700px;
}

.billing-alert {
  margin-bottom: 20px;
  padding: 16px;
}

.billing-alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.billing-alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.billing-alert-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.billing-alert-success .billing-alert-title {
  color: #22c55e;
}

.billing-alert-warning .billing-alert-title {
  color: #f59e0b;
}

.billing-card {
  margin-bottom: 20px;
}

.billing-card-title {
  margin-bottom: 16px;
}

.billing-plan-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Status badges */
.billing-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

.billing-badge-active {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

.billing-badge-trial {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #3b82f6;
}

.billing-badge-pastdue {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}

.billing-badge-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* Info boxes */
.billing-info-box {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.billing-info-box-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.billing-info-box p {
  margin: 0;
}

.billing-text-error {
  color: #ef4444;
}

.billing-text-warning {
  color: #f59e0b;
}

/* Actions */
.billing-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.billing-back {
  margin-top: 24px;
}


/* ============ LEGAL / COMPLIANCE PAGES ============ */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.legal-inner {
  background: var(--surface);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border);
}

.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.legal-updated {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.legal-page h2 {
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.legal-page h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.legal-page h3 {
  font-size: 1rem;
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal-page p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.legal-page ul {
  margin: 12px 0;
  padding-left: 24px;
}

.legal-page li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.legal-page a {
  color: var(--primary);
  text-decoration: underline;
}

/* Support page specific */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.support-card {
  text-align: center;
  padding: 32px 24px;
}

.support-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.support-card h2 {
  border: none;
  padding-top: 0;
  margin-top: 0;
}

.support-card p {
  margin-bottom: 20px;
}

.faq-list {
  margin: 24px 0;
}

.faq-item {
  padding: 20px 24px;
  margin-bottom: 12px;
}

.faq-item h3 {
  margin: 0 0 8px 0;
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

.support-contact-box {
  text-align: center;
  padding: 32px;
  margin-top: 32px;
  background: var(--link-bg);
}

.support-contact-box h3 {
  margin-top: 0;
}

/* Footer links */
.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

