/* Metra Admin 2026 — original template (HTML/CSS/JS) */
:root{
  --bg: #0b1220;
  --panel: rgba(255,255,255,.06);
  --panel-2: rgba(255,255,255,.08);
  --stroke: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.88);
  --muted: rgba(255,255,255,.65);
  --muted2: rgba(255,255,255,.48);

  --accent: #6ee7ff;
  --accent2: #a78bfa;
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;

  --shadow: 0 18px 60px rgba(0,0,0,.35);
  --shadow2: 0 10px 30px rgba(0,0,0,.28);
  --radius: 18px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
}

:root[data-theme="light"]{
  --bg: #f7f8fb;
  --panel: rgba(15,23,42,.06);
  --panel-2: rgba(15,23,42,.08);
  --stroke: rgba(15,23,42,.10);
  --text: rgba(15,23,42,.88);
  --muted: rgba(15,23,42,.65);
  --muted2: rgba(15,23,42,.50);

  --accent: #0284c7;
  --accent2: #7c3aed;

  --shadow: 0 18px 60px rgba(2,6,23,.12);
  --shadow2: 0 10px 30px rgba(2,6,23,.10);
}

*{ box-sizing:border-box }
html,body{ height:100% }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(110,231,255,.22), transparent 60%),
    radial-gradient(900px 700px at 105% 10%, rgba(167,139,250,.20), transparent 55%),
    radial-gradient(700px 600px at 60% 120%, rgba(52,211,153,.12), transparent 55%),
    var(--bg);
}

a{ color:inherit; text-decoration:none }
button, input, select{ font:inherit }
::selection{ background: rgba(110,231,255,.25) }

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

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  padding:18px;
  border-right:1px solid var(--stroke);
  background: linear-gradient(to bottom, rgba(255,255,255,.05), transparent);
  backdrop-filter: blur(12px);
}

.brand{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 10px 14px;
}

.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:700;
  letter-spacing:.2px;
}
.logo-mark{
  width:36px;
  height:36px;
  border-radius:12px;
  background:
    radial-gradient(16px 16px at 25% 25%, rgba(255,255,255,.45), transparent 60%),
    linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 30px rgba(110,231,255,.18);
}
.logo small{
  display:block;
  font-weight:600;
  color:var(--muted);
  letter-spacing:.3px;
}

.icon-btn{
  border:1px solid var(--stroke);
  background: var(--panel);
  color:var(--text);
  border-radius:14px;
  padding:10px 12px;
  cursor:pointer;
  box-shadow: var(--shadow2);
  transition:.2s transform, .2s background;
}
.icon-btn:hover{ transform: translateY(-1px); background: var(--panel-2) }

.nav{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid transparent;
  color:var(--muted);
  transition:.2s;
}
.nav a:hover{
  background: var(--panel);
  border-color: var(--stroke);
  color: var(--text);
}
.nav a.active{
  background: linear-gradient(135deg, rgba(110,231,255,.16), rgba(167,139,250,.14));
  border-color: rgba(110,231,255,.25);
  color: var(--text);
}

.nav .dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background: var(--stroke);
}
.nav a.active .dot{ background: linear-gradient(135deg, var(--accent), var(--accent2)) }

.sidebar-footer{
  position:absolute;
  left:18px;
  right:18px;
  bottom:18px;
  padding:14px;
  border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: var(--panel);
  box-shadow: var(--shadow2);
}
.sidebar-footer .meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.pill{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:8px 10px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  border-radius:999px;
  color:var(--muted);
  font-size:12px;
}

.main{
  padding:22px 26px 30px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}

.page-title h1{
  margin:0;
  font-size:22px;
  letter-spacing:.2px;
}
.page-title p{
  margin:6px 0 0;
  color:var(--muted);
  font-size:13px;
}

.actions{
  display:flex;
  gap:10px;
  align-items:center;
}
.search{
  position:relative;
  min-width: 260px;
}
.search input{
  width:100%;
  padding:12px 12px 12px 40px;
  border-radius: 14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  color: var(--text);
  outline:none;
  box-shadow: var(--shadow2);
}
.search .kbd{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  color:var(--muted2);
  font-size:12px;
  border:1px solid var(--stroke);
  padding:4px 8px;
  border-radius:10px;
  background: rgba(255,255,255,.03);
}
.search svg{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  opacity:.75;
}

.btn{
  border:1px solid var(--stroke);
  background: var(--panel);
  color: var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  box-shadow: var(--shadow2);
  transition:.2s transform, .2s background, .2s border-color;
}
.btn:hover{ transform: translateY(-1px); background: var(--panel-2) }
.btn.primary{
  border-color: rgba(110,231,255,.25);
  background: linear-gradient(135deg, rgba(110,231,255,.22), rgba(167,139,250,.18));
}

.grid{
  display:grid;
  gap:14px;
}
.grid.cols-4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card{
  border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card .card-hd{
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid var(--stroke);
}
.card .card-hd h3{
  margin:0;
  font-size:14px;
  color:var(--text);
  letter-spacing:.2px;
}
.card .card-hd span{
  color:var(--muted);
  font-size:12px;
}
.card .card-bd{ padding:16px }

.stat{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.stat .value{
  font-size:24px;
  font-weight:750;
  letter-spacing:.2px;
}
.stat .sub{
  display:flex;
  gap:10px;
  align-items:center;
  color:var(--muted);
  font-size:13px;
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color:var(--muted);
  font-size:12px;
}
.badge.ok{ border-color: rgba(52,211,153,.30); color: rgba(52,211,153,.95) }
.badge.warn{ border-color: rgba(251,191,36,.30); color: rgba(251,191,36,.95) }
.badge.bad{ border-color: rgba(251,113,133,.30); color: rgba(251,113,133,.95) }

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 10px;
}
.table th{
  text-align:left;
  font-size:12px;
  color:var(--muted);
  font-weight:650;
  padding:0 10px 8px;
}
.table td{
  padding:12px 10px;
  border-top:1px solid var(--stroke);
  border-bottom:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
}
.table tr td:first-child{
  border-left:1px solid var(--stroke);
  border-top-left-radius:14px;
  border-bottom-left-radius:14px;
}
.table tr td:last-child{
  border-right:1px solid var(--stroke);
  border-top-right-radius:14px;
  border-bottom-right-radius:14px;
}
.table .muted{ color:var(--muted) }

.row-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
}
.mini{
  padding:8px 10px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
}
.mini:hover{ background: rgba(255,255,255,.07) }

.kpi{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.spark{
  width:110px;
  height:34px;
  opacity:.95;
}

.split{
  display:grid;
  grid-template-columns: 1.4fr 1fr;
  gap:14px;
}

.form{
  display:grid;
  gap:12px;
}
.field{
  display:grid;
  gap:8px;
}
.label{
  font-size:12px;
  color:var(--muted);
}
.input, .select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  color: var(--text);
  outline:none;
}
.help{
  color: var(--muted2);
  font-size:12px;
  line-height:1.6;
}

.toast{
  position:fixed;
  right:18px;
  bottom:18px;
  min-width: 260px;
  max-width: 360px;
  padding:12px 12px;
  border-radius: 16px;
  border:1px solid var(--stroke);
  background: rgba(10,12,20,.75);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  display:none;
}
:root[data-theme="light"] .toast{
  background: rgba(255,255,255,.78);
}
.toast.show{ display:block; animation: pop .22s ease-out }
@keyframes pop{
  from{ transform: translateY(8px); opacity:0 }
  to{ transform: translateY(0); opacity:1 }
}
.toast .t1{ font-weight:700; font-size:13px }
.toast .t2{ color:var(--muted); font-size:12px; margin-top:4px; line-height:1.5 }

.modal{
  position:fixed;
  inset:0;
  display:none;
  place-items:center;
  padding:18px;
  background: rgba(0,0,0,.45);
}
.modal.show{ display:grid }
.modal .panel{
  width:min(560px, 100%);
  border-radius: 20px;
  border:1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal .hd{
  padding:14px 16px;
  border-bottom:1px solid var(--stroke);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.modal .bd{ padding:16px }
.modal .hd h3{ margin:0; font-size:14px }
.modal .close{
  padding:8px 10px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  cursor:pointer;
}

.mobile-toggle{
  display:none;
}

@media (max-width: 980px){
  .container{ grid-template-columns: 1fr }
  .sidebar{
    position:fixed;
    left:12px;
    top:12px;
    bottom:12px;
    width:min(320px, 92vw);
    height:auto;
    transform: translateX(-110%);
    transition: .25s transform;
    border:1px solid var(--stroke);
    border-radius: 20px;
    box-shadow: var(--shadow);
    z-index: 50;
  }
  .sidebar.open{ transform: translateX(0) }
  .sidebar-footer{ position:static; margin-top:12px }
  .main{ padding:18px 14px 26px }
  .mobile-toggle{ display:inline-flex }
  .grid.cols-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3{ grid-template-columns: 1fr; }
  .grid.cols-2{ grid-template-columns: 1fr; }
  .split{ grid-template-columns: 1fr; }
  .search{ min-width: 190px; }
}
