:root{--p:#0f766e;--p2:#0b5f59;--bg:#f5f7fb;--b:#e5e7eb;--t:#111827;--muted:#6b7280;--sidebar:218px}*{box-sizing:border-box}html,body{min-height:100%}body{margin:0;font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Arial,sans-serif;background:var(--bg);color:var(--t)}a{color:var(--p)}.sidebar{position:fixed;left:0;top:0;bottom:0;width:var(--sidebar);background:#fff;border-right:1px solid var(--b);z-index:30;overflow:auto}.brand{height:54px;display:flex;align-items:center;gap:10px;padding:0 18px;font-weight:800;color:#111827;text-decoration:none;font-size:17px;border-bottom:1px solid var(--b)}.brand-mark{width:32px;height:32px;border-radius:9px;background:var(--p);color:#fff;display:grid;place-items:center;font-size:18px}.side-nav{padding:6px 7px}.side-nav a{display:flex;align-items:center;gap:10px;padding:6px 9px;border-radius:7px;color:#374151;text-decoration:none;margin:1px 0;font-size:13.5px;min-height:33px;white-space:nowrap}.side-nav a:hover,.side-nav a.active{background:#ecfdf5;color:var(--p);font-weight:700}.menu-icon{width:20px;text-align:center;font-size:16px;line-height:1}.menu-icon i{vertical-align:middle}.app-shell{margin-left:var(--sidebar);min-height:100vh}.topbar{height:64px;background:#fff;border-bottom:1px solid var(--b);position:sticky;top:0;z-index:20;display:flex;align-items:center;padding:0 18px;gap:9px}.topbar-spacer{flex:1}.mobile-menu{display:none;border:0;background:transparent;font-size:22px}.notify-wrap{position:relative}.notify-btn{width:38px;height:38px;border:1px solid var(--b);border-radius:50%;background:#fff;display:grid;place-items:center;text-decoration:none;position:relative;cursor:pointer}.notify-btn:hover{background:#f3f4f6}.badge{position:absolute;right:-4px;top:-5px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:#dc2626;color:#fff;font-size:11px;font-weight:800;line-height:19px;text-align:center}.notify-panel{display:none;position:absolute;right:0;top:46px;width:370px;max-height:520px;background:#fff;border:1px solid var(--b);box-shadow:0 15px 40px rgba(0,0,0,.16);border-radius:12px;overflow:hidden}.notify-panel.open{display:block}.notify-head{display:flex;justify-content:space-between;padding:13px 14px;border-bottom:1px solid var(--b)}.notify-list{max-height:430px;overflow:auto}.notify-item{display:block;padding:11px 14px;border-bottom:1px solid #f1f5f9;color:#111827;text-decoration:none}.notify-item.unread{background:#eff6ff}.notify-item small{display:block;color:var(--muted);margin-top:3px}.pad{padding:14px}.userbox{display:flex;align-items:center;gap:9px;margin-left:4px}.userbox small{display:block;color:var(--muted);font-size:11px}.userbox>a{text-decoration:none;color:#6b7280;font-size:18px}.avatar-mini{width:34px;height:34px;border-radius:50%;background:#d1fae5;color:var(--p);display:grid;place-items:center;font-weight:800}.content{max-width:1600px;margin:auto;padding:20px}.login-main{max-width:1450px;margin:auto;padding:20px}.page-title{display:flex;align-items:center;justify-content:space-between}.page-title h1{font-size:23px;margin:0 0 16px}.card{background:#fff;border:1px solid var(--b);border-radius:12px;padding:16px;margin-bottom:16px;box-shadow:0 1px 2px rgba(0,0,0,.02)}.card h3{margin-top:0}.card-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}label{display:block;font-weight:600;margin:7px 0 5px}input,select,textarea{width:100%;padding:9px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#111827;font:inherit}textarea{min-height:90px;resize:vertical}.btn{display:inline-block;border:0;border-radius:8px;padding:9px 13px;background:var(--p);color:#fff;text-decoration:none;cursor:pointer;font-weight:600}.btn:hover{background:var(--p2)}.btn.gray{background:#475569}.btn.red{background:#b91c1c}.btn.orange{background:#d97706}.btn.light{background:#eef2ff;color:#3730a3}.toolbar{display:flex;gap:8px;align-items:end;flex-wrap:wrap;margin-bottom:12px}.toolbar>div{min-width:150px;flex:0 1 220px}.table-wrap{overflow:auto;border:1px solid var(--b);border-radius:10px}table{width:100%;border-collapse:collapse;background:#fff}th,td{padding:10px;border-bottom:1px solid var(--b);text-align:left;vertical-align:top}th{background:#f8fafc;white-space:nowrap}.flash{padding:10px 12px;background:#dcfce7;border:1px solid #86efac;border-radius:8px;margin-bottom:12px}.kpi{font-size:26px;font-weight:800}.muted{color:var(--muted)}.danger{color:#dc2626}.warn{color:#d97706}.ok{color:#15803d}.progress{height:8px;background:#e2e8f0;border-radius:99px;overflow:hidden}.progress span{display:block;height:100%;background:var(--p)}.attachment-list{display:grid;gap:7px}.attachment-item{display:flex;gap:9px;align-items:center;padding:9px;border:1px solid var(--b);border-radius:9px}.attachment-item a{text-decoration:none}.attachment-item small{display:block;color:var(--muted)}.status-pill{display:inline-block;padding:3px 8px;border-radius:99px;background:#f3f4f6;font-size:12px}.row-overdue td{color:#dc2626;font-weight:600}.row-warning td{color:#d97706;font-weight:600}.comment{padding:11px 0;border-bottom:1px solid #f1f5f9}.comment:last-child{border-bottom:0}.quick-actions{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}.summary-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:12px 0}.summary-strip>div{background:#fff;border:1px solid var(--b);border-radius:10px;padding:12px}.summary-strip b{display:block;font-size:18px;margin-top:4px}.filters{background:#fff;border:1px solid var(--b);border-radius:10px;padding:12px;margin-bottom:12px}.checkbox-line{display:flex;align-items:center;gap:7px}.checkbox-line input{width:auto}.notification-page .notify-row{padding:12px;border-bottom:1px solid var(--b)}.notification-page .notify-row.unread{background:#eff6ff}@media(max-width:1000px){.sidebar{transform:translateX(-100%);transition:.2s}.sidebar.open{transform:translateX(0)}.app-shell{margin-left:0}.mobile-menu{display:block}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.userbox div{display:none}}@media(max-width:650px){.content{padding:12px}.grid,.grid2,.summary-strip{grid-template-columns:1fr}.notify-panel{position:fixed;left:10px;right:10px;top:65px;width:auto}.leave-btn{display:none}.toolbar>div{min-width:calc(50% - 4px);flex:1}.page-title h1{font-size:20px}}
.attendance-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.attendance-now{font-size:20px;font-weight:800}.attendance-grid th,.attendance-grid td{text-align:center;min-width:70px;padding:7px 5px}.attendance-grid th:first-child,.attendance-grid td:first-child{position:sticky;left:0;text-align:left;min-width:180px;z-index:2;background:#fff}.attendance-grid th:first-child{background:#f8fafc}.att-present{background:#ecfdf5!important;color:#047857}.att-leave{background:#eff6ff!important;color:#1d4ed8}.att-absent{background:#fef2f2!important;color:#b91c1c}.att-pending{background:#fffbeb!important;color:#b45309}.att-weekend{background:#f8fafc!important;color:#94a3b8}.tiny{font-size:11px}.settings-note{font-size:12px;color:var(--muted);margin-top:5px}
/* V1.3 direct edit + conflict warning */
.editable-row{position:relative;border-bottom:1px solid #edf0f3;padding:7px 48px 7px 0}.editable-row:last-of-type{border-bottom:0}.editable-row p{margin:0}.mini-edit{position:absolute;right:0;top:9px;font-size:12px;text-decoration:none;padding:3px 7px;border-radius:5px;background:#f3f5f7}.inline-edit-form{margin-top:12px;padding-top:12px;border-top:1px dashed #d9dee4}.inline-edit-form input,.inline-edit-form select,.inline-edit-form textarea{margin-bottom:7px}.conflict-warning{margin-top:14px;padding:13px 15px;border:1px solid #f0a33a;background:#fff7e8;border-radius:8px;color:#7a4200}.conflict-warning.ok-conflict{border-color:#65b882;background:#eefaf2;color:#216a3b}.conflict-item{margin-top:9px;padding-top:9px;border-top:1px solid rgba(122,66,0,.18);line-height:1.55}.conflict-summary{padding:9px 11px;background:#fff7e8;border-left:3px solid #f0a33a;border-radius:4px}
