:root {
  --navy: #08162f;
  --ink: #13213b;
  --muted: #607084;
  --blue: #0787ad;
  --teal: #17bdc7;
  --yellow: #ffd20a;
  --paper: #f4fbfc;
  --line: #d8e8eb;
  --white: #fff;
  --shadow: 0 24px 70px rgba(6, 49, 70, .16);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
a { color: var(--blue); }

.auth-page { min-height: 100vh; padding: clamp(18px, 4vw, 48px); background: radial-gradient(circle at 10% 15%, rgba(255,255,255,.28) 0 75px, transparent 77px), linear-gradient(135deg, #087ca5, #17bdc7 56%, #63dcda); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr); width: min(1120px, 100%); min-height: min(760px, calc(100vh - 96px)); margin: 0 auto; overflow: hidden; border-radius: 32px; background: white; box-shadow: var(--shadow); }
.auth-shell-compact { display: block; width: min(650px, 100%); min-height: 0; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 6vw, 78px); }
.portal-brand { display: block; width: min(360px, 100%); margin-bottom: 42px; }
.portal-brand img, .header-brand img { display: block; width: 100%; height: auto; }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2 { font-family: Montserrat, sans-serif; letter-spacing: -.045em; }
.auth-panel h1 { max-width: 620px; margin: 0; color: var(--navy); font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: .98; }
.lede { max-width: 560px; margin: 20px 0 28px; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.portal-form { display: grid; gap: 18px; }
.portal-form label { display: grid; gap: 7px; color: var(--navy); font-weight: 800; }
.portal-form input, .search-form input { width: 100%; min-height: 55px; border: 1px solid #b9d1d8; border-radius: 12px; padding: 13px 15px; color: var(--ink); background: white; outline: none; }
.portal-form input:focus, .search-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(7,135,173,.14); }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 58px; margin-top: 5px; padding: 14px 20px; border: 0; border-radius: 14px; color: white; background: var(--navy); font-weight: 800; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.primary-button:hover, .primary-button:focus-visible { color: var(--navy); background: var(--yellow); transform: translateY(-1px); }
.button-link { margin-top: 22px; }
.text-link { width: fit-content; margin-top: 22px; color: #0a6f90; font-weight: 800; text-underline-offset: 4px; }
.logout-link-form { margin: 0; }
.logout-link { border: 0; padding: 0; background: transparent; text-decoration: underline; cursor: pointer; }
.security-note { margin: 34px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.security-note span { color: var(--teal); margin-right: 7px; }
.auth-art { position: relative; display: flex; align-items: flex-end; min-height: 580px; padding: 54px; color: white; background: linear-gradient(180deg, rgba(4,27,53,.04), rgba(4,27,53,.88)), url("../../images/background/bessy-meet-greet-cafe.webp?v=20261012") center / cover no-repeat; }
.auth-art strong { display: block; margin: 10px 0 18px; font: 900 clamp(2.8rem, 6vw, 5.5rem)/.92 Montserrat, sans-serif; letter-spacing: -.06em; }
.auth-art p { margin: 0; color: var(--yellow); font: 800 1.08rem Montserrat, sans-serif; }
.art-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.notice { margin: 0 0 22px; padding: 15px 17px; border-radius: 12px; font-weight: 700; line-height: 1.5; }
.notice-error { color: #8a1b1b; background: #fde7e7; border: 1px solid #f4c4c4; }
.notice-success { color: #125c3b; background: #e0f7e9; border: 1px solid #bce9cd; }
.notice-info { color: #164f68; background: #e4f5f8; border: 1px solid #bee2e8; }

.portal-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 88px; padding: 12px clamp(20px, 5vw, 70px); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-brand { width: min(290px, 40vw); }
.portal-header nav { display: flex; align-items: center; gap: 22px; }
.portal-header nav a, .portal-header nav button { border: 0; padding: 8px 0; color: var(--navy); background: transparent; font-weight: 800; text-decoration: none; cursor: pointer; }
.portal-header nav a:hover, .portal-header nav button:hover { color: var(--blue); }
.welcome { color: var(--muted); font-size: .94rem; }
.portal-header form { margin: 0; }
.dashboard-shell { width: min(1380px, calc(100% - 40px)); margin: 0 auto; padding: clamp(45px, 7vw, 90px) 0 60px; }
.dashboard-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.dashboard-intro h1 { margin: 0; color: var(--navy); font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: .95; }
.dashboard-intro p:not(.eyebrow) { margin: 18px 0 0; color: var(--muted); font-size: 1.1rem; }
.event-link { flex: 0 0 auto; padding: 13px 18px; border: 2px solid var(--navy); border-radius: 999px; color: var(--navy); font-weight: 800; text-decoration: none; }
.event-link:hover { background: var(--navy); color: white; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 44px 0 26px; }
.stats-grid article { position: relative; overflow: hidden; min-height: 158px; padding: 27px 30px; border-radius: 24px; color: white; background: linear-gradient(135deg, #087da5, #17bdc7); box-shadow: 0 15px 35px rgba(6,74,99,.12); }
.stats-grid article:nth-child(2) { color: var(--navy); background: var(--yellow); }
.stats-grid article:nth-child(3) { background: var(--navy); }
.stats-grid span { display: block; font-weight: 800; }
.stats-grid strong { display: block; margin-top: 12px; font: 900 3.3rem/1 Montserrat, sans-serif; }
.registrations-card { overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: white; box-shadow: 0 18px 55px rgba(6,49,70,.1); }
.card-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 35px; padding: 30px; border-bottom: 1px solid var(--line); }
.card-toolbar h2 { margin: 0; color: var(--navy); font-size: clamp(1.8rem, 4vw, 2.8rem); }
.card-toolbar p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); }
.search-form { width: min(480px, 100%); }
.search-form > label { display: block; margin-bottom: 7px; color: var(--navy); font-size: .82rem; font-weight: 800; }
.search-form > div { display: flex; }
.search-form input { min-height: 48px; border-radius: 12px 0 0 12px; }
.search-form button { min-width: 104px; border: 0; border-radius: 0 12px 12px 0; color: white; background: var(--navy); font-weight: 800; cursor: pointer; }
.search-form > a { display: inline-block; margin-top: 7px; font-size: .85rem; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 19px 22px; border-bottom: 1px solid #e8f0f2; text-align: left; vertical-align: top; }
th { color: #526478; background: #f5fafb; font-size: .76rem; letter-spacing: .11em; text-transform: uppercase; }
td { color: #334358; }
td strong { color: var(--navy); }
td a { font-weight: 700; overflow-wrap: anywhere; }
tbody tr:hover { background: #f9fdfd; }
.empty-state { padding: 70px 30px; text-align: center; }
.empty-state strong { color: var(--navy); font: 800 1.5rem Montserrat, sans-serif; }
.empty-state p { color: var(--muted); }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 15px; padding: 20px 24px; background: #f5fafb; }
.pagination a { font-weight: 800; }
.pagination a:last-child { justify-self: end; }
.pagination span { color: var(--muted); }
.privacy-reminder { max-width: 800px; margin: 24px auto 0; color: var(--muted); font-size: .88rem; text-align: center; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { min-height: 390px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-grid article { min-height: 130px; }
  .card-toolbar { align-items: stretch; flex-direction: column; }
  .search-form { width: 100%; }
  .welcome { display: none; }
}

@media (max-width: 680px) {
  .auth-page { padding: 0; }
  .auth-shell { min-height: 100vh; border-radius: 0; }
  .auth-panel { justify-content: flex-start; padding: 30px 22px 45px; }
  .portal-brand { margin-bottom: 38px; }
  .auth-art { display: none; }
  .portal-header { position: static; align-items: flex-start; flex-direction: column; gap: 10px; }
  .header-brand { width: min(285px, 82vw); }
  .portal-header nav { width: 100%; justify-content: space-between; gap: 15px; }
  .dashboard-shell { width: min(100% - 24px, 1380px); padding-top: 42px; }
  .dashboard-intro { align-items: flex-start; flex-direction: column; }
  .event-link { align-self: stretch; text-align: center; }
  .stats-grid { margin-top: 30px; }
  .card-toolbar { padding: 23px 18px; }
  .search-form > div { display: grid; gap: 8px; }
  .search-form input, .search-form button { min-height: 50px; border-radius: 11px; }
  .table-wrap { overflow: visible; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody tr { padding: 17px 18px; border-bottom: 1px solid var(--line); }
  td { display: grid; grid-template-columns: 82px 1fr; gap: 12px; padding: 7px 0; border: 0; }
  td::before { content: attr(data-label); color: #667789; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .pagination { grid-template-columns: 1fr 1fr; }
  .pagination > span:nth-child(2) { grid-column: 1 / -1; grid-row: 1; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
