/* ==========================================================================
   PAUT — shared styles for the public site and the admin portal
   Colours come from the Texas flag in the PAUT logo.
   ========================================================================== */

:root {
  --navy: #0b2a5b;
  --navy-700: #12397a;
  --navy-900: #061a3a;
  --red: #bf0d3e;
  --red-700: #9c0a32;
  --ink: #101828;
  --muted: #5b6476;
  --line: #e3e7ef;
  --bg: #f4f6fa;
  --card: #ffffff;
  --ok: #067647;
  --ok-bg: #e7f6ee;
  --warn: #9a5b00;
  --warn-bg: #fff4e0;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --info: #12397a;
  --info-bg: #eaf0fb;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--navy-700); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 860px; }

/* Flag stripe used as an accent under bars and on cards */
.flag-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--navy) 0 33.3%, #fff 33.3% 66.6%, var(--red) 66.6% 100%);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  font: 600 14px/1.2 var(--font);
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(18, 57, 122, .35); outline-offset: 2px; }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-700); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-900); color: #fff; }
.btn-outline { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-outline:hover { border-color: #c9d0dc; background: #f8fafc; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef1f6; color: var(--ink); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #eef3fb; color: var(--navy); }
.btn-outline-light { border-color: rgba(255, 255, 255, .45); color: #fff; background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger-soft { background: var(--danger-bg); color: var(--danger); }
.btn-danger-soft:hover { background: #fbd9d5; color: var(--danger); }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Alerts (also used by messages echoed from PHP: "alert alert-danger" etc.)
   -------------------------------------------------------------------------- */
.alert {
  display: flex; gap: 12px;
  padding: 14px 16px;
  margin: 0 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert strong { display: block; margin-bottom: 2px; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #d4e0f5; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: #c8ebd6; }
.alert-warning { background: var(--warn-bg); color: var(--warn); border-color: #fde3b5; }
.alert-danger { background: var(--danger-bg); color: var(--danger); border-color: #f8cdc8; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field-label { font-size: 13px; font-weight: 600; color: #344054; }
.field .hint { font-size: 12px; color: var(--muted); }
.req { color: var(--red); margin-left: 2px; }

.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  font: 400 15px/1.4 var(--font);
  color: var(--ink);
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.textarea { resize: vertical; min-height: 96px; }
.select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235b6476' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 4px rgba(18, 57, 122, .12);
}
.input::placeholder, .textarea::placeholder { color: #98a2b3; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }

/* Segmented radio choice (e.g. Single / Married) */
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border: 1px solid #d0d5dd;
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-weight: 500;
}
.choice input { accent-color: var(--navy); width: 16px; height: 16px; margin: 0; }
.choice:has(input:checked) { border-color: var(--navy-700); background: var(--info-bg); }

/* Membership plan cards */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.plan:hover { border-color: #c3cad8; }
.plan input { position: absolute; top: 18px; right: 18px; accent-color: var(--red); width: 18px; height: 18px; margin: 0; }
.plan-name { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-right: 28px; }
.plan-price { font-size: 26px; font-weight: 800; color: var(--navy); }
.plan-price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.plan-note { font-size: 13px; color: var(--muted); }
.plan:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 4px rgba(191, 13, 62, .1); background: #fffafb; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-body { padding: 28px; }
.card-section + .card-section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.section-num {
  display: grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 14px; font-weight: 700;
}
.section-head h3 { font-size: 17px; }
.section-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* --------------------------------------------------------------------------
   Public site
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 26, 58, .92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; background: #000; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; letter-spacing: .04em; }
.brand-text span { font-size: 11px; color: rgba(255, 255, 255, .65); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
  font-size: 14px; font-weight: 600;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.site-nav a.active { color: #fff; background: rgba(255, 255, 255, .14); }
.site-nav a.nav-cta { background: var(--red); color: #fff; margin-left: 6px; }
.site-nav a.nav-cta:hover { background: var(--red-700); }

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 500px at 85% 10%, rgba(191, 13, 62, .35), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(18, 57, 122, .9), transparent 60%),
    var(--navy-900);
}
.hero::after {
  /* faint star pattern */
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
  pointer-events: none;
}
.hero .container {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 48px;
  padding-top: 88px; padding-bottom: 104px;
}
.hero h1 { margin-top: 0; font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: #ff8aa8; }
.hero .lead { margin-top: 18px; max-width: 540px; font-size: 18px; color: rgba(255, 255, 255, .78); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-logo { display: flex; justify-content: center; }
.hero-logo img {
  width: min(340px, 100%);
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 10px rgba(255, 255, 255, .06);
}

.features { padding: 72px 0; }
.features h2 { font-size: 28px; text-align: center; }
.features .sub { text-align: center; color: var(--muted); margin-top: 8px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.feature { padding: 24px; }
.feature-icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--info-bg); color: var(--navy);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature:nth-child(2) .feature-icon { background: var(--danger-bg); color: var(--red); }
.feature h3 { margin-top: 16px; font-size: 17px; }
.feature p { margin-top: 6px; font-size: 14px; color: var(--muted); }

.cta-band { padding: 0 0 80px; }
.cta-band .card-body {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-700) 100%);
  border-radius: var(--radius);
  color: #fff;
}
.cta-band h3 { font-size: 22px; }
.cta-band p { color: rgba(255, 255, 255, .75); margin-top: 4px; }

.site-footer { padding: 28px 0; border-top: 1px solid var(--line); background: #fff; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.site-footer a { color: var(--ink); font-weight: 600; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Page header band used on registration / success */
.page-band { background: var(--navy-900); color: #fff; padding: 48px 0 96px; }
.page-band h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; }
.page-band p { margin-top: 8px; color: rgba(255, 255, 255, .72); }
.page-band .crumb { font-size: 13px; color: rgba(255, 255, 255, .6); margin-bottom: 12px; }
.page-band .crumb a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.page-pull { margin-top: -64px; padding-bottom: 72px; }

.form-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 20px 28px;
  border-top: 1px solid var(--line);
  background: #fafbfd;
  border-radius: 0 0 var(--radius) var(--radius);
}
.form-actions .spacer { flex: 1; }

/* Success page */
.success-icon {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin: 0 auto;
  border-radius: 50%;
  background: var(--ok-bg); color: var(--ok);
}
.success-icon svg { width: 32px; height: 32px; }
.pay-box { margin-top: 24px; padding: 20px; border: 1px dashed #c9d0dc; border-radius: var(--radius-sm); background: #fafbfd; text-align: left; }
.pay-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: 14px; }
.pay-row + .pay-row { border-top: 1px solid var(--line); }
.pay-row span { color: var(--muted); }
.pay-row strong { text-align: right; }
.countdown { margin-top: 20px; font-size: 13px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */
.auth {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
}
.auth-side {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px;
  color: #fff;
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(191, 13, 62, .4), transparent 60%),
    var(--navy-900);
}
.auth-side .brand-big img { width: 120px; height: 120px; border-radius: 50%; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.auth-side h2 { margin-top: 28px; font-size: 32px; font-weight: 800; }
.auth-side p { margin-top: 10px; color: rgba(255, 255, 255, .72); max-width: 380px; }
.auth-side small { color: rgba(255, 255, 255, .5); font-size: 12px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: #fff; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h1 { font-size: 26px; font-weight: 800; }
.auth-form > p { margin-top: 6px; color: var(--muted); }
.auth-form .grid { margin-top: 28px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; font-size: 14px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Admin portal
   -------------------------------------------------------------------------- */
.admin { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: 248px;
  display: flex; flex-direction: column;
  padding: 20px 14px;
  background: var(--navy-900);
  color: #fff;
}
.sidebar .brand { padding: 4px 8px 20px; }
.side-label { padding: 16px 12px 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .4); }
.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  font-size: 14px; font-weight: 600;
}
.side-link svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-link.active { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 var(--red); }
.sidebar .side-bottom { margin-top: auto; }

.admin-main { flex: 1; min-width: 0; margin-left: 248px; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  height: 68px; padding: 0 28px;
  background: rgba(244, 246, 250, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; }
.search {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  width: 100%; max-width: 420px;
}
.search svg { position: absolute; left: 14px; width: 18px; height: 18px; color: #98a2b3; pointer-events: none; }
.search .input { padding-left: 42px; border-radius: 999px; background: #fff; }
.topbar .spacer { flex: 1; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.avatar {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 700;
}

.admin-content { padding: 28px; }
.page-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-title h1 { font-size: 26px; font-weight: 800; }
.page-title p { margin-top: 4px; color: var(--muted); font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stat { display: flex; align-items: center; gap: 16px; padding: 22px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.stat:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 14px 32px rgba(16, 24, 40, .1); }
.stat-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 12px; }
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon.navy { background: var(--info-bg); color: var(--navy); }
.stat-icon.green { background: var(--ok-bg); color: var(--ok); }
.stat-icon.amber { background: var(--warn-bg); color: var(--warn); }
.stat-value { font-size: 30px; font-weight: 800; line-height: 1; }
.stat-label { margin-top: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }

.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.quick .card-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.quick h3 { font-size: 16px; }
.quick p { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Tables */
.table-card { overflow: hidden; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted);
  background: #f9fafc;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }
.table .num { color: var(--muted); width: 56px; }
.table .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 600; color: var(--navy); white-space: nowrap; }
.table .name { font-weight: 600; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table th:last-child { text-align: right; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-pending { background: var(--warn-bg); color: var(--warn); }
.tag { display: inline-block; padding: 3px 8px; border-radius: 6px; background: #eef1f6; color: #344054; font-size: 12px; font-weight: 600; }

.empty { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: #c0c7d4; }
.empty strong { display: block; margin-top: 12px; color: var(--ink); font-size: 16px; }

.backdrop { display: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; padding-top: 56px; padding-bottom: 72px; gap: 36px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-logo { order: -1; }
  .hero-logo img { width: 180px; }
  .feature-grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .quick { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }

  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(6, 26, 58, .45); }
  .admin-main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .admin-content { padding: 20px 16px; }
  .user-chip .name { display: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .site-nav a:not(.nav-cta):not(.active) { display: none; }
  .brand-text span { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .card-body { padding: 20px; }
  .form-actions { padding: 16px 20px; }
  .form-actions .btn { flex: 1; }
  .form-actions .spacer { display: none; }
  .cta-band .card-body { flex-direction: column; align-items: flex-start; }
  .table .hide-sm { display: none; }
  .table .name { min-width: 150px; }
}

/* Sidebar log-out button (a form, so signing out needs a real click) */
.side-button { width: 100%; border: 0; background: transparent; font: inherit; font-family: var(--font); -webkit-appearance: none; appearance: none; box-shadow: none; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.inline-form { display: inline; margin: 0; }
.field-error { font-size: 12px; font-weight: 600; color: var(--danger); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Confirmation popup (admin)
   -------------------------------------------------------------------------- */
.modal {
  width: min(420px, calc(100% - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.modal::backdrop {
  background: rgba(6, 26, 58, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal[open] { animation: modal-in .18s ease-out; }
.modal[open]::backdrop { animation: fade-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  margin: 0;
  padding: 28px 28px 24px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(6, 26, 58, .35);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.modal-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy) 0 33.3%, #dfe4ee 33.3% 66.6%, var(--red) 66.6% 100%);
}
.modal-icon {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--info-bg);
  color: var(--navy);
}
.modal-icon svg { width: 26px; height: 26px; }
.modal-danger .modal-icon { background: var(--danger-bg); color: var(--red); }
.modal-card h2 { font-size: 19px; font-weight: 800; }
.modal-card p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.modal-actions .btn { flex: 1; }
@media (prefers-reduced-motion: reduce) {
  .modal[open], .modal[open]::backdrop { animation: none; }
}

/* Live search: the button isn't needed once results update as you type */
.search.is-live .btn { display: none; }
.admin-content[aria-busy="true"] { opacity: .55; transition: opacity .15s; }
