:root {
  --bg: #f7f5f1;
  --surface: #ffffff;
  --surface-alt: #f1ece7;
  --text: #1d1d27;
  --muted: #5f5f73;
  --blue: #1f4b8f;
  --red: #d12a3f;
  --gold: #d4a45f;
  --sand: #d9c3a5;
  --green: #2d8a5c;
  --border: rgba(29, 29, 39, 0.08);
  --shadow: 0 24px 80px rgba(22, 24, 44, 0.08);
  --shadow-sm: 0 8px 24px rgba(22, 24, 44, 0.06);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(180deg, #f7f5f1 0%, #e7e3dc 100%);
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font: inherit;
}

::selection {
  background: rgba(31, 75, 143, 0.16);
}

[hidden] {
  display: none !important;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 18px 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  padding: 18px 0 12px;
  gap: 18px;
  border-bottom: 2px solid rgba(31, 75, 143, 0.08);
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-logo-img {
  width: clamp(60px, 9vw, 78px);
  height: clamp(60px, 9vw, 78px);
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.brand-name {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 0.95;
  color: var(--blue);
}

.brand-tagline {
  display: block;
  color: var(--red);
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(29, 29, 39, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(22, 24, 44, 0.08);
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(31, 75, 143, 0.3);
  box-shadow: 0 14px 34px rgba(22, 24, 44, 0.12);
}

.nav-toggle:focus-visible {
  outline: 2px solid rgba(31, 75, 143, 0.2);
  outline-offset: 2px;
}

.nav-toggle span {
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle span:nth-child(1) {
  transform: translateY(-6px);
}

.nav-toggle span:nth-child(2) {
  transform: translateY(0);
}

.nav-toggle span:nth-child(3) {
  transform: translateY(6px);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(0) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(0) rotate(-45deg);
}

.main-nav {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  gap: 6px;
  width: min(280px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid rgba(29, 29, 39, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 80px rgba(22, 24, 44, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 20;
}

.main-nav.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.navigation-group {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto;
  justify-content: flex-end;
  flex-shrink: 0;
}

.account-entry {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(29, 29, 39, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(22, 24, 44, 0.08);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-entry:hover,
.account-entry:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(31, 75, 143, 0.24);
  box-shadow: 0 14px 34px rgba(22, 24, 44, 0.12);
}

.account-entry:focus-visible {
  outline: 2px solid rgba(31, 75, 143, 0.2);
  outline-offset: 2px;
}

.account-entry-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.account-entry-state {
  min-width: 0;
  max-width: 150px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-entry.is-authenticated .account-entry-state {
  color: var(--green);
}

.page-select {
  display: none;
  width: 100%;
  max-width: 260px;
  border: 1px solid rgba(29, 29, 39, 0.12);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--text);
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-select:focus {
  outline: none;
  border-color: rgba(31, 75, 143, 0.5);
  box-shadow: 0 0 0 4px rgba(31, 75, 143, 0.08);
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  width: 100%;
  transition: background 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: rgba(31, 75, 143, 0.08);
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  transition: all 0.2s ease;
  font-weight: 600;
  display: block;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: linear-gradient(135deg, rgba(31, 75, 143, 0.08), rgba(209, 42, 63, 0.06));
  color: var(--blue);
}

.nav-link[aria-current="page"] {
  background: linear-gradient(135deg, rgba(31, 75, 143, 0.12), rgba(209, 42, 63, 0.08));
  color: var(--blue);
}

.hero {
  display: grid;
  gap: 32px;
  padding: 24px 0 40px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-content {
  display: grid;
  gap: 18px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--red);
  font-weight: 800;
  margin: 0;
}

.hero h1 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  line-height: 0.92;
  color: var(--blue);
}

.hero-subtitle {
  max-width: 640px;
  line-height: 1.8;
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

.hero p {
  max-width: 640px;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  text-decoration: none;
  padding: 16px 28px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.24s ease;
  font-weight: 700;
  font-size: 0.95rem;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(22, 24, 44, 0.15);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  background: linear-gradient(135deg, var(--blue), #1636a6);
  color: white;
  box-shadow: 0 12px 32px rgba(31, 75, 143, 0.2);
}

.button-secondary {
  background: white;
  color: var(--blue);
  border: 2px solid var(--blue);
  font-weight: 600;
}

.hero-cards {
  display: grid;
  gap: 16px;
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(22, 24, 44, 0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mini-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 80px rgba(22, 24, 44, 0.08);
  border-color: rgba(31, 75, 143, 0.2);
}

.mini-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--blue);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gold-card {
  background: linear-gradient(135deg, #fff5e6, #f7ecd8);
  border-color: rgba(212, 164, 95, 0.2);
}

.gold-card::before {
  background: var(--gold);
  opacity: 1;
}

.blue-card {
  background: linear-gradient(135deg, #eef2fb, #e6ecf7);
  border-color: rgba(31, 75, 143, 0.15);
}

.blue-card::before {
  background: var(--blue);
  opacity: 1;
}

.red-card {
  background: linear-gradient(135deg, #fce8eb, #f7dce1);
  border-color: rgba(209, 42, 63, 0.15);
}

.red-card::before {
  background: var(--red);
  opacity: 1;
}

.card-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
}

.mini-card h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.mini-card p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}

.card-meta {
  display: block;
  color: #999;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 8px;
}

.section-panel {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 32px;
  padding: 32px 24px;
  margin-bottom: 28px;
  box-shadow: 0 8px 24px rgba(22, 24, 44, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: fadeInUp 0.6s ease both;
}

.highlight-section {
  background: linear-gradient(135deg, rgba(31, 75, 143, 0.03), rgba(209, 42, 63, 0.02));
  border: 2px solid rgba(31, 75, 143, 0.08);
}

.cta-section {
  background: linear-gradient(135deg, var(--blue), #1636a6);
  color: white;
  text-align: center;
  padding: 48px 32px;
}

.cta-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  margin: 0 0 16px;
}

.cta-section p {
  max-width: 600px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.7rem;
}

.status-pill {
  background: #fff4e1;
  border: 1px solid rgba(212, 164, 95, 0.35);
  color: #7b5b32;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
}

.status-pill.success {
  background: rgba(45, 138, 92, 0.14);
  border-color: rgba(45, 138, 92, 0.24);
  color: var(--green);
}

.grid {
  display: grid;
  gap: 18px;
}

.cards-grid {
  grid-template-columns: 1fr;
}

.stat-card,
.panel,
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 22px;
}

.stat-card {
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 80px rgba(22, 24, 44, 0.08);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: 26px 26px 0 0;
  background: var(--blue);
}

.stat-blue::before {
  background: var(--blue);
}

.stat-red::before {
  background: var(--red);
}

.stat-gold::before {
  background: var(--gold);
}

.stat-green::before {
  background: var(--green);
}

.stat-card h3,
.panel h3 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 700;
}

.stat-card p {
  margin: 0 0 8px;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: #999;
  font-weight: 500;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
}

.panel-large {
  min-height: 220px;
}

.leaderboard-list,
.event-list,
.podium-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.leaderboard-list li,
.event-list li {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-alt);
  border: 1px solid rgba(29, 29, 39, 0.06);
}

.podium-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-alt);
  transition: all 0.2s ease;
}

.podium-item:hover {
  background: linear-gradient(135deg, rgba(31, 75, 143, 0.06), rgba(209, 42, 63, 0.03));
}

.podium-item.first {
  border-left: 4px solid var(--gold);
  background: linear-gradient(135deg, #fff5e6, #f7ecd8);
}

.podium-item.second {
  border-left: 4px solid #c0c0c0;
  background: linear-gradient(135deg, #f5f5f5, #efefef);
}

.podium-item.third {
  border-left: 4px solid #cd7f32;
  background: linear-gradient(135deg, #fde8d8, #f7d8c5);
}

.medal {
  font-size: 1.4rem;
}

.podium-item .name {
  flex: 1;
  font-weight: 700;
  color: var(--text);
}

.podium-item .score {
  background: rgba(31, 75, 143, 0.1);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
}

.event-list li {
  border-left: 4px solid var(--blue);
  transition: all 0.2s ease;
}

.event-list li:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(22, 24, 44, 0.08);
}

.event-list strong {
  display: block;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 4px;
}

.event-list small {
  color: var(--muted);
  font-size: 0.85rem;
}

.badge-small {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 8px;
}

.badge-small.green {
  background: rgba(45, 138, 92, 0.15);
  color: var(--green);
}

.badge-small.blue {
  background: rgba(31, 75, 143, 0.15);
  color: var(--blue);
}

.badge-small.red {
  background: rgba(209, 42, 63, 0.15);
  color: var(--red);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

select,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  border: 1px solid rgba(29, 29, 39, 0.12);
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
}

textarea {
  min-height: 132px;
  resize: vertical;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

.table-card {
  overflow: hidden;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
 td {
  text-align: left;
  padding: 16px 14px;
  font-size: 0.95rem;
}

th {
  color: var(--blue);
  font-weight: 700;
  border-bottom: 1px solid rgba(29, 29, 39, 0.08);
}

tbody tr {
  border-bottom: 1px solid rgba(29, 29, 39, 0.05);
}

tbody tr:last-child {
  border-bottom: none;
}

.profile-grid {
  display: grid;
  gap: 18px;
}

.auth-grid {
  display: grid;
  gap: 18px;
}

.auth-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 18px;
  background: var(--surface-alt);
}

.auth-mode-button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-mode-button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 8px 24px rgba(22, 24, 44, 0.08);
}

.auth-intro,
.account-note {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.auth-feedback {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-alt);
  color: var(--muted);
  font-weight: 600;
}

.auth-feedback[data-tone="success"] {
  background: rgba(45, 138, 92, 0.14);
  color: var(--green);
}

.auth-feedback[data-tone="error"] {
  background: rgba(209, 42, 63, 0.12);
  color: var(--red);
}

.auth-feedback[data-tone="info"] {
  background: rgba(31, 75, 143, 0.12);
  color: var(--blue);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.feature-list li {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--surface-alt);
  border: 1px solid rgba(29, 29, 39, 0.06);
}

.feature-list strong {
  color: var(--text);
}

.feature-list span {
  color: var(--muted);
  line-height: 1.6;
}

.profile-card {
  display: grid;
  gap: 18px;
  text-align: center;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d12a3f, #1f4b8f);
  color: white;
  font-size: 2rem;
  font-weight: 800;
}

.profile-card h3 {
  margin: 0;
}

.profile-card p {
  margin: 0;
  color: var(--muted);
}

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

.profile-stats span {
  background: var(--surface-alt);
  padding: 16px;
  border-radius: 18px;
  font-weight: 600;
}

.account-summary-card {
  align-content: start;
}

.account-summary-card .profile-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-summary-card .profile-stats span {
  display: grid;
  gap: 4px;
  text-align: left;
}

.account-summary-card .profile-stats strong {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--blue);
}

.account-summary-card .profile-stats small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.account-summary-card p {
  word-break: break-word;
}

.stat-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.stat-grid div {
  display: flex;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--surface-alt);
  border: 1px solid rgba(29, 29, 39, 0.06);
}

.stat-grid strong {
  color: var(--muted);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.account-badges-panel {
  margin-top: 18px;
}

.account-metrics .stat-card {
  text-align: left;
}

.account-metrics .stat-card p {
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.15;
  word-break: break-word;
}

.admin-panel {
  margin-top: 18px;
}

.admin-account-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-account-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: var(--surface-alt);
  border: 1px solid rgba(29, 29, 39, 0.08);
}

.admin-account-meta {
  display: grid;
  gap: 6px;
}

.admin-account-meta strong {
  font-size: 1.05rem;
  color: var(--text);
}

.admin-account-meta span {
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}

.admin-account-role {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(31, 75, 143, 0.12);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-account-role.is-admin {
  background: rgba(212, 164, 95, 0.2);
  color: #7b5b32;
}

.admin-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.admin-account-actions select {
  flex: 1 1 220px;
  min-width: 180px;
}

.admin-account-readonly {
  color: var(--muted);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff3d7, #f8e8cf);
  color: #5b4326;
  font-weight: 700;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 18px 0 6px;
}

@media (min-width: 720px) {
  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    align-items: center;
  }

  .auth-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  }

  .hero-cards {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1.5fr 1fr;
  }

  .profile-grid {
    grid-template-columns: 1fr 1.5fr;
  }

  .admin-account-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .page-shell {
    padding: 0 32px 40px;
  }

  .topbar {
    padding: 24px 0 16px;
  }

  .section-panel {
    padding: 40px 32px;
  }

  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero {
    gap: 56px;
    padding: 32px 0 48px;
  }

  .hero h1 {
    font-size: 4.2rem;
  }
}

@media (max-width: 719px) {
  .page-shell {
    padding: 0 14px 26px;
  }

  .topbar {
    gap: 14px;
  }

  .navigation-group {
    margin-left: auto;
  }

  .account-entry {
    padding: 10px 12px;
  }

  .account-entry-label {
    display: none;
  }

  .account-entry-state {
    max-width: 96px;
  }

  .auth-switch {
    width: 100%;
  }

  .auth-mode-button {
    flex: 1 1 calc(50% - 4px);
  }

  .profile-stats,
  .account-summary-card .profile-stats {
    grid-template-columns: 1fr;
  }

  .admin-account-actions {
    width: 100%;
  }

  .section-panel {
    padding: 22px 14px;
  }

  .table-card table {
    min-width: auto;
  }

  .table-card table,
  .table-card thead,
  .table-card tbody,
  .table-card tr,
  .table-card th,
  .table-card td {
    display: block;
  }

  .table-card thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .table-card tr {
    margin-bottom: 16px;
    padding: 16px 14px;
    border-radius: 22px;
    background: var(--surface-alt);
    border: 1px solid rgba(29, 29, 39, 0.08);
  }

  .table-card td {
    padding: 10px 0;
    border: none;
  }

  .table-card td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 6px;
  }
}
