:root {
  --bg: #020617;
  --bg-elevated: #020617;
  --surface: #020617;
  --border: rgba(148, 163, 184, 0.35);
  --text-main: #f9fafb;
  --text-muted: #b3bac7;
  /* Brand accent (muted to reduce eye-strain). */
  --brand: #16a34a;
  --brand-soft: rgba(34, 197, 94, 0.12);
  --danger: #f97373;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.85);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #0b1120 0, #020617 45%, #000 100%);
  color: var(--text-main);
}

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

a:hover {
  text-decoration: underline;
}

/* Modern clickable seller handle (no 1990s underline) */
.handle-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.04);
  color: rgba(248, 250, 252, 0.92);
  font-weight: 750;
  line-height: 1.7;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease, color 140ms ease;
}

.handle-link:hover {
  text-decoration: none;
  background: rgba(248, 250, 252, 0.08);
  border-color: rgba(148, 163, 184, 0.35);
  color: rgba(248, 250, 252, 0.98);
}

.handle-link:active {
  transform: translateY(1px);
}

.handle-link .handle-icon {
  width: 14px;
  height: 14px;
  opacity: 0.65;
  transition: opacity 140ms ease;
}

.handle-link:hover .handle-icon {
  opacity: 1;
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.82));
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.shell-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.brand-logo {
  height: 30px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 4px rgba(15, 23, 42, 0.9));
}

.brand-word {
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.shell-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}

.shell-nav a {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-weight: 650;
  letter-spacing: 0.15px;
}

.shell-nav a:hover {
  border-color: rgba(148, 163, 184, 0.35);
  color: rgba(248, 250, 252, 0.90);
  background: radial-gradient(circle at top, rgba(248, 250, 252, 0.04), transparent 60%);
}

.shell-main {
  flex: 1;
}

.shell-main-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 18px 40px;
}

/* Layout scaling: keep mobile header exactly as-is, give laptops/tablets more breathing room */
@media (min-width: 900px) {
  .shell-header-inner,
  .shell-main-inner,
  .shell-footer-inner {
    max-width: 1240px;
  }
  .shell-main-inner {
    padding: 30px 22px 44px;
  }
}

@media (min-width: 1200px) {
  .shell-header-inner,
  .shell-main-inner,
  .shell-footer-inner {
    max-width: 1320px;
  }
}

.shell-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 12px 18px 18px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.shell-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.3fr);
  gap: 28px;
  align-items: center;
}

.hero-panel {
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.08), transparent 60%);
  border-radius: 22px;
  padding: 22px 20px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: var(--shadow-soft);
}

.hero-kicker {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-title {
  font-size: 1.7rem;
  font-weight: 650;
  margin: 8px 0 4px;
}

.hero-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 480px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 16px;
}

.hero-badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top left, rgba(148, 163, 184, 0.18), transparent 65%);
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.btn-primary {
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.82rem;
  border: none;
  /* Primary CTA: premium, trust-first (avoid betting-site neon greens). */
  background: linear-gradient(to right, #0f172a, #1f2937);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: rgba(148, 163, 184, 0.7);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.72rem;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.card {
  border-radius: 18px;
  padding: 16px 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.35), rgba(15, 23, 42, 0.95));
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 550;
}

.card-price {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.card-body {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 0.76rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.72rem;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand);
}

.form-card {
  max-width: 420px;
  margin: 0 auto;
  border-radius: 18px;
  padding: 18px 16px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.96);
}

/* Used by dashboard builder pages (Create Prediction, etc.) */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}

.form-field {
  margin-bottom: 10px;
}

/* Used by prediction builder + other pages: stack on mobile, 2 columns on larger screens */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}

.form-label {
  display: block;
  font-size: 0.86rem;
  margin-bottom: 3px;
}

.form-input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  padding: 6px 8px;
  font-size: 0.92rem;
}

/* Alias used by some newer templates (admin/sa dashboards) */
.input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  padding: 6px 8px;
  font-size: 0.92rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand);
}

.input:focus {
  outline: none;
  border-color: var(--brand);
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-top: 12px;
}

.table th,
.table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  padding: 6px 4px;
  text-align: left;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.badge-green {
  border-color: rgba(34, 197, 94, 0.8);
  color: #bbf7d0;
}

.badge-red {
  border-color: rgba(248, 113, 113, 0.8);
  color: #fecaca;
}

.badge-amber {
  border-color: rgba(251, 191, 36, 0.8);
  color: #facc15;
}

.brand-logo {
  height: 30px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 4px rgba(15, 23, 42, 0.9));
}

.shell-search {
  display: flex;
  align-items: center;
  margin-right: 6px;
}

.shell-search-input {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  padding: 4px 10px;
  font-size: 0.75rem;
  min-width: 180px;
}

.shell-search-input::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

.shell-search-input:focus {
  outline: none;
  border-color: var(--brand);
}

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

.brand-logo-main {
  height: 34px;      /* make logo bigger & visible */
  width: auto;
  display: block;
  filter: drop-shadow(0 0 4px rgba(15, 23, 42, 0.9));
}

.brand-tagline-only {
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.98);
  letter-spacing: 0.03em;
  text-transform: none;
}

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

/* Light pill behind your dark logo so it stands out */
.brand-logo-box {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(249, 250, 251, 0.96); /* very light */
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.75),
    0 8px 18px rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-main {
  height: 24px;
  width: auto;
  display: block;
}

/* tagline text next to the logo */
.brand-tagline-only {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.98);
  letter-spacing: 0.02em;
}

/* Slightly larger base font for readability */
body {
  font-size: 16px;
}

/* Make nav links and buttons a bit bigger */
.shell-nav a {
  font-size: 0.9rem;
}

.btn-primary,
.btn-ghost,
.btn-pill {
  font-size: 0.9rem;
}

/* Make card text a touch larger */
.card-body {
  font-size: 0.9rem;
}

/* Hero title slightly bigger */
.hero-title {
  font-size: 1.6rem;
}
.shell-nav a.btn-primary {
  color: #ffffff;
}
.shell-nav a.btn-primary:hover {
  color: #ffffff;
}


/* Mobile header controls */
@media (max-width: 768px) {
  .shell-search { display: none; }
  .shell-nav { display: none; }
  .shell-mobile { display: flex; gap: 10px; align-items: center; }
  .shell-mobile details { position: relative; }
  .shell-mobile details > summary { list-style: none; cursor: pointer; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.10); }
  .shell-mobile details > summary::-webkit-details-marker { display: none; }
  .shell-mobile-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    margin-top: 0;
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.10);
    min-width: 220px;
    z-index: 60;
  }
  .shell-mobile-menu-panel a { padding: 8px 10px; border-radius: 10px; }
  .shell-mobile-search-form {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    margin-top: 0;
    padding: 12px;
    border-radius: 16px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.10);
    min-width: 240px;
    z-index: 60;
  }
}
@media (min-width: 769px) {
  .shell-mobile { display: none; }
}

/* Dashboard dropdown sections */
.dash-drop { margin-top: 12px; }
.dash-drop-summary {
  list-style: none;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
}
.dash-drop-summary::-webkit-details-marker { display: none; }
.dash-drop[open] > .dash-drop-summary { background: rgba(255,255,255,0.10); }

/* === Legibility + mobile dropdown panel tweaks (requested) === */
@media (min-width: 769px) {
  body { font-size: 16px; }
  .text-muted { font-size: 0.84rem; font-weight: 500; }
  .form-label { font-size: 0.86rem; }
  .form-input, .input { font-size: 0.92rem; }
  .table { font-size: 0.9rem; }
  .badge { font-size: 0.8rem; }
}

@media (max-width: 768px) {
  .shell-mobile-menu-panel,
  .shell-mobile-search-form {
    background: rgba(2, 6, 23, 0.98);
  }
}


/* Empty states */
.empty-state{margin:8px 0; padding:18px; border:1px dashed rgba(148,163,184,.28); border-radius:18px; background:rgba(2,6,23,.35); text-align:center;}
.empty-icon{font-size:28px; margin-bottom:6px;}
.empty-title{font-weight:900; font-size:1.05rem; margin-bottom:6px;}

/* Spinner + loading */
.spinner{display:inline-block; width:14px; height:14px; border-radius:999px; border:2px solid rgba(248,250,252,.35); border-top-color:rgba(248,250,252,.9); margin-right:8px; animation:spin .8s linear infinite;}
@keyframes spin{to{transform:rotate(360deg)}}
.is-disabled{opacity:.72; cursor:not-allowed;}

/* Modal */
.modal{position:fixed; inset:0; display:none; z-index:60;}
.modal.is-open{display:block;}
.modal-backdrop{position:absolute; inset:0; background:rgba(0,0,0,.55); backdrop-filter: blur(6px);} 
.modal-panel{position:relative; max-width:520px; margin:12vh auto; background:rgba(2,6,23,.98); border:1px solid rgba(148,163,184,.28); border-radius:18px; box-shadow: var(--shadow-soft); padding:14px;}
.modal-header{display:flex; justify-content:space-between; align-items:center; gap:10px;}
.modal-title{font-weight:950; font-size:1.02rem;}
.modal-body{margin-top:10px; white-space:pre-wrap;}
.modal-actions{display:flex; justify-content:flex-end; gap:10px; margin-top:14px; flex-wrap:wrap;}


/* v2 polish: spartan, premium, trust-oriented */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* Do not shrink the app width here; keep consistent with the global layout above. */
.shell-main-inner { max-width: 1320px; }
.card { border: 1px solid rgba(255,255,255,.08); box-shadow: 0 14px 40px rgba(0,0,0,.28); }
.btn, .btn-primary, .btn-ghost { font-weight: 800; letter-spacing: .2px; }
.btn-primary { box-shadow: 0 10px 24px rgba(0,0,0,.28); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.hr { border: 0; height: 1px; background: rgba(255,255,255,.08); margin: 14px 0; }


/* --------------------------------------------------------------------------
   Alerts / notices (used across templates)
   -------------------------------------------------------------------------- */
.alert{
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.06);
  color: rgba(248, 250, 252, 0.92);
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.45);
}
.alert-success{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.10);
}
.alert-error{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
}
.alert-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.alert-dismiss{
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255,255,255,.06);
  color: rgba(248,250,252,.92);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 900;
  cursor: pointer;
}
.alert-dismiss:hover{ background: rgba(255,255,255,.10); }
.alert .text-muted{ color: rgba(226, 232, 240, 0.80); }
.alert code{
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 2px 8px;
  border-radius: 10px;
  color: rgba(248, 250, 252, 0.92);
}
