:root{
  --bg:#0b0f17;
  --bg-2:#101722;
  --bg-3:#151f2e;

  --card:rgba(20,27,39,.86);
  --card-2:rgba(24,33,48,.92);
  --glass:rgba(255,255,255,.045);

  --border:rgba(255,255,255,.08);
  --border-strong:rgba(255,255,255,.14);

  --text:#f3f6fb;
  --muted:#a7b0bf;

  --primary:#7aa2ff;
  --primary-2:#9bb8ff;
  --primary-soft:rgba(122,162,255,.14);

  --danger:#e05252;
  --success:#41c982;
  --warning:#e6a23c;

  --shadow:0 18px 50px rgba(0,0,0,.32);
  --shadow-soft:0 10px 26px rgba(0,0,0,.20);
  --radius:20px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0;min-height:100%}

body{
  font-family:Inter,"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(122,162,255,.10), transparent 28%),
    radial-gradient(circle at 85% 8%, rgba(65,201,130,.06), transparent 24%),
    linear-gradient(135deg,#080b11 0%,#0b0f17 48%,#111827 100%);
  color:var(--text);
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size:48px 48px;
  opacity:.55;
}

a{
  color:var(--text);
  text-decoration:none;
}

.topnav{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(10,14,21,.82);
  backdrop-filter:blur(18px);
  border-bottom:1px solid var(--border);
  box-shadow:0 12px 30px rgba(0,0,0,.28);
}

.topnav-inner{
  max-width:1400px;
  margin:0 auto;
  padding:14px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

.brand{
  font-size:17px;
  font-weight:800;
  white-space:nowrap;
  letter-spacing:.2px;
}

.brand-link{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:inherit;
}

.site-logo{
  height:42px;
  width:auto;
  display:block;
  filter:drop-shadow(0 6px 14px rgba(0,0,0,.28));
}

.links{
  display:flex;
  align-items:center;
  gap:8px;
  flex:1;
  justify-content:center;
}

.links a{
  font-size:14px;
  font-weight:700;
  color:var(--muted);
  padding:10px 12px;
  border-radius:999px;
  transition:.18s ease;
}

.links a:hover,
.links a.active{
  color:#fff;
  background:rgba(255,255,255,.065);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.07);
}

.userbox{
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(122,162,255,.16);
  border:1px solid rgba(122,162,255,.35);
  color:#dce7ff;
  font-size:12px;
  font-weight:800;
  padding:7px 12px;
  border-radius:999px;
}

.container{
  max-width:1400px;
  margin:26px auto;
  padding:0 18px;
}

.container.narrow{max-width:760px}

.card{
  position:relative;
  background:linear-gradient(180deg,var(--card),rgba(16,22,33,.84));
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:26px;
  margin-bottom:22px;
  box-shadow:var(--shadow-soft);
  overflow:hidden;
}

.card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(120deg,rgba(255,255,255,.045),transparent 34%,transparent 74%,rgba(255,255,255,.025));
}

.card > *{
  position:relative;
  z-index:1;
}

.card:hover{
  border-color:var(--border-strong);
}

.narrow-card{max-width:720px}

h1,h2,h3{
  margin:0 0 18px 0;
  line-height:1.18;
  letter-spacing:-.02em;
}

h1{font-size:32px}
h2{font-size:22px}
h3{font-size:18px}

p{
  margin:0 0 12px 0;
  color:var(--muted);
}

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

.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.full{grid-column:1/-1}

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

.stat{
  min-height:128px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:24px;
  background:linear-gradient(180deg,var(--card-2),rgba(17,24,36,.9));
  border:1px solid var(--border);
  border-radius:20px;
  box-shadow:var(--shadow-soft);
  transition:.18s ease;
}

.stat:hover{
  transform:translateY(-2px);
  border-color:var(--border-strong);
}

.number{
  font-size:30px;
  font-weight:900;
  margin-bottom:14px;
  color:#ffffff;
}

label{
  display:block;
  margin-bottom:8px;
  color:var(--muted);
  font-size:14px;
  font-weight:700;
}

input,select,textarea,button{
  font:inherit;
}

input,select,textarea{
  width:100%;
  background:rgba(8,12,19,.78);
  color:#fff;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  padding:13px 15px;
  outline:none;
  transition:.16s ease;
}

input:focus,select:focus,textarea:focus{
  border-color:rgba(122,162,255,.55);
  box-shadow:0 0 0 4px rgba(122,162,255,.11);
}

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

button,.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 18px;
  border:1px solid rgba(122,162,255,.28);
  border-radius:14px;
  background:linear-gradient(135deg,rgba(122,162,255,.88),rgba(155,184,255,.78));
  color:#08101f;
  cursor:pointer;
  font-weight:900;
  box-shadow:0 10px 22px rgba(0,0,0,.20);
  transition:.16s ease;
}

button:hover,.btn:hover{
  transform:translateY(-1px);
  filter:brightness(1.05);
}

.btn.small,button.small{
  padding:8px 12px;
  border-radius:12px;
  font-size:13px;
}

.btn.ghost,button.ghost{
  background:rgba(255,255,255,.055);
  color:#fff;
  box-shadow:none;
  border:1px solid rgba(255,255,255,.09);
}

button.danger,.btn.danger,.danger{
  background:linear-gradient(135deg,#e05252,#a83232) !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.08) !important;
}

.secondary{
  background:rgba(255,255,255,.075) !important;
  border:1px solid rgba(255,255,255,.10) !important;
  color:#fff !important;
}

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

.alert.success{
  background:rgba(65,201,130,.12);
  border-color:rgba(65,201,130,.30);
  color:#c9ffe1;
}

.alert.error{
  background:rgba(224,82,82,.12);
  border-color:rgba(224,82,82,.30);
  color:#ffd2d2;
}

.table-responsive{
  overflow-x:auto;
}

table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}

th,td{
  padding:14px 12px;
  border-bottom:1px solid rgba(255,255,255,.075);
  text-align:left;
  vertical-align:top;
}

th{
  color:#ffffff;
  font-weight:800;
  font-size:13px;
  background:rgba(255,255,255,.025);
}

tr:hover td{
  background:rgba(255,255,255,.025);
}

.wrap{
  white-space:normal;
  word-break:break-word;
  overflow-wrap:anywhere;
}

.long{max-width:420px}
.actions{min-width:320px}

.actions details{
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
}

.actions summary{
  cursor:pointer;
  font-weight:800;
  margin-bottom:10px;
}

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

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

.check-card{
  display:flex;
  align-items:center;
  gap:14px;
  min-height:74px;
  padding:16px 18px;
  border:1px solid var(--border);
  border-radius:16px;
  background:rgba(8,12,19,.52);
}

.check-card input{
  width:20px;
  height:20px;
  min-width:20px;
  margin:0;
  flex:0 0 20px;
}

.openbox{
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
  margin-bottom:12px;
  background:rgba(255,255,255,.035);
}

.progressline{
  background:rgba(255,255,255,.08);
  border-radius:999px;
  overflow:hidden;
  height:14px;
  margin:12px 0;
}

.progressline > div{
  height:100%;
  background:linear-gradient(90deg,#7aa2ff,#b7c9ff);
}

.question-box{
  padding:14px 16px;
  border-radius:14px;
  background:rgba(8,12,19,.62);
  border:1px solid var(--border);
  margin-bottom:14px;
}

.question-box.subtle{color:var(--muted)}

.big-result{
  font-size:60px;
  font-weight:900;
  margin:10px 0;
}

.result-badge{
  display:inline-block;
  padding:10px 14px;
  border-radius:14px;
  font-weight:800;
  margin-bottom:12px;
  border:1px solid rgba(255,255,255,.10);
}

.result-badge.green,.ok{
  background:rgba(65,201,130,.13);
  color:#c8ffdf;
}

.result-badge.orange,.warn{
  background:rgba(230,162,60,.13);
  color:#ffe2ad;
}

.result-badge.red,.bad{
  background:rgba(224,82,82,.13);
  color:#ffc4c4;
}

.chart-vertical{
  display:flex;
  align-items:flex-end;
  gap:26px;
  height:220px;
  margin-top:20px;
}

.chart-bar{
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  align-items:center;
}

.chart-bar div{
  width:100%;
  max-width:120px;
  background:linear-gradient(180deg,#7aa2ff,#b7c9ff);
  border-radius:12px 12px 0 0;
}

.chart-bar span{
  margin-top:10px;
  font-size:13px;
  color:var(--muted);
  text-align:center;
}

.bars .bar{margin:14px 0}

.bars .bar span{
  display:block;
  margin-bottom:8px;
}

.bars .bar div{
  height:16px;
  border-radius:999px;
  background:linear-gradient(90deg,#7aa2ff,#b7c9ff);
}

.align-end{
  display:flex;
  align-items:flex-end;
}

.dashboard-hero{
  min-height:118px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.dashboard-hero h1{
  font-size:34px;
}

.dashboard-hero p{
  max-width:720px;
}

@media (max-width:1100px){
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .check-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .links{
    justify-content:flex-start;
    flex-wrap:wrap;
  }
}

@media (max-width:760px){
  .topnav-inner{
    flex-direction:column;
    align-items:flex-start;
  }
  .links{
    flex-wrap:wrap;
    margin-left:0;
    gap:8px;
  }
  .userbox{
    flex-wrap:wrap;
  }
  .stats,
  .grid.two,
  .grid.three,
  .grid.four,
  .check-grid{
    grid-template-columns:1fr;
  }
  .long{max-width:260px}
  h1{font-size:26px}
  .card{padding:20px}
}
