/* ==========================================================================
   TejHR — employee app (mobile-first)
   ========================================================================== */
:root {
  --navy: #1F4E79;
  --navy-2: #173B5C;
  --teal: #22B39B;
  --teal-2: #189683;
  --teal-50: #E4F6F2;
  --orange: #E9A21B;
  --red: #E5484D;
  --green: #22C55E;
  --ink: #16212E;
  --ink-2: #3A4757;
  --muted: #6B7889;
  --line: #E9EDF3;
  --bg: #F6F8FC;
  --card: #FFFFFF;
  --r: 20px;
  --shadow: 0 2px 6px rgba(22, 33, 46, .04), 0 10px 24px rgba(22, 33, 46, .06);
  --tile-shadow: 0 10px 18px rgba(22, 33, 46, .10), 0 2px 4px rgba(22, 33, 46, .06), inset 0 -3px 0 rgba(22, 33, 46, .05);
  --tabbar-h: 74px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #E9EEF5; color: var(--ink); font-size: 15px; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; }

.app { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px); }
body.bare .app { padding-bottom: 0; }
@media (min-width: 560px) { .app { box-shadow: 0 0 60px rgba(22, 33, 46, .12); } }
.content { padding: 14px 16px 8px; }

/* ---------- Top bar (inner pages) ---------- */
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: rgba(246, 248, 252, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar h1 { font-size: 19px; font-weight: 700; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-back, .round-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); font-size: 19px; color: var(--ink); flex: 0 0 42px; cursor: pointer; }

/* ---------- Dashboard header ---------- */
.dh { display: flex; align-items: center; gap: 12px; padding: calc(8px + env(safe-area-inset-top)) 0 14px; }
.dh-ava { width: 62px; height: 62px; border-radius: 50%; flex: 0 0 62px; background: linear-gradient(135deg, var(--navy), var(--teal)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(22, 33, 46, .14); }
.dh-ava img { width: 100%; height: 100%; object-fit: cover; }
.dh-txt { min-width: 0; flex: 1; }
.dh-name { font-size: 20px; font-weight: 700; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-role { color: var(--orange); font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dh-time { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.dh-btn { width: 50px; height: 50px; border-radius: 50%; background: var(--teal-50); color: var(--teal-2); display: grid; place-items: center; font-size: 21px; position: relative; flex: 0 0 50px; }
.dh-btn .dot { position: absolute; top: 8px; right: 9px; width: 11px; height: 11px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }

.alert-pill { display: block; text-align: center; border: 1.5px solid var(--red); color: var(--red); border-radius: 30px; padding: 7px 14px; font-weight: 500; font-size: 15px; margin-bottom: 14px; background: #fff; }
.alert-pill.info { border-color: var(--teal); color: var(--teal-2); }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
.mb { margin-bottom: 16px; }

/* ---------- Punch card ---------- */
.punch { padding: 18px 16px 20px; margin-bottom: 18px; }
.punch-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.punch-status { flex: 1; font-size: 17px; color: var(--ink-2); font-weight: 500; }
.punch-status b { color: var(--teal-2); font-weight: 600; }
.icon-ghost { width: 40px; height: 40px; border: 0; background: none; color: var(--navy); font-size: 25px; display: grid; place-items: center; cursor: pointer; border-radius: 12px; }
.icon-ghost:active { background: var(--teal-50); }
.punch-body { display: flex; align-items: center; gap: 14px; }
.dial { position: relative; width: 150px; height: 150px; flex: 0 0 150px; }
.dial svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 10px rgba(34, 179, 155, .22)); }
.dial .seg { fill: #fff; stroke: #CDEFE8; stroke-width: 1.2; }
.dial .seg.on { fill: var(--teal); stroke: var(--teal-2); }
.dial-core { position: absolute; inset: 28px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #E6F7F3 0%, #C9EEE6 100%); display: grid; place-items: center; box-shadow: inset 0 0 0 4px #fff; }
.dial-time { font-size: 23px; font-weight: 600; letter-spacing: .5px; font-variant-numeric: tabular-nums; color: var(--ink); }
.punch-btns { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pbtn { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 64px; padding: 0 16px 0 20px; border: 0; border-radius: 14px; color: #fff; font-size: 19px; font-weight: 600; cursor: pointer; text-align: left; box-shadow: 0 6px 14px rgba(22, 33, 46, .16), inset 0 -3px 0 rgba(0, 0, 0, .12); width: 100%; }
.pbtn i { font-size: 26px; flex: 0 0 auto; }
.pbtn { white-space: nowrap; }
@media (max-width: 430px) { .pbtn { font-size: 17px; padding: 0 12px 0 16px; } .pbtn i { font-size: 23px; } }
@media (max-width: 400px) { .punch-body { gap: 10px; } .dial { width: 132px; height: 132px; flex-basis: 132px; } .dial-core { inset: 25px; } .dial-time { font-size: 20px; } .pbtn { font-size: 16px; padding: 0 10px 0 13px; gap: 6px; } .pbtn i { font-size: 21px; } }
.pbtn.in { background: linear-gradient(180deg, #2CC2A9, var(--teal-2)); }
.pbtn.out { background: linear-gradient(180deg, #F0646A, #D23B41); }
.pbtn.card2 { background: linear-gradient(180deg, #2A6496, var(--navy-2)); }
.pbtn:active { transform: translateY(1px); }
@media (max-width: 370px) { .dial { width: 124px; height: 124px; flex-basis: 124px; } .dial-core { inset: 23px; } .dial-time { font-size: 19px; } .pbtn { font-size: 16px; height: 56px; padding: 0 12px 0 14px; } .pbtn i { font-size: 22px; } }

/* ---------- Banner carousel ---------- */
.banners { position: relative; margin-bottom: 20px; }
.banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; scrollbar-width: none; border-radius: var(--r); }
.banner-track::-webkit-scrollbar { display: none; }
.banner { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 2.35 / 1; border-radius: var(--r); overflow: hidden; position: relative; display: block; background: #dfe6ee; }
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner.made { display: flex; flex-direction: column; justify-content: center; padding: 18px 22px; color: #fff; }
.banner.made h3 { margin: 0 0 4px; font-size: 21px; font-weight: 800; line-height: 1.15; max-width: 72%; }
.banner.made p { margin: 0; opacity: .9; font-size: 13.5px; max-width: 70%; }
.banner.made .art { position: absolute; right: -10px; bottom: -14px; font-size: 110px; opacity: .2; line-height: 1; }
.banner.g1 { background: linear-gradient(120deg, var(--navy) 0%, #2A6FA5 55%, var(--teal) 130%); }
.banner.g2 { background: linear-gradient(120deg, #128C7E 0%, var(--teal) 60%, #7BD8C6 140%); }
.banner.g3 { background: linear-gradient(120deg, #B9741A 0%, var(--orange) 70%, #F6CF7C 140%); }
.dots { display: flex; justify-content: center; gap: 6px; position: absolute; left: 0; right: 0; bottom: 10px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: all .2s; }
.dots span.on { background: #fff; width: 9px; height: 9px; }

/* ---------- Tiles ---------- */
.big-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.big-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px 14px 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: var(--shadow); }
.big-tile .tile-ico { width: 100%; max-width: 168px; height: 112px; border-radius: 20px; font-size: 56px; }
.big-tile .tile-lbl { font-size: 19px; font-weight: 500; }

.sec-h { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; }
.sec-h h2 { font-size: 22px; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 430px) { .sec-h h2 { font-size: 19.5px; } .sec-h .all { padding: 6px 11px; font-size: 14px; } }
.sec-h .cnt { border: 1.5px solid var(--orange); color: var(--orange); font-weight: 600; font-size: 14px; padding: 0 9px; border-radius: 7px; line-height: 24px; }
.sec-h .all { margin-left: auto; background: var(--teal-50); color: var(--teal-2); padding: 7px 14px; border-radius: 12px; font-weight: 500; font-size: 15px; white-space: nowrap; }
.sec-sub { color: var(--ink-2); margin: 0 0 14px; font-size: 15px; }

.qa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px 6px 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; min-width: 0; }
.tile-ico { width: 84px; height: 84px; border-radius: 22px; background: linear-gradient(180deg, #FFFFFF, #F4F7FA); box-shadow: var(--tile-shadow); display: grid; place-items: center; font-size: 40px; }
.tile-ico i { background: linear-gradient(160deg, #2FC4AC 0%, #148573 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile-ico.navy i { background: linear-gradient(160deg, #3172AB 0%, #163A5B 100%); -webkit-background-clip: text; background-clip: text; }
.tile-lbl { font-size: 15px; color: var(--ink); line-height: 1.2; }
.tile:active, .big-tile:active { transform: scale(.98); }
@media (max-width: 370px) { .tile-ico { width: 68px; height: 68px; font-size: 32px; border-radius: 18px; } .tile-lbl { font-size: 13.5px; } }

/* ---------- People cards ---------- */
.h-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 2px 6px; margin: 0 -16px 22px; padding-left: 16px; padding-right: 16px; }
.h-scroll::-webkit-scrollbar { display: none; }
.celeb { flex: 0 0 86%; scroll-snap-align: start; padding: 14px 14px 16px; }
.celeb-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--navy); color: #fff; border-radius: 20px; padding: 4px 12px; font-size: 13.5px; font-weight: 500; }
.celeb-row { display: flex; align-items: center; gap: 14px; margin: 10px 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.p-ava { width: 74px; height: 74px; border-radius: 50%; flex: 0 0 74px; overflow: hidden; display: grid; place-items: center; font-weight: 700; font-size: 24px; color: #fff; background: linear-gradient(135deg, var(--navy), var(--teal)); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--navy); }
.p-ava img { width: 100%; height: 100%; object-fit: cover; }
.p-ava.sm { width: 46px; height: 46px; flex-basis: 46px; font-size: 16px; box-shadow: none; border-width: 0; }
.celeb .nm { font-size: 20px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.celeb .ds { color: var(--ink-2); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-wide { display: block; width: 100%; border: 0; border-radius: 26px; padding: 12px; background: linear-gradient(180deg, #2A6496, var(--navy-2)); color: #fff; font-size: 17px; font-weight: 500; text-align: center; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.btn-wide.teal { background: linear-gradient(180deg, #2CC2A9, var(--teal-2)); }
.btn-wide.light { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-wide.danger { background: #fff; color: var(--red); border: 1.5px solid #F4C7C9; box-shadow: none; }
.btn-wide:disabled { opacity: .6; }

.mate { flex: 0 0 150px; scroll-snap-align: start; border: 1.5px solid var(--teal); border-radius: 14px; background: #fff; padding: 14px 8px 12px; text-align: center; }
.mate .p-ava { margin: 0 auto 10px; width: 78px; height: 78px; box-shadow: 0 0 0 2px var(--teal); position: relative; overflow: visible; }
.mate .p-ava img, .mate .p-ava span { border-radius: 50%; }
.mate .p-ava .in-dot { position: absolute; right: -2px; bottom: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--teal); border: 3px solid #fff; }
.mate .nm { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mate .ds { color: var(--teal-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Lists ---------- */
.list { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--teal-50); color: var(--teal-2); display: grid; place-items: center; font-size: 19px; flex: 0 0 40px; }
.li .ico.navy { background: #E7EEF6; color: var(--navy); }
.li .ico.red { background: #FDECEC; color: var(--red); }
.li .t { font-weight: 500; }
.li .s { color: var(--muted); font-size: 13.5px; }
.li .grow { flex: 1; min-width: 0; }
.li .chev { color: #A9B4C2; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.kv-row:last-child { border-bottom: 0; }
.kv-row .k { color: var(--muted); }
.kv-row .v { font-weight: 500; text-align: right; word-break: break-word; }
.group-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 18px 4px 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 500; background: #EEF2F7; color: var(--ink-2); white-space: nowrap; }
.chip.teal { background: var(--teal-50); color: var(--teal-2); }
.chip.orange { background: #FDF3E1; color: #A86E06; }
.chip.navy { background: #E7EEF6; color: var(--navy); }
.empty { text-align: center; color: var(--muted); padding: 36px 20px; }
.empty i { font-size: 44px; display: block; margin-bottom: 8px; color: #C3CDD9; }

/* ---------- Menu ---------- */
.search-box { position: relative; margin-bottom: 16px; }
.search-box input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 13px 14px 13px 42px; font: inherit; outline: none; }
.search-box input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(34, 179, 155, .12); }
.search-box i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---------- Coming soon ---------- */
.soon { text-align: center; padding: 30px 10px 10px; }
.soon .tile-ico { margin: 0 auto 20px; width: 110px; height: 110px; font-size: 54px; border-radius: 28px; }
.soon h2 { font-size: 24px; margin: 0 0 8px; }
.soon p { color: var(--ink-2); margin: 0 auto 18px; max-width: 360px; line-height: 1.45; }

/* ---------- Forms / auth ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; padding: calc(28px + env(safe-area-inset-top)) 22px 28px; background: radial-gradient(120% 60% at 50% 0%, #DDF3EE 0%, var(--bg) 60%); }
.auth-logo { width: 84px; height: 84px; border-radius: 26px; margin: 18px auto 14px; background: linear-gradient(135deg, var(--navy), var(--teal)); display: grid; place-items: center; color: #fff; font-size: 36px; font-weight: 800; box-shadow: 0 12px 30px rgba(31, 78, 121, .3); overflow: hidden; }
.auth-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.auth h1 { text-align: center; font-size: 26px; margin: 0 0 4px; }
.auth .sub { text-align: center; color: var(--muted); margin: 0 0 26px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--ink-2); font-size: 14.5px; }
.input { position: relative; }
.input i.lead { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 18px; }
.input input, .input select, .input textarea { width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 14px 14px 46px; font: inherit; font-size: 16px; outline: none; color: var(--ink); }
.input input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(34, 179, 155, .12); }
.input .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font-size: 19px; padding: 8px; cursor: pointer; }
.err { background: #FDECEC; color: #B4262C; border-radius: 12px; padding: 11px 14px; margin-bottom: 14px; font-size: 14.5px; display: flex; gap: 8px; }
.hint { color: var(--muted); font-size: 13.5px; text-align: center; margin-top: 16px; }
.auth-foot { margin-top: auto; text-align: center; color: var(--muted); font-size: 13px; padding-top: 24px; }

/* ---------- Bottom tab bar ---------- */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 520px; z-index: 40; display: flex; align-items: flex-end; background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -6px 24px rgba(22, 33, 46, .08); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13.5px; color: var(--ink-2); font-weight: 500; position: relative; }
.tabbar .ti { width: 56px; height: 34px; border-radius: 18px; display: grid; place-items: center; font-size: 22px; color: var(--ink-2); }
.tabbar a.on { color: var(--navy); font-weight: 600; }
.tabbar a.on .ti { background: #E2EBF4; color: var(--navy); }
.tabbar a.on::after { content: ""; position: absolute; bottom: -6px; width: 20px; height: 3px; border-radius: 3px; background: var(--navy); }
.tabbar .fab-btn { width: 66px; height: 66px; border-radius: 50%; margin-top: -40px; margin-bottom: 2px; background: radial-gradient(circle at 50% 30%, #2D6B9E, var(--navy-2)); color: #fff; font-size: 28px; display: grid; place-items: center; border: 6px solid #fff; box-shadow: 0 8px 20px rgba(31, 78, 121, .35); }
.tabbar a.fab.on::after { display: none; }

/* ---------- Bottom sheet + toasts ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 35, .45); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 50%; bottom: 0; width: 100%; max-width: 520px; transform: translate(-50%, 105%); z-index: 90; background: #fff; border-radius: 24px 24px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); transition: transform .25s ease; max-height: 88vh; overflow-y: auto; }
.sheet.show { transform: translate(-50%, 0); }
.sheet-grip { width: 44px; height: 5px; border-radius: 4px; background: #D9E0E8; margin: 0 auto 16px; }
.sheet h3 { margin: 0 0 6px; font-size: 21px; }
.sheet p { color: var(--ink-2); line-height: 1.45; margin: 0 0 16px; }
.toasts { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 480px; z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); display: flex; gap: 10px; align-items: flex-start; animation: tIn .25s ease; pointer-events: auto; font-size: 14.5px; }
.toast.success i { color: #4ADE80; } .toast.danger i { color: #FB7185; } .toast.warning i { color: #FBBF24; } .toast.info i { color: #5EEAD4; }
@keyframes tIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Face scan / punch ---------- */
.scan { text-align: center; }
.cam { position: relative; width: 100%; max-width: 360px; aspect-ratio: 3 / 4; margin: 4px auto 16px; border-radius: 28px; overflow: hidden; background: #0E1A26; box-shadow: var(--shadow); }
.cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.cam-oval { position: absolute; left: 50%; top: 45%; width: 64%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border-radius: 50%; border: 4px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 999px rgba(14, 26, 38, .45); transition: border-color .2s; }
.cam.done .cam-oval { border-color: var(--teal); }
.cam-hint { position: absolute; left: 12px; right: 12px; bottom: 14px; background: rgba(14, 26, 38, .75); color: #fff; border-radius: 14px; padding: 10px 12px; font-weight: 500; font-size: 15.5px; }
.cam-gps { aspect-ratio: auto; height: 200px; display: grid; place-items: center; background: linear-gradient(160deg, #E4F6F2, #D4E6F2); color: var(--teal-2); font-size: 70px; }
.cam-gps i { animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.steps { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.steps span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 20px; background: #EEF2F7; color: var(--muted); font-size: 14px; font-weight: 500; }
.steps span.busy { background: #FDF3E1; color: #A86E06; }
.steps span.busy i { animation: spin 1s linear infinite; display: inline-block; }
.steps span.ok { background: var(--teal-50); color: var(--teal-2); }
.steps span.bad { background: #FDECEC; color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-note { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.result { padding: 10px 6px; }
.result-ico { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; font-size: 50px; color: #fff; }
.result-ico.ok { background: linear-gradient(180deg, #2CC2A9, var(--teal-2)); box-shadow: 0 10px 26px rgba(34, 179, 155, .35); }
.result-ico.bad { background: linear-gradient(180deg, #F0646A, #D23B41); box-shadow: 0 10px 26px rgba(229, 72, 77, .3); }
.result h2 { margin: 0 0 6px; font-size: 24px; }
.result p { color: var(--ink-2); margin: 0 auto 20px; max-width: 340px; line-height: 1.45; }
.result-btns { display: grid; gap: 10px; }
.intro h2 { margin: 0 0 8px; font-size: 22px; }
.intro p { color: var(--ink-2); margin: 0 0 16px; line-height: 1.45; }
.tips { list-style: none; padding: 0; margin: 0 0 22px; text-align: left; display: grid; gap: 8px; }
.tips li { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; }
.tips i { color: var(--teal-2); font-size: 19px; }

/* ---------- Punch card states ---------- */
.punch-status small { display: block; font-size: 13px; color: var(--muted); }
.pbtn.done { background: linear-gradient(180deg, #8FA3B6, #6B7F93); cursor: default; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); margin-right: 6px; animation: pulse 1.4s infinite; vertical-align: middle; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 179, 155, .6); } 100% { box-shadow: 0 0 0 10px rgba(34, 179, 155, 0); } }

/* ---------- Timecard ---------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.month-nav h2 { margin: 0; font-size: 20px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .wd { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; padding-bottom: 2px; }
.cal .d { aspect-ratio: 1; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; position: relative; cursor: pointer; padding: 0; color: var(--ink); }
.cal .d .b { width: 7px; height: 7px; border-radius: 50%; margin-top: 3px; background: var(--c, transparent); }
.cal .d.today { border: 2px solid var(--navy); }
.cal .d.none { opacity: .4; cursor: default; }
.cal .d.late::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 12px 2px 16px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); display: inline-block; }
.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.sum-grid div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 4px; text-align: center; }
.sum-grid b { display: block; font-size: 20px; }
.sum-grid span { font-size: 12px; color: var(--muted); }

/* ---------- Forms in the app ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 16px; }
.input.plain input, .input.plain select, .input.plain textarea { padding-left: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 > * { min-width: 0; }
.input input[type=date], .input input[type=time] { min-width: 0; padding-right: 8px; }

/* ---------- Phase 2: tabs, circulars, timeline, greetings ---------- */
.seg-tabs { display: flex; background: #E9EEF4; border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.seg-tabs a { flex: 1; text-align: center; padding: 9px 6px; border-radius: 11px; font-weight: 500; color: var(--ink-2); font-size: 14.5px; }
.seg-tabs a.on { background: #fff; color: var(--navy); font-weight: 600; box-shadow: 0 2px 6px rgba(22, 33, 46, .08); }
.prose { line-height: 1.6; color: var(--ink); word-break: break-word; }
.prose a, .post-text a { color: var(--teal-2); text-decoration: underline; }
.tile-ico { position: relative; }
.tile-badge { position: absolute; top: -6px; right: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--red); color: #fff; font-style: normal; font-size: 12.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; -webkit-text-fill-color: #fff; }

.post { padding: 14px; margin-bottom: 14px; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-head .t { font-weight: 600; line-height: 1.2; }
.post-head .s { color: var(--muted); font-size: 12.5px; }
.post-head .grow { flex: 1; min-width: 0; }
.post-text { white-space: pre-wrap; word-break: break-word; line-height: 1.5; margin-bottom: 10px; }
.post-text .more { font-weight: 600; text-decoration: none; }
.post-media { display: grid; gap: 4px; border-radius: 14px; overflow: hidden; margin-bottom: 8px; }
.post-media.m1 { grid-template-columns: 1fr; }
.post-media.m2, .post-media.m4 { grid-template-columns: 1fr 1fr; }
.post-media.m3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.post-media.m3 a:first-child { grid-row: span 2; }
.post-media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 1; background: #EEF2F7; }
.post-media.m1 img { aspect-ratio: auto; max-height: 460px; }
.post-foot { display: flex; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.react { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: none; padding: 7px; border-radius: 10px; color: var(--ink-2); font: inherit; font-weight: 500; cursor: pointer; }
.react:active { background: #F1F4F8; }
.react.on { color: var(--red); }
.composer { padding: 14px; }
.composer textarea, .comment-box textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px; font: inherit; resize: vertical; outline: none; background: #FAFBFD; }
.composer textarea:focus, .comment-box textarea:focus { border-color: var(--teal); background: #fff; }
.c-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.c-thumbs span { position: relative; }
.c-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; display: block; }
.c-thumbs button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; line-height: 1; cursor: pointer; }
.c-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.c-photo { display: inline-flex; align-items: center; gap: 6px; color: var(--teal-2); font-weight: 600; cursor: pointer; padding: 8px 12px; border-radius: 12px; background: var(--teal-50); }
.comment-box { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 6px); display: flex; gap: 8px; align-items: flex-end; background: var(--bg); padding: 8px 0; }
.event-card { text-align: center; border-radius: 16px; padding: 18px 14px 14px; background: linear-gradient(160deg, #E4F6F2, #E7EEF6); }
.event-card.ev-birthday { background: linear-gradient(160deg, #FFF1DC, #FDE2EC); }
.event-card.ev-anniversary { background: linear-gradient(160deg, #E7EEF6, #E4F6F2); }
.event-card .p-ava { margin: 0 auto 10px; }
.ev-title { font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.ev-sub { color: var(--ink-2); margin-bottom: 12px; }

.gcard { position: relative; border-radius: 18px; padding: 22px 18px 18px; color: #fff; overflow: hidden; min-height: 180px; background: linear-gradient(135deg, #F06292, #FF8A65); background-size: cover; background-position: center; }
.gcard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .25) 0 3px, transparent 4px) 0 0 / 34px 34px; opacity: .7; }
.gcard > * { position: relative; }
.gc-balloons { background: linear-gradient(135deg, #7C4DFF, #448AFF); }
.gc-milestone { background: linear-gradient(135deg, var(--navy), var(--teal)); }
.gc-thanks { background: linear-gradient(135deg, #26A69A, #9CCC65); }
.gc-image::before { background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .55)); opacity: 1; }
.gc-emoji { font-size: 44px; display: block; line-height: 1; margin-bottom: 10px; }
.gc-to { font-weight: 700; font-size: 18px; }
.gc-msg { font-size: 16px; line-height: 1.45; margin: 4px 0 10px; text-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.gc-from { font-weight: 600; opacity: .95; }
.gcard.mini { min-height: 0; height: 84px; padding: 12px; display: grid; place-items: center; }
.gcard.mini .gc-emoji { margin: 0; font-size: 34px; }
.card-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.card-picks label { text-align: center; cursor: pointer; }
.card-picks input { position: absolute; opacity: 0; pointer-events: none; }
.card-picks .gcard { border: 3px solid transparent; }
.card-picks input:checked + .gcard { border-color: var(--ink); box-shadow: 0 0 0 3px #fff inset; }
.card-picks small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--ink-2); }
.sugg { display: flex; gap: 6px; flex-wrap: wrap; }
.sugg .chip { border: 0; cursor: pointer; font: inherit; font-size: 12.5px; }

.moment { flex: 0 0 76%; scroll-snap-align: start; padding: 8px; display: block; }
.moment img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; display: block; background: #EEF2F7; }
.moment .mo-cap { font-weight: 600; margin: 8px 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.moment .mo-by { color: var(--muted); font-size: 12.5px; margin: 0 4px 4px; }

/* ---------- Phase 3: leave ---------- */
.bal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.bal { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; border-top: 4px solid var(--c); box-shadow: var(--shadow); }
.bal-name { font-weight: 600; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal-num { font-size: 28px; font-weight: 700; color: var(--c); line-height: 1.2; }
.bal-sub { font-size: 12.5px; color: var(--muted); }
.calc { border-radius: 12px; padding: 10px 12px; margin: -2px 0 14px; font-weight: 500; font-size: 14.5px; background: #EEF2F7; color: var(--ink-2); }
.calc.ok { background: var(--teal-50); color: var(--teal-2); }
.calc.bad { background: #FDECEC; color: #B4262C; }
.sess { display: block; text-align: center; padding: 9px 4px; border-radius: 11px; font-weight: 500; color: var(--ink-2); cursor: pointer; font-size: 14px; }
.sess.on { background: #fff; color: var(--navy); font-weight: 600; box-shadow: 0 2px 6px rgba(22, 33, 46, .08); }

/* ---------- Phase 4: work report ---------- */
.item-row { display: grid; grid-template-columns: 1fr 64px 32px; gap: 6px; margin-bottom: 6px; }
.item-row input { min-width: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 10px; font: inherit; font-size: 15px; outline: none; background: #fff; }
.item-row input:focus { border-color: var(--teal); }
.item-row .rm { border: 0; background: #F1F4F8; border-radius: 10px; font-size: 20px; color: var(--muted); cursor: pointer; }
.dwr-q { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; margin: 12px 0 4px; }
.dwr-q:first-child { margin-top: 0; }
.dwr-a { line-height: 1.5; word-break: break-word; }
.dwr-items { list-style: none; margin: 0; padding: 0; }
.dwr-items li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.dwr-items li:last-child { border-bottom: 0; }
.dwr-items b { white-space: nowrap; color: var(--teal-2); }

/* ---------- Phase 5: expenses & advances ---------- */
.chip.red { background: #FDECEC; color: var(--red); }
.bal-num.money { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amt { font-weight: 700; white-space: nowrap; }
.cat-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cat-picks label { margin: 0; cursor: pointer; }
.cat-picks input { position: absolute; opacity: 0; pointer-events: none; }
.cat-picks span { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 10px 4px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; font-size: 12px; font-weight: 500; color: var(--ink-2); line-height: 1.2; height: 100%; }
.cat-picks span i { font-size: 22px; color: var(--navy); }
.cat-picks input:checked + span { border-color: var(--teal); background: var(--teal-50); color: var(--teal-2); box-shadow: 0 0 0 3px rgba(34, 179, 155, .12); }
.bill-pick { display: flex; align-items: center; gap: 12px; border: 1.5px dashed #B9C6D4; border-radius: 14px; padding: 12px; background: #FAFBFD; cursor: pointer; }
.bill-pick .ph { width: 60px; height: 60px; border-radius: 12px; background: #EEF2F7; display: grid; place-items: center; font-size: 26px; color: var(--muted); overflow: hidden; flex: 0 0 60px; }
.bill-pick .ph img { width: 100%; height: 100%; object-fit: cover; }
.bill-view { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 16px; background: #fff; }
.bill-view img { width: 100%; max-height: 420px; object-fit: contain; display: block; background: #F1F4F8; }
.hero-amt { text-align: center; padding: 18px 14px 14px; }
.hero-amt .v { font-size: 34px; font-weight: 800; line-height: 1.1; }
.hero-amt .s { color: var(--muted); margin-top: 4px; }
.progress-line { height: 8px; border-radius: 8px; background: #EEF2F7; overflow: hidden; margin: 8px 0 4px; }
.progress-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-2)); border-radius: 8px; }
.trail { list-style: none; margin: 0; padding: 4px 16px; }
.trail li { position: relative; padding: 10px 0 10px 24px; border-left: 2px solid var(--line); margin-left: 6px; }
.trail li::before { content: ""; position: absolute; left: -7px; top: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--c, #C3CDD9); border: 2px solid #fff; }
.trail .t { font-weight: 600; }
.trail .s { color: var(--muted); font-size: 13px; }

/* ---------- Phase 6: visits & tracking ---------- */
.alert-pill.track { background: #E4F6F2; color: var(--teal-2); display: flex; align-items: center; gap: 8px; }
.alert-pill.track button { margin-left: auto; border: 0; background: #fff; color: var(--teal-2); border-radius: 20px; padding: 4px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.alert-pill.track button.on { background: var(--teal-2); color: #fff; }
.act-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.act-row a, .act-row button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 16px; background: #fff; border: 1px solid var(--line); font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: center; }
.act-row i { font-size: 22px; color: var(--teal-2); }
.act-row .primary { background: linear-gradient(180deg, #2CC2A9, var(--teal-2)); color: #fff; border: 0; }
.act-row .primary i { color: #fff; }
.live-card { border-left: 5px solid var(--orange); }
.pick-list { max-height: 320px; overflow-y: auto; }
.pick-list label { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; margin: 0; }
.pick-list label:has(input:checked) { background: var(--teal-50); }
.pick-list input { accent-color: var(--teal-2); width: 18px; height: 18px; }
.contact-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.contact-btns a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 6px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--navy); }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 12px 16px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.flag { color: var(--orange); font-weight: 600; }

/* ---------- Phase 7: cards, notes, lost & found, bank ---------- */
.card-canvas { display: flex; justify-content: center; margin: 4px 0 16px; }
.card-canvas canvas { width: 100%; max-width: 340px; height: auto; border-radius: 18px; box-shadow: 0 14px 34px rgba(22, 33, 46, .18); background: #fff; }
.card-canvas.wide canvas { max-width: 480px; border-radius: 14px; }
.print-only { display: none; }
@media print {
  body * { visibility: hidden !important; }
  .print-only { display: block !important; visibility: visible !important; position: absolute; left: 0; top: 0; width: 54mm; }
}
.notes-grid { columns: 2; column-gap: 10px; }
.note { break-inside: avoid; display: block; background: var(--nc, #fff); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; color: var(--ink); }
.note .nt { font-weight: 700; margin-bottom: 4px; word-break: break-word; }
.note .nb { font-size: 14px; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; max-height: 9.5em; overflow: hidden; }
.note .ni { font-size: 14px; display: flex; gap: 6px; align-items: flex-start; }
.note .ni.done { text-decoration: line-through; color: var(--muted); }
.note .nm { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; }
.color-picks { display: flex; gap: 10px; flex-wrap: wrap; }
.color-picks label { margin: 0; cursor: pointer; }
.color-picks input { position: absolute; opacity: 0; pointer-events: none; }
.color-picks span { display: block; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); }
.color-picks input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 3px #fff inset; }
.check-row { display: grid; grid-template-columns: 28px 1fr 32px; gap: 6px; align-items: center; margin-bottom: 6px; }
.check-row input[type=text] { min-width: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; font: inherit; font-size: 15px; outline: none; background: #fff; }
.check-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--teal-2); }
.check-row .rm { border: 0; background: #F1F4F8; border-radius: 10px; font-size: 20px; color: var(--muted); cursor: pointer; height: 38px; }
.lf-photo { width: 100%; max-height: 320px; object-fit: cover; border-radius: 14px; display: block; margin-bottom: 12px; background: #EEF2F7; }
.mono-num { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.d-block { display: block; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.center { text-align: center; }
