/* Kozan Law Firm time clock. Brand: navy #000068 / #000032, gold #D4AA6B, Poppins. */
:root {
  --navy: #000068;
  --navy-dark: #000032;
  --gold: #d4aa6b;
  --gold-strong: #c39654;
  --cream: #fcf8f3;
  --bg: #f6f5f2;
  --surface: #ffffff;
  --border: #e8e8e8;
  --text: #1f2937;
  --muted: #5f6673;
  --success: #098569;
  --success-bg: #e7f6f0;
  --warn: #8a5a00;
  --warn-bg: #fdf3e0;
  --error: #cb002e;
  --error-bg: #fdebef;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --font: 'Poppins', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 600; color: var(--navy); line-height: 1.25; margin: 0; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 0.95rem; }
p { margin: 0; }
a { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 22px; height: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- App bar and navigation ---------------------------------------------------------------------- */
.appbar {
  background: linear-gradient(45deg, var(--navy-dark) 0%, var(--navy-dark) 65%, #3a2f45 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.appbar-inner { max-width: 1120px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; }
.appbar .logo { height: 34px; width: auto; display: block; }
.appbar .product { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); font-weight: 500; border-left: 1px solid rgba(255,255,255,.25); padding-left: 14px; }
.appbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
.user-chip .name { opacity: 0.9; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-ghost-light { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: var(--radius-sm); padding: 6px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.btn-ghost-light:hover { background: rgba(255,255,255,.08); }

.tabs { background: var(--navy); }
.tabs-inner { max-width: 1120px; margin: 0 auto; padding: 0 8px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs-inner::-webkit-scrollbar { display: none; }
.tab { color: rgba(255,255,255,.78); text-decoration: none; padding: 11px 12px; font-size: 0.88rem; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; border-bottom: 3px solid transparent; }
.tab:hover { color: #fff; }
.tab[aria-current='page'] { color: #fff; border-bottom-color: var(--gold); }
.tab-sep { width: 1px; background: rgba(255,255,255,.2); margin: 10px 6px; flex: none; }
.badge-count { background: var(--gold); color: var(--navy-dark); border-radius: 999px; font-size: 0.72rem; font-weight: 600; padding: 0 7px; line-height: 18px; }

main { max-width: 1120px; margin: 0 auto; padding: 20px 16px 64px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { color: var(--muted); font-size: 0.88rem; }

/* ---- Cards and layout -------------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card, .stack > * + * { margin-top: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; } }
.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---- Buttons ------------------------------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius-sm); border: 1px solid transparent; padding: 9px 16px; font-weight: 500; font-size: 0.9rem; cursor: pointer; transition: background .15s, box-shadow .15s, transform .15s; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-dark); }
.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-gold:hover:not(:disabled) { background: var(--gold-strong); }
.btn-outline { background: #fff; color: var(--navy); border-color: #cfd2dc; }
.btn-outline:hover:not(:disabled) { border-color: var(--navy); }
.btn-danger { background: #fff; color: var(--error); border-color: #efc2cc; }
.btn-danger:hover:not(:disabled) { border-color: var(--error); }
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }
.icon-btn { background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 6px; cursor: pointer; color: var(--muted); display: inline-flex; }
.icon-btn:hover { color: var(--navy); border-color: var(--border); background: #fff; }

/* ---- Clock screen --------------------------------------------------------------------------------------- */
.clock-card { text-align: center; padding: 26px 20px 22px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 500; background: #eef0f5; color: var(--muted); }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.on { background: var(--success-bg); color: var(--success); }
.timer { font-size: clamp(2.6rem, 11vw, 3.6rem); font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; margin: 10px 0 2px; }
.since { color: var(--muted); font-size: 0.88rem; min-height: 1.4em; }
.desc-field { text-align: left; margin: 18px 0 14px; }
.desc-field label { font-size: 0.85rem; font-weight: 500; color: var(--navy); display: block; margin-bottom: 6px; }
.desc-field .save-state { font-size: 0.75rem; color: var(--muted); float: right; font-weight: 400; }
.btn-punch { width: 100%; min-height: 64px; font-size: 1.15rem; font-weight: 600; border-radius: 10px; box-shadow: 0 6px 16px -6px rgba(0, 0, 50, .35); }
.btn-punch:active:not(:disabled) { transform: scale(0.99); }
.tip { display: flex; gap: 10px; text-align: left; font-size: 0.82rem; color: var(--muted); margin-top: 14px; }
.tip .icon { flex: none; }
.clock-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 0.8rem; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; color: var(--navy); font: inherit; text-decoration: underline; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }

/* ---- First-visit steps --------------------------------------------------------------------------------- */
.onb-head { gap: 10px; flex-wrap: wrap; }
.onb-head-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.onb-lang { display: inline-flex; gap: 4px; }
.onb-lang button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #cfd2dc; background: #fff; color: var(--navy); border-radius: 999px; padding: 4px 9px 4px 6px; font: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer; }
.onb-lang button:hover:not(:disabled) { border-color: var(--navy); }
.onb-lang button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.onb-lang .flag { width: 18px; height: 12px; }
.onb-step { text-align: center; padding: 6px 4px 2px; }
.onb-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--cream); border: 1px solid #f0e6d8; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.onb-icon .icon { width: 26px; height: 26px; }
.onb-step h3 { margin: 0 0 10px; color: var(--navy); font-size: 1.1rem; }
.onb-step p { margin: 0 0 10px; text-align: left; font-size: 0.9rem; line-height: 1.5; }
.onb-step ul { text-align: left; margin: 0 0 10px; padding-left: 20px; font-size: 0.9rem; line-height: 1.5; }
.onb-dots { display: flex; justify-content: center; gap: 6px; margin: 8px 0 2px; }
.onb-dots span { width: 7px; height: 7px; border-radius: 50%; background: #d9dbe3; }
.onb-dots span.on { background: var(--navy); }
.onb-perm { margin-top: 6px; }
.onb-perm-state { display: block; margin-top: 8px; font-size: 0.82rem; }
.onb-perm-state.ok { color: var(--success); }
.onb-perm-state.bad { color: var(--error); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--cream); border: 1px solid #f0e6d8; border-radius: var(--radius); padding: 12px 14px; }
.stat .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }
.stat .value { font-size: 1.35rem; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.stat .sub { font-size: 0.78rem; color: var(--muted); }
.progress { height: 6px; background: #ece6dc; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: var(--navy); border-radius: 99px; width: 0; }
.progress.near > span { background: var(--gold-strong); }
.progress.over > span { background: var(--error); }

/* ---- Alerts ----------------------------------------------------------------------------------------------- */
.alert { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius); padding: 12px 14px; font-size: 0.88rem; border: 1px solid; text-align: left; }
.alert .icon { margin-top: 2px; }
.alert-warn { background: var(--warn-bg); border-color: #f1d9a8; color: #5c3d00; }
.alert-error { background: var(--error-bg); border-color: #f3c4cf; color: #7a0a24; }
.alert-info { background: #eef1fb; border-color: #d3daf3; color: #1d2a6b; }
.alert-success { background: var(--success-bg); border-color: #bfe6d6; color: #05523f; }
.alert .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ---- Entries list ------------------------------------------------------------------------------------------ */
.day { border-top: 1px solid var(--border); padding: 12px 0; }
.day:first-child { border-top: 0; padding-top: 0; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.day-head .date { font-weight: 600; color: var(--navy); font-size: 0.92rem; }
.day-head .total { font-variant-numeric: tabular-nums; font-weight: 500; }
.day.empty .date, .day.empty .total { color: #9aa0ab; font-weight: 400; }
.entry { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; margin-top: 8px; border-radius: var(--radius-sm); background: #fafafa; border: 1px solid #f0f0f0; }
.entry.voided { opacity: 0.6; }
.entry.voided .times { text-decoration: line-through; }
.entry-main { flex: 1; min-width: 0; }
.entry .times { font-variant-numeric: tabular-nums; font-weight: 500; font-size: 0.9rem; }
.entry .dur { color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.entry .desc { font-size: 0.85rem; color: #374151; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.entry .desc.none { color: #9aa0ab; font-style: italic; }
.entry .who { font-weight: 600; font-size: 0.85rem; color: var(--navy); }
.entry-actions { display: flex; gap: 2px; flex: none; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; padding: 1px 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.tag-pending { background: var(--warn-bg); color: var(--warn); }
.tag-open { background: var(--success-bg); color: var(--success); }
.tag-removed { background: #eef0f5; color: var(--muted); }
.tag-approved { background: var(--success-bg); color: var(--success); }
.tag-manual { background: #eef1fb; color: #2a3a8f; }
.tag-location { background: #fdebef; color: #8a1631; }
.icon-xs { width: 12px; height: 12px; }
.week-nav { display: flex; align-items: center; gap: 6px; }
.week-label { font-weight: 600; color: var(--navy); min-width: 190px; text-align: center; }
.totals-row { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 0 0; border-top: 2px solid var(--navy); margin-top: 12px; font-variant-numeric: tabular-nums; }
.totals-row .k { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.totals-row .v { font-weight: 600; font-size: 1.1rem; color: var(--navy); }
.totals-row .v.ot { color: var(--error); }

/* ---- Forms -------------------------------------------------------------------------------------------------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 0.82rem; font-weight: 500; color: var(--navy); margin-bottom: 5px; }
.field small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 4px; }
input[type='text'], input[type='email'], input[type='date'], input[type='datetime-local'], select, textarea {
  width: 100%; border: 1px solid #cfd2dc; border-radius: var(--radius-sm); padding: 9px 11px; background: #fff; min-height: 42px;
}
textarea { resize: vertical; min-height: 78px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .tab:focus-visible, .icon-btn:focus-visible { outline: 3px solid rgba(212, 170, 107, 0.55); outline-offset: 1px; border-color: var(--navy); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.check { display: flex; gap: 8px; align-items: center; font-size: 0.88rem; }

/* ---- Filters and tables ------------------------------------------------------------------------------------ */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.filters .field { margin: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: 0.86rem; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; background: #fafafa; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 600; background: #fafafa; border-top: 2px solid var(--border); }
td .desc-cell { max-width: 360px; white-space: pre-wrap; overflow-wrap: anywhere; }
.grid-table td.num { color: var(--text); }
.grid-table td.zero { color: #c3c7cf; }
.sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; }
th.sticky-col { background: #fafafa; }
.blockers { color: var(--warn); font-size: 0.8rem; }
.now-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.now-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: #fff; }
.now-item .elapsed { font-size: 1.2rem; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: inherit; display: block; }
.kpi .v { font-size: 1.5rem; font-weight: 600; color: var(--navy); }
.kpi .k { font-size: 0.78rem; color: var(--muted); }
.kpi.attention { border-color: #f1d9a8; background: var(--warn-bg); }
.compare { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 0.86rem; margin: 8px 0; font-variant-numeric: tabular-nums; }
.compare .k { color: var(--muted); }
.compare .was { text-decoration: line-through; color: var(--muted); }
.empty-state { text-align: center; color: var(--muted); padding: 28px 10px; font-size: 0.9rem; }

/* ---- Modal, toast -------------------------------------------------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 32, 0.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; padding: 0; }
@media (min-width: 640px) { .modal-backdrop { align-items: center; padding: 16px; } }
.modal { background: #fff; width: 100%; max-width: 520px; border-radius: 14px 14px 0 0; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
@media (min-width: 640px) { .modal { border-radius: 12px; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 6px; }
.modal-body { padding: 8px 18px 4px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 10px 18px 18px; flex-wrap: wrap; }
.modal .error-box { margin-bottom: 12px; }
.history-item { border-left: 3px solid var(--gold); padding: 4px 0 8px 12px; margin-bottom: 8px; font-size: 0.84rem; }
.history-item .when { color: var(--muted); font-size: 0.76rem; }
.toast-root { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--navy-dark); color: #fff; padding: 11px 14px; border-radius: var(--radius); font-size: 0.88rem; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; }
.toast.error { background: #7a0a24; }

/* ---- Login --------------------------------------------------------------------------------------------------- */
.login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: linear-gradient(45deg, #000032 0%, #000032 65%, #d4aa6b 120%); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 12px; padding: 30px 26px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); text-align: center; }
.login-logo { height: 54px; margin: 0 auto 6px; display: block; }
.login-card h1 { margin-top: 14px; font-size: 1.3rem; }
.login-card p { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
.btn-google { width: 100%; margin-top: 22px; min-height: 48px; background: #fff; border: 1px solid #cfd2dc; color: #1f1f1f; font-weight: 500; }
.btn-google:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.btn-google svg { width: 20px; height: 20px; }
.login-foot { margin-top: 22px; font-size: 0.75rem; color: #8a909b; }
.dev-box { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--border); text-align: left; }

/* ---- Spacing utilities (no inline styles: the CSP forbids them) ---------------------------------------------- */
.mb-6 { margin-bottom: 6px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mt-4 { margin-top: 4px; }
.mt-12 { margin-top: 12px; }
.ot-text { color: var(--error); }

/* ---- Small screens and hidden elements ------------------------------------------------------------------------ */
[hidden] { display: none !important; }
.btn-ghost-light { white-space: nowrap; }
.appbar-inner { min-width: 0; }
@media (max-width: 560px) {
  .appbar .product, .user-chip .name { display: none; }
  .appbar .logo { height: 30px; }
}
td.nowrap, th.nowrap { white-space: nowrap; }
details.entries > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details.entries > summary::-webkit-details-marker { display: none; }
details.entries > summary .chev { transition: transform .15s; color: var(--muted); }
details.entries[open] > summary .chev { transform: rotate(90deg); }

/* ---- Language menu -------------------------------------------------------------------------------------------- */
.flag { display: inline-flex; width: 22px; height: 15px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.18); flex: none; }
.flag svg { width: 100%; height: 100%; display: block; }
.icon-sm { width: 14px; height: 14px; }
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: var(--radius-sm); padding: 6px 8px; cursor: pointer; font-size: 0.8rem; font-weight: 500; }
.lang-btn:hover { background: rgba(255,255,255,.08); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,.18); list-style: none; margin: 0; padding: 6px; min-width: 170px; z-index: 40; }
.lang-menu li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 0.88rem; }
.lang-menu li:hover, .lang-menu li:focus { background: var(--cream); outline: none; }
.lang-menu li[aria-selected='true'] { font-weight: 600; color: var(--navy); }
.lang-menu li .icon { margin-left: auto; color: var(--navy); }
.lang-login { position: fixed; top: 16px; right: 16px; z-index: 30; }
.lang-options { display: grid; gap: 8px; }
.lang-option { display: flex; align-items: center; gap: 12px; border: 1px solid #cfd2dc; border-radius: var(--radius); padding: 12px 14px; cursor: pointer; background: #fff; }
.lang-option:hover { border-color: var(--navy); }
.lang-option.selected { border-color: var(--navy); background: #f4f5fb; box-shadow: inset 0 0 0 1px var(--navy); }
.lang-option input { position: absolute; opacity: 0; pointer-events: none; }
.lang-option:focus-within { outline: 3px solid rgba(212, 170, 107, 0.55); outline-offset: 1px; }
.lang-option .lang-name { font-weight: 500; }
.lang-option .icon { margin-left: auto; color: var(--navy); }
.lang-option .flag { width: 28px; height: 19px; }
dl.compare { margin: 0; }
dl.compare dd { margin: 0; }
.modal-wide { max-width: 680px; }
@media (max-width: 560px) {
  .user-chip { gap: 6px; }
  .lang-btn .lang-code { display: none; }
}

/* Long status tags wrap inside the entry instead of widening the page. */
.entry .tag { white-space: normal; max-width: 100%; }
.grid-2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .grid-2 { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); } }

/* ---- Phones and the iPhone home-screen app ---------------------------------------------------------------------
   Installed from Safari ("Add to Home Screen"), the app draws under the status bar and the home indicator:
   the navy header fills the status bar area and nothing sits under the notch or the home indicator. */
.appbar { padding-top: env(safe-area-inset-top); }
.appbar-inner { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.tabs-inner { padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.toast-root { bottom: calc(20px + env(safe-area-inset-bottom)); }
.login-body { padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.lang-login { top: calc(16px + env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); }
@media (max-width: 639px) { .modal-foot { padding-bottom: calc(18px + env(safe-area-inset-bottom)); } }
/* iPhone zooms into any field with text smaller than 16px; touch screens get 16px fields. */
@media (pointer: coarse) {
  input[type='text'], input[type='email'], input[type='date'], input[type='datetime-local'], select, textarea { font-size: 16px; }
}
button, a, .tab { touch-action: manipulation; }
/* Narrow phones: Settings shows only its icon so the employee tabs fit without scrolling. */
@media (max-width: 560px) {
  .tab { padding: 11px 10px; }
  .tab-compact .tab-label { display: none; }
}

