
:root{
  --bg:#fffaf7; --panel:#ffffff; --text:#0f172a; --muted:#475569; --border:#e2e8f0;
  --brand:#ff6b6b; --accent:#38bdf8; --accent2:#34d399; --accent3:#fbbf24; --danger:#ef4444
}
*{box-sizing:border-box} html,body{margin:0;height:100%}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--text)}
.header{position:sticky;top:0;background:linear-gradient(90deg,#fff 0%, #fff5f5 40%, #f0fbff 100%);border-bottom:1px solid var(--border);z-index:100}
.navbar{max-width:1200px;margin:0 auto;padding:10px 16px;display:flex;align-items:center;gap:12px}
.brand{display:flex;align-items:center;gap:8px;font-weight:800;color:#1f2937}
.brand .logo{font-size:22px}
.navlinks{display:flex;flex-wrap:wrap;gap:8px}
.navlinks a{padding:8px 12px;border-radius:999px;background:#fff;border:1px solid var(--border);text-decoration:none;color:#111827;font-weight:600}
.navlinks a:hover{box-shadow:0 4px 14px rgba(0,0,0,.06)}
.spacer{flex:1}
.burger{display:none; background:#fff;border:1px solid var(--border);border-radius:10px;padding:8px 10px;cursor:pointer}
@media(max-width:900px){ .navlinks{display:none} .burger{display:inline-block} }
.drawer{position:fixed;inset:0;background:rgba(0,0,0,.35);display:none;z-index:120}
.drawer.open{display:block}
.drawer .panel{position:absolute;right:0;top:0;height:100%;width:80%;max-width:360px;background:#fff;padding:16px;border-left:1px solid var(--border);display:flex;flex-direction:column;gap:8px}
.drawer .panel a{padding:10px 12px;border:1px solid var(--border);border-radius:12px;text-decoration:none;color:#111827}
.container{max-width:1200px;margin:0 auto;padding:16px}
.grid{display:grid;gap:12px} .grid-2{grid-template-columns:repeat(2,minmax(0,1fr))} .grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:1000px){.grid-2,.grid-3{grid-template-columns:1fr}}
.card{background:var(--panel);border:1px solid var(--border);border-radius:16px;box-shadow:0 8px 30px rgba(15,23,42,.06);padding:16px}
.kpi{font-weight:800;font-size:24px} .muted{color:#64748b;font-size:12px} .section-title{margin:0 0 6px 0}
.input,.select,textarea{padding:10px 12px;border:1px solid var(--border);border-radius:12px;background:#fff}
.btn{padding:10px 14px;border:1px solid var(--border);border-radius:12px;background:#fff;cursor:pointer;font-weight:700}
.btn.brand{background:var(--accent2);color:#083344;border-color:var(--accent2)}
.btn.primary{background:var(--accent);color:#0b1020;border-color:var(--accent)}
.btn.warn{background:var(--accent3);color:#3b2f04;border-color:var(--accent3)}
.btn.danger{background:var(--danger);color:#fff;border-color:var(--danger)}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:10px;border-top:1px solid var(--border);text-align:left}
.table thead{background:#fff8dc}
.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#f1f5f9;font-size:12px}
.status{padding:4px 8px;border-radius:999px;font-weight:700}
.status.present{background:#dcfce7;color:#065f46}
.status.absent{background:#fee2e2;color:#7f1d1d}
.status.left{background:#e0e7ff;color:#3730a3}
.toast-wrap{position:fixed;bottom:16px;right:16px;display:flex;flex-direction:column;gap:8px;z-index:200}
.toast{background:#111827;color:#fff;padding:10px 14px;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.2);opacity:.98}
.toast.success{background:#065f46} .toast.info{background:#1f2937} .toast.warn{background:#92400e} .toast.error{background:#7f1d1d}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.35);display:none;align-items:center;justify-content:center;z-index:210}
.modal.open{display:flex}
.modal .card{max-width:420px;width:92%}
.modal .actions{display:flex;gap:8px;justify-content:flex-end}
.footer{padding:30px 10px;text-align:center;color:#64748b;font-size:12px}
.bottom-nav{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--border);display:none;z-index:110}
.bottom-nav .row{max-width:1200px;margin:0 auto;padding:8px;display:flex;justify-content:space-around}
.bottom-nav a{display:flex;flex-direction:column;align-items:center;gap:2px;color:#111827;text-decoration:none;font-size:12px}
@media(max-width:800px){.bottom-nav{display:block} body{padding-bottom:62px}}
.close-x{align-self:flex-end;background:#fff;border:1px solid var(--border);border-radius:10px;padding:6px 10px;cursor:pointer}
.chart{width:100%;height:260px;border:1px solid var(--border);border-radius:12px;background:#fff}
.sigpad{border:2px dashed #94a3b8;border-radius:12px;background:#fff;touch-action:none}
.search{display:flex;gap:8px;align-items:center;margin:8px 0}
