:root {
  --bg: #f4efe4;
  --panel: rgba(255, 251, 242, 0.9);
  --ink: #1d1d1b;
  --muted: #635d4e;
  --line: rgba(29, 29, 27, 0.14);
  --gold: #e1bf2f;
  --teal: #0f7b7b;
  --red: #bf4b39;
  --shadow: 0 18px 55px rgba(74, 55, 20, 0.14);
  --radius: 26px;
  --body-bg: radial-gradient(circle at top left, rgba(225, 191, 47, 0.38), transparent 34%),
    radial-gradient(circle at right 18%, rgba(15, 123, 123, 0.18), transparent 26%),
    linear-gradient(180deg, #fbf8ee 0%, #f4efe4 48%, #efe3cf 100%);
  --table-bg: rgba(255, 255, 255, 0.66);
  --table-cell: rgba(255, 255, 255, 0.72);
  --table-hover: rgba(255, 249, 218, 0.95);
  --thead-bg: linear-gradient(90deg, #fff283 0%, #f7ea4f 47%, #d8efbf 100%);
  --input-bg: rgba(255, 255, 255, 0.88);
  --toggle-bg: rgba(29, 29, 27, 0.06);
  --toggle-active-bg: #ffffff;
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 245, 225, 0.72));
  --ownership-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 245, 225, 0.76));
  --strip-default: linear-gradient(180deg, rgba(255, 249, 234, 0.92), rgba(255, 255, 255, 0.82));
}

[data-theme="dark"] {
  --bg: #121218;
  --panel: rgba(30, 30, 40, 0.92);
  --ink: #e8e6e1;
  --muted: #9a9589;
  --line: rgba(255, 255, 255, 0.1);
  --gold: #e1bf2f;
  --teal: #20c9b0;
  --red: #e06050;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.4);
  --body-bg: radial-gradient(circle at top left, rgba(225, 191, 47, 0.12), transparent 34%),
    radial-gradient(circle at right 18%, rgba(15, 123, 123, 0.08), transparent 26%),
    linear-gradient(180deg, #0d0d14 0%, #121218 48%, #18181f 100%);
  --table-bg: rgba(25, 25, 35, 0.8);
  --table-cell: rgba(30, 30, 42, 0.8);
  --table-hover: rgba(60, 55, 30, 0.5);
  --thead-bg: linear-gradient(90deg, rgba(80, 70, 20, 0.6) 0%, rgba(60, 55, 15, 0.6) 47%, rgba(30, 60, 30, 0.6) 100%);
  --input-bg: rgba(40, 40, 55, 0.8);
  --toggle-bg: rgba(255, 255, 255, 0.06);
  --toggle-active-bg: rgba(50, 50, 65, 1);
  --card-bg: linear-gradient(180deg, rgba(35, 35, 48, 0.9), rgba(28, 28, 38, 0.85));
  --ownership-bg: linear-gradient(180deg, rgba(35, 35, 48, 0.9), rgba(28, 28, 38, 0.85));
  --strip-default: linear-gradient(180deg, rgba(35, 35, 48, 0.9), rgba(28, 28, 38, 0.85));
}

[data-theme="dark"] .panel {
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .hero::after {
  background: linear-gradient(135deg, rgba(50, 80, 30, 0.3), rgba(100, 80, 20, 0.15));
}

[data-theme="dark"] .hero-callout {
  background: linear-gradient(180deg, rgba(180, 150, 20, 0.7), rgba(140, 120, 10, 0.5));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .callout-note {
  color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .strip-card.gold {
  background: linear-gradient(180deg, rgba(100, 85, 20, 0.6), rgba(60, 50, 10, 0.5));
}

[data-theme="dark"] .strip-card.yellow {
  background: linear-gradient(180deg, rgba(90, 80, 15, 0.6), rgba(55, 50, 10, 0.5));
}

[data-theme="dark"] .strip-card.green {
  background: linear-gradient(180deg, rgba(30, 70, 30, 0.5), rgba(20, 50, 20, 0.4));
}

[data-theme="dark"] .strip-card.cream {
  background: linear-gradient(180deg, rgba(50, 45, 30, 0.6), rgba(35, 32, 22, 0.5));
}

[data-theme="dark"] .podium-card.place-1 {
  background: linear-gradient(180deg, rgba(120, 100, 20, 0.6), rgba(60, 50, 10, 0.5));
}

[data-theme="dark"] .podium-card.place-2 {
  background: linear-gradient(180deg, rgba(60, 60, 70, 0.6), rgba(40, 40, 50, 0.5));
}

[data-theme="dark"] .podium-card.place-3 {
  background: linear-gradient(180deg, rgba(80, 60, 35, 0.6), rgba(50, 40, 25, 0.5));
}

[data-theme="dark"] .sheet-heading-cell.gold {
  background: rgba(180, 150, 20, 0.35);
  color: #e8d860;
}

[data-theme="dark"] .sheet-heading-cell.yellow {
  background: rgba(160, 140, 15, 0.3);
  color: #e0d050;
}

[data-theme="dark"] .sheet-heading-cell.green {
  background: rgba(40, 100, 40, 0.3);
  color: #a0d880;
}

[data-theme="dark"] thead th {
  background: var(--thead-bg);
  color: var(--ink);
}

[data-theme="dark"] .place-pill.top {
  background: linear-gradient(180deg, rgba(160, 130, 20, 0.6), rgba(120, 100, 15, 0.4));
  color: #f0e070;
}

[data-theme="dark"] .preview-card,
[data-theme="dark"] .account-card {
  background: linear-gradient(180deg, rgba(30, 55, 30, 0.3), rgba(25, 25, 35, 0.6));
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .queue-card {
  background: var(--card-bg);
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .ownership-card {
  background: var(--ownership-bg);
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .primary-btn {
  background: linear-gradient(135deg, #18a090, #0f8b7b);
}

[data-theme="dark"] .comparison-panel.before header {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .comparison-panel.after header {
  background: rgba(15, 123, 123, 0.15);
}

/* ─── Keyframes ─── */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes progressGrow {
  from { width: 0%; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(15, 123, 123, 0); }
  50% { box-shadow: 0 0 20px 6px rgba(15, 123, 123, 0.25); }
}

@keyframes rowHighlight {
  0% { background: rgba(15, 123, 123, 0.25); }
  100% { background: transparent; }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes countPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes refreshPulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* ─── Animation Classes ─── */

.anim-fade-up {
  animation: fadeSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-fade-in {
  animation: fadeIn 0.5s ease both;
}

.anim-scale-in {
  animation: scaleIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-slide-right {
  animation: slideInRight 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-delay-1 { animation-delay: 0.08s; }
.anim-delay-2 { animation-delay: 0.16s; }
.anim-delay-3 { animation-delay: 0.24s; }
.anim-delay-4 { animation-delay: 0.32s; }
.anim-delay-5 { animation-delay: 0.4s; }
.anim-delay-6 { animation-delay: 0.48s; }

.progress-track span {
  animation: progressGrow 1s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.4s;
}

.row-highlight td {
  animation: rowHighlight 1.5s ease both;
}

.refreshing {
  animation: refreshPulse 0.8s ease;
}

/* ─── Base ─── */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--body-bg);
  color: var(--ink);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  transition: background 0.4s ease, color 0.3s ease;
}

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

.page-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 28px auto 80px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ─── Hero ─── */

.hero {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 34px;
  overflow: hidden;
  position: relative;
  animation: fadeSlideUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -90px -80px auto;
  width: 280px;
  height: 280px;
  background: linear-gradient(135deg, rgba(183, 216, 129, 0.66), rgba(225, 191, 47, 0.32));
  border-radius: 50%;
  filter: blur(4px);
}

.hero-copy,
.hero-callout {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-tag,
.callout-label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.8rem, 5vw, 4.7rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 58ch;
  margin: 16px 0 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.hero-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(29, 29, 27, 0.08);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.hero-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .hero-link {
  background: rgba(255, 255, 255, 0.08);
}

.workflow {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.workflow span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(29, 29, 27, 0.06);
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

[data-theme="dark"] .workflow span {
  background: rgba(255, 255, 255, 0.06);
}

.hero-callout {
  min-width: 220px;
  align-self: start;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--gold), #f5e294);
  box-shadow: inset 0 0 0 1px rgba(29, 29, 27, 0.12);
  animation: scaleIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.hero-callout strong {
  display: block;
  margin: 4px 0;
  font-size: 1.9rem;
}

.callout-note {
  color: rgba(29, 29, 27, 0.76);
}

/* ─── Dark Mode Toggle ─── */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(29, 29, 27, 0.06);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.theme-toggle .icon-sun,
[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: inline;
}

/* ─── Live Indicator ─── */

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 123, 123, 0.1);
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulseGlow 2s ease-in-out infinite;
}

/* ─── Metrics ─── */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.strip-card {
  padding: 20px;
  border-radius: 24px;
  background: var(--strip-default);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}

.strip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.strip-card.gold {
  background: linear-gradient(180deg, #f8df69, #fff3bd);
}

.strip-card.yellow {
  background: linear-gradient(180deg, #fff18a, #fff7cb);
}

.strip-card.green {
  background: linear-gradient(180deg, #d9efb4, #f2f8df);
}

.strip-card.cream {
  background: linear-gradient(180deg, #f7eed8, #fffaf0);
}

.strip-value {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.35rem, 2.5vw, 2.1rem);
  transition: transform 0.2s ease;
}

.strip-value.counting {
  animation: countPulse 0.3s ease;
}

.strip-label,
.strip-note {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ─── Podium ─── */

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.podium-card {
  padding: 22px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.podium-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.15);
}

.podium-card h3 {
  margin: 10px 0 8px;
  font-size: 1.25rem;
}

.podium-card strong {
  display: block;
  font-size: 1.8rem;
}

.podium-card p,
.podium-card span {
  color: var(--muted);
}

.podium-rank {
  display: inline-flex;
  min-width: 54px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  background: rgba(29, 29, 27, 0.08);
  transition: background 0.3s ease;
}

[data-theme="dark"] .podium-rank {
  background: rgba(255, 255, 255, 0.1);
}

.podium-card.place-1 {
  background: linear-gradient(180deg, rgba(241, 208, 73, 0.95), rgba(255, 249, 221, 0.92));
}

.podium-card.place-2 {
  background: linear-gradient(180deg, rgba(232, 232, 220, 0.95), rgba(255, 255, 255, 0.9));
}

.podium-card.place-3 {
  background: linear-gradient(180deg, rgba(232, 196, 148, 0.92), rgba(255, 249, 239, 0.9));
}

/* ─── Layout ─── */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.admin-layout {
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
}

.board-panel,
.auth-panel,
.submission-panel,
#my-submissions-section,
.admin-panel {
  padding: 22px;
}

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

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.panel-head.compact {
  align-items: start;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

/* ─── Sheet Heading ─── */

.sheet-heading {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.sheet-heading-cell {
  padding: 14px 16px;
  border-radius: 18px 18px 12px 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.84rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.sheet-heading-cell.gold {
  background: #ffe541;
}

.sheet-heading-cell.yellow {
  background: #fff372;
}

.sheet-heading-cell.green {
  background: #d8efbf;
}

/* ─── Search ─── */

.search-shell {
  min-width: min(100%, 240px);
}

.search-shell span,
label span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  background: var(--input-bg);
  color: var(--ink);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(15, 123, 123, 0.42);
  box-shadow: 0 0 0 4px rgba(15, 123, 123, 0.08);
  transform: translateY(-1px);
}

/* ─── Table ─── */

.table-shell {
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(29, 29, 27, 0.09);
  transition: border-color 0.3s ease;
}

[data-theme="dark"] .table-shell {
  border-color: rgba(255, 255, 255, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1120px;
  background: var(--table-bg);
  transition: background 0.3s ease;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 16px 14px;
  font-size: 0.85rem;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--thead-bg);
  border-bottom: 2px solid rgba(29, 29, 27, 0.14);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
  white-space: nowrap;
}

thead th:hover {
  filter: brightness(0.95);
}

thead th .sort-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.7rem;
  opacity: 0.4;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

thead th.sort-active .sort-arrow {
  opacity: 1;
}

thead th.sort-desc .sort-arrow {
  transform: rotate(180deg);
}

tbody td {
  padding: 15px 14px;
  border-bottom: 1px solid rgba(29, 29, 27, 0.08);
  vertical-align: middle;
  background: var(--table-cell);
  transition: background 0.2s ease;
}

[data-theme="dark"] tbody td {
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

tbody tr {
  transition: transform 0.15s ease;
}

tbody tr:hover td {
  background: var(--table-hover);
}

tbody tr:hover {
  transform: scale(1.002);
}

tbody tr.anim-row {
  animation: fadeSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.place-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 700;
  background: rgba(29, 29, 27, 0.08);
  transition: background 0.3s ease;
}

[data-theme="dark"] .place-pill {
  background: rgba(255, 255, 255, 0.08);
}

.place-pill.top {
  background: linear-gradient(180deg, #e1bf2f, #f7e892);
}

.name-cell {
  display: grid;
  gap: 4px;
}

.name-cell strong {
  font-size: 0.98rem;
}

.name-cell span {
  color: var(--muted);
  font-size: 0.85rem;
}

.progress-cell {
  min-width: 136px;
}

.progress-cell strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.93rem;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(29, 29, 27, 0.08);
  transition: background 0.3s ease;
}

[data-theme="dark"] .progress-track {
  background: rgba(255, 255, 255, 0.08);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), #20b6a7);
}

/* ─── Forms ─── */

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

.mode-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(29, 29, 27, 0.08);
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 0.3s ease;
}

[data-theme="dark"] .mode-badge {
  background: rgba(255, 255, 255, 0.08);
}

.panel-copy {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.pending-copy {
  color: #8e5f12;
}

[data-theme="dark"] .pending-copy {
  color: #d4a840;
}

.split-fields,
.month-grid {
  display: grid;
  gap: 12px;
}

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

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

.preview-card,
.account-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(183, 216, 129, 0.38), rgba(255, 255, 255, 0.68));
  border: 1px solid rgba(29, 29, 27, 0.08);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.preview-card {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.preview-card strong {
  font-size: 1.6rem;
}

/* ─── Toggle / Buttons ─── */

.toggle-row {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--toggle-bg);
  transition: background 0.3s ease;
}

.toggle-btn,
.primary-btn,
.ghost-btn,
.action-btn {
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, opacity 0.2s ease, background 0.3s ease;
}

.toggle-btn {
  padding: 12px 10px;
  background: transparent;
  color: var(--muted);
}

.toggle-btn.active {
  background: var(--toggle-active-bg);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(29, 29, 27, 0.08);
}

.primary-btn,
.ghost-btn {
  padding: 14px 16px;
  font-weight: 700;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #1b756d, #0f7b7b);
  box-shadow: 0 12px 26px rgba(15, 123, 123, 0.24);
}

.ghost-btn {
  color: var(--ink);
  background: rgba(29, 29, 27, 0.06);
}

[data-theme="dark"] .ghost-btn {
  background: rgba(255, 255, 255, 0.06);
}

.primary-btn:hover,
.ghost-btn:hover,
.action-btn:hover,
.toggle-btn:hover {
  transform: translateY(-2px);
}

.primary-btn:active,
.ghost-btn:active,
.action-btn:active {
  transform: translateY(0) scale(0.98);
}

.primary-btn:disabled,
.ghost-btn:disabled,
.action-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* ─── Pills ─── */

.role-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.role-pill {
  background: rgba(29, 29, 27, 0.08);
}

[data-theme="dark"] .role-pill {
  background: rgba(255, 255, 255, 0.08);
}

.status-pill.pending {
  background: rgba(225, 191, 47, 0.2);
  color: #846606;
}

.status-pill.approved {
  background: rgba(15, 123, 123, 0.14);
  color: #0d645f;
}

.status-pill.rejected {
  background: rgba(191, 75, 57, 0.14);
  color: #923527;
}

[data-theme="dark"] .status-pill.pending {
  color: #d4a840;
}

[data-theme="dark"] .status-pill.approved {
  color: #40c8b0;
}

[data-theme="dark"] .status-pill.rejected {
  color: #e07060;
}

.account-copy {
  margin: 14px 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Card List / Queue ─── */

.card-list {
  display: grid;
  gap: 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 6px;
}

.queue-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(29, 29, 27, 0.08);
  background: var(--card-bg);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.queue-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.queue-top,
.queue-metrics,
.queue-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.queue-top h3 {
  margin: 6px 0 0;
  font-size: 1.1rem;
}

.queue-meta,
.queue-note,
.empty-state {
  color: var(--muted);
  line-height: 1.55;
}

.queue-metrics {
  margin: 14px 0;
}

.metric-chip {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(29, 29, 27, 0.05);
  font-size: 0.88rem;
  transition: background 0.3s ease;
}

[data-theme="dark"] .metric-chip {
  background: rgba(255, 255, 255, 0.05);
}

/* ─── Ownership ─── */

.compact-metrics {
  display: grid;
  gap: 12px;
}

.ownership-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(29, 29, 27, 0.08);
  background: var(--ownership-bg);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.ownership-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 1.3rem;
}

.ownership-card p,
.ownership-card span,
.ownership-note {
  color: var(--muted);
  line-height: 1.55;
}

.ownership-tag {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(29, 29, 27, 0.08);
  font-size: 0.82rem;
  font-weight: 700;
  transition: background 0.3s ease;
}

[data-theme="dark"] .ownership-tag {
  background: rgba(255, 255, 255, 0.08);
}

.ownership-note {
  margin-top: 12px;
}

/* ─── Comparison ─── */

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0 10px;
}

.comparison-panel {
  border-radius: 18px;
  border: 1px solid rgba(29, 29, 27, 0.08);
  overflow: hidden;
  transition: border-color 0.3s ease;
}

[data-theme="dark"] .comparison-panel {
  border-color: rgba(255, 255, 255, 0.06);
}

.comparison-panel header {
  padding: 12px 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.comparison-panel.before header {
  background: rgba(29, 29, 27, 0.07);
}

.comparison-panel.after header {
  background: rgba(15, 123, 123, 0.14);
}

.comparison-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid rgba(29, 29, 27, 0.08);
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

[data-theme="dark"] .comparison-row {
  border-top-color: rgba(255, 255, 255, 0.04);
}

.comparison-row span {
  color: var(--muted);
}

.comparison-row strong {
  text-align: right;
}

.comparison-row.changed {
  background: rgba(225, 191, 47, 0.12);
}

[data-theme="dark"] .comparison-row.changed {
  background: rgba(225, 191, 47, 0.08);
}

.diff-empty {
  padding: 14px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.review-note {
  margin-top: 12px;
}

.queue-actions {
  margin-top: 14px;
}

.action-btn {
  padding: 12px 14px;
  font-weight: 700;
}

.action-btn.approve {
  color: #fff;
  background: linear-gradient(135deg, #1b756d, #0f7b7b);
}

.action-btn.reject {
  color: #fff;
  background: linear-gradient(135deg, #b44e33, #bf4b39);
}

/* ─── Utility ─── */

.hidden {
  display: none !important;
}

/* ─── Status Toast ─── */

.status-strip {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100% - 36px));
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(29, 29, 27, 0.9);
  color: #fff;
  box-shadow: 0 18px 32px rgba(29, 29, 27, 0.24);
  animation: toastIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: background 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.status-strip.error {
  background: rgba(191, 75, 57, 0.94);
}

.status-strip.success {
  background: rgba(15, 123, 123, 0.94);
}

.status-strip.fade-out {
  opacity: 0;
  transform: translateY(10px);
}

/* ─── Skeleton Loading ─── */

.skeleton {
  background: linear-gradient(90deg, rgba(29, 29, 27, 0.06) 25%, rgba(29, 29, 27, 0.12) 50%, rgba(29, 29, 27, 0.06) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
  min-height: 24px;
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
}

/* ─── Responsive ─── */

@media (max-width: 1100px) {
  .metrics,
  .layout,
  .podium-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1440px);
    margin-top: 10px;
  }

  .hero,
  .board-panel,
  .auth-panel,
  .submission-panel,
  #my-submissions-section,
  .admin-panel {
    padding: 18px;
  }

  .split-fields,
  .month-grid,
  .sheet-heading,
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: start;
    flex-direction: column;
  }

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