@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root{
  --primary:#0B4F6C; --primary-light:#146686; --accent:#2E8B57; --accent-soft:#E4F3EB;
  --amber:#F5A623; --amber-soft:#FDF1DD; --red:#D64545; --red-soft:#FBE7E7;
  --bg:#F7F9FA; --surface:#FFFFFF; --text:#1C2B33; --text-mute:#64798A; --border:#E3E9EC; --radius:12px;
}
*{box-sizing:border-box;} body{margin:0;font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);}
a{color:inherit;text-decoration:none;}
.shell{display:flex;min-height:100vh;}
.rail{width:210px;background:var(--primary);color:#fff;flex-shrink:0;display:flex;flex-direction:column;padding:20px 0;}
.rail .brand{padding:0 20px 20px;font-weight:800;font-size:16px;border-bottom:1px solid rgba(255,255,255,.15);margin-bottom:10px;}
.rail .brand small{display:block;font-weight:500;font-size:11px;opacity:.75;margin-top:4px;}
.rail nav a{display:flex;align-items:center;gap:10px;padding:11px 20px;color:#CFE3EC;font-size:13.5px;font-weight:600;cursor:pointer;}
.rail nav a.active,.rail nav a:hover{background:rgba(255,255,255,.13);color:#fff;}
.rail .logout{margin-top:auto;padding:11px 20px;font-size:13px;font-weight:600;color:#F5C6C6;cursor:pointer;}
.main{flex:1;min-width:0;}
.topbar{height:60px;background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 24px;}
.topbar h1{font-size:15px;font-weight:700;margin:0;}
.topbar .who{font-size:12.5px;color:var(--text-mute);}
.content{padding:24px;max-width:1200px;}
.section{display:none;} .section.active{display:block;}
.kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:20px;}
.kpi{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;}
.kpi .label{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-mute);font-weight:700;}
.kpi .value{font-size:24px;font-weight:800;margin-top:6px;}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:18px;}
.card h3{margin:0 0 14px;font-size:14.5px;font-weight:700;display:flex;justify-content:space-between;align-items:center;}
table{width:100%;border-collapse:collapse;font-size:13px;}
th,td{padding:9px 10px;text-align:left;border-bottom:1px solid var(--border);}
th{color:var(--text-mute);font-size:11px;text-transform:uppercase;letter-spacing:.03em;}
tr:hover td{background:var(--bg);}
.badge{font-size:10.5px;font-weight:700;padding:3px 10px;border-radius:20px;display:inline-block;}
.badge.paid,.badge.present,.badge.approved,.badge.active{background:var(--accent-soft);color:var(--accent);}
.badge.unpaid,.badge.pending,.badge.absent{background:var(--amber-soft);color:#B8790E;}
.badge.rejected{background:var(--red-soft);color:var(--red);}
.btn{background:var(--primary);color:#fff;border:none;padding:9px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;}
.btn:hover{background:var(--primary-light);}
.btn.secondary{background:var(--surface);color:var(--primary);border:1px solid var(--primary);}
.btn.success{background:var(--accent);} .btn.danger{background:var(--red);}
.btn.small{padding:5px 10px;font-size:12px;}
input,select,textarea{font-family:inherit;padding:9px 11px;border:1px solid var(--border);border-radius:8px;font-size:13px;width:100%;background:#fff;color:var(--text);}
label{font-size:12px;font-weight:600;color:var(--text-mute);display:block;margin-bottom:5px;}
.form-row{margin-bottom:14px;}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.tabs{display:flex;gap:6px;margin-bottom:16px;border-bottom:1px solid var(--border);}
.tabs button{background:none;border:none;padding:9px 4px;margin-right:18px;font-size:13px;font-weight:600;color:var(--text-mute);cursor:pointer;border-bottom:2px solid transparent;width:auto;}
.tabs button.active{color:var(--primary);border-bottom-color:var(--primary);}
.empty{color:var(--text-mute);font-size:13px;padding:20px 0;text-align:center;}
.toast{position:fixed;bottom:20px;right:20px;background:var(--text);color:#fff;padding:12px 18px;border-radius:8px;font-size:13px;box-shadow:0 6px 20px rgba(0,0,0,.2);z-index:50;}
.notice-item{padding:12px 0;border-bottom:1px solid var(--border);} .notice-item:last-child{border:none;}
.notice-item .t{font-weight:700;font-size:13px;} .notice-item .d{font-size:11.5px;color:var(--text-mute);margin-top:2px;}
.ring{width:80px;height:80px;border-radius:50%;display:flex;align-items:center;justify-content:center;position:relative;flex-shrink:0;}
.ring b{position:relative;font-size:16px;font-weight:800;}
.ring::before{content:"";width:60px;height:60px;background:var(--surface);border-radius:50%;position:absolute;}
.grid-2{display:grid;grid-template-columns:1.5fr 1fr;gap:16px;}
/* notification bell */
.notif-bell{position:relative;width:36px;height:36px;border-radius:50%;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:16px;background:var(--surface);}
.bell-count{position:absolute;top:-4px;right:-4px;background:var(--red);color:#fff;font-size:10px;font-weight:700;min-width:16px;height:16px;border-radius:8px;display:none;align-items:center;justify-content:center;padding:0 3px;}
.notif-panel{position:absolute;top:56px;right:20px;width:320px;max-height:400px;overflow-y:auto;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.12);display:none;z-index:40;}
.notif-panel.open{display:block;}
.notif-row{padding:12px 16px;border-bottom:1px solid var(--border);}
.notif-row:last-child{border-bottom:none;}
.notif-row.unread{background:var(--accent-soft);}
.notif-title{font-size:12.5px;font-weight:700;}
.notif-body{font-size:12px;color:var(--text-mute);margin:3px 0;}
.notif-time{font-size:10.5px;color:var(--text-mute);}
@media(max-width:900px){.grid-2{grid-template-columns:1fr;} .form-grid{grid-template-columns:1fr;}}
/* login page */
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#0B4F6C,#153B4A);}
.login-card{background:#fff;border-radius:16px;padding:36px;width:380px;box-shadow:0 20px 60px rgba(0,0,0,.3);}
.login-card h1{font-size:16px;margin:0 0 2px;color:var(--primary);}
.login-card .sub{font-size:12px;color:var(--text-mute);margin-bottom:22px;}
.login-card .demo{margin-top:18px;font-size:11.5px;color:var(--text-mute);background:var(--bg);padding:10px 12px;border-radius:8px;line-height:1.7;}
.error-msg{color:var(--red);font-size:12.5px;margin-top:10px;display:none;}
