/* ================= Base ================= */
:root{
  --font:"DM Sans","Segoe UI",system-ui,-apple-system,sans-serif;
  --navy:#1a2d63;--ink:#1a2340;--muted:#6b7599;--label:#3d4f8a;
  --bg:#eef1f8;--line:#e3e8f2;--accent:#3a62c0;--green:#4a8a5c
}
*{box-sizing:border-box}
[hidden]{display:none !important}
body{margin:0;font:14px/1.5 var(--font);background:var(--bg);color:var(--ink)}
h3{margin:0 0 12px;font-size:17px}

/* ================= Top bar and tabs ================= */
.top{display:flex;align-items:center;gap:24px;padding:8px 24px;background:#fff;position:sticky;top:0;z-index:20}
.brand{display:flex;align-items:center;gap:12px;font-weight:700;font-size:17px;color:var(--navy);white-space:nowrap}
.logo{width:40px;height:40px;border-radius:50%;object-fit:contain}
.tabs{display:flex;gap:2px;flex:1;overflow-x:auto;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tabs a{padding:9px 13px;font-size:14px;border-radius:14px;color:#2a3558;font-weight:500;white-space:nowrap;text-decoration:none}
.tabs a:hover{background:#f0f3fa}
.tabs a.on{background:var(--navy);color:#fff;box-shadow:0 8px 18px rgba(26,45,99,.3)}
.user{position:relative;margin-left:auto}
.avatar{width:38px;height:38px;border-radius:50%;background:var(--navy);color:#fff;font:700 15px var(--font);
  padding:0;margin:0;border:0;cursor:pointer;box-shadow:0 0 0 5px #eef1f8}
.umenu{position:absolute;right:0;top:56px;min-width:220px;background:#fff;border-radius:16px;
  box-shadow:0 16px 40px rgba(20,30,80,.2);padding:14px;display:flex;flex-direction:column;gap:2px}
.umenu small{color:var(--muted);margin-bottom:8px}
.umenu a{padding:9px 10px;border-radius:10px;color:var(--ink);text-decoration:none}
.umenu a:hover{background:#f0f3fa}

/* ================= Banner ================= */
.hero{background:linear-gradient(135deg,#1b3272 0%,#0f1f4d 55%,#1d3573 100%);color:#fff;padding:28px 0 88px}
.wrap{max-width:1180px;margin:0 auto;padding:0 28px}
.crumb{color:#b9c4e6;font-size:13px}
.crumb i{margin:0 8px;font-style:normal;opacity:.7}
.crumb span{color:#fff}
.heroRow{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;flex-wrap:wrap;margin-top:16px}
.hero h1{margin:0;font-size:clamp(26px,3vw,36px);line-height:1.1;font-weight:700;letter-spacing:-.5px}
.hero p{margin:6px 0 0;color:#c4cde9;font-size:15px}
.pill{display:flex;align-items:center;gap:16px;background:#fff;color:var(--ink);padding:6px 18px;
  border-radius:999px;min-width:250px;margin:0}
.pill span{font-size:11px;letter-spacing:1.5px;color:var(--muted);font-weight:500}
.pill select{flex:1;width:auto;border:0;background:transparent;font:700 15px var(--font);color:var(--navy);
  margin:0;padding:6px 0;border-radius:0;outline:0}
.content{margin-top:-58px;padding-bottom:48px}

/* ================= Cards and stats ================= */
.card{background:#fff;border-radius:22px;padding:22px;margin-bottom:24px;
  box-shadow:0 10px 30px rgba(30,45,110,.08);overflow-x:auto}
.card.narrow{max-width:520px}
.cardhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.cardhead h3{margin:0}
.chip{background:#fbe9b5;color:#6b4e00;padding:3px 12px;border-radius:999px;font-size:12px;font-weight:500}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:20px;margin-bottom:24px}
.stat{background:#fff;border-radius:24px;padding:24px;box-shadow:0 10px 30px rgba(30,45,110,.1)}
.stat .lab{font-size:12px;letter-spacing:1.2px;text-transform:uppercase;color:var(--label);font-weight:700}
.stat .num{font-size:38px;font-weight:700;line-height:1.1;margin-top:10px}
.stat .cap{color:var(--muted);font-size:14px;margin-bottom:16px}
.bar{display:flex;height:10px;border-radius:99px;background:#e4e9f4;overflow:hidden}
.bar .s1{background:var(--accent)}
.bar .s2{background:var(--green)}
.legend{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:14px;font-size:14px}
.legend u{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:7px;text-decoration:none}
.legend .d1{background:var(--accent)}
.legend .d2{background:var(--green)}

/* ================= Tables and forms ================= */
table{width:100%;border-collapse:collapse}
th,td{padding:9px 10px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}
th{font-size:11px;letter-spacing:.8px;text-transform:uppercase;color:var(--label);font-weight:700}
tr:last-child td{border-bottom:0}
label{display:block;margin-top:14px;font-weight:600;font-size:13px;color:var(--label)}
input,select,textarea{width:100%;padding:9px 12px;margin-top:5px;border:1.5px solid #d5dcec;
  border-radius:12px;font:inherit;background:#fff;color:var(--ink)}
input:focus,select:focus,textarea:focus{outline:2px solid #9db3ee;border-color:var(--accent)}
textarea{min-height:90px}
.row{display:grid;grid-template-columns:1fr 1fr;gap:0 22px}

/* Same height for every one-line field inside a card: text, number, email, date and dropdowns.
   Browsers size these differently by default, which made the form look uneven. */
.card input:not([type=checkbox]):not([type=radio]):not([type=file]),
.card select{height:42px;padding:0 12px;line-height:40px}
.card select{appearance:none;-webkit-appearance:none;padding-right:36px;cursor:pointer;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7599' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
.card input:disabled,.card select:disabled{background-color:#f4f6fb;color:var(--muted);cursor:not-allowed}
.card input::placeholder{color:#9aa3bd}

/* Three fields per row, used by the Add employee form */
.form3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 20px}
.form3 .span2{grid-column:span 2}
.fsec{margin:26px 0 0;padding-top:18px;border-top:1px solid var(--line);font-size:12px;
  letter-spacing:1.2px;text-transform:uppercase;color:var(--muted);font-weight:700}
.fsec.first{margin-top:4px;padding-top:0;border-top:0}
.hint{margin:6px 0 0;font-size:12px;color:var(--muted)}
.formfoot{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:20px}
.formfoot button{margin-top:0}
@media (max-width:640px){ .form3{grid-template-columns:1fr} .form3 .span2{grid-column:auto} }
button{padding:9px 18px;border:0;border-radius:12px;background:var(--navy);color:#fff;
  font:600 14px var(--font);cursor:pointer;margin-top:18px}
button:hover{filter:brightness(1.15)}
button.g{background:#3f8a5a}
button.r{background:#c0392b}
button.s{padding:4px 12px;margin:0;border-radius:10px;font-size:13px}
:focus-visible{outline:2px solid #6f8ae6;outline-offset:2px}
.tag{padding:2px 10px;border-radius:999px;font-size:12px;font-weight:600;background:#e6e9f2}
.Approved{background:#d6efdf;color:#1f5a35}
.Pending{background:#fbe9b5;color:#6b4e00}
.Rejected{background:#f7d3ce;color:#8a2a1f}

@media (max-width:900px){
  .top{flex-wrap:wrap;gap:10px}
  .stats{grid-template-columns:1fr !important}
  .tabs{order:3;flex-basis:100%}
  .brand{font-size:18px}
  .hero{padding:30px 0 100px}
  .hero p{font-size:17px}
  .row{grid-template-columns:1fr}
  .pill{min-width:0;width:100%}
  .wrap{padding:0 16px}
}

/* ================= Week calendar ================= */
.calhead{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.calhead h3{margin:0}
.calnav{display:flex;align-items:center;gap:8px}
.calnav b{font-weight:600;font-size:13px;color:var(--label);margin:0 6px}
table.cal{table-layout:fixed;min-width:760px}
.cal th,.cal td{white-space:normal;border:1px solid var(--line);padding:0;vertical-align:middle}
.cal thead th{padding:8px 4px;text-align:center;text-transform:none;letter-spacing:0;font-size:12px;color:var(--ink);background:#f6f8fc}
.cal thead th:first-child{width:150px;text-align:left;padding-left:10px}
.cal thead th span{display:block;font-weight:500;color:var(--muted)}
.cal thead th.tdy{background:var(--navy);color:#fff}
.cal thead th.tdy span{color:#c4cde9}
.cal th.dv{padding:8px 10px;text-align:left;font-size:13px;text-transform:none;letter-spacing:0;color:var(--ink);background:#fff;vertical-align:top}
.cal td{height:50px;padding:3px}
.cal td.we{background:#f7f8fb}
.cal tr:last-child td{border-bottom:1px solid var(--line)}
.lv{background:#dbe6fb;border-left:4px solid var(--accent);border-radius:8px;padding:5px 8px;height:100%;line-height:1.25}
.lv b{display:block;font-size:13px}
.lv small{color:var(--muted);font-size:12px}
.calEmpty td{text-align:center;color:var(--muted);padding:22px}
.bar .s3{background:#d0689a}
.legend .d3{background:#d0689a}

.notice{background:#eaf6ec;border:1px solid #bfe0c8;border-radius:14px;padding:12px 16px;margin:16px 0}
.notice code{font:600 15px ui-monospace,Menlo,Consolas,monospace;background:#fff;padding:2px 8px;border-radius:6px;user-select:all}

/* ================= Sign-in page (login.html) =================
   Everything below is scoped to body.login-page so it cannot affect the app screens. */
.login-page{--lp-blue:#2b3190;--lp-head:#2b4a9f;--lp-line:#c9ccd6;--lp-text:#2a2f5a;--lp-muted:#6b7190;
  min-height:100vh;display:grid;place-items:center;background:#eaf6fd;color:var(--lp-text);overflow-x:hidden}
.login-page .bg{position:fixed;top:0;right:0;height:100%;width:56vw;z-index:0}

.login-card{position:relative;z-index:1;width:min(94vw,780px);min-height:440px;background:#fff;
  border-radius:18px;box-shadow:0 14px 40px rgba(20,25,90,.28);overflow:hidden;
  display:flex;align-items:center}
.login-page .art{position:absolute;inset:0;width:100%;height:100%}
.login-page .panel{position:relative;width:46%;padding:28px 12px 22px 40px}

.login-page h1{margin:0;font-size:34px;letter-spacing:1px;color:var(--lp-head);text-align:center}
.login-page h1.small{font-size:24px}
.login-page .sub{margin:4px 0 6px;text-align:center;font-size:13px;color:var(--lp-muted)}

.login-page label{margin:0;font-weight:400;font-size:inherit}
.login-page .field{display:flex;align-items:center;gap:10px;margin-top:20px;padding:6px 2px;
  border-bottom:2px solid var(--lp-line)}
.login-page .field:focus-within{border-bottom-color:var(--lp-blue)}
.login-page .field input{flex:1;width:auto;min-width:0;margin:0;padding:4px 0;border:0;border-radius:0;
  background:transparent;font:inherit;color:var(--lp-text);outline:0}
.login-page .field input::placeholder{color:#9aa0b5}
.login-page .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.login-page .btn{width:100%;margin-top:24px;padding:11px;border:0;border-radius:3px;color:#fff;
  font:600 15px var(--font);cursor:pointer;
  background:linear-gradient(90deg,#2d34a0,#1b1f68);box-shadow:0 6px 12px rgba(30,35,110,.35)}
.login-page .btn:hover{filter:brightness(1.12)}
.login-page .btn:disabled{opacity:.6;cursor:wait}
.login-page a:focus-visible,.login-page .remember input:focus-visible{outline:2px solid #5a67e8;outline-offset:2px}

.login-page .row{display:flex;gap:0;justify-content:space-between;align-items:center;margin-top:14px;font-size:13px}
.login-page .row a{color:var(--lp-blue)}
.login-page .remember{display:flex;align-items:center;gap:6px;cursor:pointer}
.login-page .remember input{width:auto;margin:0;padding:0;accent-color:var(--lp-blue)}

.login-page .err{min-height:20px;margin:12px 0 0;font-size:13px;color:#c0392b}
.login-page .err.info{color:var(--lp-blue)}
.login-page .foot{margin:14px 0 0;font-size:11px;color:var(--lp-muted)}

@media (max-width:640px){
  .login-page .bg,.login-page .art{display:none}
  .login-card{width:94vw;min-height:0}
  .login-page .panel{width:100%;padding:28px 24px 22px}
}
/* ================= Required marks, profile page ================= */
.req{color:#c0392b;font-style:normal}
.muted{color:var(--muted);font-weight:400}
.notice.warn{background:#fff6dd;border-color:#f1dc9c}
.notice.warn a{color:var(--navy);font-weight:600;margin-left:4px}
.profnudge{margin:0 0 24px}
.info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 20px;margin-top:6px}
.info > div > span{display:block;font-size:12px;letter-spacing:.8px;text-transform:uppercase;color:var(--label);font-weight:700}
.info b{display:block;margin-top:3px;font-weight:500;overflow-wrap:anywhere}
@media (max-width:640px){ .info{grid-template-columns:1fr 1fr} }

/* ================= Employee list: header, search, pages ================= */
button.ghost{background:#fff;color:var(--navy);box-shadow:inset 0 0 0 1.5px #d5dcec}
button.ghost:hover{filter:none;background:#f0f3fa}
button:disabled{opacity:.5;cursor:not-allowed;filter:none}
.listhead{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:14px}
.listhead h3{margin:0}
.listhead .count{margin-left:6px;font-size:13px;font-weight:600;color:var(--muted)}
.listtools{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.listtools button{margin:0}
.search input{width:300px;max-width:100%;margin:0}
.pager{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px;
  padding-top:14px;border-top:1px solid var(--line);color:var(--muted);font-size:13px}
.pager span{margin-right:auto}
.pager button{min-width:34px}
.pager i{font-style:normal;padding:0 2px}
.pager{justify-content:flex-end}
.pager button + button,.pager i + button,.pager button + i{margin-left:4px}
@media (max-width:640px){ .listtools,.search,.search input{width:100%} .listtools button{flex:1} }
/* Long division names wrap so the whole table fits inside the card */
/* Name (with EID), workplace, designation and contact (with email) wrap so the whole table fits a laptop screen */
.emptable td:nth-child(-n+3),.emptable td:nth-child(5){white-space:normal}
.emptable td:nth-child(1){min-width:150px}
.emptable td:nth-child(2){min-width:170px}
.emptable td:nth-child(3){min-width:110px}
.emptable td:nth-child(5){min-width:150px;overflow-wrap:anywhere}
.emptable td small{display:block;color:var(--muted);font-size:12px;font-weight:400}
.emptable td small.away{color:#a35a00;font-weight:600}
.emptable td:last-child{text-align:right}

/* ================= Row action menu (the three dots) ================= */
.emptable td:last-child,.emptable th:last-child{text-align:center;width:70px}
button.kebab{width:34px;height:34px;padding:0;margin:0;border-radius:10px;background:transparent;color:var(--ink);
  font-size:20px;line-height:1;font-weight:700}
button.kebab:hover{background:#eef1f8;filter:none}
.rowmenu{position:fixed;z-index:50;min-width:190px;background:#fff;border-radius:14px;padding:6px;
  box-shadow:0 14px 36px rgba(20,30,80,.22);display:flex;flex-direction:column}
.rowmenu button{margin:0;background:transparent;color:var(--ink);text-align:left;font-weight:500;padding:9px 12px;border-radius:9px}
.rowmenu button:hover,.rowmenu button:focus-visible{background:#f0f3fa;filter:none;outline:0}
.rowmenu button.danger{color:#c0392b}
.rowmenu button.danger:hover{background:#fdecea}
select.slim{width:auto;margin:0;min-width:150px}
.notice.warn a{margin-left:0}
.legend .d0{background:#c5cbdb}
.stat button{margin-top:4px}

/* ================= Master lists ================= */
.seg{display:flex;flex-wrap:wrap;gap:4px;padding:4px;background:#f0f3fa;border-radius:14px;margin-bottom:20px;width:fit-content;max-width:100%}
.seg button{margin:0;background:transparent;color:#2a3558;font-weight:500;padding:8px 14px;border-radius:10px}
.seg button:hover{background:#e3e8f4;filter:none}
.seg button.on{background:var(--navy);color:#fff;box-shadow:0 6px 14px rgba(26,45,99,.25)}
.lkbar{background:#f6f8fc;border:1px solid var(--line);border-radius:14px;padding:4px 16px 14px;margin-bottom:16px}
.lkrow{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.lkrow input{flex:1;min-width:200px;max-width:420px}
.lkrow button{margin:5px 0 0}
.lkbar #msg{display:block;margin-top:8px;font-size:13px}
.lktable td:nth-child(2){width:180px}
.lktable td:last-child,.lktable th:last-child{text-align:center;width:70px}
.lktable td:first-child{white-space:normal}

/* ================= Notification bell ================= */
.user{display:flex;align-items:center;gap:12px}
button.bell{position:relative;width:38px;height:38px;padding:0;margin:0;border-radius:50%;background:#f0f3fa;color:var(--navy);
  display:grid;place-items:center}
button.bell:hover{background:#e3e8f4;filter:none}
.bell .dot{position:absolute;top:-3px;right:-4px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#c0392b;
  color:#fff;font:700 11px/18px var(--font);text-align:center;border:2px solid #fff}
.npanel{position:absolute;right:0;top:56px;width:360px;max-width:calc(100vw - 24px);max-height:70vh;overflow:auto;background:#fff;
  border-radius:16px;box-shadow:0 16px 40px rgba(20,30,80,.2);padding:10px;z-index:30}
.nhead{display:block;padding:6px 10px 10px;font-size:15px}
.nitem{display:flex;gap:10px;padding:10px;border-radius:12px;color:var(--ink);text-decoration:none;font-size:13px;line-height:1.4}
.nitem:hover{background:#f0f3fa}
.nitem.unread{background:#f3f6ff}
.nitem small{display:block;color:var(--muted);margin-top:2px}
.ni{flex:none;width:10px;height:10px;border-radius:50%;margin-top:5px;background:var(--accent)}
.ni.ok{background:#3f8a5a}.ni.no{background:#c0392b}.ni.off{background:#d39b1c}
.nempty{padding:4px 10px 10px;margin:0}
.nbadge{display:inline-block;min-width:18px;padding:0 6px;margin-left:4px;border-radius:9px;background:#c0392b;color:#fff;
  font-size:11px;font-weight:700;line-height:18px;text-align:center}

/* ================= Employee picker ================= */
.picker{position:relative}
.plist{position:absolute;left:0;right:0;top:100%;margin-top:4px;background:#fff;border-radius:14px;z-index:40;
  box-shadow:0 14px 36px rgba(20,30,80,.22);padding:6px;max-height:300px;overflow:auto}
.plist button{display:block;width:100%;margin:0;text-align:left;background:transparent;color:var(--ink);font-weight:400;padding:8px 10px;border-radius:9px}
.plist button:hover,.plist button.on{background:#f0f3fa;filter:none}
.plist button b{font-weight:600}
.plist small{display:block;color:var(--muted);font-size:12px}
.plist p{margin:6px 10px}
.card .picker input[type=search]{padding-right:12px}

/* ================= Apply, lists, approvals ================= */
.balbox{min-height:42px;margin-top:5px;padding:10px 14px;border-radius:12px;background:#f6f8fc;border:1px solid var(--line);font-size:14px}
.bad{color:#c0392b;font-weight:600}
.lvtable td small,.lvtable td .tag + small{display:block;color:var(--muted);font-size:12px;margin-top:3px;white-space:normal;max-width:260px}
.lvtable td:first-child b{display:block}
a.att{font-size:12px;margin-left:6px;color:var(--accent)}
td.empty{color:var(--muted);text-align:center;padding:22px}
.empty-state{text-align:center;padding:36px 22px}
.empty-state h3{margin-bottom:4px}
.appr .cardhead{align-items:flex-start}
.appr .cardhead h3{margin:0 0 2px}
.reason{margin-top:16px;padding:12px 16px;background:#f6f8fc;border-radius:12px}
.reason span{font-size:12px;letter-spacing:.8px;text-transform:uppercase;color:var(--label);font-weight:700}
.reason p{margin:4px 0 0;white-space:pre-wrap}
.amsg{font-size:13px}
.Medical,.Annual,.Earned,.Casual,.Other{background:#e6ecfb;color:#24407e}

/* ================= Work location, leave records, dashboard cards ================= */
.locnote{align-self:end;padding:0 0 10px;font-size:12px;color:var(--muted)}
.lktable td small{display:block;color:var(--muted);font-size:12px}
.loc.dz{font-weight:600;color:#7a4b00}
small.away{display:block;margin-top:3px;font-size:12px;color:#a35a00;font-weight:600;white-space:normal}
.filters{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.filters .search{flex:1;min-width:220px}
.filters .search input{width:100%}
.recform .span3{grid-column:1 / -1}
.recform label{margin-top:8px}
button.stat.awaycard{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;width:100%;margin:0;text-align:left;color:var(--ink);font:inherit;cursor:pointer;
  border:2px solid transparent;transition:border-color .15s}
button.stat.awaycard:hover{filter:none;border-color:#c9d5f3}
button.stat.awaycard.open{border-color:var(--accent)}
.awaycard .more{display:inline-block;margin-top:2px;font-size:13px;font-weight:600;color:var(--accent)}
#awaypanel .card{margin-top:-4px}
@media (max-width:640px){ .filters select.slim{flex:1} }

/* ================= Compact stat cards (dashboard, My Leaves) ================= */
.stats.ministats{grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-bottom:18px}
#mybal.ministats{grid-template-columns:repeat(auto-fill,minmax(170px,1fr)) !important}
.stat.mini{padding:14px 18px;border-radius:16px;box-shadow:0 6px 18px rgba(30,45,110,.08);min-height:0}
.stat.mini .lab{font-size:11px;letter-spacing:1px}
.stat.mini .num{font-size:26px;margin-top:4px;line-height:1.15}
.stat.mini .cap{display:block;margin:2px 0 0;font-size:12.5px}
.stat.mini .more{display:inline-block;margin-top:4px;font-size:12.5px;font-weight:600;color:var(--accent);text-decoration:none}
.stat.mini .bar.thin{height:6px;margin-top:8px}
.stat.mini .legend{margin-top:6px;font-size:12.5px;gap:4px 12px}
.stat.mini .legend u{width:8px;height:8px;margin-right:5px}
button.stat.mini.awaycard{border-width:1.5px}
@media (max-width:1100px){ .stats.ministats{grid-template-columns:repeat(3,minmax(0,1fr)) !important} }
@media (max-width:640px){ .stats.ministats,#mybal.ministats{grid-template-columns:repeat(2,minmax(0,1fr)) !important} }

/* ================= Organisation ================= */
.orgbar{border:1.5px solid var(--accent)}
.orgt{width:100%}
.orgt th{width:200px;text-align:left;vertical-align:top;padding-top:14px}
.orgt td{white-space:normal}
.orgt td.act{text-align:right;width:120px;vertical-align:top}
.orgline{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 0}
.orgline button{margin:0}
.dept .headrow{display:grid;grid-template-columns:200px 1fr auto;gap:12px;align-items:center;padding:12px 16px;margin:10px 0 6px;
  background:#f6f8fc;border-radius:12px}
.dept .headrow .lab{font-size:12px;letter-spacing:.8px;text-transform:uppercase;color:var(--label);font-weight:700}
.dept .headrow .act{display:flex;gap:8px}
.dept .headrow button,.orgt button{margin:0}
.dept .lktable td:nth-child(2){white-space:normal}
.dept .lktable td:nth-child(3){width:70px}
button.addrow{margin-top:12px}
@media (max-width:760px){ .dept .headrow{grid-template-columns:1fr} .orgt th{width:auto} }
.checks{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.checks label{display:flex;align-items:center;gap:8px;margin:0;font-weight:500;font-size:14px;color:var(--ink)}
.checks input{width:auto;height:auto;margin:0}
.lttable td{white-space:normal}

/* ================= Cancel / come back early ================= */
.tag.Cancelled{background:#eceef3;color:#5b6378}
small.pendchg{color:#a35a00 !important;font-weight:600}
.lvtable td:last-child,.lvtable th:last-child{text-align:center;width:70px}
.dlgwrap{position:fixed;inset:0;z-index:60;background:rgba(15,22,50,.45);display:grid;place-items:center;padding:16px}
.dlg{width:min(480px,100%);margin:0;box-shadow:0 24px 60px rgba(10,20,60,.35)}
.dlg h3{margin-top:0}
.dlg textarea{min-height:80px}
.appr.chg{border-left:4px solid #d39b1c}

/* ===== Official duty (not leave) ===== */
.lv.duty{background:#e3f3ea;border-left-color:#3f8a5a}
.callegend{display:flex;gap:14px;margin-top:4px;font-size:12px;color:var(--muted)}
.callegend span{display:inline-flex;align-items:center;gap:6px}
.callegend i{width:12px;height:12px;border-radius:3px;display:inline-block}
.callegend .k-leave{background:#dbe6fb;box-shadow:inset 3px 0 0 var(--accent)}
.callegend .k-duty{background:#e3f3ea;box-shadow:inset 3px 0 0 #3f8a5a}
.ni.duty{background:#3f8a5a}
.dutytable td{white-space:normal;vertical-align:top}
.dutytable td:nth-child(1){min-width:200px}
.dutytable td:nth-child(2){width:auto;min-width:130px}
.dutytable td:nth-child(3){min-width:180px}
.dutytable td:nth-child(5){text-align:center}
.dmline+.dmline{margin-top:6px}
.dmline small{display:block}
.dmtable td{vertical-align:middle;white-space:normal}
.dmtable td:nth-child(2){width:auto;min-width:240px}
.dmtable td:last-child{width:110px}
.dmtable .picker>label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
label.inl{display:inline-flex;align-items:center;gap:6px;font-weight:500;margin:0 0 0 6px;text-transform:none;letter-spacing:0}
label.inl input{width:auto;margin:0}
#dutywarn .notice{margin:12px 0 4px}

/* Many tabs (admins who also approve): tighter tabs on laptop screens, and their own row if they still don't fit */
@media (min-width:901px) and (max-width:1440px){
  .top{gap:14px}
  .tabs a{padding:8px 9px;font-size:13.5px}
}
/* set by app.js when the tabs do not fit beside the title */
@media (min-width:901px){
  .top.wraptabs{flex-wrap:wrap;row-gap:4px}
  .top.wraptabs .tabs{order:3;flex-basis:100%}
}
.cal th.dv.dutyrow{color:#2e6b45}

/* Changing tabs: the page below the header fades in instead of flashing */
main.content{animation:pagein .18s ease-out}
@keyframes pagein{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){main.content{animation:none}}
/* "Loading..." only shows if loading takes a moment, so quick pages don't flash it */
.ld{animation:ldshow 0s linear .35s both}
@keyframes ldshow{from{visibility:hidden}to{visibility:visible}}
.inrow{display:flex;gap:8px}.inrow input{flex:1;min-width:0}.inrow select{width:auto}
#applycard input[readonly]{background:#f3f5fa;color:var(--muted)}

/* ===== Government holidays and half days ===== */
.cal td.hol{background:repeating-linear-gradient(135deg,#fdf3e1 0 6px,#fbeacb 6px 12px)}
.cal thead th.hol{background:#fbeacb}
.cal thead th.hol.tdy{background:var(--navy)}
.cal thead th em{display:block;font-style:normal;font-size:11px;font-weight:600;color:#9a6512;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 4px}
.cal thead th.tdy em{color:#ffd99a}
.callegend .k-hol{background:#fbeacb}
.hotable td:nth-child(2){width:auto}
.hotable td{white-space:normal}
#hdbox select{width:100%}
.hotable td:last-child,.hotable th:last-child{width:120px}

/* Election Commission of Bhutan logo on the sign-in page */
.login-page .lp-logo{display:block;width:92px;height:92px;margin:0 auto 10px;object-fit:contain}
@media (max-width:640px){ .login-page .lp-logo{width:78px;height:78px} }
.hqfield[hidden]{display:none!important}

/* ===== Organisation tree ===== */
.orgtree,.orgtree ul{list-style:none;margin:0;padding:0}
.orgtree ul{margin-left:18px;padding-left:14px;border-left:2px solid var(--line,#e3e8f2)}
.orgtree li{margin:6px 0;line-height:1.45}
.orgtree .t-k{display:inline-block;min-width:96px;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.orgtree .t-top>.t-k{color:var(--navy)}
.orgtree .t-div{font-size:14px}
.orgtree .t-div::before{content:"";display:inline-block;width:8px;height:8px;border-radius:2px;background:#9fb4e6;margin-right:8px;vertical-align:middle}
.orgloose{margin:12px 0 0;padding:10px 12px;background:#fff6e5;border-radius:8px;font-size:13.5px}
.orgoffices ul{list-style:none;padding:0;margin:6px 0 0}
.orgoffices li{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:4px 0;font-size:14px}
.orgoffices li button{color:#c0392b}
.orgdivs td{vertical-align:middle;white-space:normal}
.orgdivs td:nth-child(2){min-width:220px;width:auto}
.orgdivs select.slim{width:100%;max-width:280px}
.orgdirs td{white-space:normal}
/* Sub-tabs inside a tab (Leave Requests, Setup), shown under the page title */
.subnav{display:flex;gap:8px;margin:18px 0 0;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.subnav::-webkit-scrollbar{display:none}
.subnav a{padding:8px 16px;border-radius:999px;font-size:14px;font-weight:600;color:#e3e9fb;text-decoration:none;white-space:nowrap;
  background:rgba(255,255,255,.1);box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.subnav a:hover{background:rgba(255,255,255,.2);color:#fff}
.subnav a.on{background:#fff;color:var(--navy);box-shadow:none}
.subnav a:focus-visible{outline:3px solid #8fb0ff;outline-offset:2px}

/* Leave type term */
.tag.term{background:#eef2fa;color:#3b4a6b}
.tag.term.long{background:#efe8fb;color:#5b3a9a}

/* Audit log */
.audtable td{white-space:normal;vertical-align:top}
.audtable td:nth-child(1){white-space:nowrap;width:110px}
.audtable td:nth-child(4){max-width:260px}
.audtable td:last-child,.audtable th:last-child{text-align:center;width:70px}
.audfilters input[type=date],.audfilters select{width:auto}
.audfilters select{min-width:190px}
pre.audjson{background:#f5f7fc;border:1px solid var(--line);border-radius:12px;padding:14px;font-size:12.5px;line-height:1.5;
  white-space:pre-wrap;overflow-wrap:anywhere;max-height:360px;overflow:auto;margin:6px 0 0}
#audview code{font-size:12.5px}
.errtable td:nth-child(3){min-width:280px}
.errtable .errmsg{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;overflow-wrap:anywhere}
pre.errfull{margin:0 0 14px;color:#8a1f1f;background:#fdf3f3;border-color:#f3d4d4}

/* Approval rules (Setup > Organisation) */
.rulescard .ruleline{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.rulescard .ruleline label{margin:0;text-transform:none;letter-spacing:0;font-size:15px;font-weight:600;color:var(--ink)}
.rulescard .ruleline input{width:90px;margin:0}
.rulescard .ruleline span{font-size:15px}
.fyicard td small{display:block;color:var(--muted);font-size:12px}
.rulescard .rulelist{margin:4px 0 8px;padding-left:20px;line-height:1.7}
.rulescard .checks label b{font-weight:600}
.rulescard p{margin:6px 0}

/* Reports */
.repmode{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}
.repmode label{display:flex;align-items:center;gap:8px;margin:0;text-transform:none;letter-spacing:0;font-size:14.5px;font-weight:500;color:var(--ink)}
.repmode select{width:auto;margin:0}
.repcols-head{display:flex;justify-content:space-between;align-items:center;font-weight:600;font-size:14px;margin:4px 0 8px}
.repcols{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:6px 16px;padding:12px 14px;background:#f7f9fd;border:1px solid var(--line);border-radius:12px}
.repcols label{display:flex;align-items:center;gap:8px;margin:0;text-transform:none;letter-spacing:0;font-size:14px;font-weight:400;color:var(--ink)}
.repfilters .inrow{display:flex;gap:8px}
.repfilters .inrow select{min-width:0}
button.linkbtn{background:none;border:0;padding:0;margin:0;color:var(--navy);font-weight:600;text-decoration:underline;cursor:pointer;font-size:13.5px}
.reptable{overflow-x:auto}
.reptable td{white-space:normal}
.reptotal{font-size:14px;margin:10px 0 0}
.repmode input,.repcols input{width:auto;height:auto;margin:0;flex:none}
.repcols label{line-height:1.3}

/* Attendance report (Reports > Attendance) */
details.attrules{border:1px solid var(--line);border-radius:12px;padding:10px 14px;margin:14px 0;background:#fbfcfe}
details.attrules summary{cursor:pointer;font-weight:600;color:var(--navy)}
details.attrules[open] summary{margin-bottom:10px}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 8px}
.chips .chip{display:inline-flex;align-items:center;gap:4px;background:#eef2fa;border-radius:999px;padding:4px 10px;font-size:13.5px}
.repmode label{align-items:flex-start}.repmode label input{margin-top:3px}
.atttable table{font-size:13.5px}
.atttable th{white-space:normal;line-height:1.25;vertical-align:bottom}
.atttable th,.atttable td{padding:8px 7px}