/* ═══════════════════════════════════════════════════════════════
   ASME Awards Portal — Design System
   Gold / Black / Warm White · Unified Components
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  /* Surfaces */
  --bg: #FAFAF7;
  --bg-warm: #F3F2EB;
  --bg-alt: #EAE7DF;
  --panel: #0A0A0A;
  --panel-soft: #141414;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-warm: rgba(255, 252, 246, 0.85);

  /* Text */
  --fg: #111111;
  --fg-light: #F5F0E6;
  --fg-secondary: #555049;
  --muted: #8A8278;

  /* Brand */
  --gold: #C9A84C;
  --gold-light: #E8D48B;
  --gold-deep: #A29770;
  --gold-glow: rgba(201, 168, 76, 0.18);

  /* Feedback */
  --success: #2D7D46;
  --error: #C23A3A;
  --info: #2563EB;

  /* Lines */
  --border: rgba(201, 168, 76, 0.18);
  --border-subtle: rgba(0, 0, 0, 0.06);

  /* Elevation */
  --shadow-xs: 0 2px 5px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.04);
  --shadow: 0 12px 35px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.08);

  /* Shape */
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-pill: 999px;

  /* Motion */
  --ease: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;
}


/* ─── Utilities ─── */
.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.5s var(--ease) forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ─── Reset ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(201, 168, 76, 0.12), transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(201, 168, 76, 0.1), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.6) 0%, transparent 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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


/* ═══════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.content {
  padding: 36px 40px;
  min-width: 0;
}


/* ─── Sidebar ─── */
.sidebar {
  padding: 24px 20px;
  background: linear-gradient(180deg, #0C0C0C 0%, #111 100%);
  color: var(--fg-light);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid rgba(201, 168, 76, 0.12);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.brand-mark {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(201, 168, 76, 0.3);
  transition: border-color var(--ease);
}

.brand:hover .brand-mark {
  border-color: var(--gold);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.nav {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.nav a {
  padding: 11px 14px;
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  transition: all var(--ease);
}

.nav a:hover,
.nav a.active {
  transform: translateX(4px);
  background: rgba(201, 168, 76, 0.1);
  border-color: rgba(201, 168, 76, 0.28);
  color: #fff;
}

.nav a.active {
  border-left: 3px solid var(--gold);
  color: var(--gold-light);
  background: rgba(201, 168, 76, 0.12);
}

.sidebar-note {
  margin-top: auto;
  padding: 14px 16px;
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: var(--radius);
  background: rgba(201, 168, 76, 0.05);
  font-size: 0.82rem;
  color: var(--gold-deep);
}

.sidebar-note p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
}


/* ─── Eyebrow ─── */
.eyebrow {
  display: block;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
}


/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */

h1,
h2,
h3 {
  font-family: var(--font-display);
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #000 0%, #333 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.15;
  font-weight: 600;
  background: linear-gradient(135deg, #111 0%, #444 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
}


/* ─── Page Header (Standard) ─── */
.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  margin: 6px 0 10px;
}

.page-header p {
  color: var(--fg-secondary);
  line-height: 1.7;
}

/* Flex variant for headers with action buttons */
.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.page-header-row h1 {
  margin: 6px 0 0;
}

.page-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 2px;
}


/* ═══════════════════════════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════════════════════════ */

.flash-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.flash {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.92rem;
  animation: slideIn 0.3s ease;
}

.flash-success {
  border-left: 4px solid var(--success);
}

.flash-error {
  border-left: 4px solid var(--error);
}

.flash-info {
  border-left: 4px solid var(--info);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ═══════════════════════════════════════════════════════════════
   HERO (Homepage)
   ═══════════════════════════════════════════════════════════════ */

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  align-items: center;
  gap: 40px;
  min-height: calc(100vh - 80px);
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 0.98;
  margin: 8px 0 18px;
}

.hero-copy p {
  font-size: 1.05rem;
  color: var(--fg-secondary);
}

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

.hero-actions .button {
  min-width: 160px;
}


/* ═══════════════════════════════════════════════════════════════
   CARDS & PANELS
   ═══════════════════════════════════════════════════════════════ */

/* Shared card base */
.card,
.hero-panel,
.panel-card,
.form-card,
.table-card,
.stat-card,
.option-card {
  background: var(--surface-warm);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: transform var(--ease), box-shadow var(--ease);
}

.option-card:hover,
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ─── Award Picker (Step 1 wizard) ─── */
.award-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 720px;
}

.award-picker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 32px;
  background: var(--surface-warm);
  border: 2px solid rgba(201, 168, 76, 0.15);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--ease);
  text-align: center;
  font-family: var(--font-body);
}

.award-picker-card img {
  max-height: 140px;
  width: auto;
  object-fit: contain;
}

.award-picker-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin: 0;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
}

.award-picker-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card,
.panel-card,
.table-card,
.stat-card,
.option-card {
  padding: 24px;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(201, 168, 76, 0.06) 0%, rgba(201, 168, 76, 0.01) 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-header h2,
.card-header h3 {
  margin: 0;
}

.card-body {
  padding: 24px;
}

/* When card-header is used, remove card padding */
.card:has(.card-header) {
  padding: 0;
}


/* ─── Tab Bar ─── */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--fg);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--ease);
}

.tab-btn:hover {
  color: var(--gold);
}

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* ─── Form Row (2-column) ─── */
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}


/* ─── Stat Grid ─── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.stat-card .label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-card span:not(.label) {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.stat-card strong {
  font-size: 1.1rem;
  font-family: var(--font-body);
}


/* ─── Card Grid ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.award-block {
  margin-bottom: 32px;
}

.option-card h3,
.option-card h2,
.panel-card h2 {
  margin: 0 0 10px;
  font-size: 1.7rem;
}

.option-card p {
  font-size: 0.9rem;
  color: var(--fg-secondary);
  margin-bottom: 14px;
}


/* ─── Section Row ─── */
.section-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 8px;
}


/* ═══════════════════════════════════════════════════════════════
   BUTTONS (Unified)
   ═══════════════════════════════════════════════════════════════ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  border: 0;
  background: linear-gradient(135deg, #111 0%, #222 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--ease);
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  line-height: 1.2;
  font-family: var(--font-body);
}

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

.button:active {
  transform: scale(0.98);
}

.button-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #111;
}

.button-gold:hover {
  box-shadow: 0 6px 24px rgba(201, 168, 76, 0.35);
}

.button-outline {
  background: transparent;
  color: var(--fg);
  border: 2px solid var(--gold);
  box-shadow: none;
}

.button-outline:hover {
  background: var(--gold-glow);
  box-shadow: none;
}

.button-secondary {
  background: transparent;
  color: var(--fg);
  border: 2px solid var(--gold);
  box-shadow: none;
}

.button-secondary:hover {
  background: var(--gold-glow);
  box-shadow: none;
}

.button-danger {
  background: linear-gradient(135deg, #C23A3A, #E04E4E);
  color: #fff;
}

.button-sm {
  padding: 8px 16px;
  font-size: 0.82rem;
}

.button-xs {
  padding: 5px 12px;
  font-size: 0.78rem;
}


/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

.form-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ── Google Sign-In ── */
.google-divider {
  text-align: center;
  position: relative;
  margin: -6px 0;
}

.google-divider span {
  background: var(--surface);
  padding: 0 14px;
  font-size: 0.82rem;
  color: var(--fg-muted);
  position: relative;
  z-index: 1;
}

.google-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: #333;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--ease);
  cursor: pointer;
}

.google-btn:hover {
  background: #f8f8f8;
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

/* Form Groups */
.form-group {
  display: grid;
  gap: 6px;
  margin-bottom: 0;
}

.form-group>label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--fg);
}

label {
  display: grid;
  gap: 6px;
  color: var(--fg);
  font-weight: 600;
  font-size: 0.88rem;
}

label .label-hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82rem;
}

.required-mark {
  color: var(--error);
  font-weight: 700;
  margin-left: 2px;
}

input,
select,
textarea {
  width: 100%;
  border: 1.5px solid transparent;
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
  font-size: 0.92rem;
  transition: all var(--ease);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow);
}

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

/* Question textareas — consistent height for all criteria answers */
.question-section textarea {
  min-height: 160px;
}

/* Profile textareas (e.g. Profile Writeup) */
.grid-form textarea {
  min-height: 120px;
}

input[type="file"] {
  padding: 10px;
  background: var(--bg-warm);
}

.file-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-input-wrap input[type="file"] {
  flex: 1;
}

.file-clear {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-xs);
  background: var(--bg-warm);
  color: var(--error);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease), border-color var(--ease);
}

.file-clear:hover {
  background: #fde8e8;
  border-color: var(--error);
}

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

.form-section h2 {
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}


/* ─── Checkboxes ─── */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.checkbox {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-warm);
  border: 1.5px solid transparent;
  transition: all var(--ease);
  cursor: pointer;
}

.checkbox:has(input:checked) {
  background: var(--gold-glow);
  border-color: var(--gold);
}

.checkbox input[type="checkbox"] {
  width: auto;
  margin: 0;
}


/* ═══════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════ */

.table-card {
  overflow-x: auto;
}

.table-card table,
.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrapper {
  overflow-x: auto;
}

th,
td {
  text-align: left;
  padding: 13px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 2px solid var(--border);
}

tbody tr {
  transition: background var(--ease);
}

tbody tr:hover {
  background: rgba(201, 168, 76, 0.04);
}

/* Detail table (key-value pairs) */
.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table th,
.detail-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  font-size: 0.9rem;
}

.detail-table th {
  color: var(--muted);
  font-weight: 600;
  width: 35%;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-table td {
  color: var(--fg);
}


/* ─── Empty States ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(0, 0, 0, 0.1);
  margin-top: 10px;
}

.empty-state-icon {
  font-size: 2.4rem;
  color: rgba(201, 168, 76, 0.4);
  margin-bottom: 12px;
}

.empty-state h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--fg);
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--fg-secondary);
}


/* ═══════════════════════════════════════════════════════════════
   STATUS BADGES & PILLS
   ═══════════════════════════════════════════════════════════════ */

/* Award tag pills (gold gradient — for labels like EYA, SPBA) */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #111;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.pill-sm {
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.pill-placeholder {
  background: var(--surface-alt);
  color: var(--fg);
  border: 1px solid var(--border);
  font-weight: 600;
  font-family: var(--font-mono, monospace);
  cursor: pointer;
  transition: all var(--ease);
}

.pill-placeholder:hover {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}

.placeholder-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* ── Recipient Checklist ── */
.recipient-checklist {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.recipient-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--ease);
}

.recipient-item:last-child {
  border-bottom: none;
}

.recipient-item:hover {
  background: var(--surface-alt);
}

.recipient-item input[type=checkbox] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.recipient-name {
  font-weight: 600;
  flex-shrink: 0;
}

.recipient-email {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status badges (for statuses like Draft, Submitted, Winner) */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1.5px solid transparent;
  letter-spacing: 0.02em;
}

.status-draft {
  background: rgba(201, 168, 76, 0.1);
  color: #8B7530;
  border-color: rgba(201, 168, 76, 0.2);
}

.status-submitted,
.status-scored {
  background: rgba(45, 125, 70, 0.1);
  color: #2D7D46;
  border-color: rgba(45, 125, 70, 0.18);
}

.status-winner {
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.15), rgba(201, 168, 76, 0.08));
  color: #8B7530;
  border-color: rgba(201, 168, 76, 0.3);
}

.status-withdrawn {
  background: rgba(194, 58, 58, 0.08);
  color: #C23A3A;
  border-color: rgba(194, 58, 58, 0.15);
}

.status-active,
.status-open {
  background: rgba(201, 168, 76, 0.08);
  color: #8B7530;
  border-color: rgba(201, 168, 76, 0.15);
}

.status-pending,
.status-muted {
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
  border-color: rgba(0, 0, 0, 0.08);
}

.file-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.04);
  color: var(--fg-secondary);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
}


/* ═══════════════════════════════════════════════════════════════
   ACTION CHIPS
   ═══════════════════════════════════════════════════════════════ */

.action-cell {
  white-space: nowrap;
}

.action-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.82rem;
  margin-right: 6px;
  border: 1.5px solid transparent;
  transition: all var(--ease);
  text-decoration: none;
}

.action-chip:hover {
  transform: translateY(-1px);
}

.action-chip-edit {
  background: rgba(201, 168, 76, 0.1);
  color: #8B7530;
  border-color: rgba(201, 168, 76, 0.25);
}

.action-chip-review {
  background: rgba(17, 17, 17, 0.06);
  color: #333;
  border-color: rgba(17, 17, 17, 0.12);
}

.action-chip-view {
  background: rgba(45, 125, 70, 0.08);
  color: #2D7D46;
  border-color: rgba(45, 125, 70, 0.15);
}

.action-chip-delete {
  background: rgba(194, 58, 58, 0.08);
  color: #C23A3A;
  border-color: rgba(194, 58, 58, 0.15);
  cursor: pointer;
}


/* ═══════════════════════════════════════════════════════════════
   UPLOAD CARDS
   ═══════════════════════════════════════════════════════════════ */

.upload-grid {
  display: grid;
  gap: 12px;
}

.upload-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--surface);
  transition: all var(--ease);
}

.upload-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}

.upload-card h3 {
  margin: 0;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
}

.upload-card-empty {
  justify-content: center;
  background: var(--bg-warm);
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}


/* ═══════════════════════════════════════════════════════════════
   QUESTION SECTIONS (Application Forms)
   ═══════════════════════════════════════════════════════════════ */

.question-section {
  padding: 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  transition: border-color var(--ease);
}

.question-section:hover {
  border-color: rgba(201, 168, 76, 0.35);
}

.question-section h3 {
  margin: 0 0 6px;
}

.question-section .weightage {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--gold-glow);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.muted-copy {
  color: var(--muted);
  font-size: 0.9rem;
}

.optional-section-hidden {
  display: none;
}


/* ─── Review / Answer Blocks ─── */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.answer-block {
  padding: 14px 0;
  border-top: 1px solid var(--border-subtle);
}

.prompt-answer {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-warm);
  border-left: 3px solid var(--gold);
}

.prompt-answer p {
  margin: 6px 0 0;
  color: var(--fg-secondary);
}


/* ═══════════════════════════════════════════════════════════════
   INFO BANNER & DECLARATION
   ═══════════════════════════════════════════════════════════════ */

.info-banner {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: rgba(201, 168, 76, 0.08);
  border-left: 4px solid var(--gold);
  margin-bottom: 16px;
  color: #6B5B1E;
  font-size: 0.9rem;
  line-height: 1.6;
}

.info-banner p {
  margin: 0;
  color: inherit;
}

.info-banner p+p {
  margin-top: 8px;
}

.info-banner ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.declaration-block {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.declaration-block h3 {
  margin: 0 0 12px;
}

.declaration-block ul {
  padding-left: 18px;
  margin: 0;
}

.declaration-block li {
  margin-bottom: 8px;
  color: var(--fg-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.declaration-block li:last-child {
  margin-bottom: 0;
}


/* ═══════════════════════════════════════════════════════════════
   SCORING PANEL (Judge)
   ═══════════════════════════════════════════════════════════════ */

.scoring-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, rgba(201, 168, 76, 0.04), transparent);
}

.scoring-panel h2 {
  margin-bottom: 4px;
}

.score-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
}

.score-field label {
  font-size: 0.85rem;
}

.score-field input {
  width: 80px;
  text-align: center;
  font-weight: 700;
}

.score-total {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #111;
  font-weight: 800;
  text-align: center;
  font-size: 1.1rem;
}


/* ═══════════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════════ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 640px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.3s ease;
}

.modal h2 {
  margin-bottom: 16px;
}

.modal p {
  color: var(--fg-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.modal .checkbox {
  margin: 18px 0;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


/* ═══════════════════════════════════════════════════════════════
   SIGNATURE CANVAS
   ═══════════════════════════════════════════════════════════════ */

#signatureCanvas {
  display: block;
  border: 2px solid var(--border);
  border-radius: var(--radius-xs);
  background: #fff;
  cursor: crosshair;
  touch-action: none;
}


/* ═══════════════════════════════════════════════════════════════
   LAYOUT UTILITIES
   ═══════════════════════════════════════════════════════════════ */

.two-col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.two-col-wide {
  grid-template-columns: 1fr 400px;
}

.assignment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.assignment-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface-warm);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--ease);
}

.assignment-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.assignment-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 6px;
}

.assignment-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.separator {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* Word Counter */
.word-count {
  text-align: right;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: -4px;
}

.word-count.over {
  color: var(--error);
}


/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */

.mt-xs {
  margin-top: 4px;
}

.mt-sm {
  margin-top: 8px;
}

.mt-md {
  margin-top: 16px;
}

.mt-lg {
  margin-top: 28px;
}

.mb-sm {
  margin-bottom: 8px;
}

.mb-md {
  margin-bottom: 16px;
}

.mb-lg {
  margin-bottom: 28px;
}

.text-gold {
  color: var(--gold);
}

.text-muted {
  color: var(--muted);
}

.text-sm {
  font-size: 0.85rem;
}

.text-xs {
  font-size: 0.78rem;
}

.text-center {
  text-align: center;
}

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

.text-bold {
  font-weight: 700;
}

.d-flex {
  display: flex;
}

.d-grid {
  display: grid;
}

.align-center {
  align-items: center;
}

.align-start {
  align-items: flex-start;
}

.justify-between {
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-xs {
  gap: 6px;
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 16px;
}

.gap-lg {
  gap: 24px;
}

.flex-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.full-width {
  grid-column: 1 / -1;
}


/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--muted);
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

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

  .sidebar {
    position: relative;
    top: 0;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
  }

  .sidebar-note {
    margin-top: 0;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .brand-copy {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .content {
    padding: 24px 20px;
  }

  .two-col,
  .two-col-wide {
    grid-template-columns: 1fr;
  }
}

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

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

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

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

  .content {
    padding: 18px 14px;
  }
}

/* ── Scoring field cards (judge 1-10 system) ── */
.score-fields-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.score-field-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.score-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.score-field-header label {
  font-weight: 600;
  font-size: 0.95rem;
}

.score-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.score-input-wrap .score-input {
  width: 70px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
}

.score-input-wrap .score-max {
  font-size: 0.85rem;
  color: var(--fg-muted);
}

.score-field-card textarea {
  font-size: 0.85rem;
  min-height: 50px;
}