/* =========================================================
   Formula E Tycoon – style.css
   Dark UI with neon accent (FE-inspired, but original)
   ========================================================= */

:root{
  --bg: #0b0f14;
  --panel: #111824;
  --panel2: #0f1520;
  --card: #141c28;
  --border: #1f2a3a;
  --text: #e8eef9;
  --muted: rgba(232,238,249,.72);
  --accent: #19f5c6;
  --accent2:#56a0ff;
  --danger:#ff4d6d;
  --warn:#ffb703;
  --shadow: 0 16px 40px rgba(0,0,0,.35);
  --radius: 14px;
  --radius2: 20px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(25,245,198,.14), transparent 60%),
    radial-gradient(900px 600px at 120% 0%, rgba(86,160,255,.14), transparent 55%),
    linear-gradient(180deg, var(--bg), #05070a);
}

a{ color:inherit; text-decoration:none; }
.muted{ color:var(--muted); }

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 18px;
  background: rgba(10,14,20,.85);
  border-bottom: 1px solid rgba(31,42,58,.7);
  backdrop-filter: blur(10px);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.brand-logo{
  width:44px;
  height:44px;
  object-fit:contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.35));
}
.brand-title{ font-weight:800; letter-spacing:.3px; }
.brand-sub{ font-size:.9rem; color:var(--muted); margin-top:2px; }

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

.app{
  display:grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 70px);
}

.sidenav{
  padding:14px;
  border-right: 1px solid rgba(31,42,58,.7);
  background: linear-gradient(180deg, rgba(17,24,36,.9), rgba(10,14,20,.65));
}
.sidenav button{
  width:100%;
  display:block;
  text-align:left;
  padding:11px 12px;
  margin:8px 0;
  border-radius: 12px;
  border: 1px solid rgba(31,42,58,.9);
  background: rgba(20,28,40,.55);
  color:var(--text);
  cursor:pointer;
  transition: transform .08s ease, border-color .2s ease, background .2s ease;
}
.sidenav button:hover{
  transform: translateY(-1px);
  border-color: rgba(25,245,198,.35);
  background: rgba(20,28,40,.75);
}
.sidenav button.active{
  border-color: rgba(25,245,198,.55);
  background: linear-gradient(180deg, rgba(25,245,198,.16), rgba(20,28,40,.65));
  box-shadow: 0 10px 26px rgba(25,245,198,.10);
}

.content{ padding:18px; }

.card{
  background: linear-gradient(180deg, rgba(20,28,40,.85), rgba(15,21,32,.85));
  border: 1px solid rgba(31,42,58,.9);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding:16px;
  margin-bottom:14px;
}

.hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.hero h2{ margin:0; font-size:1.35rem; }
.hero .hero-meta{ color:var(--muted); margin-top:4px; }

.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:14px;
}
.kpi{
  background: rgba(20,28,40,.50);
  border: 1px solid rgba(31,42,58,.9);
  border-radius: var(--radius);
  padding:14px;
}
.kpi h3{ margin:0 0 6px 0; font-size:1.05rem; }
.kpi .small{ color:var(--muted); font-size:.92rem; }

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius: 999px;
  border:1px solid rgba(31,42,58,.9);
  background: rgba(20,28,40,.5);
  color: var(--muted);
  font-size:.86rem;
}

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

table{ width:100%; border-collapse: collapse; overflow:hidden; border-radius: 12px; }
th,td{
  padding:10px 10px;
  border-bottom: 1px solid rgba(31,42,58,.7);
}
th{
  text-align:left;
  color: rgba(232,238,249,.85);
  font-weight:700;
  background: rgba(20,28,40,.55);
}
tr:hover td{ background: rgba(25,245,198,.06); }

input, select{
  width:100%;
  max-width: 380px;
  padding:10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(31,42,58,.9);
  background: rgba(10,14,20,.55);
  color: var(--text);
  outline:none;
}
input:focus, select:focus{
  border-color: rgba(25,245,198,.55);
  box-shadow: 0 0 0 4px rgba(25,245,198,.10);
}

.btn{
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid rgba(31,42,58,.9);
  background: rgba(20,28,40,.55);
  color:var(--text);
  cursor:pointer;
  transition: transform .08s ease, border-color .2s ease, background .2s ease;
}
.btn:hover{ transform: translateY(-1px); border-color: rgba(25,245,198,.35); }
.btn:disabled{ opacity:.45; cursor:not-allowed; transform:none; }

.btn-primary{
  background: linear-gradient(90deg, rgba(25,245,198,.22), rgba(86,160,255,.18));
  border-color: rgba(25,245,198,.55);
}
.btn-ghost{
  background: transparent;
  border-color: rgba(255,255,255,.18);
}
.btn-danger{
  background: rgba(255,77,109,.12);
  border-color: rgba(255,77,109,.55);
}

.progress{
  height:10px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border:1px solid rgba(31,42,58,.7);
  overflow:hidden;
}
.progress > div{
  height:100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(25,245,198,.9), rgba(86,160,255,.9));
  width: 50%;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 34px;
  padding:8px 10px;
  border-radius: 14px;
  border:1px solid rgba(31,42,58,.9);
  background: rgba(20,28,40,.55);
  font-weight:800;
}

hr.sep{
  border:none;
  border-top: 1px solid rgba(31,42,58,.7);
  margin: 14px 0;
}

/* Start page */
.start-body{ display:flex; align-items:center; justify-content:center; padding:18px; }
.start-shell{ width:min(920px, 100%); }
.start-card{
  background: linear-gradient(180deg, rgba(20,28,40,.9), rgba(15,21,32,.9));
  border:1px solid rgba(31,42,58,.9);
  border-radius: 26px;
  padding: 22px;
  box-shadow: var(--shadow);
  text-align:center;
}
.start-logo{ width:86px; height:86px; object-fit:contain; margin: 4px auto 10px; }
.start-row{ text-align:left; margin: 18px auto 0; width:min(520px, 100%); }
.start-row label{ display:block; color:var(--muted); margin-bottom:8px; }
.start-actions{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:14px; }
.start-foot{ margin-top:16px; display:flex; justify-content:center; gap:8px; flex-wrap:wrap; }

/* Mobile */
@media (max-width: 860px){
  .app{ grid-template-columns: 1fr; }
  .sidenav{
    display:flex;
    gap:8px;
    overflow:auto;
    border-right:none;
    border-bottom: 1px solid rgba(31,42,58,.7);
    position:sticky;
    top:70px;
    z-index:9;
  }
  .sidenav button{
    width:auto;
    white-space:nowrap;
    margin:0;
  }
}
