:root{
  --text:#e5e7eb;
  --muted:#94a3b8;
  --green-soft:#86efac;
  --yellow-soft:#fde68a;
  --red-soft:#fca5a5;
  --gray-soft:#cbd5e1;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

html,body{
  margin:0;
  padding:0;
}

body{
  font-family:Inter,Segoe UI,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.18), transparent 28%),
    radial-gradient(circle at top right, rgba(96,165,250,.12), transparent 22%),
    linear-gradient(180deg,#08101d 0%,#0b1220 35%,#0f172a 100%);
  min-height:100vh;
}

a{
  color:#93c5fd;
  text-decoration:none;
}

.wrap{
  max-width:1280px;
  margin:0 auto;
  padding:32px 22px 48px;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
  padding:16px 20px;
  border:1px solid rgba(255,255,255,.06);
  background:rgba(15,23,42,.72);
  backdrop-filter:blur(10px);
  border-radius:20px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand img{
  height:38px;
}

.brand-meta{
  display:flex;
  flex-direction:column;
}

.brand-meta strong{
  font-size:15px;
}

.brand-meta span{
  font-size:12px;
  color:var(--muted);
}

.userbox{
  font-size:14px;
  color:var(--muted);
}

.nav{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:26px;
}

.nav a{
  color:#dbeafe;
  padding:10px 14px;
  border-radius:12px;
  background:rgba(17,24,39,.78);
  border:1px solid rgba(96,165,250,.12);
}

.card{
  background:linear-gradient(180deg, rgba(17,24,39,.96) 0%, rgba(15,23,42,.96) 100%);
  border:1px solid rgba(148,163,184,.12);
  border-radius:18px;
  padding:22px;
  margin-bottom:22px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:20px;
  margin-bottom:24px;
}

.stat{
  min-height:128px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  background:linear-gradient(180deg, rgba(17,24,39,.95), rgba(12,18,32,.95));
  border:1px solid rgba(148,163,184,.1);
  border-radius:20px;
  padding:22px 20px;
}

.stat small{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:8px;
}

.stat .num{
  font-size:30px;
  font-weight:700;
}

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

th,td{
  border-bottom:1px solid rgba(148,163,184,.11);
  padding:8px 10px;
  text-align:left;
  vertical-align:top;
  font-size:14px;
}

th{
  color:#cbd5e1;
  font-weight:600;
  background:rgba(255,255,255,.02);
}

input,
select,
button,
textarea{
  width:100%;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.16);
  background:#0b1220;
  color:#fff;
  outline:none;
  box-sizing:border-box;
  margin-top: 5px;
  margin-bottom: 5px;
}

input:focus,
select:focus,
textarea:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 2px rgba(37,99,235,.2);
}

button{
  width:auto;
  background:linear-gradient(180deg,#2563eb,#1d4ed8);
  border-color:#2563eb;
  cursor:pointer;
  font-weight:600;
}

.btn-secondary{
  background:linear-gradient(180deg,#1f2937,#111827);
}

.btn-danger{
  background:linear-gradient(180deg,#b91c1c,#991b1b);
}

.btn-warning{
  background:linear-gradient(180deg,#ca8a04,#a16207);
}

.btn-success{
  background:linear-gradient(180deg,#15803d,#166534);
}

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

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

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

.muted{color:var(--muted);}
.ok{color:var(--green-soft);}
.warn{color:var(--yellow-soft);}
.bad{color:var(--red-soft);}

.flash{
  padding:13px 15px;
  border-radius:14px;
  margin-bottom:18px;
  font-size:14px;
}

.flash.success{
  background:rgba(34,197,94,.12);
  border:1px solid rgba(34,197,94,.25);
}

.flash.error{
  background:rgba(239,68,68,.12);
  border:1px solid rgba(239,68,68,.25);
}

.actions form{
  display:inline-block;
  margin:0 6px 0px 0;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid rgba(148,163,184,.14);
  background:rgba(255,255,255,.04);
}

.status-ok,
.status-warning,
.status-expired,
.status-error,
.status-removed,
.status-pending,
.status-running,
.status-done,
.status-failed{
  display:inline-block;
  padding:3px 5px;
  border-radius:8px;
  font-size:12px;
  font-weight:700;
  letter-spacing:.2px;
}

.status-ok,
.status-done{
  background:rgba(34,197,94,.14);
  color:var(--green-soft);
  border:1px solid rgba(34,197,94,.25);
}

.status-warning,
.status-pending,
.status-running{
  background:rgba(250,204,21,.12);
  color:var(--yellow-soft);
  border:1px solid rgba(250,204,21,.22);
}

.status-expired,
.status-error,
.status-failed{
  background:rgba(239,68,68,.12);
  color:var(--red-soft);
  border:1px solid rgba(239,68,68,.22);
}

.status-removed{
  background:rgba(148,163,184,.12);
  color:var(--gray-soft);
  border:1px solid rgba(148,163,184,.22);
}

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

/* auth */
.auth-body{
  margin:0;
  min-height:100vh;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  color:#e5e7eb;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.22), transparent 25%),
    radial-gradient(circle at bottom right, rgba(96,165,250,.14), transparent 26%),
    linear-gradient(180deg,#07101d 0%,#0b1220 40%,#111827 100%);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.auth-shell{
  width:100%;
  max-width:1080px;
  display:grid;
  grid-template-columns:1.08fr .92fr;
  background:rgba(10,16,30,.72);
  backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.06);
  border-radius:26px;
  overflow:hidden;
  box-shadow:0 30px 90px rgba(0,0,0,.45);
}

.auth-hero{
  padding:44px;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.18), transparent 35%),
    linear-gradient(180deg, rgba(17,24,39,.9), rgba(10,16,30,.95));
  border-right:1px solid rgba(255,255,255,.05);
}

.auth-hero img{
  height:40px;
  margin-bottom:28px;
}

.auth-hero h1{
  font-size:38px;
  line-height:1.08;
  margin:0 0 16px;
}

.auth-hero p{
  font-size:15px;
  line-height:1.7;
  color:#94a3b8;
  margin:0 0 26px;
}

.auth-panel{
  padding:42px 36px;
  background:linear-gradient(180deg, rgba(17,24,39,.96), rgba(11,18,32,.98));
}

.auth-box{
  width:100%;
  max-width:520px;
  background:#111827;
  border:1px solid rgba(255,255,255,.08);
  border-radius:20px;
  padding:28px;
}

.error-box{
  padding:12px 14px;
  border-radius:12px;
  background:rgba(239,68,68,.12);
  border:1px solid rgba(239,68,68,.22);
  font-size:14px;
  margin-bottom:14px;
}

.success-box{
  padding:12px 14px;
  border-radius:12px;
  background:rgba(34,197,94,.12);
  border:1px solid rgba(34,197,94,.22);
  font-size:14px;
  margin-bottom:14px;
}

@media (max-width:860px){
  .row,.row-3,.row-4{
    grid-template-columns:1fr;
  }

  .topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .auth-shell{
    grid-template-columns:1fr;
  }
}
