:root{
  --bg:#0b1220;
  --card:#0f1a2e;
  --muted:#94a3b8;
  --text:#e5e7eb;
  --accent:#38bdf8;
  --ok:#22c55e;
  --warn:#f59e0b;
  --bad:#ef4444;
  --line:rgba(148,163,184,.18);
  --shadow:0 12px 40px rgba(0,0,0,.35);
  --radius:18px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  background: radial-gradient(1200px 700px at 20% -10%, rgba(56,189,248,.22), transparent 55%),
              radial-gradient(900px 600px at 110% 0%, rgba(34,197,94,.12), transparent 50%),
              var(--bg);
  background: #f4f5f7;
  color:var(--text);
}

a{color:inherit}
.container{ margin:0 auto; padding:20px}
.nav{
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px; background:rgba(15,26,46,.8);
  border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); backdrop-filter: blur(10px);
}
.brand{display:flex; align-items:center; gap:10px; font-weight:700}
.brand .dot{width:10px; height:10px; border-radius:999px; background:var(--accent); box-shadow:0 0 0 6px rgba(56,189,248,.15)}
.nav .right{display:flex; align-items:center; gap:12px; color:var(--muted)}
.pill{
  font-size:12px; padding:6px 10px; border-radius:999px; border:1px solid var(--line);
  color:var(--muted); background:rgba(148,163,184,.06)
}
.grid{
  display:grid; grid-template-columns: 260px 1fr; gap:18px; margin-top:18px;
}
.sidebar{
  background:rgba(15,26,46,.75);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:14px;
  box-shadow:var(--shadow);
  position:sticky; top:18px; height:fit-content;
}
.sidebar a{
  display:flex; gap:10px; align-items:center;
  padding:10px 12px; border-radius:14px; text-decoration:none;
  color:var(--text);
}
.sidebar a:hover{background:rgba(148,163,184,.08)}
.sidebar a.active{background:rgba(56,189,248,.12); border:1px solid rgba(56,189,248,.28)}
.main{
  background:rgba(15,26,46,.75);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
  box-shadow:var(--shadow);
}

.h1{font-size:22px; margin:0 0 12px}
.h2{font-size:16px; margin:16px 0 10px; color:#dbeafe}
.muted{color:var(--muted)}
.row{display:flex; gap:12px; flex-wrap:wrap}
.field{display:flex; flex-direction:column; gap:6px; min-width:200px; flex:1}
label{font-size:12px; color:var(--muted)}
input,select,textarea{
  padding:10px 12px;
  background:rgba(11,18,32,.8);
  border:1px solid var(--line);
  color:var(--text);
  border-radius:14px;
  outline:none;
}
textarea{min-height:90px; resize:vertical}
button,.btn{
  appearance:none;
  border:1px solid rgba(56,189,248,.34);
  background:rgba(56,189,248,.12);
  color:var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  font-weight:600;
  text-decoration:none;
  display:inline-flex; align-items:center; gap:8px;
}
button:hover,.btn:hover{background:rgba(56,189,248,.18)}
.btn.secondary{
  border:1px solid var(--line);
  background:rgba(148,163,184,.08);
  color:var(--text);
}
.btn.danger{
  border:1px solid rgba(239,68,68,.35);
  background:rgba(239,68,68,.12);
}

table{width:100%; border-collapse:collapse; margin-top:10px}
th,td{padding:10px 8px; border-bottom:1px solid var(--line); vertical-align:top}
th{font-size:12px; color:var(--muted); text-align:left}
.badge{
  display:inline-flex; align-items:center;
  font-size:12px; padding:4px 9px; border-radius:999px;
  border:1px solid var(--line); background:rgba(148,163,184,.06);
}
.badge.ok{border-color:rgba(34,197,94,.35); background:rgba(34,197,94,.12)}
.badge.warn{border-color:rgba(245,158,11,.35); background:rgba(245,158,11,.12)}
.badge.bad{border-color:rgba(239,68,68,.35); background:rgba(239,68,68,.12)}
.flash{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(148,163,184,.06);
  margin:10px 0;
}
.flash.ok{border-color:rgba(34,197,94,.35); background:rgba(34,197,94,.12)}
.flash.bad{border-color:rgba(239,68,68,.35); background:rgba(239,68,68,.12)}
.footer{margin-top:16px; color:var(--muted); font-size:12px}

.login-wrap{
  min-height:100vh; display:flex; align-items:center; justify-content:center; padding:18px
}
.card{
  width:min(460px, 100%); background:rgba(15,26,46,.8);
  border:1px solid var(--line); border-radius:var(--radius);
  padding:18px; box-shadow:var(--shadow)
}

.calendar{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
}
.cal-head, .cal-cell{
  padding:10px; border-right:1px solid var(--line); border-bottom:1px solid var(--line);
  min-height:110px;
}
.cal-head{min-height:auto; background:rgba(148,163,184,.06); color:var(--muted); font-weight:600}
.calendar .cal-head:nth-child(7n), .calendar .cal-cell:nth-child(7n){border-right:none}
.cal-date{font-size:12px; color:var(--muted); margin-bottom:8px}
.cal-item{
  font-size:12px; padding:5px 8px; border-radius:12px;
  border:1px solid var(--line); background:rgba(11,18,32,.75);
  margin-bottom:6px;
}
.cal-item strong{font-weight:700}
.small{font-size:12px}
.kpi{display:flex; gap:10px; flex-wrap:wrap; margin:10px 0 4px}
.kpi .chip{padding:8px 10px; border-radius:14px; border:1px solid var(--line); background:rgba(148,163,184,.06)}
.kpi .chip b{display:block; font-size:12px; color:var(--muted); font-weight:600}
.kpi .chip span{font-weight:800}