:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --green: #16a34a;
  --red: #dc2626;
  --blue: #2563eb;
  --orange: #f59e0b;
  --purple: #9333ea;
  --teal: #0f766e;
  --indigo: #4f46e5;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card, .card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 8px 24px rgba(15,23,42,0.05); }
.login-card { width: min(420px, 100%); padding: 28px; }
.login-card h1 { margin: 0 0 8px; }
.login-card p { color: var(--muted); margin: 0 0 20px; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
textarea { min-height: 84px; resize: vertical; }
label { font-size: 13px; color: var(--muted); display:block; margin-bottom: 6px; }
.btn { border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 600; background: var(--blue); color: white; }
.btn.secondary { background: #0f172a; }
.btn.light { background: #f1f5f9; color: var(--text); }
.btn.green { background: var(--green); }
.btn.red { background: var(--red); }
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: #0f172a; color: white; padding: 20px; position: sticky; top: 0; height: 100vh; }
.sidebar h2 { margin: 0 0 6px; font-size: 20px; }
.sidebar small { color: #94a3b8; display: block; margin-bottom: 22px; }
.nav-btn { display: block; width: 100%; border: 0; padding: 12px 14px; text-align: left; margin-bottom: 8px; border-radius: 12px; background: transparent; color: #e2e8f0; }
.nav-btn.active, .nav-btn:hover { background: rgba(255,255,255,0.09); }
.content { padding: 22px; }
.topbar { display:flex; justify-content: space-between; align-items:center; margin-bottom: 18px; gap: 16px; }
.muted { color: var(--muted); }
.grid-cards { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 18px; position:relative; overflow:hidden; }
.stat .label { font-size: 12px; color: white; opacity: 0.9; }
.stat .value { color:white; font-size: 28px; font-weight: 700; margin-top: 8px; }
.stat.green { background: var(--green); }
.stat.red { background: var(--red); }
.stat.blue { background: var(--blue); }
.stat.orange { background: var(--orange); }
.stat.purple { background: var(--purple); }
.stat.teal { background: var(--teal); }
.stat.indigo { background: var(--indigo); }
.section { margin-bottom: 18px; }
.section h3 { margin: 0 0 10px; }
.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid var(--border); text-align: left; padding: 10px; font-size: 14px; vertical-align: top; }
.table th { background: #f8fafc; position: sticky; top: 0; }
.row { display:flex; gap: 14px; flex-wrap: wrap; }
.row > .card { flex: 1; min-width: 320px; padding: 16px; }
.badge { padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e2e8f0; display:inline-block; }
.badge.training { background: #dcfce7; color: #166534; }
.badge.processing { background: #ede9fe; color: #6d28d9; }
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.paid { background: #dcfce7; color: #166534; }
.badge.overdue { background: #fee2e2; color: #991b1b; }
.toolbar { display:flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hidden { display: none !important; }
.notice { padding: 12px; border-radius: 12px; background: #eff6ff; color: #1d4ed8; margin-bottom: 10px; }
.kv { display:grid; grid-template-columns: 170px 1fr; gap: 8px; font-size: 14px; }
pre { white-space: pre-wrap; }
@media (max-width: 1100px){ .grid-cards{ grid-template-columns: repeat(2, minmax(0,1fr)); } .layout{ grid-template-columns: 1fr; } .sidebar{ height:auto; position:relative; } }
@media (max-width: 700px){ .grid-cards,.form-grid.two{ grid-template-columns: 1fr; } .content{ padding: 14px; } }
