:root {
    --navy: #1f3761;
    --navy-2: #2a4a7f;
    --bg: #f2f5fb;
    --card: #fff;
    --ink: #1f2733;
    --muted: #7d8898;
    --line: #e6e9f0;
    --green: #27ae60;
    --green-bg: #34c46b;
    --red: #e64a4a;
    --gold: #f2b631;
    --blue: #3a7bd5;
    --purple: #9b59e6;
    --teal: #1abc9c;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 32, 64, .04), 0 6px 20px rgba(16, 32, 64, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Nunito Sans", "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: .95rem; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.inline { display: inline; }
svg.i { width: 15px; height: 15px; vertical-align: -3px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- app shell: sidebar + top bar ---------- */
:root { --side: 250px; --top: 64px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: linear-gradient(180deg, #16294b 0%, #1d3a6b 100%); color: #cfd9ee;
    display: flex; flex-direction: column; z-index: 40; overflow-y: auto; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand img { height: 40px; width: auto; background: #fff; border-radius: 8px; padding: 3px 5px; }
.brand b { display: block; color: #fff; font-size: 1.02rem; letter-spacing: .01em; }
.brand small { display: block; color: #93a6c9; font-size: .74rem; font-weight: 600; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; flex: 1; }
.side-label { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #7f93b8; padding: 14px 10px 6px; }
.side-nav a, .side-foot a, .side-foot button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: #d6def0;
    font: inherit; font-weight: 600; font-size: .92rem; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.side-nav svg, .side-foot svg, .menu-btn svg { width: 19px; height: 19px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.side-nav a:hover, .side-foot a:hover, .side-foot button:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav a.on, .side-foot a.on { background: #fff; color: #16294b; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.side-nav .badge { margin-left: auto; background: #ff5b5b; color: #fff; font-size: .72rem; font-weight: 800; min-width: 22px; height: 22px; padding: 0 6px;
    border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; }
.side-foot { padding: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.side-foot form { margin: 0; }
.sidebar.locked .side-nav { opacity: .35; pointer-events: none; }
.lock-note { margin: 12px 12px 0; background: #ffe9a8; color: #6b4d00; font-size: .8rem; font-weight: 700; padding: 8px 10px; border-radius: 8px; }

.topbar { position: sticky; top: 0; z-index: 30; margin-left: var(--side); height: var(--top); background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 clamp(14px, 2.2vw, 28px); }
.menu-btn { display: none; background: none; border: 0; color: var(--navy); padding: 6px; margin-left: -6px; cursor: pointer; }
.menu-btn svg { width: 24px; height: 24px; }
.greet b { display: block; font-size: 1rem; color: var(--ink); }
.greet small { color: var(--muted); font-size: .8rem; }
.company { margin-left: auto; font-weight: 800; font-size: .85rem; letter-spacing: .06em; color: var(--navy); background: #eef3fc; padding: 7px 14px; border-radius: 99px; white-space: nowrap; }
.me { display: flex; align-items: center; gap: 10px; }
.me .avatar { color: #fff; width: 40px; height: 40px; }
.me-text b { display: block; font-size: .9rem; line-height: 1.2; }
.me-text small { color: var(--muted); font-size: .76rem; }
.shell ~ .page, .shell ~ .foot { margin-left: var(--side); }
.scrim { display: none; }

.avatar { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; flex: 0 0 auto; }
.avatar.sm { width: 34px; height: 34px; font-size: .8rem; color: #fff; }
.c0 { background: #34c46b !important; } .c1 { background: #e0457b !important; } .c2 { background: #f2a531 !important; }
.c3 { background: #2d8cf0 !important; } .c4 { background: #9b59e6 !important; } .c5 { background: #16a3a3 !important; }
.icon-btn { background: none; border: 0; color: inherit; cursor: pointer; padding: 4px; display: flex; }

@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s ease, visibility .25s; visibility: hidden; }
    .nav-open .sidebar { visibility: visible; box-shadow: 0 0 40px rgba(0,0,0,.3); }
    .nav-open .sidebar { transform: none; }
    .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 20, 40, .45); z-index: 35; }
    .topbar, .shell ~ .page, .shell ~ .foot { margin-left: 0; }
    .menu-btn { display: inline-flex; }
    .company, .me-text { display: none; }
    .me { margin-left: auto; }
}

/* ---------- page ---------- */
.page { max-width: 1480px; padding: 22px clamp(14px, 2.2vw, 30px) 60px; }
.page-title { font-size: 1.45rem; font-weight: 800; color: #16294b; margin: 4px 0 18px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 18px; }
.page-head .page-title { margin: 0; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 0 0 24px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #e9edf5; padding: 20px; min-width: 0; }
.card-title { font-size: 1.05rem; font-weight: 700; color: #1b2a44; margin-bottom: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head .card-title { margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }

.flash { padding: 11px 14px; border-radius: 6px; margin-bottom: 14px; font-weight: 600; font-size: .92rem; }
.flash.ok { background: #e3f7ea; color: #17733d; border: 1px solid #bfe9cd; }
.flash.error { background: #fdeaea; color: #a52626; border: 1px solid #f5c6c6; }

/* ---------- dashboard ---------- */
.dash { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(300px, .95fr); grid-auto-flow: row dense; align-items: start; }
.dash .cal-card { grid-column: 3; grid-row: 1 / span 3; }
.dash .wide { grid-column: 1 / span 2; }
.pair { display: flex; flex-wrap: wrap; gap: 14px 30px; margin-bottom: 16px; }
.stat { display: flex; align-items: center; gap: 10px; }
.stat small, .bar small, .person small, .leave-row small { display: block; color: var(--muted); font-size: .8rem; }
.stat b, .bar b { font-weight: 600; font-size: 1rem; }
.stat-ico { width: 30px; height: 30px; display: inline-flex; }
.stat-ico svg { width: 30px; height: 30px; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-ico.blue svg { stroke: var(--blue); } .stat-ico.red svg { stroke: var(--red); }
.stat-ico.navy svg { stroke: var(--navy); } .stat-ico.gold svg { stroke: var(--gold); }
.shift-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; font-size: .92rem; }
.countdown { color: #c0392b; font-family: ui-monospace, Consolas, monospace; letter-spacing: .05em; }
.done { margin: 0; }
.link { color: var(--blue); font-weight: 600; font-size: .92rem; }
.link:hover { text-decoration: underline; }
.bar { padding-left: 10px; border-left: 2px solid; }
.green-bar { border-color: var(--green); } .red-bar { border-color: var(--red); }
.hide-money .money { filter: blur(7px); user-select: none; }

.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #c9ced8; border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--green-bg); }
.switch input:checked + span::before { transform: translateX(18px); }

/* calendar */
.cal-head { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; margin-bottom: 10px; }
.nav-arrow { font-size: 1.6rem; line-height: 1; padding: 0 8px; font-weight: 700; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px 4px; text-align: center; }
.dow { color: var(--muted); font-size: .8rem; padding-bottom: 6px; }
.day { position: relative; display: flex; align-items: center; justify-content: center; height: 34px; border-radius: 5px; font-weight: 600; font-size: .95rem; border: 1.5px solid transparent; }
.day:hover { background: var(--bg); }
.day.out { color: #c3c8d1; font-weight: 400; }
.day::after { content: ""; position: absolute; bottom: 2px; width: 6px; height: 6px; border-radius: 50%; }
.day.st-present { border-color: #2e8b57; }
.day.st-late::after { background: var(--gold); }
.day.st-absent::after { background: var(--red); }
.day.st-leave::after { background: var(--purple); }
.day.st-holiday::after { background: var(--teal); }
.day.st-weekly-off { color: #9aa3b1; }
.day.is-today { background: #e9f0ff; }
.day.sel { outline: 2px solid var(--navy); outline-offset: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; font-size: .78rem; margin: 14px 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.dot.leave { background: var(--purple); } .dot.holiday { background: var(--teal); } .dot.absent { background: var(--red); }
.dot.late { background: var(--gold); } .dot.present { background: #7fc241; }
.day-detail { border-top: 1px solid var(--line); padding-top: 14px; }
.day-detail p { color: #4b5563; margin: 6px 0 0; }
.pill { display: inline-block; font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 3px; margin-left: 6px; background: #eee; }
.pill.st-present { background: #d9f5d0; color: #2d7a17; } .pill.st-late { background: #fff1cc; color: #8a6300; }
.pill.st-absent { background: #fde0e0; color: #a52626; } .pill.st-leave { background: #efe3fd; color: #6b2fb3; }
.pill.st-holiday { background: #d5f5ee; color: #0f7a64; } .pill.st-weekly-off, .pill.st-today { background: #e8ecf3; color: #4b5563; }
.cal-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

/* birthdays */
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.tabs button { border: 0; background: #fff; padding: 6px 14px; font: inherit; font-size: .82rem; color: var(--muted); cursor: pointer; border-right: 1px solid var(--line); }
.tabs button:last-child { border-right: 0; }
.tabs button.on { background: #a9b2c8; color: #fff; }
.people { border: 1px solid var(--line); border-radius: 6px; padding: 4px 14px; max-height: 420px; overflow: auto; }
.person { display: grid; grid-template-columns: auto minmax(0, 1.4fr) 1fr 1fr; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.person:last-of-type { border-bottom: 0; }
.person b { font-weight: 600; }
.who b { font-size: 1rem; }
.empty { padding: 14px 0; margin: 0; }

/* today's leave */
.leave-group { margin-bottom: 8px; }
.group-head { background: #e6e9f1; text-align: center; font-size: .85rem; padding: 5px; border-radius: 3px; margin-bottom: 6px; }
.leave-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.leave-row small { font-size: .7rem; letter-spacing: .02em; }
.tag { font-size: .66rem; font-weight: 700; padding: 4px 9px; border-radius: 3px; color: #fff; white-space: nowrap; }
.tag.green { background: var(--green-bg); } .tag.gold { background: var(--gold); } .tag.red { background: var(--red); }
.tag.grey { background: #9aa3b1; } .tag.blue { background: var(--blue); } .tag.purple { background: var(--purple); }

.fab { position: fixed; right: 26px; bottom: 26px; background: #3d8bfd; color: #fff; font-weight: 700; padding: 12px 24px; border-radius: 99px; box-shadow: 0 8px 20px rgba(61,139,253,.4); z-index: 15; }
.fab:hover { background: #2a76e8; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 99px; padding: 10px 26px; font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; color: #fff; background: var(--navy); }
.btn:hover { filter: brightness(1.07); }
.btn.sm { padding: 7px 18px; font-size: .85rem; }
.btn.xs { padding: 5px 12px; font-size: .78rem; }
.btn.red { background: var(--red); } .btn.gold { background: var(--gold); } .btn.green { background: var(--green-bg); }
.btn.primary { background: var(--navy); } .btn.blue { background: var(--blue); }
.btn.ghost { background: #eef1f6; color: var(--ink); }
.btn.block { width: 100%; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: .85rem; font-weight: 600; color: #4b5563; }
.form label.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.form input:not([type=checkbox]), .form select, .form textarea {
    width: 100%; padding: 9px 11px; border: 1px solid #d5dae3; border-radius: 5px; font: inherit; font-size: .95rem; background: #fff; color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid #b9cdf3; border-color: var(--blue); }
.form input:disabled { background: #f3f5f8; color: #5b6574; cursor: not-allowed; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.section-label { font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); margin-top: 6px; }

.modal { border: 0; border-radius: 10px; padding: 24px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal::backdrop { background: rgba(15, 25, 45, .5); }
.modal h3 { font-size: 1.15rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .actions { white-space: nowrap; text-align: right; }
.tbl .actions form { display: inline; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell small { display: block; color: var(--muted); font-size: .78rem; }

/* summary tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; border-left: 4px solid var(--navy); }
.tile small { color: var(--muted); font-weight: 600; font-size: .8rem; display: block; }
.tile b { font-size: 1.5rem; }
.tile.present { border-color: #7fc241; } .tile.late { border-color: var(--gold); } .tile.absent { border-color: var(--red); }
.tile.leave { border-color: var(--purple); } .tile.holiday { border-color: var(--teal); }

.balance-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.balance { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.balance b { font-size: 1.6rem; color: var(--navy); }
.balance .meter { height: 6px; background: #e8ecf3; border-radius: 99px; overflow: hidden; margin: 10px 0 6px; }
.balance .meter span { display: block; height: 100%; background: var(--green-bg); }

.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 16px; }
.week-strip div { background: #f6f8fc; border-radius: 6px; padding: 8px; text-align: center; font-size: .82rem; }
.week-strip b { display: block; font-size: 1.05rem; }

/* ---------- payslip ---------- */
.payslip { max-width: 820px; margin: 24px auto; background: #fff; padding: 36px; border-radius: 8px; box-shadow: var(--shadow); }
.payslip header { display: flex; align-items: center; gap: 16px; border-bottom: 3px solid var(--navy); padding-bottom: 16px; margin-bottom: 18px; }
.payslip header img { height: 60px; }
.payslip h1 { font-size: 1.3rem; color: var(--navy); }
.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 30px; font-size: .92rem; margin-bottom: 18px; }
.kv span { color: var(--muted); }
.net { background: #eef6ff; border-radius: 6px; padding: 14px 18px; display: flex; justify-content: space-between; font-size: 1.1rem; margin-top: 16px; }
.no-print { text-align: center; margin: 16px; }

/* ---------- sign in / register / forgot ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); background: #fff; }
.auth-hero { position: relative; overflow: hidden; color: #fff; padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; gap: 26px;
    background: radial-gradient(circle at 85% 10%, rgba(80,160,255,.35), transparent 45%), radial-gradient(circle at 10% 90%, rgba(26,188,156,.28), transparent 40%), linear-gradient(135deg, #102245 0%, #1c3d74 55%, #2358a8 100%); }
.hero-brand { display: flex; align-items: center; gap: 12px; }
.hero-brand img { height: 48px; background: #fff; border-radius: 10px; padding: 4px 6px; }
.hero-brand b { display: block; font-size: 1.05rem; letter-spacing: .03em; }
.hero-brand small { color: #b9c9e8; font-weight: 600; }
.auth-hero h2 { font-size: clamp(1.4rem, 2.4vw, 2.1rem); line-height: 1.25; max-width: 560px; font-weight: 800; }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 620px; }
.feature { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(6px); }
.feature b { display: block; font-size: .98rem; }
.feature small { color: #c8d5ee; font-size: .8rem; }
.f-ico { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; background: #fff; }
.f-ico svg { width: 24px; height: 24px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.f-ico.blue svg { stroke: #2d6fe0; } .f-ico.green svg { stroke: #1f9d55; } .f-ico.gold svg { stroke: #d99a00; } .f-ico.purple svg { stroke: #8a43d8; }
.mock { margin-top: auto; background: #fff; border-radius: 16px; padding: 16px; max-width: 520px; box-shadow: 0 30px 60px rgba(0,0,0,.35); transform: perspective(900px) rotateY(-8deg) rotateX(4deg); }
.mock-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-tile { border: 1px solid #e8ecf4; border-radius: 10px; padding: 10px; color: #1b2a44; }
.mock-tile small { font-size: .62rem; font-weight: 800; color: #8592a8; letter-spacing: .06em; }
.mock-tile b { display: block; font-size: 1.5rem; }
.mock-tile i { display: block; height: 4px; border-radius: 9px; background: #e8ecf4; position: relative; overflow: hidden; }
.mock-tile i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: #2d6fe0; }
.t-green { color: #1f9d55; } .t-purple { color: #8a43d8; } .t-gold { color: #d99a00; }
.mock-bars { display: flex; align-items: flex-end; gap: 10px; height: 90px; margin-top: 12px; padding: 0 6px; border-bottom: 1px solid #e8ecf4; }
.mock-bars span { flex: 1; height: var(--h); border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #4b8df5, #2358a8); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth-box { width: min(400px, 100%); text-align: center; }
.auth-box.wide { width: min(500px, 100%); }
.auth-logo { height: 70px; margin-bottom: 10px; }
.auth-box h1 { font-size: 1.9rem; color: #16294b; font-weight: 800; margin-bottom: 4px; }
.auth-box > .muted { margin: 0 0 18px; }
.auth-box .form { text-align: left; margin: 18px 0 8px; }
.field { position: relative; display: block !important; }
.field input { padding: 14px 46px 14px 14px !important; border-radius: 10px !important; font-size: 1rem !important; background: #f7f9fc !important; }
.field > svg, .field .eye svg { width: 22px; height: 22px; fill: none; stroke: #8a95a8; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.field > svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.field .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer; display: flex; }
.field .eye.on svg { stroke: var(--blue); }
.btn.lg { padding: 14px 26px; font-size: 1.02rem; border-radius: 10px; }
.forgot { display: inline-block; margin-top: 8px; color: #1f4fa3; font-weight: 700; }
.forgot:hover { text-decoration: underline; }
.auth-help { margin-top: 18px; }
.setup-note { background: #eef4ff; color: #294a86; border-radius: 10px; padding: 10px 12px; font-size: .85rem; margin: 10px 0 0; text-align: left; }
@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-hero { padding: 22px 20px; gap: 14px; }
    .auth-hero h2, .mock, .features { display: none; }
    .auth-panel { padding: 24px 16px 40px; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
    .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash .cal-card { grid-column: auto; grid-row: auto; }
    .dash .wide { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .dash { grid-template-columns: minmax(0, 1fr); }
    .person { grid-template-columns: auto 1fr; }
    .person > div:nth-child(n+3) { grid-column: 2; }
    .row2, .row3, .kv { grid-template-columns: 1fr; }
    .fab { right: 14px; bottom: 14px; padding: 10px 18px; }
    .payslip { padding: 20px; }
    .week-strip { grid-template-columns: repeat(4, 1fr); }
}
@media print {
    .shell, .topbar, .sidebar, .no-print, .fab, .foot { display: none !important; }
    .shell ~ .page { margin-left: 0 !important; }
    body { background: #fff; }
    .payslip { box-shadow: none; margin: 0; max-width: none; }
}
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.error-box { background: #fff; border-radius: 16px; padding: 36px 28px; box-shadow: var(--shadow); }
.error-box h1 { margin-bottom: 8px; }
.error-box .btn { margin-top: 14px; }

/* ---------- selfie attendance ---------- */
.cam-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cam-btn { padding: 10px 22px; }
.cam-modal { width: min(520px, calc(100vw - 24px)); }
.cam-view { position: relative; background: #0d1628; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.cam-view video, .cam-view img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-view video { transform: scaleX(-1); }
.cam-view [hidden] { display: none; }
.cam-msg { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; background: rgba(0,0,0,.6); color: #fff; font-size: .85rem; padding: 8px 10px; border-radius: 8px; text-align: center; }
.cam-msg[hidden] { display: none; }
.cam-msg.bad { position: static; background: none; color: #ffd0d0; padding: 20px; }
.loc { display: flex; gap: 6px; align-items: flex-start; font-size: .85rem; color: #4b5563; margin: 0; }
.proof { display: flex; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.proof > div { display: flex; align-items: center; gap: 8px; }
.proof img { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; border: 2px solid #e6ebf3; }
.proof small { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.proof a { color: var(--blue); font-weight: 700; font-size: .85rem; }
.thumb { width: 38px; height: 38px; object-fit: cover; border-radius: 8px; vertical-align: middle; border: 1px solid #e6ebf3; }
.map-link { color: var(--blue); font-weight: 700; font-size: .82rem; white-space: nowrap; }
[hidden] { display: none !important; }
@media (min-width: 1181px) and (max-width: 1540px) {
    .dash { grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(290px, 1fr); grid-auto-flow: row dense; }
    .dash .cal-card { grid-column: 3; grid-row: 1 / span 3; }
    .dash .wide { grid-column: 1 / span 2; }
}
.selfie-note { display: flex; gap: 8px; align-items: flex-start; background: #fff7e0; color: #7a5a00; border-radius: 10px; padding: 10px 12px; font-size: .84rem; margin: 12px 0 0; }
.selfie-note a { color: var(--blue); font-weight: 700; }
.selfie-note .i { flex: 0 0 auto; margin-top: 2px; }
.pill, .tag { white-space: nowrap; }
.tbl td:first-child { white-space: nowrap; }
.tbl.nowrap td, .tbl.nowrap th { white-space: nowrap; }
@media (max-width: 720px) {
    .balance-cards, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .balance b, .tile b { font-size: 1.3rem; }
    .page-title { font-size: 1.25rem; }
    .page-head { align-items: flex-start; }
}

/* ---------- mark attendance (office kiosk) ---------- */
.kiosk-help { background: #eef4ff; color: #294a86; border-radius: 12px; padding: 12px 14px; font-size: .9rem; margin: 0 0 14px; }
.kiosk-search input { width: min(420px, 100%); padding: 12px 14px; border: 1px solid #d5dae3; border-radius: 10px; font: inherit; margin-bottom: 16px; background: #fff; }
.kiosk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.kiosk-card { display: grid; gap: 14px; align-content: start; }
.kiosk-card .person-cell b { display: block; }
.kiosk-pill { margin-left: auto; }
.kiosk-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #f7f9fc; border-radius: 10px; padding: 10px 12px; }
.kiosk-times small { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.kiosk-times b { font-size: 1rem; margin-right: 6px; }
.kiosk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.manual { width: 100%; }
.manual summary { list-style: none; display: inline-flex; }
.manual summary::-webkit-details-marker { display: none; }
.manual[open] summary { background: #dfe6f2; }
.manual-form { margin-top: 10px; background: #f7f9fc; border-radius: 10px; padding: 12px; }
.manual-form .btn { justify-self: end; }

/* ---------- clarity + every screen size (phone, laptop, desktop, LED / TV) ---------- */
:root { --muted: #66728a; --ink: #152238; }
.tbl td { color: #1f2a3d; }
.tbl th { color: #5c6880; }
.btn { min-height: 40px; }
.phone-box { background: #e9f8ef; color: #17593a; border: 1px solid #bfe9cd; border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; font-size: .92rem; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.phone-box code { background: #fff; border: 1px solid #bfe9cd; border-radius: 8px; padding: 4px 10px; font-size: 1rem; font-weight: 700; color: #0f4d2e; }
.phone-box small { flex-basis: 100%; }
@media (max-width: 480px) {
    .page { padding: 16px 12px 40px; }
    .card { padding: 16px; }
    .btn { min-height: 44px; }
    .topbar { height: 58px; }
    .greet b { font-size: .95rem; }
    .kiosk-grid { grid-template-columns: 1fr; }
    .modal { padding: 16px; }
    .modal-actions { flex-wrap: wrap; }
    .modal-actions .btn { flex: 1 1 auto; }
}
@media (min-width: 1900px) {
    html { font-size: 18px; }
    :root { --side: 290px; --top: 72px; }
    .page { max-width: 1900px; }
}
@media (min-width: 2500px) {
    html { font-size: 22px; }
    :root { --side: 340px; --top: 86px; }
    .page { max-width: none; }
}

/* ---------- polish: cards, tabs, titles ---------- */
.card { border-radius: 16px; padding: 22px; transition: box-shadow .2s; }
.card:hover { box-shadow: 0 2px 4px rgba(16,32,64,.05), 0 12px 28px rgba(16,32,64,.08); }
.card-title { font-weight: 800; letter-spacing: .005em; color: #16294b; }
.tabs { border-radius: 99px; background: #f1f4f9; border: 0; padding: 3px; gap: 2px; }
.tabs button { border: 0 !important; border-radius: 99px; background: transparent; font-weight: 700; padding: 6px 14px; }
.tabs button.on { background: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(31,55,97,.25); }
.people { border: 0; padding: 0; }
.group-head { background: #eef2f8; border-radius: 8px; font-weight: 700; color: #3b4a63; }
.tag { border-radius: 99px; }
.pill { border-radius: 99px; padding: 3px 10px; }
.day { border-radius: 10px; }
.day.sel { outline: 2px solid var(--navy); background: #eef3fc; }

/* ---------- dashboard "Today" card ---------- */
.today { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) auto; grid-template-areas: "who times act" "who shift act";
    align-items: center; gap: 14px 28px; margin: 4px 0 22px; padding: 24px 28px; border-radius: 20px; color: #fff; position: relative; overflow: hidden;
    background: radial-gradient(circle at 92% 0%, rgba(90,170,255,.35), transparent 40%), linear-gradient(120deg, #13264a 0%, #1d3d73 60%, #2456a6 100%);
    box-shadow: 0 14px 34px rgba(19,38,74,.28); }
.today.is-done { background: radial-gradient(circle at 92% 0%, rgba(120,230,170,.32), transparent 40%), linear-gradient(120deg, #0f3b2e 0%, #17624a 60%, #1f8a63 100%); }
.today-who { grid-area: who; display: flex; align-items: center; gap: 16px; min-width: 0; }
.today-selfie { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 6px 18px rgba(0,0,0,.25); font-size: 1.5rem; flex: 0 0 auto; }
.today-label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .12em; color: #a9c1ea; }
.today h2 { font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 800; margin: 2px 0 6px; }
.today .pill { margin: 0 8px 0 0; }
.today-map { color: #cfe0ff; font-weight: 700; font-size: .85rem; display: inline-flex; align-items: center; gap: 4px; }
.today-map:hover { color: #fff; text-decoration: underline; }
.today-times { grid-area: times; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.today-times > div { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 10px 14px; }
.today-times small { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #b8cbeb; }
.today-times b { font-size: 1.15rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.today-shift { grid-area: shift; }
.progress { height: 8px; background: rgba(255,255,255,.18); border-radius: 99px; overflow: hidden; margin-bottom: 6px; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5ee2a0, #34c46b); border-radius: 99px; transition: width 1s linear; }
#shiftLeft { color: #d5e2f7; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }
#shiftLeft.over { color: #ffd66b; }
.today-act { grid-area: act; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.today-act .btn { box-shadow: 0 8px 20px rgba(0,0,0,.25); min-width: 170px; }
.today-out { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; border: 2px solid rgba(255,255,255,.7); }

/* quick actions */
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick a, .quick button { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: #f6f8fc; border: 1px solid #edf0f6;
    font: inherit; font-weight: 700; font-size: .9rem; color: #1f2a3d; cursor: pointer; text-align: left; transition: background .15s, transform .15s; }
.quick a:hover, .quick button:hover { background: #eef3fc; transform: translateY(-1px); }
.q-ico { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.q-ico svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.q-ico.blue { background: #e4eeff; color: #2d6fe0; } .q-ico.purple { background: #f1e7fd; color: #8a43d8; }
.q-ico.red { background: #fde6e6; color: #d93b3b; } .q-ico.gold { background: #fff2d1; color: #c28a00; }

@media (max-width: 1180px) {
    .today { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who act" "times times" "shift shift"; }
}
@media (max-width: 720px) {
    .today { grid-template-columns: minmax(0, 1fr); grid-template-areas: "who" "times" "shift" "act"; padding: 20px 18px; border-radius: 18px; }
    .today-selfie { width: 64px; height: 64px; }
    .today-times { gap: 8px; }
    .today-times > div { padding: 8px 10px; }
    .today-times b { font-size: .98rem; }
    .today-act { width: 100%; }
    .today-act .btn { width: 100%; }
    .quick a, .quick button { padding: 10px; font-size: .85rem; }
}

/* ---------- "Start your day" (attendance first) ---------- */
.start-page { min-height: 100vh; display: flex; flex-direction: column; color: #fff;
    background: radial-gradient(circle at 80% 0%, rgba(80,160,255,.35), transparent 45%), radial-gradient(circle at 0% 100%, rgba(26,188,156,.25), transparent 40%), linear-gradient(160deg, #0f2144 0%, #1a3a70 55%, #2358a8 100%); }
.start-top { display: flex; align-items: center; justify-content: space-between; padding: 14px clamp(16px, 3vw, 32px); }
.start-brand { display: flex; align-items: center; gap: 10px; }
.start-brand img { height: 40px; background: #fff; border-radius: 9px; padding: 3px 5px; }
.start-brand b { display: block; font-size: .95rem; letter-spacing: .04em; }
.start-brand small { display: block; color: #b4c6e6; font-size: .75rem; font-weight: 600; }
.start-top form { margin: 0; }
.start-out { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: #fff;
    border-radius: 99px; padding: 8px 14px; font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.start-out svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.start-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 10px 16px 40px; }
.start-card { width: min(460px, 100%); background: #fff; color: var(--ink); border-radius: 26px; padding: 30px 26px 24px; text-align: center; box-shadow: 0 30px 70px rgba(0,0,0,.35); }
.start-card .flash { text-align: left; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; color: #fff; margin-bottom: 10px; }
.start-card h1 { font-size: 1.55rem; font-weight: 800; color: #16294b; }
.start-sub { margin: 4px 0 16px; }
.start-clock { background: #f3f6fb; border-radius: 16px; padding: 12px; margin-bottom: 14px; }
.start-clock b { display: block; font-size: 2.1rem; font-weight: 800; color: #16294b; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.start-clock small { color: var(--muted); font-weight: 600; }
.start-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #eef3fc; color: #294a86; border-radius: 99px; padding: 6px 12px; font-size: .82rem; font-weight: 700; }
.chip.ok { background: #e3f7ea; color: #17733d; } .chip.warn { background: #fff1cc; color: #8a6300; }
.start-cam { position: relative; width: 132px; height: 132px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
    background: linear-gradient(145deg, #3ad07c, #1f9d55); box-shadow: 0 16px 34px rgba(31,157,85,.45); display: inline-flex; align-items: center; justify-content: center; transition: transform .15s; }
.start-cam:hover { transform: scale(1.04); }
.start-cam:active { transform: scale(.97); }
.start-cam svg { width: 56px; height: 56px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; position: relative; }
.start-cam .ring { position: absolute; inset: -10px; border-radius: 50%; border: 3px solid rgba(52,196,107,.45); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .start-cam .ring { animation: none; } }
.start-cta { display: block; margin: 16px 0 18px; font-size: 1.15rem; color: #16294b; }
.start-steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.start-steps li { font-size: .78rem; font-weight: 700; color: #4b5563; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.start-steps span { width: 26px; height: 26px; border-radius: 50%; background: #eef3fc; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.start-foot { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.start-foot a { color: var(--blue); font-weight: 700; }
@media (max-width: 480px) {
    .start-card { padding: 24px 18px 20px; border-radius: 22px; }
    .start-clock b { font-size: 1.8rem; }
    .start-brand small { display: none; }
}
@media (min-width: 1900px) { .start-card { width: 560px; } }

/* ---------- phone opening screen (sign-in page) ---------- */
.splash { position: fixed; inset: 0; z-index: 100; background: radial-gradient(circle at 80% 0%, rgba(80,160,255,.35), transparent 45%), linear-gradient(160deg, #0f2144, #1f4586); display: flex; align-items: center; justify-content: center; padding: 24px; transition: opacity .35s, transform .35s; }
.splash.bye { opacity: 0; transform: scale(1.03); }
.splash-in { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; animation: rise .6s ease-out both; }
.splash-logo { width: min(220px, 60vw); height: auto; }
.splash-name { font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: .04em; margin-top: 6px; }
.splash-tag { color: #f5b82e; font-weight: 700; }
.splash-go { margin-top: 26px; min-width: 200px; letter-spacing: .08em; border-radius: 10px; background: #fff !important; color: #16294b !important; box-shadow: 0 10px 24px rgba(0,0,0,.3); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- app home: "What do you want to do today?" ---------- */
.app-home { max-width: 980px; padding-top: 0; }
.home-hero { margin: 0 calc(-1 * clamp(14px, 2.2vw, 30px)); padding: 22px clamp(16px, 3vw, 30px) 64px; color: #fff;
    background: radial-gradient(circle at 90% 0%, rgba(90,170,255,.35), transparent 45%), linear-gradient(150deg, #16294b, #1f4586); }
.home-hello { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-hello h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: .02em; }
.home-hello small { color: #b9cbeb; font-weight: 700; letter-spacing: .04em; }
.home-hello .avatar.lg { margin: 0; border: 3px solid rgba(255,255,255,.8); }
.home-notice { margin-top: 16px; background: #fff; color: #1f2a3d; border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 22px rgba(0,0,0,.18); display: grid; gap: 2px; }
.home-notice b { font-size: .95rem; color: #16294b; }
.home-notice span { font-size: .9rem; }
.home-panel { background: #fff; border-radius: 22px; margin-top: -40px; padding: 18px clamp(14px, 3vw, 26px) 26px; box-shadow: 0 10px 30px rgba(16,32,64,.1); position: relative; }
.today-strip { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.today-strip b { margin-left: auto; font-size: 1.3rem; line-height: 1; }
.today-strip.out { background: #fff4d6; color: #7a5a00; } .today-strip.in { background: #e3f7ea; color: #17733d; } .today-strip.done { background: #eaf1ff; color: #294a86; }
.dot-live { width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: 0 0 auto; box-shadow: 0 0 0 4px rgba(0,0,0,.06); }
.today-strip.out .dot-live { animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.home-q { text-align: center; font-size: 1.15rem; font-weight: 800; color: #16294b; margin: 18px 0 14px; }
.home-q.small-q { text-align: left; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: #7f8aa0; margin-top: 26px; }
.lock-hint { text-align: center; background: #fff4d6; color: #7a5a00; border-radius: 10px; padding: 8px 12px; font-size: .85rem; font-weight: 700; margin: -4px 0 14px; }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.app-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 6px; border-radius: 14px;
    font-weight: 700; font-size: .86rem; color: #1f2a3d; transition: background .15s, transform .15s; }
.app-tile:hover { background: #f3f6fb; transform: translateY(-2px); }
.app-tile.hot .app-ico { box-shadow: 0 0 0 4px #ffe7a3; }
.app-tile.locked { opacity: .38; filter: grayscale(.7); pointer-events: none; }
.app-tile.locked::after { content: "\1F512"; position: absolute; top: 8px; right: 14px; font-size: .8rem; }
.app-ico { width: 58px; height: 58px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #eef3fc; }
.app-ico svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-ico.navy { color: #1f3761; background: #e6ecf7; } .app-ico.blue { color: #2d6fe0; background: #e4eeff; } .app-ico.gold { color: #c28a00; background: #fff2d1; }
.app-ico.purple { color: #8a43d8; background: #f1e7fd; } .app-ico.teal { color: #0f8f7a; background: #d9f6ef; } .app-ico.pink { color: #d63f7b; background: #fde6ef; }
.app-ico.green { color: #1f9d55; background: #ddf6e7; } .app-ico.red { color: #d93b3b; background: #fde6e6; }
.tile-badge { position: absolute; top: 8px; right: calc(50% - 38px); background: #ff5b5b; color: #fff; font-size: .7rem; font-weight: 800; min-width: 20px; height: 20px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
@media (min-width: 721px) { .app-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- Attendance (clock) page, phone-app style ---------- */
.clock-page { background: #1f3761; min-height: 100vh; padding-bottom: 76px; }
.app-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #1f3761; color: #fff; }
.app-bar b { font-size: 1.1rem; }
.app-back { display: inline-flex; padding: 4px; margin-left: -4px; color: #fff; }
.app-back svg, .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-bar-time { margin-left: auto; font-size: .82rem; font-weight: 700; color: #b9cbeb; }
.clock-main { max-width: 560px; margin: 0 auto; background: #fff; min-height: calc(100vh - 130px); }
.clock-map { background: #fff; }
.clock-addr { margin: 0; padding: 12px 16px; font-weight: 700; font-size: .9rem; color: #1f2a3d; display: flex; gap: 6px; align-items: flex-start; }
.map-box { height: 190px; background: #e8eef7 repeating-linear-gradient(45deg, #e8eef7 0 14px, #eef3fa 14px 28px); position: relative; }
.map-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 16px; color: #3b4a63; }
.map-wait b { color: #17733d; }
.pin-ok { font-size: 2.2rem; line-height: 1; animation: rise .5s ease-out both; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #c9d6ea; border-top-color: #1f3761; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.clock-card { background: #1f3761; color: #fff; padding: 14px 16px 16px; text-align: center; }
.clock-id { display: flex; justify-content: center; gap: 18px; font-size: .82rem; color: #c9d6ea; font-weight: 700; }
.clock-id span { display: inline-flex; align-items: center; gap: 5px; }
.clock-card h2 { font-size: 1.15rem; letter-spacing: .04em; margin: 8px 0 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.2); }
.clock-io { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; }
.clock-io small { display: block; font-size: .78rem; color: #c9d6ea; margin-bottom: 3px; }
.clock-io b { display: block; background: #dfe6f1; color: #1f2a3d; border-radius: 6px; padding: 8px 10px; font-size: 1.05rem; text-align: center; font-variant-numeric: tabular-nums; }
.clock-kpi { display: flex; justify-content: center; gap: 22px; margin-top: 10px; font-size: .85rem; color: #c9d6ea; }
.clock-kpi b { color: #fff; margin-left: 3px; }
.clock-act { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 16px 30px; text-align: center; }
.clock-act .flash { width: 100%; text-align: left; margin: 0; }
.big-cam { width: 92px; height: 92px; border-radius: 22px; border: 0; cursor: pointer; background: #f5b82e; color: #fff; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 26px rgba(245,184,46,.45); transition: transform .15s; }
.big-cam.out { background: #e64a4a; box-shadow: 0 12px 26px rgba(230,74,74,.4); }
.big-cam:active { transform: scale(.95); }
.big-cam svg { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.clock-go { min-width: 240px; border-radius: 10px; }
.clock-done { display: grid; gap: 4px; background: #e3f7ea; color: #17733d; border-radius: 14px; padding: 14px 22px; font-size: 1rem; }
.clock-act .proof { justify-content: center; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: #1f3761; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #c9d6ea; font-size: .74rem; font-weight: 700; }
.tabbar a.on { color: #f5b82e; }
@media (min-width: 721px) { .clock-main { margin-top: 16px; border-radius: 18px; overflow: hidden; min-height: 0; } .map-box { height: 240px; } }

/* ---------- full-screen selfie camera ---------- */
.cam-full { border: 0; padding: 0; margin: auto; width: 100vw; max-width: 560px; height: 100vh; height: 100dvh; max-height: none; background: #0b1426; color: #fff; }
.cam-full::backdrop { background: rgba(5, 10, 20, .85); }
.cam-full form { height: 100%; display: flex; flex-direction: column; }
.cam-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #1f3761; }
.cam-head b { font-size: 1.05rem; }
.cam-x { background: none; border: 0; color: #fff; padding: 4px; display: inline-flex; cursor: pointer; }
.cam-x svg, .cam-switch svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cam-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #000; }
.cam-stage video, .cam-stage canvas, .cam-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-stage .mirror { transform: scaleX(-1); }
.cam-guide { position: absolute; left: 50%; top: 46%; width: min(64%, 300px); aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.28); border: 3px dashed rgba(255,255,255,.55); transition: border-color .2s; pointer-events: none; }
.cam-guide.ok { border: 3px solid #34e07a; }
.cam-hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); margin: 0; max-width: calc(100% - 28px); background: rgba(0,0,0,.62); color: #fff;
    padding: 8px 14px; border-radius: 99px; font-weight: 700; font-size: .9rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-hint.ok { background: #1f9d55; }
.cam-hint:empty { display: none; }
.cam-full .cam-msg { position: absolute; left: 14px; right: 14px; bottom: 14px; margin: 0; background: rgba(0,0,0,.7); color: #fff; padding: 10px 12px; border-radius: 10px; text-align: center; font-size: .9rem; }
.cam-full .cam-msg.bad { top: 50%; bottom: auto; transform: translateY(-50%); color: #ffd6d6; }
.cam-loc { margin: 0; padding: 10px 14px; font-size: .82rem; color: #c9d6ea; display: flex; gap: 6px; align-items: flex-start; background: #111d33; }
.cam-bar { display: flex; align-items: stretch; background: #f5b82e; padding-bottom: env(safe-area-inset-bottom); }
.cam-bar button { border: 0; font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; padding: 18px 12px; }
.cam-capture { flex: 1; background: #f5b82e; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.cam-capture:disabled { background: #b9a26b; color: rgba(255,255,255,.75); cursor: not-allowed; }
.cam-capture.ready { background: #f5b82e; animation: ready 1s ease-in-out infinite alternate; }
@keyframes ready { to { background: #ffc947; } }
.cam-switch { background: #f5b82e; color: #1f2a3d; padding: 0 20px !important; display: inline-flex; align-items: center; }
.cam-retake { flex: 1; background: #e8ecf3; color: #1f2a3d; }
.cam-confirm { flex: 2; background: #34c46b; color: #fff; }
.cam-confirm:disabled { background: #8fbfa0; cursor: wait; }
@media (min-width: 721px) { .cam-full { height: min(92vh, 860px); border-radius: 18px; overflow: hidden; } }

/* ---------- monthly report ---------- */
.month-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.month-nav input[type=month] { padding: 7px 10px; border: 1px solid #d5dae3; border-radius: 8px; font: inherit; background: #fff; }
.month-tiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.tile em { display: block; font-style: normal; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.tile.half { border-color: #f08c3a; } .tile.hours { border-color: var(--blue); }
.table-search { padding: 8px 12px; border: 1px solid #d5dae3; border-radius: 99px; font: inherit; width: min(260px, 100%); }
.month-tbl td, .month-tbl th { white-space: nowrap; }
.month-tbl td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
.month-tbl .person-cell b { display: block; }
.c-present { color: #1f8a3e; } .c-late { color: #b07d00; font-weight: 700; } .c-half { color: #d0661b; font-weight: 700; }
.c-leave { color: #7b3fc4; font-weight: 700; } .c-absent { color: #c62f2f; font-weight: 700; }
.rules { font-size: .8rem; color: var(--muted); margin: 14px 0 0; line-height: 1.5; }
.addr { max-width: 280px; white-space: normal !important; font-size: .8rem; }
.addr a { color: var(--blue); }
.splash-name { display: none; }

/* ---------- Leave Summary (DigiSME style) ---------- */
.leave-top { display: flex; align-items: center; gap: 14px; background: linear-gradient(150deg, #16294b, #1f4586); color: #fff; border-radius: 18px; padding: 18px 20px; margin-bottom: 14px; }
.leave-top h1 { font-size: 1.3rem; font-weight: 800; }
.leave-top small { display: block; color: #c9d6ea; font-weight: 700; }
.leave-top .avatar.lg { margin: 0; border: 3px solid rgba(255,255,255,.8); }
.role-badge { display: inline-block; margin-top: 6px; background: #f5b82e; color: #3d2c00; font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #e8edf5; border-radius: 12px; padding: 4px; margin-bottom: 16px; max-width: 520px; }
.seg a { text-align: center; padding: 10px; border-radius: 9px; font-weight: 700; color: #4b5563; }
.seg a.on { background: #1f3761; color: #fff; box-shadow: 0 4px 12px rgba(31,55,97,.25); }
.section-title { font-size: 1.1rem; font-weight: 800; color: #16294b; margin: 4px 0 14px; }
.leave-cal { max-width: 620px; }
.lcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.lday { display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 10px; background: #f3f6fb; font-weight: 700; color: #2d6fe0; border: 2px solid transparent; }
.lday.sun { color: #9aa3b1; }
.lday.out { background: transparent; color: #c3c8d1; font-weight: 500; }
.lday.has { border-color: #3a7bd5; background: #fff; }
.lday.now { background: #e4eeff; }
.lday.sel { background: #2d6fe0; color: #fff; border-color: #2d6fe0; }
.all-toggle { margin: 14px 0 6px; }
.all-toggle label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.all-toggle input { width: 18px; height: 18px; accent-color: #2d6fe0; }
.on-day { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.on-day b { color: #2d6fe0; }
.dept-block { margin-bottom: 10px; }
.lrow { display: grid; grid-template-columns: minmax(0, 1fr) 60px 100px; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.lrow b { display: block; }
.lrow a { color: #2d6fe0; font-size: .88rem; }
.lrow small { display: block; color: var(--muted); font-size: .72rem; }
.lrow .num { text-align: center; }
.saved-addr { display: flex; gap: 6px; font-size: .82rem; color: #4b5563; margin: 0; text-align: left; max-width: 460px; }
.map-box iframe { width: 100%; height: 100%; border: 0; display: block; }

/* home: blue greeting card and white options panel sit apart (no overlap) */
.app-home { padding-top: 22px; }
.home-hero { margin: 0 0 18px; padding: 22px clamp(16px, 3vw, 28px); border-radius: 20px; box-shadow: 0 12px 30px rgba(19,38,74,.22); }
.home-notice { margin-top: 14px; box-shadow: none; }
.home-panel { margin-top: 0; border-radius: 20px; border: 1px solid #e6ebf3; box-shadow: 0 6px 20px rgba(16,32,64,.06); }
@media (max-width: 480px) {
    .app-home { padding-top: 14px; }
    .home-hero { border-radius: 18px; margin-bottom: 14px; }
}

/* phone: leave requests as readable cards instead of a sideways-scrolling table */
@media (max-width: 720px) {
    .req-tbl thead { display: none; }
    .req-tbl, .req-tbl tbody, .req-tbl tr, .req-tbl td { display: block; width: 100%; }
    .req-tbl tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; }
    .req-tbl td { border: 0; padding: 5px 0; white-space: normal; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
    .req-tbl td::before { content: attr(data-label); color: var(--muted); font-weight: 700; font-size: .8rem; text-align: left; }
    .req-tbl td.actions { justify-content: flex-end; }
    .req-tbl td.actions::before, .req-tbl td[colspan]::before { content: none; }
}

/* leave status is a button that opens the request details */
.status-btn { border: 0; cursor: pointer; font: inherit; font-size: .7rem; font-weight: 800; letter-spacing: .02em; }
.status-btn:hover { filter: brightness(1.08); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.req-modal { text-align: left; white-space: normal; }
.req-modal h3 { margin-bottom: 2px; }
.steps { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 0; }
.steps li { position: relative; padding: 0 0 16px 30px; }
.steps li::before { content: ""; position: absolute; left: 4px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #d5dae3; border: 3px solid #fff; box-shadow: 0 0 0 2px #d5dae3; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: #e3e7ee; }
.steps li.done::before { background: #34c46b; box-shadow: 0 0 0 2px #34c46b; }
.steps li.now::before { background: #f2b631; box-shadow: 0 0 0 2px #f2b631; }
.steps li.bad::before { background: #e64a4a; box-shadow: 0 0 0 2px #e64a4a; }
.steps b { display: block; }
.steps small { color: var(--muted); }
.req-reason { background: #f6f8fc; border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin: 0 0 8px; }
.req-modal .modal-actions form { margin: 0; }

/* ---------- new round logo ---------- */
.brand img { height: 46px; width: 46px; padding: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); object-fit: contain; }
.hero-brand img, .start-brand img { height: 52px; width: 52px; padding: 0; border-radius: 50%; object-fit: contain; }
.auth-logo { height: 104px; width: 104px; object-fit: contain; }
.splash-logo { width: min(230px, 62vw); height: auto; border-radius: 50%; box-shadow: 0 16px 40px rgba(0,0,0,.35); }

/* ---------- profile photos ---------- */
img.avatar { object-fit: cover; background: #e8edf5; }
.avatar.xl { width: 88px; height: 88px; font-size: 1.8rem; color: #fff; }
.photo-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.photo-edit b { display: block; font-size: 1.05rem; }
.photo-edit small { display: block; margin-bottom: 8px; }
.photo-actions { display: inline-block; margin: 0 6px 0 0; }
.ot-note { background: #e9f8ef; color: #17593a; border-radius: 12px; padding: 10px 14px; font-size: .88rem; margin: 0; max-width: 460px; }

/* ---------- phone: slimmer side menu ---------- */
@media (max-width: 960px) {
    .sidebar { width: min(236px, 78vw); }
}
@media (max-width: 480px) {
    .sidebar { width: min(214px, 74vw); }
    .brand { padding: 12px 12px 10px; gap: 8px; }
    .brand img { height: 38px; width: 38px; }
    .brand b { font-size: .92rem; }
    .brand small { font-size: .68rem; }
    .side-nav { padding: 6px 8px; }
    .side-label { padding: 10px 8px 4px; font-size: .62rem; }
    .side-nav a, .side-foot a, .side-foot button { padding: 8px 10px; gap: 10px; font-size: .86rem; }
    .side-nav svg, .side-foot svg { width: 17px; height: 17px; }
    .side-foot { padding: 6px 8px; }
    .home-hello .avatar.lg { width: 52px; height: 52px; font-size: 1.1rem; }
}
.decide-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.note-input { padding: 6px 10px; border: 1px solid #d5dae3; border-radius: 8px; font: inherit; font-size: .82rem; width: 170px; }

/* e-mail settings */
.mail-status { display: grid; gap: 4px; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.mail-status.ok { background: #e3f7ea; color: #17593a; border: 1px solid #bfe9cd; }
.mail-status.bad { background: #fff4d6; color: #6b4d00; border: 1px solid #f5dc8f; }
.test-mail { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.howto { padding-left: 20px; margin: 0 0 12px; display: grid; gap: 10px; line-height: 1.5; }
.howto a { color: var(--blue); font-weight: 700; }
.howto code { background: #f1f4f9; padding: 2px 6px; border-radius: 6px; }
.mail-warn { background: #fff4d6; color: #6b4d00; border-radius: 10px; padding: 10px 12px; font-size: .88rem; margin: -6px 0 12px; }
.mail-warn a { color: var(--blue); font-weight: 700; }

/* holidays & festivals */
.rules-list { margin: 12px 0 0; padding-left: 18px; font-size: .84rem; color: #4b5563; display: grid; gap: 6px; }
.hol-edit { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hol-edit select { padding: 5px 8px; border: 1px solid #d5dae3; border-radius: 8px; font: inherit; font-size: .82rem; background: #fff; }

/* ================= sign-in / register / forgot: redesigned ================= */
.auth-page { grid-template-columns: minmax(0, 1.2fr) minmax(420px, .8fr); background: #f3f6fb; }
.auth-hero { justify-content: space-between; gap: 28px; padding: clamp(28px, 4vw, 56px) clamp(28px, 4.5vw, 72px);
    background: radial-gradient(1200px 600px at 110% -10%, rgba(94,170,255,.35), transparent 60%),
                radial-gradient(800px 500px at -10% 110%, rgba(26,188,156,.22), transparent 60%),
                linear-gradient(145deg, #0c1c3b 0%, #15315f 50%, #1e4a91 100%); }
.auth-hero > * { position: relative; z-index: 1; }
.orb { position: absolute !important; z-index: 0 !important; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
.orb.o1 { width: 340px; height: 340px; background: #3c7dff; top: -80px; right: 10%; }
.orb.o2 { width: 280px; height: 280px; background: #f5b82e; bottom: -120px; left: 30%; opacity: .25; }
.grid-bg { position: absolute !important; inset: 0; z-index: 0 !important; pointer-events: none; opacity: .5;
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 44px 44px; -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%); }
.hero-brand img { height: 58px; width: 58px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.hero-brand b { font-size: 1.12rem; letter-spacing: .05em; }
.hero-body { display: grid; gap: 16px; max-width: 880px; }
.hero-kicker { justify-self: start; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #9fe3c4;
    background: rgba(52,196,107,.12); border: 1px solid rgba(52,196,107,.35); padding: 6px 12px; border-radius: 99px; }
.auth-hero h2 { font-size: clamp(1.7rem, 2.9vw, 2.7rem); line-height: 1.18; letter-spacing: -.01em; max-width: 680px; }
.auth-hero h2 em { font-style: normal; background: linear-gradient(90deg, #ffd166, #f5b82e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 0; color: #c3d2ee; font-size: 1.02rem; max-width: 600px; line-height: 1.55; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 34px; align-items: center; margin-top: 10px; }
.auth-hero .features { max-width: none; gap: 12px; }
.auth-hero .feature { border-radius: 16px; padding: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); transition: transform .2s, background .2s; }
.auth-hero .feature:hover { transform: translateY(-2px); background: rgba(255,255,255,.12); }
.auth-hero .f-ico { width: 42px; height: 42px; border-radius: 12px; }

/* phone illustration */
.phone { position: relative; width: 210px; height: 400px; border-radius: 34px; background: #0a1428; padding: 12px; margin: 0 auto;
    box-shadow: 0 30px 60px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.12); transform: rotate(4deg); animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 50% { transform: rotate(4deg) translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .phone { animation: none; } }
.phone::before { content: ""; position: absolute; inset: 12px; border-radius: 24px; background: #f3f6fb; }
.phone > * { position: relative; }
.phone-notch { width: 70px; height: 16px; background: #0a1428; border-radius: 0 0 12px 12px; margin: 0 auto 6px; }
.phone-top { display: flex; justify-content: space-between; align-items: center; background: #1f3761; color: #fff; border-radius: 12px; padding: 8px 10px; font-size: .72rem; }
.phone-top small { color: #b9cbeb; font-size: .62rem; }
.phone-map { height: 78px; margin-top: 8px; border-radius: 12px; position: relative;
    background: #dfe8f3 repeating-linear-gradient(45deg, #dfe8f3 0 10px, #e8eff8 10px 20px); }
.phone-map::after { content: ""; position: absolute; left: 0; right: 0; top: 46%; height: 8px; background: #fff; opacity: .9; }
.pin { position: absolute; left: 50%; top: 22%; width: 16px; height: 16px; background: #e64a4a; border-radius: 50% 50% 50% 0; transform: translateX(-50%) rotate(-45deg); z-index: 1; box-shadow: 0 3px 6px rgba(0,0,0,.25); }
.phone-face { width: 74px; height: 74px; margin: -24px auto 0; border-radius: 50%; background: linear-gradient(145deg, #ffd9b8, #f2b889); border: 4px solid #34c46b; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.phone-face span { width: 50px; height: 26px; border-radius: 26px 26px 0 0; background: #1f3761; }
.phone-ok { margin: 10px 0 8px; background: #e3f7ea; color: #17733d; font-weight: 800; font-size: .72rem; text-align: center; padding: 8px 6px; border-radius: 10px; }
.phone-rows { display: grid; gap: 6px; }
.phone-rows i { display: block; height: 10px; border-radius: 6px; background: #e3e8f0; }
.phone-rows i:last-child { width: 70%; }
.chip-float { position: absolute !important; white-space: nowrap; background: #fff; color: #1f2a3d; font-size: .72rem; font-weight: 800; padding: 7px 11px; border-radius: 99px; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.chip-float.c-a { left: -70px; top: 120px; transform: rotate(-4deg); }
.chip-float.c-b { right: -46px; bottom: 60px; transform: rotate(-4deg); }

.hero-trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: #c3d2ee; font-size: .85rem; font-weight: 700; }

/* right side: white card */
.auth-panel { padding: 32px 24px; background: radial-gradient(600px 400px at 50% 0%, #e6eefb, transparent 70%), #f3f6fb; }
.auth-box { width: min(430px, 100%); background: #fff; border-radius: 24px; padding: 34px 32px 26px; box-shadow: 0 24px 60px rgba(16,32,64,.12); border: 1px solid #e6ebf3; }
.auth-box.wide { width: min(540px, 100%); }
.auth-logo { height: 92px; width: 92px; margin-bottom: 12px; border-radius: 50%; box-shadow: 0 10px 24px rgba(16,32,64,.18); }
.auth-box h1 { font-size: 1.85rem; letter-spacing: -.01em; }
.auth-box > .muted { margin-bottom: 20px; }
.auth-box .form.auth-form { gap: 8px; margin-top: 14px; }
.lbl { font-size: .8rem !important; font-weight: 800 !important; color: #3b4a63 !important; letter-spacing: .02em; margin-top: 6px; }
.field.ico-left input { padding-left: 46px !important; background: #f7f9fc !important; border: 1.5px solid #dfe5ee !important; transition: border-color .15s, box-shadow .15s, background .15s; }
.field.ico-left input:focus { background: #fff !important; border-color: #2d6fe0 !important; box-shadow: 0 0 0 4px rgba(45,111,224,.14); outline: none !important; }
.field .lead { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: none; stroke: #8a95a8; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.field.ico-left:focus-within .lead { stroke: #2d6fe0; }
.auth-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 0 8px; flex-wrap: wrap; }
.auth-row .check { font-size: .86rem; color: #4b5563; }
.auth-row .forgot { margin: 0; font-size: .88rem; }
.login-btn { gap: 10px; border-radius: 12px !important; background: linear-gradient(135deg, #1f3761, #2d5aa8) !important; box-shadow: 0 12px 24px rgba(31,55,97,.3); transition: transform .15s, box-shadow .15s; }
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(31,55,97,.36); }
.login-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.login-btn:hover svg { transform: translateX(3px); }
.auth-note { display: flex; gap: 10px; align-items: flex-start; text-align: left; background: #f3f6fb; border-radius: 12px; padding: 12px 14px; margin-top: 18px; font-size: .84rem; color: #4b5563; }
.auth-note svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: #2d6fe0; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.auth-foot { margin: 18px 0 0; font-size: .75rem; color: #8a95a8; }
.auth-box .flash { text-align: center; border-radius: 10px; }

@media (max-width: 1280px) { .hero-row { grid-template-columns: 1fr; } .phone { display: none; } }
@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-hero { padding: 18px 18px 22px; gap: 10px; }
    .hero-body, .hero-trust, .orb, .grid-bg { display: none !important; }
    .auth-panel { padding: 18px 14px 32px; background: #f3f6fb; }
    .auth-box { padding: 26px 20px 20px; border-radius: 20px; }
}

/* ================= My Profile ================= */
.profile-page { max-width: 1280px; }
.pf-hero { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid #e9edf5; margin-bottom: 20px; }
.pf-cover { height: 132px; background: radial-gradient(600px 200px at 85% 0%, rgba(94,170,255,.5), transparent 70%),
    radial-gradient(400px 160px at 10% 120%, rgba(245,184,46,.35), transparent 70%), linear-gradient(120deg, #13264a, #1f4586 60%, #2456a6); }
.pf-id { display: flex; align-items: flex-end; gap: 22px; padding: 0 28px 20px; margin-top: -58px; flex-wrap: wrap; }
.pf-avatar { position: relative; flex: 0 0 auto; }
.pf-avatar form { margin: 0; }
.avatar.xxl { width: 124px; height: 124px; font-size: 2.6rem; color: #fff; border: 5px solid #fff; box-shadow: 0 10px 26px rgba(16,32,64,.22); }
.pf-cam { position: absolute; right: 2px; bottom: 6px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; background: #1f3761; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.25); transition: transform .15s; }
.pf-cam:hover { transform: scale(1.08); }
.pf-cam svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pf-name { flex: 1; min-width: 240px; padding-bottom: 4px; }
.pf-name h1 { font-size: 1.6rem; font-weight: 800; color: #16294b; }
.pf-name p { margin: 6px 0 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.pf-role { background: #fff2d1; color: #7a5a00; font-weight: 800; font-size: .78rem; padding: 4px 12px; border-radius: 99px; }
.pf-admin { background: #e4eeff; color: #1f4fa3; font-weight: 800; font-size: .78rem; padding: 4px 12px; border-radius: 99px; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-chips span { display: inline-flex; align-items: center; gap: 6px; background: #f3f6fb; border: 1px solid #e6ebf3; color: #3b4a63; font-size: .82rem; font-weight: 700; padding: 6px 12px; border-radius: 99px; }
.pf-photo-actions { display: flex; gap: 8px; padding-bottom: 6px; }
.pf-photo-actions form { margin: 0; }
/* set photo: drag / zoom inside the circle */
.photo-modal { width: min(380px, calc(100vw - 32px)); text-align: center; }
.crop-help { font-size: .86rem; margin: 4px 0 14px; }
.crop-box { position: relative; width: min(280px, 72vw); aspect-ratio: 1; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #eef2f8; }
.crop-box canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.crop-box canvas:active { cursor: grabbing; }
.crop-box::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.9);
    box-shadow: 0 0 0 999px rgba(15, 25, 45, .5); pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: 10px; max-width: 280px; margin: 16px auto 10px; font-weight: 700; color: #5b6b86; }
.crop-zoom input { flex: 1; accent-color: #1f3761; }
.pf-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.pf-stats div { padding: 14px 18px; border-right: 1px solid var(--line); }
.pf-stats div:last-child { border-right: 0; }
.pf-stats small { display: block; color: var(--muted); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.pf-stats b { font-size: 1.35rem; color: #16294b; }
.pf-stats .hl { background: linear-gradient(135deg, #eef6ff, #e7f8ee); }
.pf-stats .hl b { color: #1f7a45; }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.pf-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.pf-info div { background: #f7f9fc; border: 1px solid #edf0f6; border-radius: 12px; padding: 10px 14px; min-width: 0; }
.pf-info dt { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pf-info dd { margin: 3px 0 0; font-weight: 700; color: #1f2a3d; overflow-wrap: anywhere; }
.pf-edit { border-top: 1px dashed #dfe5ee; padding-top: 14px; }
.pf-sub { margin: 0; font-size: .78rem; font-weight: 800; color: #2d6fe0; text-transform: uppercase; letter-spacing: .06em; }
.field.pw { display: block; position: relative; }
.field.pw input { padding-right: 44px !important; }
.pw-meter { height: 6px; background: #e8ecf3; border-radius: 99px; overflow: hidden; margin-top: -4px; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width .25s, background .25s; border-radius: 99px; }
.pw-label { font-size: .78rem; font-weight: 700; margin-top: -6px; }
.pf-tip { display: flex; gap: 10px; align-items: flex-start; background: #f3f6fb; border-radius: 12px; padding: 12px 14px; margin-top: 16px; font-size: .84rem; color: #4b5563; }
.pf-tip svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: #1f9d55; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 960px) { .pf-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
    .pf-cover { height: 96px; }
    .pf-id { flex-direction: column; align-items: center; text-align: center; padding: 0 16px 16px; margin-top: -54px; gap: 10px; }
    .pf-name { min-width: 0; }
    .pf-name p, .pf-chips { justify-content: center; }
    .avatar.xxl { width: 108px; height: 108px; font-size: 2.2rem; }
    .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pf-stats div { border-bottom: 1px solid var(--line); }
    .pf-stats .hl { grid-column: 1 / -1; }
    .pf-info { grid-template-columns: 1fr; }
}

/* profile: keep the name below the cover so it stays readable */
.pf-name, .pf-photo-actions { margin-top: 66px; }
@media (max-width: 720px) { .pf-name, .pf-photo-actions { margin-top: 0; } }
.pf-avatar { align-self: flex-start; }
@media (max-width: 720px) { .pf-avatar { align-self: center; } }

/* ================= polish pass ================= */
/* messages */
.flash, .auto-hide { position: relative; padding-right: 40px !important; transition: opacity .35s, transform .35s, max-height .35s, margin .35s, padding .35s; max-height: 300px; overflow: hidden; }
.flash.bye, .auto-hide.bye { opacity: 0; transform: translateY(-6px); max-height: 0; margin: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; }
.flash-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: 50%;
    background: rgba(0,0,0,.06); color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.flash-x:hover { background: rgba(0,0,0,.12); }
.flash { border-radius: 12px; }

/* stat strip (My Attendance, employee month) */
.stat-strip { display: grid; grid-template-columns: 220px minmax(0, 1fr); background: #fff; border: 1px solid #e9edf5; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.ss-main { padding: 20px 22px; color: #fff; display: flex; flex-direction: column; justify-content: center;
    background: radial-gradient(300px 160px at 100% 0%, rgba(94,170,255,.45), transparent 70%), linear-gradient(140deg, #16294b, #1f4586); }
.ss-main small { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #b9cbeb; }
.ss-main b { font-size: 2.6rem; line-height: 1.1; font-weight: 800; }
.ss-main b span { font-size: 1.1rem; color: #b9cbeb; margin-left: 4px; }
.ss-main em { font-style: normal; font-size: .8rem; color: #c9d6ea; }
.ss-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.ss { padding: 14px 16px; border-right: 1px solid #eef1f6; border-bottom: 1px solid #eef1f6; position: relative; }
.ss small { display: flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.ss small::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c3cad6; flex: 0 0 auto; }
.ss b { display: block; font-size: 1.45rem; color: #16294b; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ss.present small::before { background: #7fc241; } .ss.late small::before { background: var(--gold); } .ss.half small::before { background: #f08c3a; }
.ss.leave small::before { background: var(--purple); } .ss.absent small::before { background: var(--red); } .ss.holiday small::before { background: var(--teal); }
.ss.extra small::before { background: #1f9d55; } .ss.lop small::before { background: #b91c1c; } .ss.hours small::before, .ss.ot small::before { background: var(--blue); }
@media (max-width: 720px) {
    .stat-strip { grid-template-columns: 1fr; }
    .ss-main { flex-direction: row; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 16px 18px; }
    .ss-main b { font-size: 2rem; }
    .ss-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* monthly rules toggle */
.rules-box { margin-top: 14px; }
.rules-box summary { cursor: pointer; font-weight: 800; font-size: .85rem; color: #2d6fe0; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.rules-box summary::before { content: "?"; width: 20px; height: 20px; border-radius: 50%; background: #e4eeff; color: #2d6fe0; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; }
.rules-box summary::-webkit-details-marker { display: none; }

/* home: use the full width on computers */
.app-home { max-width: 1480px; }
@media (min-width: 1100px) {
    .app-home { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
    .app-home .home-hero { grid-column: 2; grid-row: 1; margin: 0; min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
    .app-home .home-panel { grid-column: 1; grid-row: 1; }
    .app-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
}
.app-tile { border: 1px solid #edf0f6; background: #fbfcfe; }
.app-tile:hover { border-color: #d6e2f5; background: #f3f7fd; box-shadow: 0 8px 18px rgba(16,32,64,.06); }

/* page titles & cards: a touch more polish everywhere */
.page-title { letter-spacing: -.01em; }
.tbl th { background: #f7f9fc; }
.tbl tbody tr:hover td { background: #fafbfe; }
.card-title { font-size: 1.08rem; }

/* fine-tuning */
@media (min-width: 1100px) { .app-home .home-hero { min-height: 0; align-self: start; display: block; } }
@media (min-width: 1100px) { .ss-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.kiosk-actions { flex-wrap: wrap; }
.manual { width: auto; }
.manual[open] { width: 100%; }

/* ================= design pass 2 ================= */
/* page headers */
.ph-text { min-width: 0; }
.page-head .ph-text .page-title { margin: 0; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: .9rem; font-weight: 600; }
.page-head { margin-bottom: 20px; }

/* theme toggle */
.theme-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #e3e9f3; background: #f4f7fc; color: #1f3761; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: transform .2s, background .2s; }
.theme-btn:hover { transform: rotate(-12deg) scale(1.05); }
.theme-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .t-sun { display: none; }
html[data-theme="dark"] .theme-btn .t-sun { display: block; }
html[data-theme="dark"] .theme-btn .t-moon { display: none; }
.auth-panel { position: relative; }
.theme-btn.float { position: absolute; top: 16px; right: 16px; z-index: 2; box-shadow: 0 6px 16px rgba(16,32,64,.1); }
@media (max-width: 960px) { .topbar .theme-btn { margin-left: auto; } .topbar .theme-btn ~ .me { margin-left: 0; } }

/* cards: headings with count pills */
.ap-card { margin-bottom: 18px; }
.card-title .count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 8px; margin-left: 6px;
    border-radius: 99px; background: #ffe3e3; color: #c0392b; font-size: .8rem; font-weight: 800; vertical-align: 2px; }
.card-title .count.zero { background: #e3f7ea; color: #1f7a45; }
.empty-row td { padding: 0 !important; border-bottom: 0 !important; }
.empty-row:hover td { background: transparent !important; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 12px 18px; text-align: center; color: var(--muted); }
.empty-state svg { width: 42px; height: 42px; fill: none; stroke: #34c46b; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
    background: #e9f8ef; border-radius: 50%; padding: 8px; margin-bottom: 4px; }
.empty-state b { color: var(--ink); font-size: .98rem; }
.note-input { width: 150px; padding: 6px 10px; border: 1px solid #d5dae3; border-radius: 8px; font: inherit; font-size: .85rem; }

/* daily report toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tool-form { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 12px; box-shadow: var(--shadow); margin: 0; }
.tool-lbl { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0; }
.tool-form input { border: 0 !important; background: transparent !important; padding: 6px 4px !important; font: inherit; color: var(--ink); box-shadow: none !important; outline: none; }
.nowrap { white-space: nowrap; }

/* leave types: labels shown once like a table header */
.lt-row { grid-template-columns: 2fr 1fr auto auto auto; align-items: end; border-bottom: 1px solid var(--line); padding: 12px 0; gap: 12px; }
.lt-row:last-of-type { border-bottom: 0; }
@media (min-width: 721px) { .lt-row + .lt-row .lbl-t { display: none; } .lt-row + .lt-row { align-items: center; } .lt-row + .lt-row .check { margin: 0; } }
@media (max-width: 720px) { .lt-row { grid-template-columns: 1fr 1fr; } }

/* holidays legend */
.rules-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.rules-list li { position: relative; padding: 9px 12px 9px 30px; background: #f7f9fc; border: 1px solid #edf0f6; border-radius: 10px; font-size: .86rem; }
.rules-list li::before { content: ""; position: absolute; left: 12px; top: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.rules-list .lg-paid::before { background: #34c46b; } .rules-list .lg-unpaid::before { background: var(--red); }
.rules-list .lg-open::before { background: var(--gold); } .rules-list .lg-extra::before { background: var(--purple); }

/* home: today card */
.home-today { display: none; }
@media (min-width: 1100px) {
    .app-home .home-panel { grid-row: 1 / span 2; }
    .home-today { display: block; grid-column: 2; grid-row: 2; background: var(--card); border: 1px solid #e9edf5; border-radius: 22px; box-shadow: var(--shadow); padding: 18px 20px; }
}
.ht-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ht-head h3 { font-size: 1.05rem; color: var(--ink); }
.ht-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ht-grid div { background: #f7f9fc; border: 1px solid #edf0f6; border-radius: 12px; padding: 10px 12px; }
.ht-grid small { display: block; font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ht-grid b { font-size: 1.05rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.ht-grid em { display: block; font-style: normal; font-size: .76rem; color: var(--muted); }
.ht-btn { width: 100%; justify-content: center; margin-top: 14px; }

/* monthly: salary column and sticky names */
.month-tbl .sal { background: #eefaf2; color: #1f7a45; }
.month-tbl th.sal { background: #e1f5e9 !important; color: #1f7a45; }
.sticky-first th:first-child, .sticky-first td:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); box-shadow: 1px 0 0 var(--line); }
.sticky-first th:first-child { background: #f7f9fc; z-index: 2; }

/* general polish */
.card { border: 1px solid #e9edf5; }
.btn { transition: transform .12s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.tbl td { vertical-align: middle; }

/* holidays: wider list so Office / Pay / Save stay on one line */
@media (min-width: 1000px) { .hol-grid { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); } }
@media (min-width: 1200px) { .hol-edit { flex-wrap: nowrap; } }

.stat-strip.no-main { grid-template-columns: 1fr; }
@media (min-width: 1100px) { .stat-strip.no-main .ss-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* employee: block / delete */
.acct-actions { margin-top: 18px; }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; margin-top: 10px; }
.acct-row.danger { border-color: #f5c2c2; background: #fff7f7; }
.acct-text b { display: block; color: var(--ink); }
.acct-text span { font-size: .85rem; color: var(--muted); }
.acct-row form { margin: 0; flex: 0 0 auto; }
.btn.warn { background: #f59e0b; color: #fff; }
.btn.warn:hover { background: #d97f06; }
@media (max-width: 720px) { .acct-row { flex-direction: column; align-items: stretch; } .acct-row .btn { width: 100%; justify-content: center; } }

/* employee list: actions in a tidy 2 x 2 grid so Delete never gets cut off */
.emp-tbl td.actions { white-space: normal; }
.act-grid { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px; justify-content: end; }
.act-grid form { display: block !important; margin: 0; }
.act-grid .btn { width: 100%; justify-content: center; white-space: nowrap; }

/* employees: department filter, chips and group rows */
.emp-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.emp-toolbar select { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-weight: 700; color: var(--ink); background: #fff; text-transform: none; letter-spacing: 0; }
.emp-toolbar input[type=search] { flex: 0 1 300px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 99px; font: inherit; background: #fff; color: var(--ink); }
.dept-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dchip { border: 1px solid #e3e9f3; background: #f6f8fc; color: #3b4a63; font: inherit; font-size: .82rem; font-weight: 700; padding: 6px 12px; border-radius: 99px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.dchip b { background: #e4eaf4; color: #1f3761; border-radius: 99px; padding: 0 7px; font-size: .74rem; }
.dchip:hover { border-color: #c9d6ea; }
.dchip.on { background: #1f3761; border-color: #1f3761; color: #fff; }
.dchip.on b { background: rgba(255,255,255,.2); color: #fff; }
.emp-tbl .dept-row td { background: #eef3fb; padding: 9px 14px; border-bottom: 1px solid #dfe7f3; }
.emp-tbl .dept-row:hover td { background: #eef3fb !important; }
.dept-name { font-weight: 800; color: #1f3761; font-size: .9rem; letter-spacing: .02em; }
.dept-count { margin-left: 8px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.tag.gold { background: #f59e0b; color: #fff; }
@media (max-width: 720px) { .emp-toolbar input[type=search] { flex: 1 1 100%; } }

/* password messages stay until closed and offer a Copy button */
.flash.sticky { padding-right: 150px !important; border-left: 4px solid #1f9d55; }
.flash-copy { position: absolute; right: 44px; top: 50%; transform: translateY(-50%); background: #1f9d55; color: #fff; }
.flash-copy:hover { background: #17864a; }
@media (max-width: 720px) { .flash.sticky { padding-right: 40px !important; padding-bottom: 46px !important; } .flash-copy { top: auto; bottom: 8px; transform: none; left: 12px; right: auto; } }


/* backups page */
.bk-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.bk-box { background: var(--card); border: 1px solid #e9edf5; border-radius: 16px; box-shadow: var(--shadow); padding: 14px 18px; }
.bk-box small { display: block; font-size: .74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.bk-box b { display: block; font-size: 1.02rem; color: var(--ink); margin-top: 4px; }
.bk-box em { display: block; font-style: normal; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.bk-note { margin: 14px 0 0; }
.bk-note code { overflow-wrap: anywhere; }
@media (max-width: 720px) { .bk-summary { grid-template-columns: 1fr; } }

/* clock out missing: note on Home, Fix time in Daily Report */
.missed-out { display: flex; align-items: center; gap: 12px; background: #fff4d6; color: #7a5a00; border: 1px solid #f3dca0; border-radius: 12px; padding: 10px 12px; margin: 8px 0 6px; }
.missed-out p { margin: 0; flex: 1; font-size: .86rem; line-height: 1.35; min-width: 0; }
.missed-out b { display: block; font-size: .92rem; }
.missed-out small { display: block; opacity: .85; }
.missed-ico { width: 28px; height: 28px; border-radius: 50%; background: #f2b631; color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.fix-time { display: inline-block; vertical-align: middle; width: auto; }
.fix-time[open] { display: block; margin-bottom: 6px; }
.fix-time .manual-form { margin-top: 8px; min-width: 250px; text-align: left; }
.btn.fix-hot { background: #fff4d6; color: #7a5a00; border-color: #f3dca0; }
@media (max-width: 720px) { .missed-out { flex-wrap: wrap; } .missed-out .btn { width: 100%; justify-content: center; } }

/* voice typing (mic on reason / notes boxes) */
.voice-wrap { position: relative; display: block; }
.voice-wrap.line { display: inline-block; }
.voice-wrap.area textarea { padding-right: 96px !important; }
.voice-wrap.line input { padding-right: 40px !important; }
.voice-bar { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 6px; align-items: center; }
.voice-wrap.line .voice-bar { top: 50%; bottom: auto; right: 4px; transform: translateY(-50%); }
.voice-mic { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #eef3fc; color: #1f3761; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s; flex: 0 0 auto; }
.voice-wrap.line .voice-mic { width: 28px; height: 28px; }
.voice-mic:hover { background: #dfe8f8; }
.voice-mic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.voice-mic.on { background: #e64a4a; color: #fff; animation: voicePulse 1.2s infinite; }
@keyframes voicePulse { 0% { box-shadow: 0 0 0 0 rgba(230,74,74,.45); } 70% { box-shadow: 0 0 0 10px rgba(230,74,74,0); } 100% { box-shadow: 0 0 0 0 rgba(230,74,74,0); } }
@media (prefers-reduced-motion: reduce) { .voice-mic.on { animation: none; } }
.voice-lang { height: 26px; min-width: 34px; padding: 0 8px; border-radius: 99px; border: 1px solid #dfe5ee; background: #fff; color: #3b4a63;
    font: inherit; font-size: .74rem; font-weight: 800; cursor: pointer; }
.voice-msg { display: block; font-size: .78rem; font-weight: 700; color: #b45309; margin-top: 4px; }
.voice-msg[hidden] { display: none; }
html[data-theme="dark"] .voice-mic { background: #22304a; color: #cfe0ff; }
html[data-theme="dark"] .voice-lang { background: #1a263b; color: #dbe4f3; border-color: #2c3b58; }


/* departments & timings */
.dep-card { margin-bottom: 18px; }
.dep-grid .rules-list { margin-top: 4px; }
.dt-head { display: none; }
.dt-row { grid-template-columns: minmax(170px, 1fr) 130px 130px 130px 130px 140px 150px; align-items: center; gap: 14px;
    border-bottom: 1px solid var(--line); padding: 10px 0; }
.dt-row:last-of-type { border-bottom: 0; }
.dt-name b { display: block; }
.dt-name small { color: var(--muted); font-size: .78rem; }
.dt-apply { font-size: .8rem; margin: 0; line-height: 1.25; }
.dt-actions { display: flex; gap: 6px; justify-content: flex-end; }
@media (min-width: 721px) {
    .dt-head { display: grid; grid-template-columns: minmax(170px, 1fr) 130px 130px 130px 130px 140px 150px; gap: 14px; padding: 8px 0;
        border-bottom: 1px solid var(--line); font-size: .74rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
    .dt-row .lbl-t { display: none; }
}
/* laptops (1280-1440 px): slimmer columns so the Save / Remove buttons stay on screen */
@media (max-width: 1440px) {
    .dt-row, .dt-head { grid-template-columns: minmax(130px, 1fr) 116px 116px 116px 116px 116px 136px; gap: 10px; }
}
@media (max-width: 1240px) { .dt-head { display: none !important; } .dt-row { grid-template-columns: 1fr 1fr; } .dt-row .lbl-t { display: block !important; } .dt-name, .dt-apply, .dt-actions { grid-column: 1 / -1; } }

.dt-min small { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.dt-min input { text-align: center; }

/* stat strip: stronger, easier-to-read colours (dot, number and a side bar share one colour per item) */
.ss { --c: #334155; box-shadow: inset 4px 0 0 var(--c); }
.ss small { color: #475569; }
.ss small::before { width: 11px; height: 11px; background: var(--c) !important; }
.ss b { color: var(--c); font-weight: 800; }
.ss.present { --c: #15803d; } .ss.late { --c: #b45309; } .ss.half { --c: #c2410c; }
.ss.leave { --c: #7e22ce; } .ss.absent { --c: #dc2626; } .ss.holiday { --c: #0f766e; }
.ss.extra { --c: #047857; } .ss.lop { --c: #991b1b; } .ss.hours, .ss.ot { --c: #1d4ed8; }
.ss.salary { --c: #166534; background: #f0fdf4; } .ss.working { --c: #334155; } .ss.auto { --c: #a16207; }
