:root{
  --bg:#031D55;
  --panel: rgba(255,255,255,.08);
  --panel2: rgba(255,255,255,.10);
  --border: rgba(255,255,255,.14);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --white:#ffffff;
  --shadow: 0 18px 55px rgba(0,0,0,.28);
  --radius: 18px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:Roboto,system-ui,Segoe UI,Arial,sans-serif;
  background: radial-gradient(1200px 700px at 20% 0%, rgba(255,255,255,.10), transparent 55%),
              radial-gradient(900px 600px at 80% 10%, rgba(130,70,255,.16), transparent 55%),
              var(--bg);
  color: var(--text);
}

a{color:inherit}

.btn{
  border:none; cursor:pointer;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 900;
  text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center;
  transition: transform .12s ease, opacity .12s ease, background .12s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0); }

.btn-primary{ background: #ffffff; color:#0b1b3b; }
.btn-ghost{ background: rgba(255,255,255,.12); color: var(--white); border: 1px solid var(--border); }
.btn-danger{ background:#ff5c5c; color:#1a0b0b; }

.card{
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.section-title{
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 900;
}

.grid-3{ display:grid; grid-template-columns: repeat(3, 1fr); gap:12px; }
.grid-2{ display:grid; grid-template-columns: repeat(2, 1fr); gap:12px; }
.grid-1{ display:grid; grid-template-columns: 1fr; gap:12px; }

@media (max-width: 980px){
  .grid-3{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
}

.field label{
  display:block;
  margin: 6px 0 6px;
  font-weight: 800;
  color: rgba(255,255,255,.86);
  font-size: 13px;
}

.field input, .field textarea, .field select{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.95);
  color: #111;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.field textarea{ min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus{
  border-color: rgba(120,190,255,.9);
  box-shadow: 0 0 0 4px rgba(80,170,255,.20);
}

.help{ margin-top:6px; font-size:12px; color: var(--muted); }
.msg-ok{ margin-top:10px; color:#b6ffcc; font-weight: 800; }

.table{
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  overflow:hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.14);
}
.table th, .table td{
  text-align:left;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: 14px;
  vertical-align: top;
}
.table th{
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(6px);
  font-weight: 900;
}
.table tr:hover td{ background: rgba(255,255,255,.05); }

.row-actions{ display:flex; gap:8px; flex-wrap:wrap; }

.modal-backdrop{
  position:fixed; inset:0;
  display:none; place-items:center;
  background: rgba(0,0,0,.55);
  padding: 18px;
}
.modal{
  width:min(980px, 96%);
  background: linear-gradient(180deg, rgba(9,44,120,.92), rgba(6,35,96,.92));
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.modal-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }

/* ===== Sidebar Layout ===== */
.admin-shell{
  display:grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar{
  position: sticky;
  top:0;
  height: 100vh;
  padding: 18px;
  border-right: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
}

.brand{
  display:flex; align-items:center; gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  margin-bottom: 14px;
}
.brand .logo{
  width:38px;height:38px;border-radius:12px;
  background: rgba(255,255,255,.16);
  display:grid;place-items:center;
  font-weight: 900;
}
.brand b{ font-size: 16px; }
.brand small{ display:block; color: rgba(255,255,255,.70); margin-top:2px; }

.nav{
  display:flex; flex-direction:column; gap:8px;
  margin-top: 10px;
}
.nav a{
  padding: 12px 12px;
  border-radius: 14px;
  text-decoration:none;
  border: 1px solid transparent;
  color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.06);
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.nav a:hover{
  background: rgba(255,255,255,.10);
  transform: translateY(-1px);
}
.nav a.active{
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.18);
  color: #fff;
  font-weight: 900;
}

.sidebar-footer{
  position:absolute;
  bottom: 18px;
  left: 18px;
  right: 18px;
  display:flex;
  gap:10px;
}

.main{
  padding: 22px;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  margin-bottom: 14px;
}
.page-title{ margin:0; font-size: 26px; font-weight: 900; }
.page-sub{ margin:6px 0 0; color: rgba(255,255,255,.72); }

@media (max-width: 980px){
  .admin-shell{ grid-template-columns: 1fr; }
  .sidebar{
    height:auto;
    position: relative;
  }
  .sidebar-footer{
    position: relative;
    left:0;right:0;bottom:0;
    margin-top: 12px;
  }
}