:root {
  --bg: #080f1e;
  --bg-elevated: #0f172a;
  --surface: #131f37;
  --surface-soft: #1b2a47;
  --border: rgba(148, 163, 184, 0.22);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --teal: #14b8a6;
  --teal-strong: #0d9488;
  --teal-soft: rgba(20, 184, 166, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --radius: 14px;
  --shadow: 0 20px 50px rgba(2, 6, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(circle at top right, #132544 0%, var(--bg) 52%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: #5eead4;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header / Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 15, 30, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal), #0284c7);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.94rem;
}

.nav-links a.active,
.nav-links a:hover {
  color: #ffffff;
  text-decoration: none;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--teal);
  color: #042f2e;
}

.btn-primary:hover {
  background: #2dd4bf;
}

.btn-approve {
  background: var(--emerald);
  color: #022c22;
}

.btn-approve:hover {
  background: #34d399;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background: #f87171;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-soft);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn-disabled {
  background: rgba(148, 163, 184, 0.12);
  border-color: var(--border);
  color: var(--text-muted);
  cursor: default;
}

.btn-disabled:hover {
  transform: none;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-teal {
  background: var(--teal-soft);
  color: #5eead4;
  border: 1px solid rgba(20, 184, 166, 0.35);
}

.badge-amber {
  background: var(--amber-soft);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-emerald {
  background: var(--emerald-soft);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-danger {
  background: var(--danger-soft);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-muted {
  background: rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  border: 1px solid var(--border);
}

/* Alerts */
.alert {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.92rem;
  border: 1px solid transparent;
}

.alert-error {
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecaca;
}

.alert-success {
  background: var(--emerald-soft);
  border-color: rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.alert-warning {
  background: var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

/* Auth Gate Page */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-header .brand-mark {
  width: 48px;
  height: 48px;
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.auth-header h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.auth-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.tab-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: var(--bg);
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 22px;
  border: 1px solid var(--border);
}

.tab-btn {
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--surface-soft);
  color: #ffffff;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
}

.field input,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

.field textarea {
  min-height: 76px;
  resize: vertical;
}

.auth-footer-note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* Main Portal Sections */
main {
  padding: 32px 0 64px;
}

.hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  margin-bottom: 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: stretch;
}

.hero-media {
  position: relative;
  min-height: 360px;
  background: #0b1324;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-body {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.hero-body h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.15;
}

.hero-subtitle {
  margin: 0;
  color: #cbd5e1;
  font-size: 1.02rem;
}

.hero-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 36px 0 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.45rem;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-pad {
  padding: 22px;
}

.card-media {
  aspect-ratio: 16 / 10;
  background: #0b1324;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-media-placeholder {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.02) 12px,
    rgba(255, 255, 255, 0.04) 12px,
    rgba(255, 255, 255, 0.04) 24px
  );
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.card h3 {
  margin: 8px 0 6px;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
}

/* Info Box & Table */
.info-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.info-table th,
.info-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  vertical-align: top;
}

.info-table th {
  color: var(--text-muted);
  font-weight: 600;
  background: rgba(15, 23, 42, 0.65);
}

.info-table tr:last-child td,
.info-table tr:last-child th {
  border-bottom: 0;
}

.review-card {
  max-width: 620px;
  margin: 48px auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.site-footer {
  padding: 28px 0 42px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .cards-3 {
    grid-template-columns: 1fr;
  }
  .cards-2 {
    grid-template-columns: 1fr;
  }
  .topbar-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }
}
