/* ==========================================================================
   Overtime Approval: the same "warm Dermatouch" look as HR Help Desk.
   Ivory canvas, white paper panels, Dermatouch teal for actions and focus,
   pastel chips for status. Figtree for UI, Bricolage Grotesque for headings.
   ========================================================================== */

:root {
  --canvas: #fbf8f4; --canvas-deep: #f5efe7; --paper: #ffffff; --paper-soft: #fcfaf7; --linen: #f5f0e9;
  --line: rgba(110, 80, 40, 0.11); --line-2: rgba(110, 80, 40, 0.18);
  --ink: #1e2a29; --ink-2: #4f5a58; --ink-3: #636c6a; --ink-4: #a8b0ad;
  --brand: #00b398; --brand-deep: #007d6a; --wash: #e3f6f2; --wash-line: rgba(0, 179, 152, 0.2);
  --mint: #eaf7f3; --mint-ink: #006b5b; --peach: #fde7da; --peach-ink: #9e4a24;
  --butter: #fdf2d3; --butter-ink: #8f6106; --lilac: #eeeafd; --lilac-ink: #5b4fd6;
  --rose: #fce9ec; --rose-ink: #b3243f; --mute: #5f6866; --mute-bg: #f1ede7;
  --control: #faf6f1; --control-line: #c9bba7; --control-line-hover: #a39581;
  --focus-field: 0 0 0 1px var(--brand-deep), 0 0 0 4px rgba(0, 125, 106, 0.14);
  --lift-panel: 0 0 0 1px rgba(80, 56, 28, 0.07), 0 1px 2px rgba(80, 56, 28, 0.04), 0 2px 8px -4px rgba(80, 56, 28, 0.06);
  --lift-raised: 0 0 0 1px rgba(80, 56, 28, 0.08), 0 2px 4px -1px rgba(80, 56, 28, 0.05), 0 10px 24px -12px rgba(80, 56, 28, 0.16);
  --lift-popover: 0 0 0 1px rgba(80, 56, 28, 0.09), 0 4px 10px -4px rgba(80, 56, 28, 0.08), 0 18px 36px -14px rgba(80, 56, 28, 0.22);
  --lift-accent: 0 1px 2px rgba(0, 90, 80, 0.25), 0 6px 14px -8px rgba(0, 125, 106, 0.55);
  --r-xs: 6px; --r-sm: 10px; --r-control: 12px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ui: "Figtree", "Segoe UI", system-ui, sans-serif;
  --display: "Bricolage Grotesque", "Figtree", "Segoe UI", system-ui, sans-serif;
  --bar-h: 64px;
  color-scheme: light;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font-family: var(--ui); font-size: 15px; line-height: 1.55; letter-spacing: -0.003em;
  color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
::selection { background: var(--peach); }
:focus-visible { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(251, 248, 244, 0.86); -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.topbar-inner { height: var(--bar-h); padding: 0 28px; display: flex; align-items: center; gap: 18px; max-width: 1320px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none !important; flex: none; }
.brandlogo { display: inline-block; width: 92px; height: 36px; background: currentColor;
  -webkit-mask: url("/static/brand/dermatouch.svg") left center / contain no-repeat; mask: url("/static/brand/dermatouch.svg") left center / contain no-repeat; }
.brand-divider { width: 1px; height: 24px; background: var(--line-2); }
.brand-app { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--r-pill); font-family: var(--display);
  font-weight: 600; font-size: 0.875rem; color: var(--brand-deep); background: var(--wash); box-shadow: inset 0 0 0 1px var(--wash-line);
  transition: background-color .15s var(--ease-out), box-shadow .15s var(--ease-out), transform .12s var(--ease-out); }
.brand:hover .brand-app { background: var(--paper); box-shadow: inset 0 0 0 1px var(--wash-line), var(--lift-raised); }
.brand:active .brand-app { transform: scale(0.97); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; min-width: 0; }
.nav-link { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); font-weight: 600;
  color: var(--ink-2); text-decoration: none !important; white-space: nowrap; transition: background-color .15s var(--ease-out), color .15s var(--ease-out); }
.nav-link:hover { background: var(--paper); color: var(--ink); }
.nav-link .lbl-short { display: none; }
.nav-link.is-on { background: var(--paper); color: var(--brand-deep); box-shadow: var(--lift-panel); }
.nav-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--butter); color: var(--butter-ink); }
.account { position: relative; flex: none; }
.account summary { list-style: none; }
.account summary::-webkit-details-marker { display: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; cursor: pointer;
  background: var(--peach); color: var(--peach-ink); font-weight: 700; font-size: 13px; box-shadow: var(--lift-panel); transition: box-shadow .15s; }
.avatar:hover, .account[open] .avatar { box-shadow: var(--lift-raised); }
.menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: 270px; padding: 6px; border-radius: var(--r-md);
  background: var(--paper); box-shadow: var(--lift-popover); transform-origin: 100% 0; animation: menu-in .2s var(--ease-out) both; }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head strong { display: block; }
.menu-head span { display: block; font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.menu-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink-2);
  font-weight: 600; text-decoration: none !important; transition: background-color .15s; }
.menu-item:hover { background: var(--linen); color: var(--ink); }
.menu-item.is-danger:hover { background: var(--rose); color: var(--rose-ink); }
@keyframes menu-in { from { opacity: 0; transform: scale(0.96); } }

/* ---------- layout ---------- */
.wrap { max-width: 820px; margin: 36px auto 0; padding: 0 20px; }
.wide { max-width: 1240px; }
.stack { display: grid; gap: 16px; }
.masthead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.masthead-text { display: grid; gap: 6px; min-width: 0; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--brand-deep); }
.h1 { font-family: var(--display); font-size: 1.875rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.lede { color: var(--ink-2); max-width: 62ch; }
.foot { text-align: center; color: var(--ink-3); font-size: 12px; margin: 40px 0 32px; }

/* ---------- cards / panels ---------- */
.card { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--lift-panel); }
.card-head { padding: 26px 28px 0; display: grid; gap: 4px; }
.card-head .eyebrow { text-transform: none; letter-spacing: 0; }
.card-head h1 { font-family: var(--display); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.card-head p { color: var(--ink-2); }
.card-body { padding: 20px 28px 28px; }
.sheet { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--lift-panel); padding: 24px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.sheet-title { font-family: var(--display); font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; }
.sheet-sub { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.panel { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--lift-panel); margin-bottom: 20px; }
.panel:has(> table) { overflow-x: auto; }
.panel h2 { font-family: var(--display); font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.015em; padding: 20px 22px 14px; }
.panel .pad { padding: 0 22px 20px; }
.section-title { font-family: var(--display); font-size: 1.0625rem; font-weight: 700; margin: 24px 0 4px; }
.section-title:first-child { margin-top: 0; }

/* ---------- forms ---------- */
.field { display: grid; gap: 8px; min-width: 0; align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label, .label { display: block; font-weight: 600; color: var(--ink); }
.label .opt { font-weight: 500; color: var(--ink-3); margin-left: 6px; font-size: 13px; }
.card-body > label, .card-body form > label { margin: 16px 0 8px; }
.hint { font-size: 13px; font-weight: 500; color: var(--ink-3); line-height: 1.45; }
input, select, textarea, .input { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--control-line); border-radius: var(--r-control);
  background: var(--control); color: var(--ink); font: inherit; transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out); }
textarea { min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
input:hover:not(:focus):not([readonly]), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: var(--control-line-hover); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus, .input.active { outline: none; border-color: var(--brand-deep); box-shadow: var(--focus-field); }
input[readonly] { background: var(--canvas-deep); border-style: dashed; color: var(--ink-2); cursor: default; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
/* A field with an icon on the right (date / time) or a prefix on the left (₹). */
.ctl { position: relative; display: block; min-width: 0; font-weight: 400; margin: 0; }
.ctl > svg { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; transition: color .15s; }
.ctl input { padding-right: 40px; cursor: pointer; }
.ctl:focus-within > svg { color: var(--brand-deep); }
.ctl.has-prefix > .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 600; pointer-events: none; }
.ctl.has-prefix input { padding-left: 32px; padding-right: 14px; cursor: text; }

/* Themed dropdown (select.js). The real <select> stays hidden inside for the form. */
.select { position: relative; display: block; min-width: 0; }
.select-native { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px 0 14px;
  border: 1px solid var(--control-line); border-radius: var(--r-control); background: var(--control); color: var(--ink); font: inherit;
  text-align: left; cursor: pointer; transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out), background-color .15s; }
.select-trigger:hover { border-color: var(--control-line-hover); }
.select-trigger:focus-visible, .select.is-open .select-trigger { outline: none; border-color: var(--brand-deep); box-shadow: var(--focus-field); }
.select-trigger[data-active] { background: var(--wash); border-color: var(--wash-line); color: var(--brand-deep); font-weight: 600; }
.select-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-chevron { flex: none; display: inline-grid; color: var(--ink-3); transition: transform .16s var(--ease-out); }
.select.is-open .select-chevron { transform: rotate(180deg); }
.pop { position: absolute; z-index: 110; top: calc(100% + 6px); left: 0; min-width: 100%; max-height: 300px; overflow-y: auto; margin: 0; padding: 6px;
  list-style: none; border-radius: var(--r-md); background: var(--paper); box-shadow: var(--lift-popover); outline: none;
  transform-origin: top center; animation: pop-in .16s var(--ease-out) both; }
/* Lift the panel holding an open list above the panels after it. */
.panel:has(.select.is-open), .sheet:has(.select.is-open), .filters:has(.select.is-open) { position: relative; z-index: 50; }
.pop.is-up { top: auto; bottom: calc(100% + 6px); transform-origin: bottom center; }
.pop-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--ink-2); font-weight: 500; white-space: nowrap; cursor: pointer; transition: background-color .12s, color .12s; }
.pop-item svg { color: var(--brand-deep); visibility: hidden; flex: none; }
.pop-item.is-active { background: var(--linen); color: var(--ink); }
.pop-item[aria-selected="true"] { color: var(--brand-deep); font-weight: 600; }
.pop-item[aria-selected="true"] svg { visibility: visible; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.97) translateY(-4px); } }

/* Segmented control (radio labels or links) */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--r-pill); background: var(--linen); flex-wrap: wrap; }
.seg label, .seg a { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; margin: 0; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: color .15s, background-color .15s, box-shadow .15s; }
.seg label input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.seg label:has(input:checked), .seg a.is-on { color: var(--ink); background: var(--paper); box-shadow: var(--lift-panel); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--brand-deep); outline-offset: 2px; }
.seg label:hover:not(:has(input:checked)), .seg a:hover:not(.is-on) { color: var(--ink); }
.seg.is-lg label, .seg.is-lg a { height: 40px; padding: 0 18px; font-size: 14px; }

/* Stepper (number of employees) */
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--linen); }
.stepper button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--paper); box-shadow: var(--lift-panel); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; transition: transform .12s var(--ease-out), background-color .15s; }
.stepper button:hover:not(:disabled) { background: var(--wash); color: var(--brand-deep); }
.stepper button:active:not(:disabled) { transform: scale(0.92); }
.stepper button:disabled { opacity: .4; cursor: not-allowed; }
.stepper input { width: 52px; min-height: 36px; padding: 0; border: 0; background: none; text-align: center; font-weight: 700; font-size: 16px; box-shadow: none !important; }
.stepper-label { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0 8px 0 10px; }

/* Repeating rows: the header uses the same grid as the rows, so everything lines up. */
.rows { display: grid; gap: 10px; }
.emp-grid { display: grid; grid-template-columns: 32px minmax(0, 1.4fr) minmax(0, 1fr) 36px; gap: 10px; align-items: center; }
.day-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr) 72px 36px; gap: 10px; align-items: center; }
.grid-head { font-size: 13px; font-weight: 600; color: var(--ink-3); padding-bottom: 2px; }
.grid-head .r { text-align: right; }
.idx { width: 28px; height: 28px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--linen);
  color: var(--ink-2); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hours { justify-self: end; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--wash); color: var(--brand-deep); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours:empty { background: none; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; color: var(--ink-3); cursor: pointer; display: grid; place-items: center;
  transition: background-color .15s, color .15s, transform .12s; }
.icon-btn:hover:not(:disabled) { background: var(--rose); color: var(--rose-ink); }
.icon-btn:active:not(:disabled) { transform: scale(0.92); }
.icon-btn:disabled { opacity: .25; cursor: default; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.totals { display: flex; gap: 8px; flex-wrap: wrap; }
.pill, .chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  background: var(--linen); color: var(--ink-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.is-brand { background: var(--wash); color: var(--brand-deep); }
.food-row { display: grid; grid-template-columns: auto minmax(0, 260px); gap: 16px; align-items: end; }
.submit-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 4px 4px 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  border: 0; background: var(--paper); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--lift-panel);
  white-space: nowrap; text-decoration: none !important; transition: background-color .15s var(--ease-out), box-shadow .15s var(--ease-out), transform .12s var(--ease-out); }
.btn:hover:not(:disabled) { background: var(--linen); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { color: #fff; background: var(--brand-deep); box-shadow: var(--lift-accent); }
.btn-primary:hover:not(:disabled) { background: #006a5a; }
.btn-approve { color: #fff; background: var(--brand-deep); box-shadow: var(--lift-accent); }
.btn-approve:hover:not(:disabled) { background: #006a5a; }
.btn-reject { color: var(--rose-ink); background: var(--paper); box-shadow: inset 0 0 0 1px rgba(179, 36, 63, 0.35); }
.btn-reject:hover:not(:disabled) { background: var(--rose); }
.btn-ghost { background: var(--paper); }
.btn-quiet { background: transparent; box-shadow: none; color: var(--brand-deep); }
.btn-quiet:hover:not(:disabled) { background: var(--wash); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 50px; padding: 0 28px; font-size: 16px; }
.full { width: 100%; margin-top: 20px; }
.btn-link { background: none; box-shadow: none; color: var(--brand-deep); padding: 0; height: auto; }
.spinner { width: 16px; height: 16px; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; display: none; }
.btn.loading .spinner { display: inline-block; animation: spin .8s linear infinite; }
.google-btn { width: 100%; height: 48px; }
.inline-form { display: inline; }

/* ---------- messages ---------- */
.errors, .notice, .warn { border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 16px; font-size: 14px; }
.errors { background: var(--rose); color: var(--rose-ink); font-weight: 600; }
.errors ul, .warn ul { margin: 4px 0 0; padding-left: 18px; }
.notice { background: var(--wash); color: var(--brand-deep); font-weight: 500; }
.warn { background: var(--butter); color: var(--butter-ink); }

/* ---------- details / status ---------- */
table.details { width: 100%; border-collapse: collapse; }
table.details td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.details tr:last-child td { border-bottom: 0; }
table.details td:first-child { color: var(--ink-3); font-size: 13px; font-weight: 600; width: 32%; padding-right: 12px; }
table.mini { border-collapse: collapse; width: auto; }
table.mini td { padding: 3px 12px 3px 0; border: 0; width: auto !important; color: inherit !important; font-size: 14px !important; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--mute-bg); color: var(--mute); font-size: 12px; font-weight: 600; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.b-Pending { background: var(--butter); color: var(--butter-ink); }
.b-Approved { background: var(--mint); color: var(--mint-ink); }
.b-Rejected { background: var(--rose); color: var(--rose-ink); }
.b-Expired, .b-Cancelled { background: var(--mute-bg); color: var(--mute); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-xs); background: var(--linen); color: var(--ink-2);
  font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag-past { background: var(--lilac); color: var(--lilac-ink); }
.banner { text-align: center; padding: 26px 20px; border-radius: var(--r-md); margin-top: 20px; }
.banner.Approved { background: var(--mint); color: var(--mint-ink); }
.banner.Rejected { background: var(--rose); color: var(--rose-ink); }
.banner.Expired, .banner.Cancelled, .banner.self { background: var(--mute-bg); color: var(--mute); }
.banner .big { font-family: var(--display); font-size: 1.375rem; font-weight: 700; margin: 8px 0 4px; }
.mark { width: 60px; height: 60px; display: block; margin: 0 auto; }
.mark circle { fill: none; stroke: currentColor; stroke-width: 3; opacity: .25; }
.mark path { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- dashboard ---------- */
.subnav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; }
.subnav a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--r-pill); font-weight: 600; color: var(--ink-2);
  white-space: nowrap; text-decoration: none !important; transition: background-color .15s, color .15s; }
.subnav a:hover { background: var(--linen); color: var(--ink); }
.subnav a.on { background: var(--wash); color: var(--brand-deep); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--lift-panel); padding: 18px 20px; }
.stat .n { font-family: var(--display); font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 13px; color: var(--ink-3); font-weight: 600; }
table.grid { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 10px 16px; background: var(--paper-soft);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tbody tr { transition: background-color .15s; }
table.grid tbody tr:hover td { background: var(--paper-soft); }
table.grid { min-width: 900px; }
.reason { min-width: 220px; max-width: 320px; color: var(--ink-2); }
table.grid td:nth-child(3) { min-width: 150px; }
.empty { padding: 40px; text-align: center; color: var(--ink-3); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.filters > div { min-width: 150px; display: grid; gap: 6px; }
.filters label { margin: 0; font-size: 13px; }
.mono { font-family: Consolas, monospace; font-size: 12px; color: var(--ink-3); white-space: pre-wrap; word-break: break-word; }
.ev { font-weight: 700; font-size: 13px; white-space: nowrap; }
.ev-bad { color: var(--rose-ink); } .ev-warn { color: var(--butter-ink); }
.login-card { max-width: 440px; margin-top: 64px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; font-weight: 600; margin: 22px 0 6px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- date / time picker (flatpickr), themed ---------- */
.flatpickr-calendar input, .flatpickr-calendar select { width: auto; min-height: 0; padding: 0; border: 0; border-radius: 6px; background: none; box-shadow: none; font: inherit; }
.flatpickr-calendar .flatpickr-current-month { padding-top: 6px; }
.flatpickr-calendar .flatpickr-current-month input.cur-year { width: 4.4ch; font-weight: 700; }
.flatpickr-calendar .flatpickr-time input { width: 100%; height: 100%; text-align: center; }
.flatpickr-calendar { border-radius: var(--r-md); box-shadow: var(--lift-popover) !important; border: 0; font-family: var(--ui); }
.flatpickr-calendar.arrowTop::before, .flatpickr-calendar.arrowTop::after { display: none; }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months { font-family: var(--display); font-weight: 700; }
.flatpickr-day { border-radius: 10px; font-weight: 500; }
.flatpickr-day:hover { background: var(--wash); border-color: var(--wash); }
.flatpickr-day.today { border-color: var(--brand); }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.flatpickr-day.flatpickr-disabled { color: var(--ink-4); }
.flatpickr-time input, .flatpickr-time .flatpickr-am-pm { font-family: var(--ui); font-weight: 600; min-height: 0; border: 0; background: none; box-shadow: none; }
.flatpickr-time input:hover, .flatpickr-time .flatpickr-am-pm:hover, .flatpickr-time input:focus { background: var(--wash); }
.ctl input[readonly], .flatpickr-input[readonly] { background: var(--control); border-style: solid; color: var(--ink); cursor: pointer; }
.flatpickr-input.active { border-color: var(--brand-deep); box-shadow: var(--focus-field); }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .topbar-inner { padding: 0 16px; gap: 10px; }
  .brand-divider, .nav-link .lbl-long { display: none; }
  .nav-link .lbl-short { display: inline; }
  .nav-link { padding: 0 10px; font-size: 14px; }
  .brandlogo { width: 78px; }
  .wrap { margin-top: 24px; padding: 0 16px; }
  .h1 { font-size: 1.5rem; }
  .sheet { padding: 18px 16px; }
  .card-head { padding: 20px 18px 0; } .card-body { padding: 16px 18px 22px; }
  .row, .field-row, .food-row { grid-template-columns: 1fr; }
  .emp-grid { grid-template-columns: 28px minmax(0, 1fr) 36px; row-gap: 8px; }
  .emp-grid > .emp-desig { grid-column: 2; }
  .emp-grid > .icon-btn { grid-row: 1; grid-column: 3; }
  .rows .emp-grid { padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
  .grid-head { display: none; }
  .day-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; row-gap: 8px; }
  .day-grid > .ctl-date { grid-column: 1 / 3; }
  .day-grid > .hours { grid-column: 3; grid-row: 2; justify-self: center; }
  .day-grid > .icon-btn { grid-column: 3; grid-row: 1; }
  .rows .day-grid { padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
}
@media (max-width: 480px) { .brand-app { display: none; } }

/* ---------- motion: quick and gentle, off for reduced motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
  @keyframes row-in { from { opacity: 0; transform: translateY(-4px); } }
  @keyframes pulse-dot { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: .35; transform: scale(1.5); } }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
  .masthead, .card, .sheet, .panel, .stat, .notice, .errors, .warn { animation: rise .32s var(--ease-out) both; }
  .stack > :nth-child(2) { animation-delay: .04s; } .stack > :nth-child(3) { animation-delay: .08s; }
  .stack > :nth-child(4) { animation-delay: .12s; } .stack > :nth-child(5) { animation-delay: .16s; }
  .stat:nth-child(2) { animation-delay: .04s; } .stat:nth-child(3) { animation-delay: .08s; } .stat:nth-child(4) { animation-delay: .12s; }
  .rows > .is-new, .reveal { animation: row-in .24s var(--ease-out) both; }
  .b-Pending::before { animation: pulse-dot 1.8s ease-in-out infinite; }
  table.grid tbody tr { animation: rise .3s var(--ease-out) both; }
  table.grid tbody tr:nth-child(2) { animation-delay: .03s; } table.grid tbody tr:nth-child(3) { animation-delay: .06s; }
  table.grid tbody tr:nth-child(4) { animation-delay: .09s; } table.grid tbody tr:nth-child(n+5) { animation-delay: .12s; }
  .mark { animation: pop .45s var(--spring) both; }
  .mark path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s .2s var(--ease-out) forwards; }
}
