:root {
  --navy: #011359;
  --navy-2: #1B3B8F;
  --navy-50: #EEF3FA;
  --navy-100: #DCE5F3;
  --lime: #55F800;
  --ink: #0F172A;
  --muted: #5B6577;
  --line: #E3E8F0;
  --bg: #F6F8FB;
  --white: #fff;
  --green: #127A3E; --green-bg: #E5F5EB;
  --amber: #A15C07; --amber-bg: #FDF1DC;
  --red: #B42318; --red-bg: #FDECEA;
  --gray-bg: #EEF0F4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 4px 16px rgba(15,23,42,.06);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--white); overflow-x: hidden; }
body { font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy-2); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { height: 40px; width: auto; display: block; }
.brand .app-name { font-size: 13px; font-weight: 600; color: var(--muted); border-left: 1px solid var(--line); padding-left: 12px; }
.topbar .spacer { flex: 1; }
.who { text-align: right; font-size: 14px; line-height: 1.2; }
.who b { display: block; color: var(--navy); }
.who span { color: var(--muted); font-size: 12px; }
.nav { max-width: 1200px; margin: 0 auto; padding: 0 12px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 12px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--navy); }
.nav a.active { color: var(--navy); border-bottom-color: var(--navy); }

/* ---------- Layout ---------- */
.page { max-width: 1200px; margin: 0 auto; padding: 24px 20px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 26px; color: var(--navy); letter-spacing: -.3px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 0; font-size: 18px; color: var(--navy); }
.stack > * + * { margin-top: 20px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); color: var(--navy); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--navy-50); border-color: var(--navy-100); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primary:hover { background: var(--navy-2); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-bg); border-color: #F5C2BD; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--navy-50); }
.icon-btn { width: 42px; padding: 0; font-size: 20px; }

/* ---------- Forms ---------- */
label.field { display: block; }
label.field > span { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
label.field small { display: block; color: var(--muted); margin-top: 4px; font-size: 13px; }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #CBD3E1; border-radius: 10px; background: #fff; outline: none; }
.input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(22,62,127,.15); }
textarea.input { min-height: 80px; resize: vertical; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.error-msg { background: var(--red-bg); color: var(--red); padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(180deg, var(--white) 0%, var(--white) 55%, var(--navy-50) 100%); }
.login-card { width: 100%; max-width: 420px; padding: 32px 28px; }
.login-card .logo { display: block; height: 56px; margin: 0 auto 8px; }
.login-card h1 { text-align: center; color: var(--navy); font-size: 22px; margin: 10px 0 4px; }
.login-card p.sub { text-align: center; color: var(--muted); margin: 0 0 24px; }
.login-card .btn { width: 100%; min-height: 52px; font-size: 17px; }
.login-foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }

/* ---------- Status pills & flags ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.s-clocked_in, .s-working { background: var(--green-bg); color: var(--green); }
.s-on_lunch { background: var(--amber-bg); color: var(--amber); }
.s-clocked_out, .s-complete { background: var(--navy-50); color: var(--navy); }
.s-not_clocked_in, .s-off { background: var(--gray-bg); color: var(--muted); }
.s-incomplete, .s-absent { background: var(--red-bg); color: var(--red); }
.s-active { background: var(--green-bg); color: var(--green); }
.s-inactive { background: var(--gray-bg); color: var(--muted); }
.flag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--red-bg); color: var(--red); margin: 2px 4px 2px 0; white-space: nowrap; }
.flag.f-no_lunch { background: var(--amber-bg); color: var(--amber); }
.flag.f-edited { background: var(--navy-50); color: var(--navy-2); }

/* ---------- Agent clock ---------- */
.agent-page { max-width: 1000px; }
.clock-card { text-align: center; padding: 28px 24px 24px; }
.hello { font-size: 18px; color: var(--muted); }
.hello b { color: var(--navy); }
.today-date { font-size: 17px; font-weight: 600; margin-top: 6px; color: var(--ink); }
.bigclock { font-size: clamp(54px, 12vw, 92px); font-weight: 800; color: var(--navy); letter-spacing: -2px; line-height: 1.05; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.bigclock .ampm { font-size: .35em; letter-spacing: 0; margin-left: 6px; font-weight: 700; }
.tzlabel { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.status-big { font-size: 16px; padding: 7px 16px; }
.punch-actions { display: grid; gap: 12px; max-width: 520px; margin: 22px auto 6px; }
.punch-actions.two { grid-template-columns: 1fr 1fr; }
.punch { min-height: 84px; border-radius: 16px; border: 0; color: #fff; font-size: 22px; font-weight: 800; letter-spacing: .5px; cursor: pointer; box-shadow: 0 6px 18px rgba(11,42,91,.18); transition: transform .06s, filter .15s; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; text-align: center; padding: 8px 10px; }
.punch small { font-size: 13px; font-weight: 600; opacity: .85; letter-spacing: 0; margin-top: 3px; }
.punch:hover { filter: brightness(1.08); }
.punch:active { transform: translateY(2px); }
.punch:disabled { filter: grayscale(.5) opacity(.6); cursor: wait; }
.punch.clock_in { background: var(--navy); }
.punch.start_lunch { background: #C26A06; }
.punch.end_lunch { background: var(--navy-2); }
.punch.clock_out { background: #9B1C13; }
.done-msg { max-width: 520px; margin: 22px auto 6px; padding: 18px; border-radius: 14px; background: var(--navy-50); color: var(--navy); font-weight: 600; }
.confirm-banner { max-width: 520px; margin: 16px auto 0; padding: 14px 16px; border-radius: 14px; background: var(--green-bg); color: var(--green); border: 1px solid #BFE5CC; font-weight: 700; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; animation: pop .25s ease-out; }
.confirm-banner .t { white-space: nowrap; font-size: 20px; font-variant-numeric: tabular-nums; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.today-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); margin: 22px -24px -24px; }
.today-grid > div { padding: 14px 8px; border-right: 1px solid var(--line); }
.today-grid > div:last-child { border-right: 0; background: var(--navy-50); border-bottom-right-radius: var(--radius); }
.today-grid > div:first-child { border-bottom-left-radius: var(--radius); }
.today-grid .k { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; }
.today-grid .v { font-size: 18px; font-weight: 700; color: var(--ink); margin-top: 2px; font-variant-numeric: tabular-nums; }
.today-grid .v.hours { color: var(--navy); font-size: 20px; }

/* ---------- Period switcher ---------- */
.seg { display: inline-flex; background: var(--gray-bg); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer; }
.loc-seg { flex-wrap: wrap; }
.seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.period-nav { display: flex; align-items: center; gap: 6px; }
.period-nav .label { min-width: 190px; text-align: center; font-weight: 700; color: var(--navy); }

.summary-chips { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #FBFCFE; }
.chip { padding: 8px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.chip .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.chip .v { font-size: 17px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; padding: 11px 14px; background: #FBFCFE; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td { white-space: nowrap; }
.tbl td[data-label="Estado"], .tbl td[data-label="Alertas"], .tbl td[data-label="Problema"] { white-space: normal; min-width: 180px; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--navy-50); }
.tbl tr.flagged td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.tbl .name { font-weight: 700; color: var(--navy); }
.tbl .r { text-align: right; }
.tbl tfoot td { font-weight: 800; background: #FBFCFE; border-top: 2px solid var(--line); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }

/* ---------- Admin stats ---------- */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stat { padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.stat .k { font-size: 13px; font-weight: 600; color: var(--muted); }
.stat .v { font-size: 30px; font-weight: 800; color: var(--navy); margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat.accent { background: var(--navy); border-color: var(--navy); }
.stat.accent .k { color: #C9D6EC; }
.stat.accent .v { color: #fff; }
.stat .bar { height: 4px; border-radius: 4px; margin-top: 10px; }
.stat.st-in .bar { background: var(--green); }
.stat.st-lunch .bar { background: #E0A13B; }
.stat.st-out .bar { background: var(--navy-2); }
.stat.st-none .bar { background: #C3CAD6; }
.stat.st-total .bar { background: var(--navy-100); }
.attention { border-color: #F5C2BD; }
.attention .card-head { background: var(--red-bg); border-bottom-color: #F5C2BD; border-radius: var(--radius) var(--radius) 0 0; }
.attention .card-head h2 { color: var(--red); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.filters label.field { min-width: 150px; }
.filters label.field > span { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.filters .input { min-height: 42px; }
.emp-section + .emp-section { border-top: 6px solid var(--bg); }
.emp-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px 8px; }
.emp-title h3 { margin: 0; color: var(--navy); font-size: 17px; }

.detail-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; }
.back { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.back:hover { color: var(--navy); }

.audit-item { padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
.audit-item:last-child { border-bottom: 0; }
.audit-item .meta { color: var(--muted); font-size: 13px; }
.audit-item .chg { margin-top: 6px; display: grid; gap: 2px; }
.audit-item .old { text-decoration: line-through; color: var(--red); }
.audit-item .new { color: var(--green); font-weight: 700; }
.audit-item .reason { margin-top: 6px; background: var(--bg); padding: 6px 10px; border-radius: 8px; }

/* ---------- Modal & toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(11,22,45,.45); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { margin: 0; color: var(--navy); font-size: 19px; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: #FBFCFE; border-radius: 0 0 16px 16px; }
@keyframes fade { from { opacity: 0; } }
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: pop .2s; }
.toast.err { background: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .topbar-inner { padding: 8px 14px; }
  .brand img { height: 34px; }
  .brand .app-name, .who { display: none; }
  .topbar-inner { gap: 8px; }
  .topbar .btn.sm { min-height: 34px; padding: 0 10px; font-size: 13px; }
  .page { padding: 16px 12px 48px; }
  .page-head h1 { font-size: 22px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat .v { font-size: 26px; }
  .form-grid.two { grid-template-columns: 1fr; }
  .clock-card { padding: 22px 16px 16px; }
  .today-grid { grid-template-columns: repeat(2, 1fr); margin: 20px -16px -16px; }
  .today-grid > div { border-bottom: 1px solid var(--line); }
  .today-grid > div:nth-child(2n) { border-right: 0; }
  .today-grid > div:last-child { grid-column: 1 / -1; border-radius: 0 0 var(--radius) var(--radius); border-bottom: 0; }
  .today-grid > div:first-child { border-radius: 0; }
  .punch { min-height: 78px; font-size: 20px; }
  .period-nav .label { min-width: 0; flex: 1; font-size: 14px; }
  .period-nav { width: 100%; }
  .card-head, .filters, .summary-chips { padding-left: 14px; padding-right: 14px; }
  .filters label.field { min-width: 0; flex: 1 1 140px; }

  /* tables become stacked cards */
  table.tbl.stackable thead { display: none; }
  table.tbl.stackable, .tbl.stackable tbody, .tbl.stackable tr, .tbl.stackable td { display: block; width: 100%; }
  .tbl.stackable tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .tbl.stackable td { border: 0; padding: 4px 0; text-align: right; overflow: hidden; }
  .tbl.stackable td::before { content: attr(data-label); float: left; margin-right: 12px; font-weight: 600; color: var(--muted); font-size: 13px; text-align: left; line-height: 1.9; }
  .tbl.stackable td.full { display: block; text-align: left; }
  .tbl.stackable td.full::before { display: none; }
  .tbl.stackable td:empty { display: none; }
  .tbl.stackable tr.flagged td:first-child { box-shadow: none; }
  .tbl.stackable tr.flagged { box-shadow: inset 4px 0 0 var(--red); }
  .tbl.stackable tfoot tr { background: #FBFCFE; }
}
@media print {
  .topbar, .nav, .btn, .filters { display: none !important; }
  .card { box-shadow: none; }
}

/* =================================================================
   v2 — separate ADMIN (sidebar) and AGENT (simple) interfaces
   ================================================================= */
.ic { width: 18px; height: 18px; flex: none; }
.btn.big { min-height: 52px; font-size: 16px; padding: 0 22px; }
.btn .ic { width: 16px; height: 16px; }
.small { font-size: 13px; }
.navy { color: var(--navy); }
.red { color: var(--red); font-weight: 700; }
em.opt, em.req { font-style: normal; font-weight: 600; font-size: 12px; margin-left: 6px; padding: 1px 7px; border-radius: 6px; }
em.opt { color: var(--muted); background: var(--gray-bg); }
em.req { color: var(--red); background: var(--red-bg); }
.ok-msg { background: var(--green-bg); color: var(--green); padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.info-box { background: var(--navy-50); color: var(--navy); padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: #FFF8E6; border: 1px solid #F5D9A0; color: #7A4B00; padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; }
.notice .ic { margin-top: 2px; }
.success-box { display: flex; gap: 14px; align-items: flex-start; background: var(--green-bg); color: var(--ink); padding: 16px; border-radius: 12px; }
.success-box > .ic { width: 28px; height: 28px; color: var(--green); }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { font-size: 13px; }
.login-card .btn.big { width: 100%; }
.pill.xs { font-size: 11px; padding: 2px 8px; }
.pill.xs::before { width: 6px; height: 6px; }
.s-time_off { background: #EFE9FB; color: #5B3CB0; }
/* account statuses */
.a-active { background: var(--green-bg); color: var(--green); }
.a-invitation_sent { background: var(--navy-50); color: var(--navy-2); }
.a-pending_acceptance { background: var(--amber-bg); color: var(--amber); }
.a-deactivated, .a-not_invited { background: var(--gray-bg); color: var(--muted); }
/* time-off statuses */
.t-pending { background: var(--amber-bg); color: var(--amber); }
.t-approved { background: var(--green-bg); color: var(--green); }
.t-denied { background: var(--red-bg); color: var(--red); }
.t-info_requested { background: #E6F0FF; color: #1D4ED8; }
.t-cancelled { background: var(--gray-bg); color: var(--muted); }

/* ---------- ADMIN: sidebar layout ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex: none; background: var(--navy); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40; }
.side-brand { display: block; background: #fff; margin: 14px; padding: 10px 12px; border-radius: 12px; }
.side-brand img { height: 36px; display: block; }
.side-label { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: #8FA6CC; font-weight: 700; padding: 6px 22px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: #C9D6EC; text-decoration: none; font-weight: 600; font-size: 15px; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.active { background: #fff; color: var(--navy); }
.side-nav a span { flex: 1; }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: #E5484D; color: #fff; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.side-foot { margin-top: auto; padding: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.side-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.side-user b { display: block; font-size: 14px; }
.side-user span { font-size: 12px; color: #8FA6CC; }
.side-foot .btn { background: transparent; color: #C9D6EC; border-color: rgba(255,255,255,.18); }
.side-foot .btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.avatar.sm { width: 34px; height: 34px; font-size: 13px; background: var(--lime); color: var(--navy); }
.admin-main { flex: 1; min-width: 0; background: #FBFCFE; }
.admin-main .page { max-width: 1280px; }
.admin-mobile-top { display: none; }
.nav-scrim { display: none; }
.stat { text-decoration: none; color: inherit; }
.stat .mini { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat.accent .mini { color: #C9D6EC; }
.stat .bar.b-total { background: var(--navy-100); } .stat .bar.b-in { background: var(--green); } .stat .bar.b-lunch { background: #E0A13B; }
.stat .bar.b-out { background: var(--navy-2); } .stat .bar.b-none { background: #C3CAD6; }
a.stat.accent:hover { background: var(--navy-2); }
.filters .search { max-width: 260px; min-height: 40px; }
.seg.wrap { flex-wrap: wrap; }
.seg .cnt { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: #fff; color: var(--muted); font-size: 12px; }
.seg button.on .cnt { background: var(--navy-50); color: var(--navy); }
.seg .cnt.hot { background: #E5484D; color: #fff; }
.status-tabs { justify-content: space-between; }
.reason-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; }
.emp-title h3 a { color: inherit; text-decoration: none; }
.logo-preview { height: 60px; max-width: 280px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.two-col.wide-left { grid-template-columns: 1.6fr 1fr; }
.steps { margin: 0; padding: 18px 20px 20px 42px; display: grid; gap: 14px; }
.steps li b { display: block; color: var(--navy); }
.steps li span { color: var(--muted); font-size: 14px; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.details-grid > div span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.details-grid .full { grid-column: 1 / -1; }
.details-grid p { margin: 0; white-space: pre-wrap; }
.decision .btn.big { width: 100%; justify-content: center; font-weight: 800; letter-spacing: .3px; }
.btn.approve { background: var(--green); color: #fff; border-color: var(--green); }
.btn.approve:hover { background: #0E6533; }
.btn.deny { background: #fff; color: var(--red); border-color: #F0B7B1; }
.btn.deny:hover { background: var(--red-bg); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline .ev { display: grid; grid-template-columns: 14px 1fr; gap: 12px; font-size: 14px; }
.timeline .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; background: var(--navy-100); border: 2px solid var(--navy-2); }
.ev-approved .dot { background: var(--green); border-color: var(--green); }
.ev-denied .dot { background: var(--red); border-color: var(--red); }
.ev-info_requested .dot { background: #1D4ED8; border-color: #1D4ED8; }
.ev-cancelled .dot { background: #C3CAD6; border-color: #C3CAD6; }
.timeline .msg { margin-top: 4px; background: var(--bg); padding: 8px 12px; border-radius: 8px; white-space: pre-wrap; }

/* ---------- AGENT: simple interface ---------- */
.agent-top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.agent-top-inner { max-width: 1100px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.agent-top .brand img { height: 38px; }
.agent-nav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.agent-nav a { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.agent-nav a:hover { color: var(--navy); background: var(--navy-50); }
.agent-nav a.active { background: var(--navy); color: #fff; }
.agent-user { display: flex; align-items: center; gap: 8px; }
.agent-user .who { text-align: right; font-size: 13px; line-height: 1.2; }
.agent-user .who b { display: block; color: var(--navy); font-size: 14px; }
.agent-user .who span { color: var(--muted); }
.bottom-nav { display: none; }
.agent-page { max-width: 1100px; }
.agent-page .clock-card { max-width: 760px; margin: 0 auto; }
.status-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tbl tr.subtotal td { background: var(--navy-50); font-size: 14px; }
.req-item { padding: 16px 20px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.req-item:last-child { border-bottom: 0; }
.req-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.req-item details summary { cursor: pointer; color: var(--navy-2); font-weight: 600; font-size: 14px; }
.req-item details > * + * { margin-top: 10px; }
.req-item .btn { justify-self: start; }
.kv { font-size: 14px; } .kv span { display: block; font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.info-req { background: #E6F0FF; color: #1E3A8A; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.reply-form { display: grid; gap: 8px; margin-top: 10px; }
.reply-form .btn { justify-self: start; }

@media (max-width: 1100px) {
  .two-col, .two-col.wide-left { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; background: rgba(11,22,45,.4); z-index: 30; }
  .admin-mobile-top { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .admin-mobile-top img { height: 32px; }
  .admin-mobile-top .ic { width: 22px; height: 22px; }
  .agent-nav { display: none; }
  .agent-top-inner { justify-content: space-between; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 25; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700; text-align: center; border-radius: 10px; }
  .bottom-nav a .ic { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--navy); background: var(--navy-50); }
  .agent-page { padding-bottom: 96px; }
  #toast-root { bottom: 84px; }
}
@media (max-width: 720px) {
  .hide-sm { display: none; }
  .agent-user .who { display: none; }
  .details-grid { grid-template-columns: 1fr; }
  .copy-row { flex-direction: column; }
  .filters .search { max-width: none; }
  .admin-main .stats { grid-template-columns: repeat(2, 1fr); }
}
/* fixes */
.agent-top-inner { max-width: 1240px; }
.agent-nav a { white-space: nowrap; padding: 9px 12px; }
@media (min-width: 901px) { .admin-layout { background: linear-gradient(to right, var(--navy) 252px, #FBFCFE 252px); } }
@media (max-width: 1180px) and (min-width: 901px) { .agent-user .who { display: none; } .agent-nav a .ic { display: none; } }

/* real logo sizing */
.side-brand img { height: 58px; margin: 0 auto; }
.login-card .logo { height: 92px; }
.agent-top .brand img { height: 48px; }
.admin-mobile-top img { height: 40px; }
.a-deleted { background: #F3E8E8; color: #8A3B3B; }
.a-not_invited { background: #FFF4E5; color: #9A5B00; }
.office-select { min-height: 36px; padding: 4px 8px; font-size: 14px; width: auto; min-width: 150px; }
.office-select.unassigned { border-color: #F0B45B; background: #FFF8E6; color: #7A4B00; font-weight: 600; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.results-list { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.results-list .r-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.results-list .r-item:last-child { border-bottom: 0; }
.results-list .r-item .copy-row { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; }
tr.deleted td { color: var(--muted); }

.side-brand { padding: 10px 14px; }
.side-brand img { height: auto; width: 100%; max-height: 92px; object-fit: contain; }
.office-select { min-width: 172px; }
.emp-table .actions { justify-content: flex-end; flex-wrap: nowrap; gap: 6px; }
details.more { position: relative; display: inline-block; }
details.more > summary { list-style: none; cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
details.more .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(15,23,42,.14); padding: 6px; min-width: 200px; display: grid; }
details.more .menu button { text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 8px; font-weight: 600; cursor: pointer; color: var(--navy); }
details.more .menu button:hover { background: var(--navy-50); }
details.more .menu button.danger { color: var(--red); }
details.more .menu button.danger:hover { background: var(--red-bg); }
@media (max-width: 720px) { .emp-table .actions { justify-content: flex-start; flex-wrap: wrap; } details.more .menu { left: 0; right: auto; } }

.notice.danger { background: var(--red-bg); border-color: #F0B7B1; color: var(--red); }
.checks { list-style: none; margin: 0; padding: 8px 20px 14px; display: grid; gap: 4px; }
.checks li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks .mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.checks li.ok .mark { background: var(--green-bg); color: var(--green); }
.checks li.no .mark { background: var(--red-bg); color: var(--red); }
.checks .mark .ic { width: 14px; height: 14px; }
