:root{
  --bg:#eef3f8;
  --bg-soft:#111821;
  --sidebar:#0c1219;
  --card:#ffffff;
  --card-soft:#f7f9fc;
  --text:#16202b;
  --text-soft:#5f6b78;
  --border:#dbe3ec;
  --primary:#c7ff00;
  --primary-2:#a7e500;
  --primary-ink:#10160b;
  --dark:#0f1720;
  --danger:#d94b4b;
  --success:#1f9d55;
  --warning:#c58a00;
  --shadow:0 14px 34px rgba(8,15,26,.08);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font-family:Inter,Segoe UI,Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--text);
}

a{color:#0f5ab8;text-decoration:none}
a:hover{color:#0b4388}

code{
  background:#eef4fb;
  padding:.2rem .45rem;
  border-radius:6px;
  color:#0b4388;
}

label{
  display:flex;
  flex-direction:column;
  gap:.45rem;
  font-size:.95rem;
  color:var(--text);
  font-weight:600;
}

input,select,textarea{
  padding:.82rem .9rem;
  border:1px solid var(--border);
  border-radius:14px;
  font:inherit;
  background:#fff;
  color:var(--text);
  width:100%;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease;
}

input:focus,select:focus,textarea:focus{
  border-color:rgba(167,229,0,.9);
  box-shadow:0 0 0 4px rgba(199,255,0,.14);
}

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

.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:var(--primary-ink);
  border:none;
  border-radius:14px;
  padding:.88rem 1.15rem;
  font-weight:800;
  letter-spacing:.01em;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(167,229,0,.18);
  transition:transform .12s ease, box-shadow .18s ease;
}

.button:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(167,229,0,.22);
}

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

.sidebar{
  background:linear-gradient(180deg,#0b1016 0,#111a23 100%);
  color:#fff;
  padding:1.5rem 1.1rem;
  border-right:1px solid rgba(255,255,255,.06);
  position:sticky;
  top:0;
  height:100vh;
}

.brand{
  margin-bottom:1.6rem;
  padding:.35rem .3rem 1.1rem;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.brand-mark{
  width:54px;
  height:54px;
  border-radius:16px;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:var(--primary-ink);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.55rem;
  font-weight:900;
  margin-bottom:.95rem;
  box-shadow:0 14px 30px rgba(167,229,0,.18);
}

.brand-title{
  font-size:1.35rem;
  font-weight:900;
  letter-spacing:.02em;
  color:#fff;
}

.brand-subtitle{
  font-size:.88rem;
  color:#a9b6c3;
  margin-top:.35rem;
  line-height:1.45;
}

.sidebar nav{
  display:flex;
  flex-direction:column;
  gap:.45rem;
}

.sidebar nav a{
  display:block;
  color:#d7e0e8;
  padding:.9rem 1rem;
  border-radius:14px;
  border:1px solid transparent;
  transition:background .14s ease, border-color .14s ease, transform .12s ease, color .14s ease;
}

.sidebar nav a:hover,
.sidebar nav a.active{
  background:rgba(199,255,0,.1);
  border-color:rgba(199,255,0,.2);
  color:#fff;
  transform:translateX(2px);
}

.content{
  padding:1.7rem 2rem 2rem;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:1.2rem;
  gap:1rem;
}

.page-title-wrap h1{
  margin:0;
  font-size:2rem;
  line-height:1.1;
  color:var(--dark);
}

.page-title-wrap p{
  margin:.45rem 0 0;
  color:var(--text-soft);
}

.user-chip{
  background:#fff;
  border:1px solid var(--border);
  padding:.8rem 1rem;
  border-radius:999px;
  color:var(--dark);
  box-shadow:var(--shadow);
  font-weight:700;
}

.panel,.stat-card,.auth-card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.panel{
  padding:1.15rem 1.25rem;
  margin-bottom:1rem;
}

.panel-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:1rem;
  gap:1rem;
}

.panel-header h2{
  margin:0;
  font-size:1.12rem;
  color:var(--dark);
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1rem;
  margin-bottom:1rem;
}

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

.stat-card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:4px;
  background:linear-gradient(90deg,var(--primary),var(--primary-2));
}

.stat-card strong{
  font-size:2rem;
  display:block;
  color:var(--dark);
}

.stat-card span{
  color:var(--text-soft);
  font-weight:600;
}

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

.table th,.table td{
  padding:.9rem .82rem;
  border-top:1px solid #edf2f7;
  text-align:left;
  vertical-align:top;
}

.table tbody tr:hover{
  background:#fbfdff;
}

.table thead th{
  border-top:none;
  color:var(--text-soft);
  font-size:.82rem;
  text-transform:uppercase;
  letter-spacing:.04em;
}

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

.grid-form h2,.grid-form .full{
  grid-column:1 / -1;
}

.actions{
  display:flex;
  gap:.75rem;
  align-items:center;
  flex-wrap:wrap;
}

.checkbox{
  flex-direction:row;
  align-items:center;
  gap:.6rem;
}

.checkbox input{
  width:auto;
}

.alert{
  padding:.95rem 1rem;
  border-radius:14px;
  margin-bottom:1rem;
  border:1px solid transparent;
  font-weight:600;
}

.alert.error{
  background:#fff1f1;
  color:#9b2c2c;
  border-color:#f3c8c8;
}

.alert.success{
  background:#eefcf3;
  color:#1d6b3d;
  border-color:#c9ebd6;
}

.alert.warning{
  background:#fff8e8;
  color:#8a5a00;
  border-color:#f2dfac;
}

.small{font-size:.85rem}
.muted{color:var(--text-soft)}

.auth-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:2rem;
  background:linear-gradient(135deg,#0b1016 0,#141d28 100%);
}

.auth-card{
  width:100%;
  max-width:460px;
  padding:1.8rem;
}

.auth-card-wide{
  max-width:920px;
}

.auth-brand{
  display:flex;
  align-items:center;
  gap:.9rem;
  margin-bottom:1rem;
}

.auth-brand-mark{
  width:58px;
  height:58px;
  border-radius:18px;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:var(--primary-ink);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.7rem;
  font-weight:900;
  box-shadow:0 14px 28px rgba(167,229,0,.2);
}

.auth-brand-text strong{
  display:block;
  font-size:1.35rem;
  color:var(--dark);
}

.auth-brand-text span{
  display:block;
  color:var(--text-soft);
  font-size:.92rem;
  margin-top:.2rem;
}

.auth-card h1{
  margin:.2rem 0 .55rem;
  font-size:1.6rem;
  color:var(--dark);
}

.auth-card form{
  display:grid;
  gap:1rem;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  background:#f3fad8;
  color:#5c7500;
  border:1px solid #ddeca3;
  padding:.45rem .7rem;
  border-radius:999px;
  font-size:.8rem;
  font-weight:800;
  margin-bottom:.9rem;
}

.section-title{
  margin:0 0 .85rem;
  font-size:1.08rem;
  color:var(--dark);
}

.empty-state{
  padding:1rem;
  border:1px dashed #d6e2ec;
  border-radius:14px;
  color:var(--text-soft);
  text-align:center;
  background:#fbfdff;
}

@media (max-width:980px){
  .layout{grid-template-columns:1fr}
  .sidebar{position:relative;height:auto}
  .content{padding:1rem}
  .stats-grid,.grid-form{grid-template-columns:1fr}
  .topbar{flex-direction:column;align-items:flex-start}
}
