:root{
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --card: #ffffff;
  --border: rgba(15, 23, 42, .10);
  --muted: rgba(15, 23, 42, .60);
  --text: #0f172a;

  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, .10);

  --ok: #16a34a;
  --warn: #f59e0b;
  --bad: #ef4444;

  --shadow: 0 10px 30px rgba(2, 6, 23, .08);
  --shadow-soft: 0 6px 16px rgba(2, 6, 23, .06);

  --radius: 18px;
  --radius-sm: 14px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(37,99,235,.12), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(59,130,246,.10), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

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

.wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 18px 40px;
}

.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 14px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.70);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 260px;
}
.logo{
  width:46px;
  height:46px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 25%, #93c5fd 0%, #3b82f6 35%, #1d4ed8 100%);
  box-shadow: 0 10px 22px rgba(37,99,235,.25);
}
.h1{
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.sub{
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.nav{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.85);
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(2,6,23,.06);
  cursor:pointer;
  user-select:none;
}
.btn:hover{
  border-color: rgba(37,99,235,.30);
  background: rgba(37,99,235,.06);
  text-decoration:none;
}
.btn:active{ transform: translateY(1px); }
.right{ margin-left:auto; }

.card{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.90);
  box-shadow: var(--shadow);
}
.p{ padding: 16px; }

.grid{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

@media (max-width: 1100px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .top{ flex-direction: column; align-items:flex-start; }
  .nav{ justify-content:flex-start; }
  .grid{ grid-template-columns: 1fr; }
}

.kpi{
  padding: 14px 14px;
  min-height: 92px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.kpi .n{
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -.02em;
}
.kpi .t{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.ok{ color: var(--ok); font-weight: 900; }
.warn{ color: var(--warn); font-weight: 900; }
.bad{ color: var(--bad); font-weight: 900; }

.row{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

.small{
  font-size: 12px;
  color: var(--muted);
  font-weight: 650;
}

hr{
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

input, select{
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  outline: none;
  font-weight: 700;
}
input:focus, select:focus{
  border-color: rgba(37,99,235,.40);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow:hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,.95);
}
thead th{
  text-align:left;
  font-size: 12px;
  color: rgba(15,23,42,.70);
  padding: 12px 12px;
  background: linear-gradient(180deg, rgba(37,99,235,.06), rgba(37,99,235,.02));
  border-bottom: 1px solid var(--border);
  font-weight: 900;
  letter-spacing: .02em;
}
tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(15,23,42,.06);
  font-weight: 700;
  color: rgba(15,23,42,.92);
}
tbody tr:hover{
  background: rgba(37,99,235,.04);
}
tbody tr:last-child td{ border-bottom: 0; }

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,.03);
  font-size: 12px;
  font-weight: 950;
  color: rgba(15,23,42,.85);
}
.badge.bad{
  border-color: rgba(239,68,68,.25);
  background: rgba(239,68,68,.08);
  color: #991b1b;
}
.badge.ok{
  border-color: rgba(22,163,74,.25);
  background: rgba(22,163,74,.10);
  color: #14532d;
}
