*{box-sizing:border-box}
:root{
  --bg:#050505;
  --bg-soft:#0b0b0c;
  --panel:#111113;
  --panel-2:#17171a;
  --panel-3:#1d1d21;
  --border:#2a2a31;
  --text:#f5f5f5;
  --text-soft:#a1a1aa;
  --red:#dc2626;
  --red-hover:#b91c1c;
  --red-soft:rgba(220,38,38,.12);
  --green:#22c55e;
  --green-soft:rgba(34,197,94,.14);
  --yellow:#f59e0b;
  --yellow-soft:rgba(245,158,11,.14);
  --shadow:0 14px 40px rgba(0,0,0,.35);
  --radius:20px;
  --radius-sm:12px;
}

html,body{
  margin:0;
  padding:0;
  background:linear-gradient(180deg,#050505 0%,#0a0a0b 100%);
  color:var(--text);
  font-family:Inter,Arial,sans-serif;
}

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

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

.sidebar{
  background:linear-gradient(180deg,#0a0a0b 0%,#101012 100%);
  border-right:1px solid var(--border);
  padding:24px;
}

.brand{
  font-size:24px;
  font-weight:900;
  letter-spacing:.3px;
  margin-bottom:24px;
  color:#fff;
}

.brand-accent{
  color:var(--red);
}

.nav a{
  display:block;
  padding:12px 14px;
  border-radius:14px;
  color:var(--text-soft);
  margin-bottom:8px;
  transition:.18s ease;
  border:1px solid transparent;
}

.nav a:hover,
.nav a.active{
  background:var(--panel-2);
  color:#fff;
  border-color:rgba(220,38,38,.22);
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:24px 28px;
  border-bottom:1px solid var(--border);
  background:rgba(10,10,11,.72);
  backdrop-filter:blur(10px);
}

.page-title{
  font-size:24px;
  font-weight:800;
  letter-spacing:.2px;
}

.content{
  padding:28px;
}

.grid{
  display:grid;
  gap:18px;
}

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

.grid-3{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.card{
  background:linear-gradient(180deg,#101012 0%,#141417 100%);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:20px;
  box-shadow:var(--shadow);
}

.card h3{
  margin:0 0 12px;
  font-size:18px;
  color:#fff;
}

.muted{
  color:var(--text-soft);
}

.kpi-value{
  margin:14px 0 8px;
  font-size:30px;
  font-weight:900;
  color:#fff;
}

.progress{
  height:12px;
  background:#1d1d22;
  border-radius:999px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.03);
}

.progress > span{
  display:block;
  height:100%;
  background:linear-gradient(90deg,var(--red) 0%,#ef4444 100%);
}

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

.table th,
.table td{
  padding:12px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align:top;
}

.table th{
  color:#fff;
  font-size:14px;
}

.table td{
  color:#e4e4e7;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}

.badge-green{
  background:var(--green-soft);
  color:#86efac;
  border:1px solid rgba(34,197,94,.18);
}

.badge-yellow{
  background:var(--yellow-soft);
  color:#fcd34d;
  border:1px solid rgba(245,158,11,.18);
}

.badge-red{
  background:var(--red-soft);
  color:#fca5a5;
  border:1px solid rgba(220,38,38,.2);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 14px;
  border:none;
  border-radius:14px;
  background:linear-gradient(180deg,#dc2626 0%,#b91c1c 100%);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  transition:.18s ease;
  box-shadow:0 10px 25px rgba(185,28,28,.22);
}

.btn:hover{
  transform:translateY(-1px);
  background:linear-gradient(180deg,#ef4444 0%,#b91c1c 100%);
}

.btn-secondary{
  background:linear-gradient(180deg,#232328 0%,#1a1a1f 100%);
  color:#fff;
  box-shadow:none;
  border:1px solid var(--border);
}

.btn-danger{
  background:linear-gradient(180deg,#dc2626 0%,#991b1b 100%);
}

.btn-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.field{
  margin-bottom:16px;
}

label{
  display:block;
  margin-bottom:8px;
  font-size:14px;
  font-weight:800;
  color:#fff;
}

input,
select,
textarea{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#0c0c0e;
  color:#fff;
  outline:none;
  transition:.18s ease;
}

input:focus,
select:focus,
textarea:focus{
  border-color:rgba(220,38,38,.45);
  box-shadow:0 0 0 4px rgba(220,38,38,.10);
}

.flash{
  padding:14px 16px;
  border-radius:14px;
  margin-bottom:18px;
  border:1px solid transparent;
}

.flash-success{
  background:var(--green-soft);
  color:#86efac;
  border-color:rgba(34,197,94,.18);
}

.flash-error{
  background:var(--red-soft);
  color:#fca5a5;
  border-color:rgba(220,38,38,.18);
}

.code{
  background:#080809;
  border:1px solid var(--border);
  border-radius:16px;
  padding:16px;
  white-space:pre-wrap;
  overflow:auto;
  max-height:420px;
  color:#e4e4e7;
}

.small{
  font-size:12px;
}

.login-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:
    radial-gradient(circle at top left, rgba(220,38,38,.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(220,38,38,.08), transparent 25%),
    linear-gradient(180deg,#050505 0%,#0a0a0b 100%);
}

.login-card{
  width:100%;
  max-width:460px;
  background:linear-gradient(180deg,#101012 0%,#141417 100%);
  border:1px solid var(--border);
  border-radius:28px;
  padding:30px;
  box-shadow:var(--shadow);
}

.login-card h1{
  margin:0 0 8px;
  color:#fff;
  font-size:30px;
}

.login-card p{
  color:var(--text-soft);
  margin:0 0 20px;
}

.login-card button{
  width:100%;
}

.section-space{
  height:18px;
}

.info-list{
  display:grid;
  gap:12px;
}

.info-item{
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:12px 14px;
  background:#0b0b0d;
  border:1px solid var(--border);
  border-radius:14px;
}

.info-item strong{
  color:#fff;
}

.console-shell{
  min-height:320px;
  background:#060607;
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);
}

.console-meta{
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:12px;
  font-size:13px;
  color:var(--text-soft);
}

.console-output{
  background:#030304;
  border:1px solid #1a1a1f;
  border-radius:14px;
  padding:14px;
  color:#e5e7eb;
  white-space:pre-wrap;
  overflow:auto;
  max-height:340px;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:13px;
  line-height:1.5;
}

.console-command{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}

.console-history{
  display:grid;
  gap:12px;
}

.console-history-item{
  background:#0b0b0d;
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
}

.console-history-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
  font-size:12px;
  color:var(--text-soft);
}

.console-badge-ok{
  color:#86efac;
}

.console-badge-fail{
  color:#fca5a5;
}

.notice{
  padding:14px 16px;
  border-radius:14px;
  border:1px solid rgba(245,158,11,.18);
  background:rgba(245,158,11,.08);
  color:#fcd34d;
}

hr.soft{
  border:none;
  border-top:1px solid var(--border);
  margin:18px 0;
}

@media (max-width:980px){
  .layout{
    grid-template-columns:1fr;
  }

  .sidebar{
    display:none;
  }

  .grid-2,
  .grid-3{
    grid-template-columns:1fr;
  }

  .content{
    padding:18px;
  }

  .topbar{
    padding:18px;
  }
}