:root{
  --bg:#0c0f14;
  --panel:#101522;
  --panel-2:#0f1420;
  --muted:#9aa0a6;
  --text:#e7eaf0;
  --primary:#6a5af9;
  --primary-2:#7b6dfb;
  --border:#1c2230;
  --success:#2ecc71;
  --danger:#ff5d5d;
  --warning:#f0b429;
  --shadow:0 8px 24px rgba(0,0,0,.35);
  --radius:14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; padding:0;
  background:linear-gradient(180deg, #0b0e13 0%, #0b0e13 50%, #0f1320 100%);
  color:var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  letter-spacing:.2px;
}

a{color:inherit; text-decoration:none}
img{max-width:100%}

.container{
  max-width:1120px; margin:0 auto; padding:24px 20px;
}

/* Topbar */
.topbar{
  position:sticky; top:0; z-index:5;
  backdrop-filter:saturate(180%) blur(8px);
  background:rgba(12,15,20,.8);
  border-bottom:1px solid var(--border);
}
.topbar-inner{display:flex; align-items:center; gap:18px; padding:14px 20px;}
.brand{
  font-weight:700; letter-spacing:.5px; font-size:18px;
  background:linear-gradient(135deg, #8ea8ff, #b29bff 60%, #ffe7ff);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.nav{list-style:none; display:flex; gap:10px; margin:0; padding:0; flex-wrap:wrap}
.nav a{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:12px; border:1px solid var(--border);
  background:linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.nav a:hover{border-color:#2a3144; transform:translateY(-1px); transition:all .15s ease}

/* Headings */
h1{font-size:26px; margin:10px 0 16px 0; letter-spacing:.3px}
h2{font-size:20px; margin:18px 0 10px}

/* Cards */
.cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px}
.card{
  background:linear-gradient(180deg, var(--panel), var(--panel-2));
  border:1px solid var(--border); border-radius:var(--radius); padding:16px;
  box-shadow:var(--shadow);
}
.card .value{font-size:26px; font-weight:700}
.card .label{color:var(--muted); font-size:12px; margin-top:6px}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:linear-gradient(180deg, var(--primary), var(--primary-2));
  color:#fff; padding:10px 14px; border:none; border-radius:12px;
  box-shadow:0 8px 18px rgba(106,90,249,.35); cursor:pointer;
}
.btn:hover{filter:brightness(1.04); transform:translateY(-1px); transition:all .15s ease}
.btn.outline{
  background:transparent; color:var(--text); border:1px solid var(--border);
  box-shadow:none;
}
.btn.ghost{background:transparent; color:var(--muted); border:none}

/* Forms */
form .row{display:grid; grid-template-columns:repeat(12,1fr); gap:12px}
label{display:block; color:var(--muted); font-size:12px; margin-bottom:6px}
input[type=text], input[type=email], input[type=number], input[type=password],
input[type=date], input[type=datetime-local], select, textarea{
  width:100%; padding:10px 12px; border-radius:12px; border:1px solid var(--border);
  background:linear-gradient(180deg, #0d1220, #0b1020);
  color:var(--text); outline:none; box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}
textarea{min-height:120px}

/* Tables */
table{width:100%; border-collapse:separate; border-spacing:0; margin:10px 0 20px 0}
thead th{
  text-align:left; font-weight:700; font-size:13px; color:#cbd1de;
  background:linear-gradient(180deg, #121727, #0e1321); padding:12px;
  border-top-left-radius:12px; border-top-right-radius:12px; border:1px solid var(--border); border-bottom:none;
}
tbody td{
  border:1px solid var(--border); border-top:none; padding:12px; background:linear-gradient(180deg, #0f1320, #0e131f);
}
tbody tr:first-child td{border-top:none}
tbody tr td:first-child{border-left:1px solid var(--border); border-bottom-left-radius:12px}
tbody tr td:last-child{border-right:1px solid var(--border); border-bottom-right-radius:12px}

/* Flash messages */
.flash{padding:10px 12px; border-radius:10px; margin:12px 0; border:1px solid var(--border)}
.flash.success{background:rgba(46,204,113,.08); color:#b6f3c9; border-color:rgba(46,204,113,.3)}
.flash.danger{background:rgba(255,93,93,.08); color:#feb7b7; border-color:rgba(255,93,93,.3)}
.flash.info{background:rgba(125,145,255,.08); color:#c9ceff; border-color:rgba(125,145,255,.3)}

/* Calendar grid helpers */
.calendar{display:grid; grid-template-columns:repeat(7,1fr); gap:10px; margin:12px 0}
.day{background:linear-gradient(180deg, var(--panel), var(--panel-2)); border:1px solid var(--border); border-radius:12px; min-height:120px; padding:10px}
.day.empty{background:transparent; border:none}
.date{color:var(--muted); font-size:12px; margin-bottom:6px}
.pill{background:#1b2133; border:1px solid #262d3f; padding:6px 8px; border-radius:10px; margin:4px 0; font-size:13px}
.pill .tag{font-size:11px; opacity:.8; margin-left:6px}

/* Utility */
.mt-1{margin-top:8px}.mt-2{margin-top:14px}.mt-3{margin-top:20px}
.flex{display:flex}.gap-1{gap:8px}.gap-2{gap:12px}.right{margin-left:auto}
