/*
File: app.css
Project: CFN Time & Attendance (V7.8)

Follows Apple's Human Interface Guidelines for the web: system font, system
colors with automatic light/dark, grouped backgrounds, inset grouped lists,
segmented controls, sheets, 44pt minimum touch targets, reduced motion.
The app accent ("tint") is CFN gold.
*/

/* ================= TOKENS ================= */

:root {
  color-scheme: light;

  --tint: #E39013;
  --tint-text: #9E5B00;              /* gold dark enough for text on light backgrounds */
  --tint-soft: rgba(227, 144, 19, .14);
  --on-tint: #1a1206;

  --bg: #f2f2f7;                     /* systemGroupedBackground */
  --bg-card: #ffffff;                /* secondarySystemGroupedBackground */
  --bg-sheet: #f2f2f7;
  --bg-raised: #ffffff;
  --bg-sheet-card: #ffffff;
  --bg-sidebar: rgba(236, 236, 241, .78);
  --bg-bar: rgba(249, 249, 251, .82);

  --label: #1d1d1f;
  --label-2: rgba(60, 60, 67, .62);
  --label-3: rgba(60, 60, 67, .34);
  --fill: rgba(118, 118, 128, .12);
  --fill-strong: rgba(118, 118, 128, .2);
  --separator: rgba(60, 60, 67, .16);
  --segment-on: #ffffff;

  --green: #248A3D;  --green-fill: #34C759;
  --red: #D70015;    --red-fill: #FF3B30;
  --orange: #C93400; --orange-fill: #FF9500;
  --blue: #0066CC;   --blue-fill: #007AFF;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 1px rgba(0, 0, 0, .02);
  --shadow-float: 0 10px 40px rgba(0, 0, 0, .14), 0 2px 8px rgba(0, 0, 0, .06);
  --logo-filter: invert(1);

  /* Apple's San Francisco where installed (Apple devices); Inter, its closest
     open-source match, everywhere else (loaded in index.html). */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --sidebar-w: 248px;
  /* Motion (emil-design-eng): strong ease-out for UI, ease-in-out for on-screen
     movement, the iOS drawer curve for sheets and the sidebar. Never ease-in. */
  --ease: cubic-bezier(.23, 1, .32, 1);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --dur-press: 160ms;
  --dur-small: 180ms;
  --dur-sheet-in: 300ms;
  --dur-sheet-out: 200ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --tint-text: #F5B74A;
    --tint-soft: rgba(227, 144, 19, .22);
    --bg: #000000;
    --bg-card: #1c1c1e;
    --bg-sheet: #1c1c1e;
    --bg-raised: #2c2c2e;
    --bg-sheet-card: #2c2c2e;
    --bg-sidebar: rgba(30, 30, 32, .78);
    --bg-bar: rgba(22, 22, 24, .82);
    --label: #f5f5f7;
    --label-2: rgba(235, 235, 245, .62);
    --label-3: rgba(235, 235, 245, .3);
    --fill: rgba(118, 118, 128, .24);
    --fill-strong: rgba(118, 118, 128, .36);
    --separator: rgba(84, 84, 88, .55);
    --segment-on: #636366;
    --green: #30D158;  --green-fill: #30D158;
    --red: #FF6961;    --red-fill: #FF453A;
    --orange: #FFB340; --orange-fill: #FF9F0A;
    --blue: #409CFF;   --blue-fill: #0A84FF;
    --shadow-card: none;
    --shadow-float: 0 12px 48px rgba(0, 0, 0, .6);
    --logo-filter: none;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --tint-text: #F5B74A;
  --tint-soft: rgba(227, 144, 19, .22);
  --bg: #000000;
  --bg-card: #1c1c1e;
  --bg-sheet: #1c1c1e;
  --bg-raised: #2c2c2e;
  --bg-sheet-card: #2c2c2e;
  --bg-sidebar: rgba(30, 30, 32, .78);
  --bg-bar: rgba(22, 22, 24, .82);
  --label: #f5f5f7;
  --label-2: rgba(235, 235, 245, .62);
  --label-3: rgba(235, 235, 245, .3);
  --fill: rgba(118, 118, 128, .24);
  --fill-strong: rgba(118, 118, 128, .36);
  --separator: rgba(84, 84, 88, .55);
  --segment-on: #636366;
  --green: #30D158;  --green-fill: #30D158;
  --red: #FF6961;    --red-fill: #FF453A;
  --orange: #FFB340; --orange-fill: #FF9F0A;
  --blue: #409CFF;   --blue-fill: #0A84FF;
  --shadow-card: none;
  --shadow-float: 0 12px 48px rgba(0, 0, 0, .6);
  --logo-filter: none;
}

/* ================= BASE ================= */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 15px/1.4 var(--font);
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  font-feature-settings: "cv05", "cv08";   /* Inter: SF-like lowercase l and r */
}

h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--tint) 55%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.icon { width: 1.15em; height: 1.15em; flex: none; display: block; }
[data-icon] { display: inline-flex; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }

.brand-logo { filter: var(--logo-filter); object-fit: contain; }

/* ================= BUTTONS ================= */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 16px;
  border: 0; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  white-space: nowrap;
  transition: background-color .15s, transform .12s var(--ease), opacity .15s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; }
.btn .icon { width: 17px; height: 17px; }

.btn-primary { background: var(--tint); color: var(--on-tint); }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--tint) 88%, #000); } }

.btn-secondary { background: var(--fill); color: var(--tint-text); }
@media (hover: hover) and (pointer: fine) { .btn-secondary:hover:not(:disabled) { background: var(--fill-strong); } }

.btn-tint-red { color: var(--red); }
.btn-destructive { background: var(--red-fill); color: #fff; }

.btn-large { min-height: 50px; padding: 0 24px; font-size: 17px; border-radius: var(--r-md); }
.btn-block { width: 100%; }

.btn-text {
  background: none; border: 0; padding: 8px 4px; min-height: 44px;
  color: var(--tint-text); font-size: 17px;
}
.btn-text-strong { font-weight: 600; }
.btn-text:disabled { color: var(--label-3); cursor: default; }

.btn-link {
  background: none; border: 0; padding: 0; min-height: 28px;
  color: var(--tint-text); font-size: 15px;
}
.btn-link-red { color: var(--red); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: transparent; color: var(--label-2);
  transition: background-color .15s, color .15s;
}
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--fill); color: var(--label); } }
.icon-btn .icon { width: 18px; height: 18px; }

/* ================= SCREENS ================= */

.screen { min-height: 100vh; min-height: 100dvh; }
.screen-center { display: grid; place-items: center; padding: 32px 16px; }

.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--fill-strong); border-top-color: var(--label-2);
  animation: spin .8s linear infinite;
}
.spinner-small { width: 26px; height: 26px; border-width: 3px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sign in ---------- */

.signin {
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  animation: rise .5s var(--ease) both;
}
.signin-logo { width: 104px; height: 94px; margin-bottom: 28px; }
.signin-title { font: 700 34px/1.1 var(--font-display); letter-spacing: -.025em; }
.signin-sub { margin: 10px 0 32px; color: var(--label-2); font-size: 17px; max-width: 320px; }
.signin-form { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.ms-logo { width: 18px; height: 18px; }
#msSignInBtn { background: var(--label); color: var(--bg-card); }
.form-error { margin-top: 16px; color: var(--red); font-size: 15px; }
.footnote { color: var(--label-2); font-size: 13px; text-align: center; margin-top: 4px; }

/* ---------- Empty states ---------- */

.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  max-width: 440px; margin: 0 auto; gap: 10px;
}
.empty-page { min-height: calc(100dvh - 120px); justify-content: center; }
.empty-glyph {
  width: 76px; height: 76px; border-radius: 22px; margin-bottom: 8px;
  display: grid !important; place-items: center;
  background: var(--tint-soft); color: var(--tint-text);
}
.empty-glyph .icon { width: 38px; height: 38px; }
.empty-title { font: 700 26px/1.2 var(--font-display); letter-spacing: -.02em; }
.empty-text { color: var(--label-2); font-size: 17px; margin-bottom: 14px; }

/* ================= SHELL ================= */

.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); height: 100vh; height: 100dvh; }

.sidebar {
  display: flex; flex-direction: column;
  padding: 18px 12px 14px;
  background: var(--bg-sidebar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--separator);
  overflow-y: auto;
}

.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.sidebar-logo { width: 38px; height: 34px; }
.sidebar-app { font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.sidebar-org { font-size: 12px; color: var(--label-2); }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  min-height: 36px; padding: 0 10px;
  border: 0; border-radius: var(--r-sm);
  background: transparent; text-align: left; font-size: 15px;
  transition: background-color .12s;
}
.nav-item .icon { width: 19px; height: 19px; color: var(--tint-text); }
@media (hover: hover) and (pointer: fine) { .nav-item:hover { background: var(--fill); } }
.nav-item.is-active { background: var(--tint-soft); font-weight: 600; }
.nav-live { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--green-fill); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green-fill) 25%, transparent); }

.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }

.sync { display: flex; align-items: center; gap: 7px; padding: 0 10px; font-size: 12px; color: var(--label-2); }
.sync .icon { width: 16px; height: 16px; }
.sync-pending { color: var(--orange); }
.sync-error { color: var(--red); }

.account {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--r-md); background: var(--fill);
}
.account-text { flex: 1; min-width: 0; }
.account-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-role { font-size: 12px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.content { overflow-y: auto; padding: 28px 36px 48px; scroll-padding-top: 20px; }
.view { max-width: 1240px; margin: 0 auto; }

/* ================= AVATARS ================= */

.avatar {
  --hue: 30;
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, hsl(var(--hue) 45% 62%), hsl(var(--hue) 42% 50%));
  color: #fff; font-weight: 600; font-size: 14px; letter-spacing: .02em;
}
#accountAvatar { background: linear-gradient(180deg, #a1a1a6, #7c7c80); }
.avatar-xl { width: 76px; height: 76px; font-size: 28px; }
.avatar-xl .icon { width: 36px; height: 36px; }

/* ================= PAGE HEADER ================= */

.page-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-titles { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--green); margin-bottom: 4px;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-fill); animation: pulse 2s ease-in-out infinite; }
.large-title { font: 700 34px/1.12 var(--font-display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.page-sub { margin-top: 6px; color: var(--label-2); font-size: 15px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; }

.section-title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.count {
  font-size: 13px; font-weight: 600; color: var(--label-2);
  background: var(--fill); border-radius: 999px; padding: 2px 9px; font-variant-numeric: tabular-nums;
}

/* ================= CARDS ================= */

.card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.session-grid {
  display: grid; gap: 16px;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  grid-template-areas: "hero stats" "hero manual";
  margin-bottom: 32px;
}

/* ---------- Hero: latest scan result ---------- */

.hero {
  grid-area: hero;
  --state: var(--label-3);
  --state-text: var(--label-2);
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 24px 26px 28px;
  position: relative; overflow: hidden;
  min-height: 236px;
  transition: background-color .3s;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--state) 16%, transparent), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.hero[data-state="success"]  { --state: var(--green-fill);  --state-text: var(--green); }
.hero[data-state="warning"]  { --state: var(--orange-fill); --state-text: var(--orange); }
.hero[data-state="error"]    { --state: var(--red-fill);    --state-text: var(--red); }
.hero[data-state="looking"]  { --state: var(--blue-fill);   --state-text: var(--blue); }
.hero[data-state="ready"]    { --state: var(--green-fill);  --state-text: var(--green); }
.hero:not([data-state="ready"])::before { opacity: 1; }

.hero-status {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 5px 12px 5px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--state) 14%, transparent);
  color: var(--state-text); font-size: 13px; font-weight: 600;
}
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--state); }
.hero[data-state="ready"] .hero-dot { animation: pulse 2s ease-in-out infinite; }

.hero-body { position: relative; display: flex; align-items: center; gap: 20px; }
.hero .avatar-xl { background: color-mix(in srgb, var(--state) 85%, #000 0%); }
.hero[data-state="ready"] .avatar-xl { background: var(--fill); color: var(--label-2); }
.hero .avatar-xl.avatar-person { background: linear-gradient(180deg, hsl(var(--hue) 45% 62%), hsl(var(--hue) 42% 50%)); }
.hero-text { min-width: 0; }
.hero-name { font: 700 30px/1.15 var(--font-display); letter-spacing: -.025em; overflow-wrap: anywhere; }
.hero-detail { margin-top: 6px; color: var(--label-2); font-size: 15px; font-variant-numeric: tabular-nums; }

.hero.is-updated .hero-body { animation: pop .3s var(--ease-out) both; }

/* ---------- Stats ---------- */

.stats { grid-area: stats; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  background: var(--bg-card); border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 2px;
}
.stat-value { font: 600 30px/1.1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-label { font-size: 13px; color: var(--label-2); font-weight: 500; }
.stat-accent .stat-value { color: var(--tint-text); }

/* ---------- Manual entry ---------- */

.manual { grid-area: manual; display: flex; flex-direction: column; gap: 12px; padding: 18px; }

.segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 2px; border-radius: 9px; background: var(--fill);
}
.segmented button {
  min-height: 32px; border: 0; border-radius: 7px; background: transparent;
  font-size: 13px; font-weight: 500; padding: 0 12px;
  transition: background-color .2s var(--ease), box-shadow .2s;
}
.segmented button[aria-checked="true"] {
  background: var(--segment-on); font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04);
}
.segmented-compact { min-width: 260px; }

.search-row { display: flex; gap: 8px; }
.search-field {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 12px; border-radius: 10px;
  background: var(--fill); color: var(--label-2);
}
.search-field .icon { width: 17px; height: 17px; }
.search-field input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: 16px; color: var(--label); padding: 8px 0;
}
.search-field input::placeholder { color: var(--label-2); }
.search-field:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tint) 45%, transparent); }
.search-small { flex: 0 1 240px; min-height: 36px; }
.search-small input { font-size: 15px; padding: 6px 0; }
input[type="search"]::-webkit-search-cancel-button { filter: grayscale(1); }

/* ================= LISTS (inset grouped) ================= */

.list-section { margin-bottom: 24px; }
.list-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }

.grouped-list {
  list-style: none; margin: 0; padding: 0;
  background: var(--bg-card); border-radius: var(--r-md); box-shadow: var(--shadow-card);
  overflow: hidden;
}
.grouped-list:empty { display: none; }
.grouped-list > li { position: relative; }
.grouped-list > li + li::before {
  content: ""; position: absolute; top: 0; right: 0; left: 64px;
  border-top: 1px solid var(--separator);
}

.list-row {
  display: flex; align-items: center; gap: 14px;
  min-height: 60px; padding: 10px 16px;
  width: 100%;
}
.list-button { border: 0; background: transparent; text-align: left; transition: background-color .12s; }
@media (hover: hover) and (pointer: fine) { .list-button:hover { background: var(--fill); } }
.list-button:active { background: var(--fill-strong); }

.list-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-title { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: 13px; color: var(--label-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-trailing { display: flex; align-items: center; gap: 10px; flex: none; }
.list-time { font-size: 14px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.list-count { font: 600 20px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.list-count-label { font-size: 12px; color: var(--label-2); }
.list-empty { padding: 28px; text-align: center; color: var(--label-2); background: var(--bg-card); border-radius: var(--r-md); }
.chev { color: var(--label-3); display: inline-flex; }
.chev .icon { width: 16px; height: 16px; }
.row-index { width: 28px; color: var(--label-3); font-variant-numeric: tabular-nums; text-align: right; flex: none; }

.row-remove { opacity: 0; margin-right: -6px; }
@media (hover: hover) and (pointer: fine) { .list-row:hover .row-remove, .row-remove:focus-visible { opacity: 1; } }
@media (hover: hover) and (pointer: fine) { .row-remove:hover { color: var(--red); background: color-mix(in srgb, var(--red-fill) 12%, transparent); } }
@media (hover: none) { .row-remove { opacity: 1; } }

#attendeeList > li { animation: slide-in .26s var(--ease-out) both; }
#attendeeList > li:nth-child(n + 2) { animation: none; }

.pill {
  font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap;
}
.pill-gray { background: var(--fill); color: var(--label-2); }
.pill-blue { background: color-mix(in srgb, var(--blue-fill) 14%, transparent); color: var(--blue); }
.pill-orange { background: color-mix(in srgb, var(--orange-fill) 16%, transparent); color: var(--orange); }

.date-tile {
  width: 44px; height: 46px; flex: none; border-radius: 10px;
  background: var(--bg-raised); box-shadow: inset 0 0 0 1px var(--separator);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.date-month { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--red); letter-spacing: .04em; }
.date-day { font: 600 20px/1.05 var(--font-display); margin-top: 2px; }

.file-tile {
  width: 36px; height: 36px; border-radius: 9px; flex: none;
  display: grid !important; place-items: center; color: #fff;
}
.file-tile .icon { width: 20px; height: 20px; }
.tile-green { background: linear-gradient(180deg, #34C759, #248A3D); }
.tile-blue  { background: linear-gradient(180deg, #4BA3FF, #0066CC); }
.tile-red   { background: linear-gradient(180deg, #FF6961, #D70015); }

/* ================= SETTINGS ================= */

.settings { max-width: 680px; }
.group-title {
  font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em;
  color: var(--label-2); margin: 28px 16px 8px;
}
.group-title:first-child { margin-top: 0; }

.grouped { background: var(--bg-card); border-radius: var(--r-md); box-shadow: var(--shadow-card); overflow: hidden; }
.grouped > .row, .grouped > .form-row { position: relative; }
.grouped > * + *::before {
  content: ""; position: absolute; top: 0; right: 0; left: 16px;
  border-top: 1px solid var(--separator);
}

.row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 48px; padding: 10px 16px;
}
.row-label { display: flex; flex-direction: column; font-size: 16px; }
.row-sub { font-size: 13px; color: var(--label-2); margin-top: 1px; }
.row-value { color: var(--label-2); font-size: 16px; text-align: right; overflow-wrap: anywhere; }

.switch {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 51px; height: 31px; border-radius: 999px; margin: 0;
  background: var(--fill-strong); position: relative; cursor: pointer;
  transition: background-color .25s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .1);
  transition: transform .25s var(--ease);
}
.switch:checked { background: var(--green-fill); }
.switch:checked::after { transform: translateX(20px); }

/* ---------- Form rows (sign-in + new session) ---------- */

.form-row {
  display: flex; align-items: center; gap: 12px;
  min-height: 50px; padding: 0 16px;
}
.form-label { width: 104px; flex: none; font-size: 16px; text-align: left; }
.form-row input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-size: 16px; padding: 13px 0; color: var(--label);
}
.form-row input::placeholder { color: var(--label-3); }
.form-row input[type="date"], .form-row input[type="time"] { color: var(--tint-text); }
.form-row:focus-within .form-label { color: var(--tint-text); }
.signin .grouped { text-align: left; }

/* ================= SHEETS ================= */

dialog.sheet {
  border: 0; padding: 0;
  width: min(560px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  border-radius: 14px;
  background: var(--bg-sheet);
  color: var(--label);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
dialog.sheet {
  opacity: 0; transform: translateY(10px) scale(.97);
  transition: opacity var(--dur-sheet-out) var(--ease-out), transform var(--dur-sheet-out) var(--ease-out),
              overlay var(--dur-sheet-out) allow-discrete, display var(--dur-sheet-out) allow-discrete;
}
dialog.sheet[open] { display: flex; flex-direction: column; opacity: 1; transform: none; transition-duration: var(--dur-sheet-in); }
@starting-style { dialog.sheet[open] { opacity: 0; transform: translateY(10px) scale(.97); } }
dialog.sheet::backdrop {
  background: rgba(0, 0, 0, 0);
  transition: background-color var(--dur-sheet-out) var(--ease-out),
              overlay var(--dur-sheet-out) allow-discrete, display var(--dur-sheet-out) allow-discrete;
}
dialog.sheet[open]::backdrop { background: rgba(0, 0, 0, .32); transition-duration: var(--dur-sheet-in); }
@starting-style { dialog.sheet[open]::backdrop { background: rgba(0, 0, 0, 0); } }
.sheet-wide { width: min(680px, calc(100vw - 32px)); }
dialog.sheet .grouped, dialog.sheet .grouped-list { background: var(--bg-sheet-card); box-shadow: none; }

.sheet > form { display: flex; flex-direction: column; min-height: 0; }

.sheet-header {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 4px 12px; min-height: 54px;
  border-bottom: 1px solid var(--separator);
  background: var(--bg-bar);
}
.sheet-header > :first-child { justify-self: start; }
.sheet-header > :last-child { justify-self: end; }
.sheet-title { font-size: 17px; font-weight: 600; text-align: center; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-spacer { width: 1px; }

.sheet-body { padding: 18px 16px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.sheet-sub { color: var(--label-2); font-size: 14px; padding: 0 4px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.detail-actions:empty { display: none; }
#matchList .avatar, #detailList .row-index { margin-left: 0; }

/* ---------- Alert ---------- */

dialog.sheet-alert {
  width: min(320px, calc(100vw - 48px));
  border-radius: 16px; background: var(--bg-raised);
  text-align: center;
}
dialog.sheet-alert { transform: scale(.96); }
dialog.sheet-alert[open] { transform: none; }
@starting-style { dialog.sheet-alert[open] { opacity: 0; transform: scale(.96); } }
.alert-body { padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 6px; }
.alert-title { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.alert-message { font-size: 14px; color: var(--label-2); }
.alert-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding: 0 16px 16px; }
.alert-actions.is-stacked { grid-auto-flow: row; }
.alert-actions .btn { min-height: 44px; }
.alert-actions .btn-secondary { color: var(--label); }

/* ================= BANNER ================= */

.banner {
  position: fixed; z-index: 100; top: 16px; left: 50%;
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 10px 18px 10px 12px; border-radius: 999px;
  background: var(--bg-bar);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-float), inset 0 0 0 1px var(--separator);
  font-size: 15px; font-weight: 500;
  transform: translate(-50%, -140%); opacity: 0; pointer-events: none;
  transition: transform .45s var(--ease), opacity .3s;
}
.banner.is-visible { transform: translate(-50%, 0); opacity: 1; }
.banner-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; background: var(--label-3); }
.banner-icon .icon { width: 15px; height: 15px; stroke-width: 2.4; }
.banner-success .banner-icon { background: var(--green-fill); }
.banner-warning .banner-icon { background: var(--orange-fill); }
.banner-error .banner-icon { background: var(--red-fill); }
.banner-info .banner-icon { background: var(--blue-fill); }

/* ================= TAB BAR (compact widths) ================= */

.tabbar { display: none; }

/* ================= TIME CLOCK (V7.1) ================= */

/* ---------- Sidebar sections ---------- */

.nav-heading {
  padding: 16px 10px 6px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--label-2);
}
.nav-heading:first-child { padding-top: 0; }
.nav-spacer { height: 14px; }

/* ---------- Preview notice ---------- */

.preview-strip {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 20px; padding: 11px 14px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--orange-fill) 13%, transparent);
  color: var(--label); font-size: 14px;
}
.preview-strip .icon { color: var(--orange); width: 18px; height: 18px; margin-top: 1px; }
.preview-strip strong { color: var(--orange); }

/* ---------- Shared bits ---------- */

.btn-small { min-height: 32px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn-small .icon { width: 15px; height: 15px; }

.period-nav { display: flex; align-items: center; gap: 4px; }
.period-label { min-width: 170px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.stats-4, .stats-5 { grid-area: auto; margin-bottom: 16px; }
.stats.stats-4 { grid-template-columns: repeat(4, 1fr); }
.stats.stats-5 { grid-template-columns: repeat(5, 1fr); margin-bottom: 24px; }
.stat-alert .stat-value { color: var(--red); }

.status-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; min-height: 22px; }

.pill-red   { background: color-mix(in srgb, var(--red-fill) 14%, transparent); color: var(--red); }
.pill-green { background: color-mix(in srgb, var(--green-fill) 16%, transparent); color: var(--green); }
.pill-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }

.list-hours { font: 600 17px/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-trailing-stack { flex-direction: column; align-items: flex-end; gap: 6px; }
.list-title .live-dot { display: inline-block; vertical-align: middle; margin-left: 6px; }
.mono-nums { font-variant-numeric: tabular-nums; }

.day-row { min-height: 64px; }
.day-row.is-empty .list-title, .day-row.is-empty .list-hours { color: var(--label-2); }
.day-row.is-empty .date-tile { opacity: .55; }
.date-tile.is-today { box-shadow: inset 0 0 0 2px var(--tint); }

.footnote-left { text-align: left; margin: 12px 4px 0; }
.group-foot { margin: 8px 16px 0; }
.form-error-left { margin: 0 4px; text-align: left; }

#teamList .list-row, #kioskRecent .list-row { min-height: 64px; }

/* ---------- Kiosk ---------- */

.view-kiosk { max-width: 760px; }
.kiosk { display: flex; flex-direction: column; align-items: center; gap: 24px; padding-top: 8px; }

.kiosk-clock { text-align: center; }
.kiosk-time {
  font: 700 clamp(56px, 9vw, 96px)/1 var(--font-display);
  letter-spacing: -.04em; font-variant-numeric: tabular-nums;
}
.kiosk-date { margin-top: 8px; font-size: 20px; color: var(--label-2); }

.kiosk-card {
  --state: var(--tint);
  --state-text: var(--tint-text);
  width: 100%;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 40px 28px 34px;
  border-radius: var(--r-xl);
  background: var(--bg-card);
  box-shadow: var(--shadow-card), inset 0 0 0 2px color-mix(in srgb, var(--state) 0%, transparent);
  position: relative; overflow: hidden;
  transition: box-shadow .3s;
}
.kiosk-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(90% 80% at 50% 0%, color-mix(in srgb, var(--state) 18%, transparent), transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.kiosk-card:not([data-state="ready"])::before { opacity: 1; }
.kiosk-card[data-state="in"]      { --state: var(--green-fill);  --state-text: var(--green); }
.kiosk-card[data-state="out"]     { --state: var(--blue-fill);   --state-text: var(--blue); }
.kiosk-card[data-state="warning"] { --state: var(--orange-fill); --state-text: var(--orange); }
.kiosk-card[data-state="error"]   { --state: var(--red-fill);    --state-text: var(--red); }
.kiosk-card[data-state="looking"] { --state: var(--label-3);     --state-text: var(--label-2); }

.kiosk-glyph {
  position: relative;
  width: 104px; height: 104px; border-radius: 50%; margin-bottom: 12px;
  display: grid; place-items: center;
  background: var(--state); color: #fff;
}
.kiosk-card[data-state="ready"] .kiosk-glyph { background: var(--tint-soft); color: var(--tint-text); }
.kiosk-card[data-state="ready"] .kiosk-glyph::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid var(--tint); opacity: .5;
  animation: ring 2.4s var(--ease) infinite;
}
.kiosk-glyph .icon { width: 50px; height: 50px; stroke-width: 1.9; }
.spinner-large { width: 44px; height: 44px; border-width: 4px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }

.kiosk-title { position: relative; font: 700 40px/1.1 var(--font-display); letter-spacing: -.03em; color: var(--state-text); }
.kiosk-card[data-state="ready"] .kiosk-title { color: var(--label); }
.kiosk-detail { position: relative; font-size: 22px; color: var(--label); }
.kiosk-card[data-state="ready"] .kiosk-detail { color: var(--label-2); }
.kiosk-meta { position: relative; font-size: 17px; color: var(--label-2); font-variant-numeric: tabular-nums; min-height: 1.4em; }
.kiosk-card.is-updated .kiosk-glyph { animation: pop .32s var(--ease-out) both; }

.kiosk-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.kiosk-recent { width: 100%; }
.kiosk-recent .group-title { margin-top: 0; }

@keyframes ring { 0% { transform: scale(.92); opacity: .6; } 100% { transform: scale(1.18); opacity: 0; } }

/* Full-screen kiosk: just the clock */
body.is-kiosk .sidebar, body.is-kiosk .tabbar { display: none; }
body.is-kiosk .shell { grid-template-columns: minmax(0, 1fr); }
body.is-kiosk .content { padding-top: 6vh; }
body.is-kiosk #forgotBadgeBtn { min-height: 50px; font-size: 17px; }

/* ---------- Timesheet sheet ---------- */

.ts-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ts-stats > div { background: var(--bg-sheet-card); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.ts-stat-value { font: 600 20px/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.ts-stat-label { font-size: 12px; color: var(--label-2); }

.approval {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px 10px 14px; border-radius: 10px;
  background: var(--bg-sheet-card); font-size: 14px;
}
.approval > span { flex: 1; min-width: 160px; }
.approval .icon { width: 18px; height: 18px; color: var(--orange); }
.approval-done { background: color-mix(in srgb, var(--green-fill) 12%, var(--bg-sheet-card)); }
.approval-done .icon { color: var(--green); }

.ts-toolbar { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.section-title-small { font-size: 17px; }
#tsCorrectionsWrap .section-title-small { margin: 6px 0 10px; }

.ts-day + .ts-day { margin-top: 14px; }
.ts-day-head { display: flex; align-items: center; gap: 10px; padding: 0 4px 8px; }
.ts-day-title { font-weight: 600; font-size: 15px; }
.ts-day-head .pill-row { margin: 0; flex: 1; }
.ts-day-total { font-weight: 600; font-variant-numeric: tabular-nums; margin-left: auto; }

.punch-row { min-height: 52px; }
.pill-dir { width: 44px; text-align: center; }
.punch-row.is-voided .list-title { text-decoration: line-through; color: var(--label-2); }
.punch-row.is-voided .pill-dir { opacity: .45; }

.segmented-inline { flex: 1; margin: 8px 0; }
#punchRemove { align-self: flex-start; }

/* ================= V7.2: MY TIME, SIGN-IN TABS ================= */

.appbar { display: none; }

.signin-tabs { width: 100%; margin-bottom: 20px; }
.signin-panel { width: 100%; display: flex; flex-direction: column; gap: 16px; }
#staffSignIn .footnote { margin-top: -4px; }

/* ---------- My Time clock card ---------- */

.clock-card {
  --state: var(--green-fill);
  --state-text: var(--green);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 22px 24px;
  margin-bottom: 12px;
  position: relative; overflow: hidden;
}
.clock-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(110% 120% at 0% 0%, color-mix(in srgb, var(--state) 14%, transparent), transparent 60%);
}
.clock-card[data-state="out"] { --state: var(--label-3); --state-text: var(--label-2); }
.clock-card[data-state="out"]::before { opacity: 0; }

.clock-card-main { position: relative; display: flex; align-items: center; gap: 18px; min-width: 0; }
.clock-card-glyph {
  width: 64px; height: 64px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--state) 18%, transparent); color: var(--state-text);
}
.clock-card[data-state="out"] .clock-card-glyph { background: var(--fill); color: var(--label-2); }
.clock-card-glyph .icon { width: 30px; height: 30px; }
.clock-card-text { min-width: 0; }
.clock-card-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--state-text); margin-bottom: 2px;
}
.clock-card-title { font: 700 28px/1.15 var(--font-display); letter-spacing: -.025em; }
.clock-card-sub { margin-top: 4px; color: var(--label-2); font-variant-numeric: tabular-nums; }

.clock-btn { position: relative; min-width: 180px; min-height: 56px; font-size: 19px; border-radius: 14px; color: #fff; }
.clock-btn-in  { background: var(--green-fill); }
@media (hover: hover) and (pointer: fine) { .clock-btn-in:hover:not(:disabled)  { background: color-mix(in srgb, var(--green-fill) 88%, #000); } }
.clock-btn-out { background: var(--red-fill); }
@media (hover: hover) and (pointer: fine) { .clock-btn-out:hover:not(:disabled) { background: color-mix(in srgb, var(--red-fill) 88%, #000); } }

.today-punches { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.today-punches:empty { display: none; }
.today-punch {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  background: var(--bg-card); box-shadow: var(--shadow-card);
  font-size: 14px;
}
.today-punch.is-voided { opacity: .45; text-decoration: line-through; }
.today-source { color: var(--label-2); font-size: 13px; }
.period-heading { margin: 4px 0 12px; }
#view-myhours .page-header { margin-bottom: 16px; }

@media (max-width: 760px) {
  .clock-card { padding: 18px; }
  .clock-btn { width: 100%; }
  .clock-card-title { font-size: 24px; }
}

/* =====================================================================
   MICROSOFT 365 DESIGN (Fluent-style layout: app bar, icon rail,
   flat cards, pivots, bottom-right toasts, dialogs with footer buttons).
   Text stays in Apple's typeface. Switch in Settings → Design.
   ===================================================================== */

:root[data-design="microsoft"] {
  --tint: #0F6CBD;
  --tint-text: #0F6CBD;
  --tint-soft: rgba(15, 108, 189, .1);
  --on-tint: #ffffff;
  --brand-bar: #000000;

  --bg: #f5f5f5;
  --bg-card: #ffffff;
  --bg-sheet: #ffffff;
  --bg-sheet-card: #fafafa;
  --bg-raised: #ffffff;
  --bg-sidebar: #ebebeb;
  --bg-bar: #ffffff;

  --label: #242424;
  --label-2: #616161;
  --label-3: #a0a0a0;
  --fill: #f0f0f0;
  --fill-strong: #e0e0e0;
  --separator: #e0e0e0;
  --stroke: #d1d1d1;
  --segment-on: transparent;

  --shadow-card: 0 0 2px rgba(0, 0, 0, .12), 0 2px 4px rgba(0, 0, 0, .14);
  --shadow-float: 0 0 8px rgba(0, 0, 0, .12), 0 14px 28px rgba(0, 0, 0, .14);

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 8px;
}

@media (prefers-color-scheme: dark) {
  :root[data-design="microsoft"]:not([data-theme="light"]) {
    --tint: #115EA3;
    --tint-text: #479EF5;
    --tint-soft: rgba(71, 158, 245, .16);
    --brand-bar: #000000;
    --bg: #1f1f1f;
    --bg-card: #292929;
    --bg-sheet: #292929;
    --bg-sheet-card: #333333;
    --bg-raised: #2e2e2e;
    --bg-sidebar: #141414;
    --bg-bar: #292929;
    --label: #ffffff;
    --label-2: #adadad;
    --label-3: #707070;
    --fill: #333333;
    --fill-strong: #3d3d3d;
    --separator: #3d3d3d;
    --stroke: #5c5c5c;
    --shadow-card: 0 0 2px rgba(0, 0, 0, .24), 0 2px 4px rgba(0, 0, 0, .28);
    --shadow-float: 0 0 8px rgba(0, 0, 0, .24), 0 14px 28px rgba(0, 0, 0, .28);
  }
}
:root[data-design="microsoft"][data-theme="dark"] {
  --tint: #115EA3;
  --tint-text: #479EF5;
  --tint-soft: rgba(71, 158, 245, .16);
  --brand-bar: #000000;
  --bg: #1f1f1f;
  --bg-card: #292929;
  --bg-sheet: #292929;
  --bg-sheet-card: #333333;
  --bg-raised: #2e2e2e;
  --bg-sidebar: #141414;
  --bg-bar: #292929;
  --label: #ffffff;
  --label-2: #adadad;
  --label-3: #707070;
  --fill: #333333;
  --fill-strong: #3d3d3d;
  --separator: #3d3d3d;
  --stroke: #5c5c5c;
  --shadow-card: 0 0 2px rgba(0, 0, 0, .24), 0 2px 4px rgba(0, 0, 0, .28);
  --shadow-float: 0 0 8px rgba(0, 0, 0, .24), 0 14px 28px rgba(0, 0, 0, .28);
}

[data-design="microsoft"] body { font-size: 14px; letter-spacing: 0; }

/* ---------- Shell: black app bar + wide, collapsible navigation (like Power Automate) ---------- */

[data-design="microsoft"] .shell {
  --nav-w: 228px;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  grid-template-rows: 48px minmax(0, 1fr);
  grid-template-areas: "appbar appbar" "rail content";
}
@media (min-width: 1100px) { [data-design="microsoft"] body.nav-collapsed .shell { --nav-w: 48px; } }

[data-design="microsoft"] .appbar {
  grid-area: appbar;
  display: flex; align-items: center; gap: 4px;
  padding: 0 8px 0 0;
  background: var(--brand-bar); color: #fff;
}
[data-design="microsoft"] .appbar-waffle { width: 48px; height: 48px; display: grid; place-items: center; }
[data-design="microsoft"] .appbar-waffle .icon { width: 18px; height: 18px; }
[data-design="microsoft"] .appbar-waffle .icon circle { fill: currentColor; stroke: none; }
[data-design="microsoft"] .appbar-org { font-weight: 700; font-size: 13px; letter-spacing: .02em; padding: 0 22px 0 6px; }
[data-design="microsoft"] .appbar-title { font-weight: 600; font-size: 16px; white-space: nowrap; }
[data-design="microsoft"] .appbar-search {
  display: flex; align-items: center; gap: 8px;
  width: min(468px, 34vw); height: 32px; margin: 0 auto; padding: 0 10px;
  border-radius: 4px; background: #fff; color: #616161;
}
[data-design="microsoft"] .appbar-search .icon { width: 16px; height: 16px; color: #0F6CBD; }
[data-design="microsoft"] .appbar-search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 14px; color: #242424;
}
[data-design="microsoft"] .appbar-search input::placeholder { color: #616161; }
[data-design="microsoft"] .appbar-spacer { display: none; }
[data-design="microsoft"] .appbar-sync { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,.8); padding: 0 8px; white-space: nowrap; }
[data-design="microsoft"] .appbar-sync .icon { width: 16px; height: 16px; }
[data-design="microsoft"] .appbar-sync.sync-pending { color: #ffd17a; }
[data-design="microsoft"] .appbar-sync.sync-error { color: #ff9a9a; }
[data-design="microsoft"] .appbar-icon {
  width: 40px; height: 40px; border: 0; border-radius: 4px; background: transparent; color: #fff;
  display: grid; place-items: center;
}
@media (hover: hover) and (pointer: fine) { [data-design="microsoft"] .appbar-icon:hover, [data-design="microsoft"] .appbar-account:hover { background: rgba(255,255,255,.14); } }
[data-design="microsoft"] .appbar-icon .icon { width: 20px; height: 20px; }
[data-design="microsoft"] .appbar-account {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 6px 0 12px; border: 0; border-radius: 4px;
  background: transparent; color: #fff; font-size: 14px;
}
[data-design="microsoft"] .avatar-small { width: 32px; height: 32px; font-size: 12px; background: #c7d7ec; color: #0F2A4A; }

[data-design="microsoft"] .sidebar {
  grid-area: rail;
  padding: 4px 0 12px;
  background: var(--bg-card);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-right: 1px solid var(--separator);
  box-shadow: 1px 0 2px rgba(0,0,0,.04);
  overflow-x: hidden;
}
[data-design="microsoft"] .sidebar-brand,
[data-design="microsoft"] .sidebar-footer { display: none !important; }
[data-design="microsoft"] .nav-collapse {
  display: grid !important; place-items: center;
  width: 48px; height: 40px; margin: 0 0 4px; border: 0; background: transparent; color: var(--label);
  border-radius: 4px;
}
@media (hover: hover) and (pointer: fine) { [data-design="microsoft"] .nav-collapse:hover { background: var(--fill); } }
[data-design="microsoft"] .nav-collapse .icon { width: 20px; height: 20px; }
[data-design="microsoft"] .nav-list { height: calc(100% - 44px); gap: 0; }
/* Section headings become thin separators, as in Microsoft 365 apps. */
[data-design="microsoft"] .nav-heading {
  height: 1px; padding: 0; margin: 8px 0; background: var(--separator);
  font-size: 0; overflow: hidden;
}
[data-design="microsoft"] .nav-heading:first-child { display: none !important; }
[data-design="microsoft"] .nav-spacer { flex: 1; height: auto; }
[data-design="microsoft"] .nav-item {
  position: relative;
  flex-direction: row; justify-content: flex-start; gap: 16px;
  min-height: 40px; padding: 0 16px; border-radius: 0;
  font-size: 14px; line-height: 1.2; text-align: left; color: var(--label);
  white-space: nowrap;
}
[data-design="microsoft"] .nav-item .icon { width: 20px; height: 20px; color: inherit; stroke-width: 1.6; flex: none; }
@media (hover: hover) and (pointer: fine) { [data-design="microsoft"] .nav-item:hover { background: var(--fill); } }
[data-design="microsoft"] .nav-item.is-active { background: transparent; color: var(--tint-text); font-weight: 400; }
[data-design="microsoft"] .nav-item.is-active::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0;
  background: var(--tint);
}
[data-design="microsoft"] .nav-live { margin-left: auto; position: static; width: 8px; height: 8px; box-shadow: none; }
[data-design="microsoft"] .nav-count { position: static; margin-left: auto; height: 18px; min-width: 18px; font-size: 11px; padding: 0 5px; }
[data-design="microsoft"] body.nav-collapsed .nav-item > span:not([data-icon]) { display: none; }
[data-design="microsoft"] body.nav-collapsed .nav-item { padding: 0 14px; }
[data-design="microsoft"] body.nav-collapsed .nav-item .nav-live,
[data-design="microsoft"] body.nav-collapsed .nav-item .nav-count { display: block !important; position: absolute; top: 6px; right: 6px; }

[data-design="microsoft"] .content { grid-area: content; padding: 28px 32px 48px; background: var(--bg); }
[data-design="microsoft"] .view { max-width: 1320px; margin: 0; }

.nav-collapse { display: none; }
.title-ms { display: none; }
[data-design="microsoft"] .title-ms { display: inline; }
[data-design="microsoft"] .title-apple { display: none; }

/* ---------- Type & headers ---------- */

[data-design="microsoft"] .large-title { font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
[data-design="microsoft"] .page-header { align-items: center; margin-bottom: 20px; }
[data-design="microsoft"] .page-sub { font-size: 14px; }
[data-design="microsoft"] .section-title { font-size: 18px; font-weight: 600; letter-spacing: 0; }
[data-design="microsoft"] .group-title { text-transform: none; font-size: 14px; font-weight: 600; color: var(--label); letter-spacing: 0; margin: 24px 0 8px; }
[data-design="microsoft"] .empty-title { font-size: 22px; font-weight: 600; letter-spacing: 0; }
[data-design="microsoft"] .empty-glyph { border-radius: 8px; }

/* ---------- Buttons ---------- */

[data-design="microsoft"] .btn {
  min-height: 32px; padding: 0 14px; border-radius: 4px;
  font-size: 14px; font-weight: 600;
}
[data-design="microsoft"] .btn:active:not(:disabled) { transform: none; }
[data-design="microsoft"] .btn-primary { background: var(--tint); color: var(--on-tint); }
@media (hover: hover) and (pointer: fine) { [data-design="microsoft"] .btn-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--tint) 85%, #000); } }
[data-design="microsoft"] .btn-secondary {
  background: var(--bg-card); color: var(--label);
  box-shadow: inset 0 0 0 1px var(--stroke);
}
@media (hover: hover) and (pointer: fine) { [data-design="microsoft"] .btn-secondary:hover:not(:disabled) { background: var(--fill); } }
[data-design="microsoft"] .btn-tint-red { color: var(--red); }
[data-design="microsoft"] .btn-large { min-height: 40px; font-size: 15px; border-radius: 4px; }
[data-design="microsoft"] .btn-small { min-height: 28px; font-size: 13px; }
[data-design="microsoft"] .icon-btn { border-radius: 4px; }
[data-design="microsoft"] .btn-link { font-weight: 600; font-size: 14px; }
[data-design="microsoft"] .clock-btn { min-height: 44px; font-size: 16px; border-radius: 4px; min-width: 160px; }
[data-design="microsoft"] #msSignInBtn { background: var(--tint); color: #fff; }

/* ---------- Pivots instead of segmented controls ---------- */

[data-design="microsoft"] .segmented {
  background: transparent; padding: 0; border-radius: 0; gap: 4px;
  grid-auto-columns: max-content; justify-content: start;
}
[data-design="microsoft"] .segmented button {
  min-height: 36px; padding: 0 10px; border-radius: 4px;
  font-size: 14px; font-weight: 400; color: var(--label-2);
}
@media (hover: hover) and (pointer: fine) { [data-design="microsoft"] .segmented button:hover { background: var(--fill); color: var(--label); } }
[data-design="microsoft"] .segmented button[aria-checked="true"] {
  background: transparent; box-shadow: inset 0 -3px 0 var(--tint);
  color: var(--label); font-weight: 600;
}
[data-design="microsoft"] .signin-tabs { border-bottom: 1px solid var(--separator); }

/* ---------- Surfaces ---------- */

[data-design="microsoft"] .card,
[data-design="microsoft"] .stat,
[data-design="microsoft"] .grouped,
[data-design="microsoft"] .grouped-list,
[data-design="microsoft"] .list-empty,
[data-design="microsoft"] .kiosk-card { border-radius: 8px; box-shadow: var(--shadow-card); }
[data-design="microsoft"] .stat-value { font-size: 26px; font-weight: 600; letter-spacing: 0; }
[data-design="microsoft"] .grouped-list > li + li::before { left: 0; }
[data-design="microsoft"] .grouped > * + *::before { left: 0; }
[data-design="microsoft"] .list-row { min-height: 52px; }
[data-design="microsoft"] .list-title { font-size: 14px; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { [data-design="microsoft"] .list-button:hover { background: var(--fill); } }
[data-design="microsoft"] .pill { border-radius: 4px; font-weight: 600; }
[data-design="microsoft"] .date-tile { border-radius: 4px; }
[data-design="microsoft"] .today-punch { border-radius: 4px; }
[data-design="microsoft"] .file-tile { border-radius: 4px; }
[data-design="microsoft"] .count { border-radius: 4px; }
[data-design="microsoft"] .search-field { border-radius: 4px; background: var(--bg-card); box-shadow: inset 0 0 0 1px var(--stroke); }
[data-design="microsoft"] .search-field:focus-within { box-shadow: inset 0 0 0 1px var(--stroke), inset 0 -2px 0 var(--tint); }
[data-design="microsoft"] .hero-name, [data-design="microsoft"] .clock-card-title, [data-design="microsoft"] .kiosk-title { font-weight: 600; letter-spacing: -.01em; }

[data-design="microsoft"] .preview-strip {
  border-radius: 4px; background: #fff4ce; color: #242424;
  box-shadow: inset 0 0 0 1px #f5d7a0;
}
[data-design="microsoft"] .preview-strip .icon, [data-design="microsoft"] .preview-strip strong { color: #8a5300; }
@media (prefers-color-scheme: dark) {
  [data-design="microsoft"]:not([data-theme="light"]) .preview-strip { background: #463100; color: #fff; box-shadow: none; }
  [data-design="microsoft"]:not([data-theme="light"]) .preview-strip .icon,
  [data-design="microsoft"]:not([data-theme="light"]) .preview-strip strong { color: #ffd17a; }
}
[data-design="microsoft"][data-theme="dark"] .preview-strip { background: #463100; color: #fff; box-shadow: none; }
[data-design="microsoft"][data-theme="dark"] .preview-strip .icon,
[data-design="microsoft"][data-theme="dark"] .preview-strip strong { color: #ffd17a; }

/* Fluent toggle switch */
[data-design="microsoft"] .switch { width: 40px; height: 20px; background: transparent; box-shadow: inset 0 0 0 1px var(--label-2); }
[data-design="microsoft"] .switch::after { top: 4px; left: 4px; width: 12px; height: 12px; background: var(--label-2); box-shadow: none; }
[data-design="microsoft"] .switch:checked { background: var(--tint); box-shadow: none; }
[data-design="microsoft"] .switch:checked::after { transform: translateX(20px); background: #fff; }

/* ---------- Toast: bottom-right ---------- */

[data-design="microsoft"] .banner {
  top: auto; bottom: 24px; left: auto; right: 24px;
  border-radius: 8px; padding: 12px 16px 12px 12px;
  background: var(--bg-card);
  -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: var(--shadow-float);
  transform: translateY(140%);
}
[data-design="microsoft"] .banner.is-visible { transform: none; }
[data-design="microsoft"] .banner-icon { border-radius: 50%; }

/* ---------- Forms: label above field ---------- */

[data-design="microsoft"] .sheet .grouped,
[data-design="microsoft"] .signin .grouped {
  background: transparent; box-shadow: none; border-radius: 0; overflow: visible;
  display: flex; flex-direction: column; gap: 14px;
}
[data-design="microsoft"] .sheet .grouped > * + *::before,
[data-design="microsoft"] .signin .grouped > * + *::before { display: none; }
[data-design="microsoft"] .sheet .form-row,
[data-design="microsoft"] .signin .form-row {
  flex-direction: column; align-items: stretch; gap: 6px; padding: 0; min-height: 0;
}
[data-design="microsoft"] .form-label { width: auto; font-size: 14px; font-weight: 600; }
[data-design="microsoft"] .sheet .form-row input,
[data-design="microsoft"] .signin .form-row input {
  min-height: 32px; padding: 5px 10px; border-radius: 4px;
  background: var(--bg-card);
  box-shadow: inset 0 0 0 1px var(--stroke), inset 0 -1px 0 1px var(--label-2);
  font-size: 14px; color: var(--label);
}
[data-design="microsoft"] .sheet .form-row input:focus,
[data-design="microsoft"] .signin .form-row input:focus { box-shadow: inset 0 0 0 1px var(--stroke), inset 0 -2px 0 0 var(--tint); }
[data-design="microsoft"] .form-row:focus-within .form-label { color: var(--label); }
[data-design="microsoft"] .form-row input[type="date"],
[data-design="microsoft"] .form-row input[type="time"] { color: var(--label); }
[data-design="microsoft"] .segmented-inline { margin: 0; }

/* ---------- Sign-in: Microsoft-style card ---------- */

[data-design="microsoft"] #signInScreen { background: var(--bg); }
[data-design="microsoft"] .signin {
  max-width: 440px; padding: 40px 44px 36px;
  align-items: stretch; text-align: left;
  background: var(--bg-card); border-radius: 8px; box-shadow: var(--shadow-float);
}
[data-design="microsoft"] .signin-logo { width: 64px; height: 58px; margin-bottom: 18px; }
[data-design="microsoft"] .signin-title { font-size: 24px; font-weight: 600; letter-spacing: 0; }
[data-design="microsoft"] .signin-sub { font-size: 14px; margin: 6px 0 20px; max-width: none; }
[data-design="microsoft"] .signin .footnote { text-align: left; }
[data-design="microsoft"] .form-error { text-align: left; font-size: 14px; }

/* ---------- Dialogs: title top-left, buttons bottom-right ---------- */

[data-design="microsoft"] dialog.sheet { border-radius: 8px; width: min(600px, calc(100vw - 32px)); }
[data-design="microsoft"] dialog.sheet.sheet-wide { width: min(760px, calc(100vw - 32px)); }
[data-design="microsoft"] dialog.sheet:not(.sheet-alert)[open],
[data-design="microsoft"] dialog.sheet > form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "title title title" "body body body" ". primary secondary";
  column-gap: 8px;
  min-height: 0;
}
[data-design="microsoft"] dialog.sheet:not(.sheet-alert)[open] { padding: 24px; max-height: 86vh; }
[data-design="microsoft"] dialog.sheet > form { grid-column: 1 / -1; grid-row: 1 / -1; }
[data-design="microsoft"] dialog.sheet:has(> form)[open] { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
[data-design="microsoft"] .sheet-header { display: contents; }
[data-design="microsoft"] .sheet-header > :nth-child(1) { grid-area: secondary; }
[data-design="microsoft"] .sheet-header > :nth-child(2) { grid-area: title; }
[data-design="microsoft"] .sheet-header > :nth-child(3) { grid-area: primary; }
[data-design="microsoft"] .sheet-spacer { display: none; }
[data-design="microsoft"] .sheet-title { text-align: left; font-size: 20px; font-weight: 600; padding: 0; white-space: normal; }
[data-design="microsoft"] .sheet-body { grid-area: body; padding: 16px 0 24px; overflow-y: auto; }
[data-design="microsoft"] .sheet-sub { padding: 0; }
[data-design="microsoft"] .sheet .btn-text {
  min-height: 32px; padding: 0 16px; border: 0; border-radius: 4px;
  background: var(--bg-card); color: var(--label); box-shadow: inset 0 0 0 1px var(--stroke);
  font-size: 14px; font-weight: 600;
}
@media (hover: hover) and (pointer: fine) { [data-design="microsoft"] .sheet .btn-text:hover { background: var(--fill); } }
[data-design="microsoft"] .sheet .btn-text-strong { background: var(--tint); color: var(--on-tint); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { [data-design="microsoft"] .sheet .btn-text-strong:hover { background: color-mix(in srgb, var(--tint) 85%, #000); } }
[data-design="microsoft"] .sheet .footnote { text-align: left; }
[data-design="microsoft"] dialog.sheet:not(.sheet-alert) { transform: scale(.98); }
[data-design="microsoft"] dialog.sheet:not(.sheet-alert)[open] { transform: none; }
@starting-style { [data-design="microsoft"] dialog.sheet:not(.sheet-alert)[open] { opacity: 0; transform: scale(.98); } }

[data-design="microsoft"] dialog.sheet-alert { width: min(440px, calc(100vw - 32px)); border-radius: 8px; text-align: left; background: var(--bg-card); }
[data-design="microsoft"] .alert-body { padding: 24px 24px 20px; gap: 10px; }
[data-design="microsoft"] .alert-title { font-size: 20px; }
[data-design="microsoft"] .alert-message { font-size: 14px; color: var(--label); }
[data-design="microsoft"] .alert-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 0 24px 24px; }
[data-design="microsoft"] .alert-actions .btn { min-height: 32px; }
[data-design="microsoft"] .alert-actions .btn-secondary { color: var(--label); }

/* ---------- Kiosk ---------- */

[data-design="microsoft"] .kiosk-time { font-weight: 600; letter-spacing: -.02em; }
[data-design="microsoft"] .kiosk-card { border-radius: 8px; }
[data-design="microsoft"] .view-kiosk { margin: 0 auto; }
body.is-kiosk .appbar { display: none !important; }
[data-design="microsoft"] body.is-kiosk .shell { grid-template-rows: minmax(0, 1fr); grid-template-areas: "content"; }

/* ---------- Compact widths ---------- */

@media (max-width: 760px) {
  [data-design="microsoft"] .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px auto; grid-template-areas: "appbar" "content"; }
  [data-design="microsoft"] .appbar-search, [data-design="microsoft"] .appbar-org, [data-design="microsoft"] .appbar-icon { display: none; }
  [data-design="microsoft"] .appbar-title { margin-right: auto; }
  [data-design="microsoft"] .appbar { position: sticky; top: 0; z-index: 40; padding-left: 16px; }
  [data-design="microsoft"] .appbar-name, [data-design="microsoft"] .appbar-sync span { display: none; }
  [data-design="microsoft"] .content { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
  [data-design="microsoft"] .tabbar { background: var(--bg-card); -webkit-backdrop-filter: none; backdrop-filter: none; }
  [data-design="microsoft"] .tab-item.is-active { color: var(--tint-text); font-weight: 600; }
  [data-design="microsoft"] .signin { padding: 28px 24px; box-shadow: none; background: transparent; }
  [data-design="microsoft"] dialog.sheet:not(.sheet-alert) { border-radius: 8px 8px 0 0; }
}

/* ================= TIME OFF (V7.2) ================= */

.pill-purple { background: color-mix(in srgb, #AF52DE 16%, transparent); color: #8E3BBF; }
:root[data-theme="dark"] .pill-purple { color: #DA8FFF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill-purple { color: #DA8FFF; } }

.nav-count, .tab-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--red-fill); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.nav-count { margin-left: auto; }
.tab-count:empty { display: none; }
.tab-count { margin-left: 6px; height: 18px; min-width: 18px; font-size: 11px; }

.to-tabs { max-width: 460px; margin-bottom: 18px; }
.to-row { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.to-row .list-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; white-space: normal; }
.to-row .list-sub { white-space: normal; }
.to-row.is-past { opacity: .62; }
.to-comment {
  margin-top: 6px; padding: 6px 10px; border-radius: 8px;
  background: var(--fill); font-size: 13px; color: var(--label);
}
.out-day .group-title { margin-top: 0; }
.out-day + .out-day { margin-top: 20px; }

.out-today {
  display: flex; align-items: center; gap: 10px;
  margin: -8px 0 20px; padding: 10px 14px; border-radius: var(--r-md);
  background: color-mix(in srgb, #AF52DE 11%, var(--bg-card));
  font-size: 14px;
}
.out-today .icon { color: #AF52DE; width: 18px; height: 18px; }

/* Form bits used by the request sheet */
.form-fill { flex: 1; }
.form-label-wide { width: auto; }
.form-row-top { align-items: flex-start; }
.form-row-top .form-label { padding-top: 13px; }
.form-row select, .form-row textarea {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 16px; color: var(--label); padding: 13px 0;
}
.form-row select { color: var(--tint-text); cursor: pointer; }
.form-row textarea { resize: vertical; min-height: 48px; line-height: 1.35; }
.form-row textarea::placeholder { color: var(--label-3); }
.form-row .switch { margin: 10px 0; }

.choice-list .choice {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 10px 16px; cursor: pointer; font-size: 16px;
}
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--tint); flex: none; }

.note-callout {
  margin: 0; padding: 10px 14px; border-radius: 10px;
  background: color-mix(in srgb, var(--blue-fill) 12%, transparent); color: var(--label); font-size: 14px;
}
.agreement {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-md); background: var(--bg-sheet-card);
  font-size: 13px; line-height: 1.45; color: var(--label-2); cursor: pointer;
}
.agreement input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--tint); flex: none; }
#toStudentOnly { display: flex; flex-direction: column; gap: 14px; }
#toStudentOnly[hidden] { display: none; }

.review-person { display: flex; align-items: center; gap: 12px; }
.review-person .avatar { width: 44px; height: 44px; font-size: 16px; }
.detail-list { margin: 0; border-radius: var(--r-md); background: var(--bg-sheet-card); overflow: hidden; }
.detail-list > div { display: flex; gap: 16px; padding: 11px 16px; }
.detail-list > div + div { border-top: 1px solid var(--separator); }
.detail-list dt { width: 96px; flex: none; color: var(--label-2); }
.detail-list dd { margin: 0; flex: 1; }
#trDeny { align-self: flex-start; }

.ts-off-note { margin: 0 4px 4px; color: var(--label-2); font-size: 14px; }
.ts-day ul:empty { display: none; }

/* Microsoft design tweaks for the above */
[data-design="microsoft"] .to-comment, [data-design="microsoft"] .note-callout,
[data-design="microsoft"] .out-today, [data-design="microsoft"] .agreement, [data-design="microsoft"] .detail-list { border-radius: 4px; }

[data-design="microsoft"] .sheet .form-row select,
[data-design="microsoft"] .sheet .form-row textarea {
  min-height: 32px; padding: 5px 10px; border-radius: 4px;
  background: var(--bg-card); color: var(--label);
  box-shadow: inset 0 0 0 1px var(--stroke), inset 0 -1px 0 1px var(--label-2);
  font-size: 14px;
}
[data-design="microsoft"] .sheet .form-row:has(.switch) { flex-direction: row; align-items: center; }
[data-design="microsoft"] .form-row-top .form-label { padding-top: 0; }
[data-design="microsoft"] .choice-list { gap: 4px !important; }
[data-design="microsoft"] .choice-list .choice { min-height: 32px; padding: 4px 0; font-size: 14px; }

/* Sheet contents never squash; the body scrolls instead. */
.sheet-body > * { flex-shrink: 0; }

/* Switches inside form rows keep their own look. */
.form-row input.switch {
  flex: none; padding: 0; width: 51px; height: 31px;
  background: var(--fill-strong); box-shadow: none;
}
.form-row input.switch:checked { background: var(--green-fill); }
[data-design="microsoft"] .sheet .form-row input.switch,
[data-design="microsoft"] .signin .form-row input.switch {
  width: 40px; height: 20px; min-height: 0; padding: 0;
  background: transparent; box-shadow: inset 0 0 0 1px var(--label-2);
}
[data-design="microsoft"] .sheet .form-row input.switch:checked { background: var(--tint); box-shadow: none; }

/* ================= V7.3 ================= */

/* ---------- Kiosk device: only the clock ---------- */

body.kiosk-device .sidebar,
body.kiosk-device .tabbar,
body.kiosk-device .appbar { display: none !important; }
body.kiosk-device .shell { grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: minmax(0, 1fr) !important; grid-template-areas: "content" !important; }
body.kiosk-device .content { padding-top: 5vh; }
.kiosk-menu-btn {
  position: fixed; top: 14px; right: 14px; z-index: 60;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  display: grid; place-items: center;
  background: var(--fill); color: var(--label-3);
  opacity: .55; transition: opacity .2s;
}
@media (hover: hover) and (pointer: fine) { .kiosk-menu-btn:hover, .kiosk-menu-btn:focus-visible { opacity: 1; color: var(--label); } }
.kiosk-menu-btn .icon { width: 18px; height: 18px; }

/* ---------- My Time info cards ---------- */

.mytime-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 28px; }
.mytime-cards:has(> .info-card:not([hidden])) { margin-top: 0; }
.mytime-cards:not(:has(> .info-card:not([hidden]))) { display: none; }
.info-card { --level: var(--green-fill); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.info-card[data-level="near"] { --level: var(--orange-fill); }
.info-card[data-level="over"] { --level: var(--red-fill); }
.info-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.info-card-title { font-size: 15px; font-weight: 600; }
.info-card-meta { font-size: 13px; color: var(--label-2); }
.info-card-value { font: 700 26px/1.15 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.info-card-of { font: 500 15px var(--font); color: var(--label-2); letter-spacing: 0; }
.info-card-note { font-size: 13px; color: var(--label-2); }
.info-card-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--separator); font-size: 14px; }
.info-card-row .switch { margin-left: auto; }
.info-card-row select {
  font: inherit; font-size: 14px; color: var(--tint-text);
  border: 0; border-radius: 8px; padding: 4px 6px; background: var(--fill);
}
.toggle-label { color: var(--label); }

.meter { height: 8px; border-radius: 999px; background: var(--fill-strong); overflow: hidden; }
.meter > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--level); transition: width .5s var(--ease); }
.meter-balance > span { background: var(--blue-fill); }
.info-card[data-level="over"] .meter-balance > span { background: var(--red-fill); }

.limit-warning {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 12px; padding: 12px 14px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--orange-fill) 14%, var(--bg-card)); font-size: 14px;
}
.limit-warning .icon { color: var(--orange); width: 18px; height: 18px; margin-top: 1px; }
.limit-warning[data-level="over"] { background: color-mix(in srgb, var(--red-fill) 13%, var(--bg-card)); }
.limit-warning[data-level="over"] .icon { color: var(--red); }

.balance-line { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--bg-sheet-card); font-size: 14px; color: var(--label-2); }
.balance-line strong { color: var(--label); }
.balance-line[data-level="over"] { background: color-mix(in srgb, var(--orange-fill) 13%, var(--bg-sheet-card)); }

.period-row .btn-small { margin-left: auto; }
.period-row .period-nav { margin-left: 8px; }
.row-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.today-punch.is-target { box-shadow: inset 0 0 0 2px var(--orange-fill); }

/* ---------- Timesheet: limits & allotted hours ---------- */

.ts-limits { display: grid; gap: 8px; }
.ts-limits:empty { display: none; }
.ts-limit {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 10px; background: var(--bg-sheet-card); font-size: 14px;
}
.ts-limit-label { width: 160px; flex: none; color: var(--label-2); }
.ts-limit-value { flex: 1; font-weight: 600; display: flex; flex-direction: column; }
.ts-limit-value small { font-weight: 400; color: var(--label-2); font-size: 12px; }

/* ---------- Calendar ---------- */

.cal-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-toolbar .period-nav { margin-right: auto; }
.cal-pending { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--label-2); }
.cal-pending input { accent-color: var(--tint); width: 16px; height: 16px; }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--bg-card); border-radius: var(--r-md); box-shadow: var(--shadow-card); overflow: hidden;
}
.cal-head {
  padding: 8px 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--label-2); border-bottom: 1px solid var(--separator);
}
.cal-cell {
  min-height: 96px; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 3px;
  border-right: 1px solid var(--separator); border-bottom: 1px solid var(--separator); min-width: 0;
}
.cal-cell:nth-child(7n + 7) { border-right: 0; }
.cal-cell.is-weekend { background: color-mix(in srgb, var(--fill) 50%, transparent); }
.cal-cell.is-other .cal-day { color: var(--label-3); }
.cal-day { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-cell.is-today .cal-day { background: var(--tint); color: var(--on-tint); }
.cal-chip {
  font-size: 12px; font-weight: 600; line-height: 1.2; padding: 3px 6px; border-radius: 6px;
  background: hsl(var(--hue) 55% 50% / .16); color: hsl(var(--hue) 45% 35%);
  border-left: 3px solid hsl(var(--hue) 55% 50%);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
:root[data-theme="dark"] .cal-chip { color: hsl(var(--hue) 70% 78%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cal-chip { color: hsl(var(--hue) 70% 78%); } }
.cal-chip.is-pending { background: transparent; border: 1px dashed hsl(var(--hue) 55% 50%); border-left-width: 3px; }
.cal-more { font-size: 11px; color: var(--label-2); padding-left: 4px; }

/* ---------- Automations ---------- */

.mono-small { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0; }
.auto-event { align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.auto-event .list-sub { white-space: normal; }
.auto-log-head { margin-top: 24px; margin-bottom: 0; }
.auto-log-head .group-title { margin-top: 0; }
.auto-log-row { align-items: flex-start; }
.auto-log-row details { cursor: pointer; }
.auto-log-row summary { list-style: none; display: flex; flex-direction: column; }
.auto-log-row summary::-webkit-details-marker { display: none; }
.auto-json {
  margin: 8px 0 2px; padding: 10px 12px; border-radius: 8px; background: var(--fill);
  font: 12px/1.5 var(--font-mono); white-space: pre-wrap; word-break: break-word; cursor: text;
}
#autoPreviewNote { margin-bottom: 8px; }

/* ---------- Microsoft design tweaks ---------- */

[data-design="microsoft"] .info-card-value { font-weight: 600; letter-spacing: 0; }
[data-design="microsoft"] .meter { border-radius: 2px; height: 6px; }
[data-design="microsoft"] .limit-warning, [data-design="microsoft"] .balance-line,
[data-design="microsoft"] .ts-limit, [data-design="microsoft"] .cal-chip, [data-design="microsoft"] .auto-json { border-radius: 4px; }
[data-design="microsoft"] .cal-grid { border-radius: 8px; }
[data-design="microsoft"] .kiosk-menu-btn { border-radius: 4px; }

@media (max-width: 760px) {
  .cal-cell { min-height: 64px; padding: 4px 3px; }
  .cal-chip { font-size: 10px; padding: 2px 3px; border-left-width: 2px; }
  .cal-head { padding: 6px 4px; font-size: 10px; text-align: center; }
  .period-row { flex-wrap: wrap; }
  .period-row .btn-small { margin-left: 0; }
  .ts-limit { flex-wrap: wrap; }
  .ts-limit-label { width: 100%; }
}

/* ================= V7.4 ================= */

.status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.status-row .status-line { margin: 0; }
.attest-line { display: flex; gap: 6px; }
.ts-populi { padding: 12px 14px; border-radius: 10px; background: var(--bg-sheet-card); display: flex; flex-direction: column; gap: 10px; }
.ts-populi-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.ts-populi-head .icon { width: 16px; height: 16px; color: var(--red); }
.ts-populi-head small { margin-left: auto; font-weight: 400; color: var(--label-2); font-size: 12px; }
.ts-populi .detail-list { background: var(--bg-sheet); }
.sched-row { gap: 10px; min-height: 48px; }
.sched-day { display: flex; align-items: center; gap: 8px; width: 80px; flex: none; font-size: 15px; }
.sched-day input { width: 18px; height: 18px; accent-color: var(--tint); }
.sched-row input[type="time"] { flex: 1; }
.sched-dash { color: var(--label-2); }
[data-design="microsoft"] .sheet .sched-row { flex-direction: row; align-items: center; }
[data-design="microsoft"] .ts-populi { border-radius: 4px; }

/* ================= V7.5 GLOW UP ================= */

/* ---- Phones feel native (mobile-native) ---- */
html { -webkit-tap-highlight-color: transparent; }
html, body { overscroll-behavior: none; }
.content, .sheet-body, .sidebar, .grouped-list { overscroll-behavior: contain; }
button, a, [role="button"], [role="tab"], [role="radio"], .switch, summary {
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
@media (max-width: 760px), (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }   /* no zoom on focus in iOS Safari */
}
.banner { top: calc(16px + env(safe-area-inset-top)); }
.kiosk-menu-btn { top: calc(14px + env(safe-area-inset-top)); right: calc(14px + env(safe-area-inset-right)); }
[data-design="microsoft"] .appbar { padding-top: env(safe-area-inset-top); }

/* ---- Press feedback on everything you can press (scale 0.97, 160 ms) ---- */
.btn, .icon-btn, .nav-item, .tab-item, .list-button, .btn-text, .btn-link, .segmented button,
.appbar-icon, .appbar-account, .nav-collapse, .sidebar-toggle, .sidebar-show, .clock-btn, .kiosk-menu-btn {
  transition-property: background-color, color, box-shadow, opacity, transform;
  transition-duration: var(--dur-small), var(--dur-small), var(--dur-small), var(--dur-small), var(--dur-press);
  transition-timing-function: ease, ease, ease, ease, var(--ease-out);
}
.btn:active:not(:disabled), .icon-btn:active, .nav-item:active, .tab-item:active, .btn-text:active:not(:disabled),
.segmented button:active, .appbar-icon:active, .nav-collapse:active, .sidebar-toggle:active, .sidebar-show:active,
.kiosk-menu-btn:active { transform: scale(.97); }
.list-button:active { transform: scale(.99); }      /* full-width rows: barely, or it looks like a bounce */
.btn-link:active { opacity: .6; }

/* ---- Depth: softer, layered shadows; hairline edges in dark mode ---- */
:root {
  --shadow-card: 0 0 0 .5px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .05), 0 6px 20px -8px rgba(0, 0, 0, .08);
  --shadow-float: 0 0 0 .5px rgba(0, 0, 0, .05), 0 12px 40px -6px rgba(0, 0, 0, .22), 0 4px 12px rgba(0, 0, 0, .08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-design="microsoft"]) {
    --shadow-card: inset 0 0 0 1px rgba(255, 255, 255, .06);
    --shadow-float: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 64px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"]:not([data-design="microsoft"]) {
  --shadow-card: inset 0 0 0 1px rgba(255, 255, 255, .06);
  --shadow-float: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 64px rgba(0, 0, 0, .6);
}

/* Apple design: lit buttons and a little glow on the big actions */
:root:not([data-design="microsoft"]) .btn-primary {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0));
  box-shadow: 0 1px 2px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .28);
}
:root:not([data-design="microsoft"]) .clock-btn {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 24px -8px var(--clock-glow, transparent);
}
.clock-btn-in  { --clock-glow: color-mix(in srgb, var(--green-fill) 70%, transparent); }
.clock-btn-out { --clock-glow: color-mix(in srgb, var(--red-fill) 70%, transparent); }
:root:not([data-design="microsoft"]) .stat { background-image: linear-gradient(180deg, color-mix(in srgb, var(--label) 2.5%, transparent), transparent 60%); }
:root:not([data-design="microsoft"]) .nav-item.is-active { box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--tint) 25%, transparent); }
.large-title { font-optical-sizing: auto; }

/* ---- Materials (apple-design): heavier chrome, honor accessibility settings ---- */
:root:not([data-design="microsoft"]) .sidebar { border-right-color: color-mix(in srgb, var(--separator) 70%, transparent); }
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .banner, .tabbar, .sheet-header { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--bg-card) !important; }
}
@media (prefers-contrast: more) {
  :root { --separator: rgba(60, 60, 67, .5); --label-2: rgba(60, 60, 67, .85); }
  .card, .stat, .grouped, .grouped-list, .kiosk-card { box-shadow: inset 0 0 0 1px var(--label-3) !important; }
}

/* ---- Theme switch eases instead of flashing ---- */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color 260ms ease, color 260ms ease, border-color 260ms ease, box-shadow 260ms ease, fill 260ms ease !important;
}

/* ---- Banner: enter 360 ms, leave faster ---- */
.banner { transition: transform var(--dur-sheet-out) var(--ease-out), opacity var(--dur-sheet-out) ease; }
.banner.is-visible { transition-duration: 360ms, 240ms; }
.switch, .switch::after { transition-timing-function: var(--ease-out); transition-duration: 200ms; }

.sidebar-brand { padding-right: 0; gap: 9px; }
.sidebar-brand > div { min-width: 0; }
.sidebar-logo { width: 30px; height: 28px; }
.sidebar-app, .sidebar-org { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-app { font-size: 15px; }

/* ================= COLLAPSIBLE SIDEBAR (immersive) =================
   Apple design: the sidebar slides away completely; a small button brings it back.
   Microsoft design: ☰ shrinks it to an icon rail (as in Power Automate).
   Only transform and opacity animate; the column snaps once the slide is done. */

.sidebar { transition: transform 260ms var(--ease-drawer), opacity 200ms var(--ease-out); }
.sidebar-toggle, .sidebar-show {
  border: 0; display: grid; place-items: center; color: var(--label-2);
  background: transparent; width: 32px; height: 32px; border-radius: 8px;
}
.sidebar-toggle { margin-left: auto; }
.sidebar-toggle .icon, .sidebar-show .icon { width: 19px; height: 19px; }
@media (hover: hover) and (pointer: fine) {
  .sidebar-toggle:hover, .sidebar-show:hover { background: var(--fill); color: var(--label); }
}
.sidebar-show {
  position: fixed; z-index: 45;
  top: calc(16px + env(safe-area-inset-top)); left: calc(16px + env(safe-area-inset-left));
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--bg-bar); color: var(--label);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-float);
  opacity: 0; transform: translateX(-8px); pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out);
}

/* Large screens only: medium screens float the sidebar; phones use the tab bar. */
@media (min-width: 1100px) {
  :root:not([data-design="microsoft"]) body.nav-closing .sidebar,
  :root:not([data-design="microsoft"]) body.nav-opening .sidebar { transform: translateX(-100%); opacity: 0; }
  :root:not([data-design="microsoft"]) body.nav-opening .sidebar { transition: none; }
  :root:not([data-design="microsoft"]) body.nav-collapsed .shell { grid-template-columns: 0 minmax(0, 1fr); }
  :root:not([data-design="microsoft"]) body.nav-collapsed .sidebar { visibility: hidden; transform: translateX(-100%); opacity: 0; }
  :root:not([data-design="microsoft"]) body.nav-collapsed .sidebar-show { opacity: 1; transform: none; pointer-events: auto; }
  :root:not([data-design="microsoft"]) body.nav-collapsed .content { padding-left: 72px; padding-right: 72px; }
  :root:not([data-design="microsoft"]) body.nav-collapsed .view { max-width: 1760px; }
}

[data-design="microsoft"] .sidebar-toggle, [data-design="microsoft"] .sidebar-show { display: none; }
[data-design="microsoft"] .nav-item > span:not([data-icon]) { transition: opacity 140ms ease; }
[data-design="microsoft"] body.nav-closing .nav-item > span:not([data-icon]) { opacity: 0; }
[data-design="microsoft"] body.nav-collapsed .nav-collapse { margin-left: 0; }

body.nav-instant .sidebar, body.nav-instant .sidebar-show,
body.nav-instant .nav-item > span { transition: none !important; }
body.kiosk-device .sidebar-show { display: none; }
@media (max-width: 760px) { .sidebar-show, .sidebar-toggle { display: none !important; } }

/* ================= V7.6: iPad-STYLE LAYOUT ================= */

/* ---- Floating sidebar at medium widths (iPad portrait, Split View, small laptops) ---- */
.sidebar-scrim { display: none; }
@media (min-width: 761px) and (max-width: 1099px) {
  /* The sidebar floats (position: fixed), so the page gets the only column. */
  :root:not([data-design="microsoft"]) .shell { grid-template-columns: minmax(0, 1fr); }
  :root:not([data-design="microsoft"]) .sidebar {
    position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; width: 280px;
    transform: translateX(-104%); visibility: hidden;
    box-shadow: none;
    transition: transform 300ms var(--ease-drawer), visibility 0s linear 300ms, box-shadow 300ms ease;
  }
  :root:not([data-design="microsoft"]) body.nav-overlay .sidebar {
    transform: none; visibility: visible; box-shadow: var(--shadow-float);
    transition: transform 300ms var(--ease-drawer), visibility 0s, box-shadow 300ms ease;
  }
  :root:not([data-design="microsoft"]) .sidebar-show { opacity: 1; transform: none; pointer-events: auto; }
  :root:not([data-design="microsoft"]) body.nav-overlay .sidebar-show { opacity: 0; pointer-events: none; }
  :root:not([data-design="microsoft"]) .content { padding-left: 72px; }

  /* Microsoft design: icon rail; ☰ floats the full menu over the page */
  [data-design="microsoft"] .shell { --nav-w: 48px; }
  [data-design="microsoft"] .nav-item > span:not([data-icon]) { display: none; }
  [data-design="microsoft"] .nav-item { padding: 0 14px; }
  [data-design="microsoft"] body.nav-overlay .sidebar {
    position: fixed; z-index: 70; top: 48px; bottom: 0; left: 0; width: 228px; box-shadow: var(--shadow-float);
  }
  [data-design="microsoft"] body.nav-overlay .nav-item > span:not([data-icon]) { display: inline; }
  [data-design="microsoft"] body.nav-overlay .nav-item { padding: 0 16px; }

  .sidebar-scrim {
    display: block; position: fixed; inset: 0; z-index: 65;
    background: rgba(0, 0, 0, .22); opacity: 0; pointer-events: none;
    transition: opacity 240ms var(--ease-out);
  }
  body.nav-overlay .sidebar-scrim { opacity: 1; pointer-events: auto; }
}

/* ---- List | detail (iPad split view) on wide screens ---- */
.split-pane { display: none; }
@media (min-width: 1180px) {
  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 44%); gap: 20px; align-items: start; }
  .split-pane {
    display: block; position: sticky; top: 0;
    max-height: calc(100dvh - 56px); min-height: 320px;
  }
  .pane-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px;
    min-height: 320px; padding: 32px;
    border-radius: var(--r-lg); border: 1.5px dashed color-mix(in srgb, var(--label-3) 70%, transparent);
    color: var(--label-2);
  }
  .pane-placeholder .empty-glyph { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 4px; }
  .pane-placeholder .empty-glyph .icon { width: 28px; height: 28px; }
  .pane-placeholder .empty-title { font-size: 19px; color: var(--label); }
  .pane-placeholder .empty-text { font-size: 14px; margin: 0; max-width: 280px; }
  .split-pane.has-detail .pane-placeholder { display: none; }

  .split-pane dialog.sheet.is-docked {
    position: static; inset: auto; margin: 0; width: 100%; max-width: none;
    max-height: calc(100dvh - 56px);
    opacity: 1; transform: none;
    border-radius: var(--r-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
    animation: pane-in 220ms var(--ease-out);
  }
  .split-pane dialog.sheet.is-docked .sheet-header { background: transparent; }
  .split-pane dialog.sheet.is-docked .grouped,
  .split-pane dialog.sheet.is-docked .grouped-list,
  .split-pane dialog.sheet.is-docked .ts-stats > div,
  .split-pane dialog.sheet.is-docked .ts-limit,
  .split-pane dialog.sheet.is-docked .approval,
  .split-pane dialog.sheet.is-docked .detail-list { background: var(--bg-sheet-card); }
  [data-design="microsoft"] .split-pane dialog.sheet.is-docked { padding: 20px; border-radius: 8px; }

  .split-pane .ts-stat-value { font-size: 17px; white-space: nowrap; }
  .split-pane .ts-limit-label { width: 120px; }

  /* The selected row stays highlighted, like a sidebar selection. */
  .split-main .list-button.is-selected { background: var(--tint-soft); }
  .split-main .list-button.is-selected .list-title { color: var(--tint-text); }
}
@keyframes pane-in { from { opacity: 0; transform: translateY(6px); } }

/* ---- Context menu (right-click / press and hold) ---- */
.ctx-menu {
  position: fixed; z-index: 120; min-width: 200px; max-width: 280px; padding: 6px;
  border-radius: 12px;
  background: var(--bg-bar);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: var(--shadow-float);
  opacity: 0; transform: scale(.96);
  transition: opacity 140ms var(--ease-out), transform 160ms var(--ease-out);
}
.ctx-menu.is-open { opacity: 1; transform: none; }
.ctx-menu button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  min-height: 36px; padding: 0 10px; border: 0; border-radius: 7px;
  background: transparent; color: var(--label); font-size: 14px; text-align: left; cursor: default;
}
.ctx-menu button .icon { width: 16px; height: 16px; color: var(--label-2); }
.ctx-menu button:focus-visible, .ctx-menu button:focus { outline: none; background: var(--tint); color: var(--on-tint); }
.ctx-menu button:focus .icon { color: inherit; }
@media (hover: hover) and (pointer: fine) { .ctx-menu button:hover { background: var(--tint); color: var(--on-tint); } .ctx-menu button:hover .icon { color: inherit; } }
.ctx-menu button.is-destructive { color: var(--red); }
.ctx-sep { height: 1px; margin: 5px 8px; background: var(--separator); }
[data-design="microsoft"] .ctx-menu { border-radius: 8px; background: var(--bg-card); -webkit-backdrop-filter: none; backdrop-filter: none; }
[data-design="microsoft"] .ctx-menu button { border-radius: 4px; }
[data-design="microsoft"] .ctx-menu button:focus, [data-design="microsoft"] .ctx-menu button:hover { background: var(--fill); color: var(--label); }

/* ---- Keyboard shortcut list ---- */
kbd {
  display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px;
  font: 600 12px/18px var(--font); text-align: center;
  background: var(--bg-card); color: var(--label);
  box-shadow: inset 0 0 0 1px var(--separator), 0 1px 0 var(--separator);
}
.keys-list dt { width: 150px; }

/* ---- Pointer: the right cursor for what's under it ---- */
.list-button, [role="tab"], [role="radio"], label.row, .switch, .choice, .agreement, summary, .nav-item, .tab-item { cursor: pointer; }
.list-row:not(.list-button) { cursor: default; }

.setup-intro { margin: 0 0 4px; font-size: 14px; color: var(--label-2); text-align: left; }
.setup-intro strong { color: var(--label); }

/* ================= BIG MONITORS =================
   Use the room on 1080p+ screens instead of a narrow centered column,
   and never leave an empty band in the middle of the check-in card. */

.hero { justify-content: flex-start; }
.hero-body { flex: 1; }                       /* name block sits in the middle of any extra height */

@media (min-width: 1280px) {
  .view { max-width: 1600px; }
}
@media (min-width: 1440px) {
  .session-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(320px, .95fr);
    grid-template-areas: "hero stats manual";
  }
  .hero { min-height: 0; gap: 18px; }
  .manual { justify-content: center; }
}

/* ================= ANIMATION ================= */

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes pop { from { transform: scale(.96); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); background: var(--tint-soft); } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes alert-in { from { opacity: 0; transform: scale(1.1); } }
@keyframes pulse { 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  /* Movement goes; fades and color changes stay (apple-design / emil-design-eng). */
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .spinner { animation-duration: .8s !important; animation-iteration-count: infinite !important; }
  dialog.sheet, dialog.sheet[open], dialog.sheet-alert, .sidebar, body.nav-closing .sidebar, body.nav-opening .sidebar { transform: none !important; }
  .btn:active, .pressable:active, button:active { transform: none !important; }
  .banner, .banner.is-visible { transform: translate(-50%, 0) !important; }
  [data-design="microsoft"] .banner, [data-design="microsoft"] .banner.is-visible { transform: none !important; }
  .switch::after { transition-property: none; }
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1100px) {
  .session-grid { grid-template-columns: 1fr; grid-template-areas: "hero" "stats" "manual"; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .hero { min-height: 0; }
}

@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 100dvh; }
  .sidebar { display: none; }
  .content { overflow: visible; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }

  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--bg-bar);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--separator);
  }
  .tab-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    min-height: 48px; border: 0; background: none;
    font-size: 10px; font-weight: 500; color: var(--label-2);
  }
  .tab-item .icon { width: 24px; height: 24px; }
  .tab-item.is-active { color: var(--tint-text); }

  .large-title { font-size: 30px; }
  .page-header { align-items: stretch; flex-direction: column; }
  .toolbar .btn { flex: 1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero { padding: 20px; gap: 20px; }
  .hero-body { gap: 14px; }
  .avatar-xl { width: 60px; height: 60px; font-size: 22px; }
  .hero-name { font-size: 24px; }
  .list-header { flex-wrap: wrap; }
  .search-small { flex: 1 1 100%; }
  .list-time { display: none; }
  .row { flex-wrap: wrap; }
  .segmented-compact { min-width: 0; width: 100%; }

  .stats.stats-4, .stats.stats-5 { grid-template-columns: 1fr 1fr; }
  .period-nav { width: 100%; justify-content: space-between; }
  .period-label { min-width: 0; flex: 1; }
  .ts-stats { grid-template-columns: 1fr 1fr; }
  .kiosk-title { font-size: 32px; }
  .kiosk-detail { font-size: 18px; }
  .tab-item { font-size: 9.5px; }
  #teamFilter { width: 100%; }
  #teamFilter button { padding: 0 4px; font-size: 12px; }

  dialog.sheet:not(.sheet-alert) {
    width: 100vw; max-width: 100vw; max-height: 92vh;
    margin: auto 0 0; border-radius: 14px 14px 0 0;
  }
}
