/* Skeulur OS — glass-on-graphite */
:root {
  /* Pure neutral graphite */
  --ink-0: #060607;       /* deepest */
  --ink-1: #0c0c0e;       /* base */
  --ink-2: #131316;
  --ink-3: #1c1c20;
  --ink-4: #25252a;

  /* Glass surfaces (semi-transparent layers) */
  --glass-1: rgba(28, 28, 32, 0.62);
  --glass-2: rgba(38, 38, 44, 0.72);
  --glass-3: rgba(52, 52, 58, 0.78);
  --glass-edge: rgba(255, 255, 255, 0.08);
  --glass-edge-soft: rgba(255, 255, 255, 0.04);
  --glass-edge-bright: rgba(255, 255, 255, 0.14);

  /* Text */
  --fg-0: #f3f3f5;        /* primary text */
  --fg-1: #c8c8cc;        /* secondary */
  --fg-2: #87878d;        /* tertiary / labels */
  --fg-3: #5a5a60;        /* quaternary / mono micro */
  --fg-4: #3a3a3f;        /* disabled */

  /* Functional accents — extremely muted, only used as signal */
  --signal-warn: #d8b25c; /* amber-graphite */
  --signal-err:  #d97070; /* dusted red */
  --signal-ok:   #8fb89a; /* moss */

  --shadow-lift: 0 1px 0 rgba(255,255,255,0.04) inset,
                 0 20px 50px -20px rgba(0,0,0,0.7),
                 0 8px 24px -12px rgba(0,0,0,0.5);

  --shadow-dock: 0 1px 0 rgba(255,255,255,0.08) inset,
                 0 -1px 0 rgba(0,0,0,0.5) inset,
                 0 18px 36px -10px rgba(0,0,0,0.8),
                 0 6px 14px -6px rgba(0,0,0,0.6);

  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 26px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; background: #0a0a0c; }
body {
  font-family: var(--font-sans);
  color: var(--fg-0);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

.font-mono { font-family: var(--font-mono); font-feature-settings: "tnum","zero","ss01"; }

/* ─────────────────────────────────────────────
   Full-screen / phone-web mode (demo.html)
   The app fills the viewport instead of the iOS bezel. Safe-area insets
   replace the bezel's status bar / home indicator allowances.
────────────────────────────────────────────── */
.app-fill {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #07070a;
  overflow: hidden;
}
.app-fill .os-root,
.app-fill .ls-wrap,
.app-fill .auth-root { height: 100%; }

/* Replace the bezel's 66px island allowance with the real status-bar inset */
.app-fill .app-topbar { padding-top: calc(env(safe-area-inset-top, 0px) + 16px); }
.app-fill .auth-root { padding-top: env(safe-area-inset-top, 0px); }
.app-fill .ls-topbar { padding-top: calc(env(safe-area-inset-top, 0px) + 8px); }

/* Keep the dock above the home-bar inset */
.app-fill .dock-wrap { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); }
.app-fill .drawer { bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }
.app-fill .drawer.is-stacked { bottom: calc(env(safe-area-inset-bottom, 0px) + 108px); }
.app-fill .ls-wrap .drawer { bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); }

/* On a phone-width canvas the 14-day grid would crush; give it readable
   fixed columns and let it scroll horizontally (a natural mobile gesture). */
.app-fill .ls-grid {
  grid-template-columns: 56px repeat(7, minmax(104px, 1fr));
  min-width: max-content;
}

/* Force the calendar (names grid) into landscape on phones: when the device is
   portrait, rotate the whole calendar frame 90° so it fills the screen as a
   landscape canvas — prompting the user to turn the phone, at which point it's
   upright and the full week is visible. */
@media (orientation: portrait) and (max-width: 900px) {
  .app-fill--ls {
    inset: auto;
    top: 50%;
    left: 50%;
    width: 100vh;
    width: 100dvh;
    height: 100vw;
    height: 100dvw;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
  }
}

/* If the demo link is opened on a desktop browser, present it as a centered
   phone-shaped frame instead of a stretched full-window app. */
@media (min-width: 760px) {
  .app-fill {
    width: 440px;
    height: 92vh;
    height: 92dvh;
    max-height: 940px;
    inset: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 34px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
  }
}

/* ─────────────────────────────────────────────
   App shell inside the iOS frame
────────────────────────────────────────────── */
.os-root {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(120% 80% at 10% -10%, #1a1a1f 0%, transparent 55%),
    radial-gradient(80% 60% at 110% 105%, #14141a 0%, transparent 55%),
    linear-gradient(180deg, #0a0a0c 0%, #07070a 100%);
  color: var(--fg-0);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Subtle grain overlay for "high tech" feel */
.os-root::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.5;
  z-index: 0;
}

.os-content {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

/* ─────────────────────────────────────────────
   Top status / global chrome (very minimal)
────────────────────────────────────────────── */
.app-topbar {
  flex: none;
  padding: 66px 18px 8px;  /* top reserves space for iOS status bar / dynamic island */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: none;
}
.brand-mark .brand-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand-name {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-0);
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.top-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-pill {
  height: 30px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 99px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-edge);
  color: var(--fg-1);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.top-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--signal-ok);
  box-shadow: 0 0 8px var(--signal-ok);
}
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-edge);
  color: var(--fg-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 120ms ease;
}
.icon-btn:hover { background: rgba(255,255,255,0.06); }
.icon-btn svg { width: 15px; height: 15px; }

/* ─────────────────────────────────────────────
   Section labels (mono micro-caps)
────────────────────────────────────────────── */
.kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.kicker--bright { color: var(--fg-2); }

/* ─────────────────────────────────────────────
   Scroll containers
────────────────────────────────────────────── */
.scroll-y { overflow-y: auto; overflow-x: hidden; }
.scroll-y::-webkit-scrollbar { width: 0; }

/* ─────────────────────────────────────────────
   Dock
────────────────────────────────────────────── */
.dock-wrap {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  padding: 0 14px 22px;
  display: flex;
  justify-content: center;
  z-index: 60;
  pointer-events: none;
}
.dock {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border-radius: 24px;
  background: rgba(20, 20, 24, 0.55);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-dock);
  position: relative;
}
.dock::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0) 40%);
  pointer-events: none;
}
.dock-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--fg-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease;
}
.dock-btn svg { width: 19px; height: 19px; }
.dock-btn:hover { color: var(--fg-1); }
.dock-btn.is-active {
  color: var(--fg-0);
  background: rgba(255,255,255,0.06);
  border-color: var(--glass-edge-bright);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 6px 14px -6px rgba(0,0,0,0.6);
}
.dock-btn .badge {
  position: absolute;
  top: 6px; right: 6px;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--signal-err);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #15151a;
}
.dock-btn .badge--ok { background: var(--signal-ok); color: #0c0c0e; }
.dock-btn .avatar-dot {
  width: 20px; height: 20px;
  border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.16);
}
.dock-sep {
  width: 1px;
  height: 24px;
  background: var(--glass-edge);
  margin: 0 2px;
}

/* Tiny popover anchor indicator above active dock button */
.dock-btn.is-active::after {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 99px;
  background: var(--fg-0);
  box-shadow: 0 0 10px rgba(255,255,255,0.4);
}

/* ─────────────────────────────────────────────
   Drawer (right-side stacked card)
────────────────────────────────────────────── */
.drawer-scrim {
  position: absolute;
  top: 0; left: 0; right: 0;
  bottom: 88px; /* don't cover dock — keep it clickable */
  background: rgba(4, 4, 6, 0.5);
  backdrop-filter: blur(2px);
  z-index: 40;
  opacity: 0;
  transition: opacity 240ms ease;
  pointer-events: none;
}
.drawer-scrim.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 96px; /* sit above dock */
  width: calc(100% - 24px);
  z-index: 50;
  display: none;
  flex-direction: column;
  border-radius: var(--radius-2xl);
  background: rgba(20, 20, 24, 0.78);
  backdrop-filter: blur(36px) saturate(140%);
  -webkit-backdrop-filter: blur(36px) saturate(140%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.drawer.is-open {
  display: flex;
}

/* Landscape (calendar) container — drawer fills more of the screen since
   there's no dock to clear and no underlying day drawer */
.ls-wrap .drawer {
  top: 12px;
  bottom: 12px;
  right: 12px;
  left: 12px;
  width: auto;
}
.ls-wrap .drawer-body {
  /* In landscape the drawer is short and wide — layout as a column with side-by-side fields */
  padding: 12px 16px 14px;
}
.ls-wrap .drawer .field { margin-bottom: 12px; }
.ls-wrap .drawer .datestripe { padding: 6px; }
.ls-wrap .drawer .datestripe .half { height: 14px; font-size: 8px; }
.ls-wrap .drawer .datestripe .num { font-size: 9.5px; }
.ls-wrap .drawer .datestripe .dow { font-size: 7.5px; }

/* Stacked drawer — sits on top of another drawer */
.drawer.is-stacked {
  top: 24px;
  bottom: 108px;
  right: 6px;
  width: calc(100% - 18px);
}

.drawer-header {
  flex: none;
  padding: 16px 18px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--glass-edge-soft);
}
.drawer-title-block { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.drawer-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--fg-0); }
.drawer-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); }

.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px 22px; }
.drawer-body::-webkit-scrollbar { width: 0; }

.drawer-footer {
  flex: none;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--glass-edge-soft);
  display: flex;
  gap: 8px;
  background: rgba(12,12,14,0.4);
}

/* Buttons */
.btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.btn--ghost {
  background: rgba(255,255,255,0.03);
  border-color: var(--glass-edge);
  color: var(--fg-1);
}
.btn--ghost:hover { background: rgba(255,255,255,0.06); }
.btn--primary {
  background: var(--fg-0);
  color: #08080a;
  border-color: var(--fg-0);
}
.btn--primary:disabled {
  background: rgba(255,255,255,0.08);
  color: var(--fg-3);
  border-color: var(--glass-edge);
  cursor: not-allowed;
}
.btn--danger {
  background: rgba(217, 112, 112, 0.12);
  border-color: rgba(217, 112, 112, 0.32);
  color: var(--signal-err);
}
.btn--block { flex: 1; }

/* ─────────────────────────────────────────────
   Cards
────────────────────────────────────────────── */
.card {
  background: var(--glass-1);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-lg);
}
.card--strong { background: var(--glass-2); }

/* Day card (two-week view) */
.day-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: rgba(22, 22, 26, 0.6);
  border: 1px solid var(--glass-edge);
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 140ms ease, border-color 140ms ease;
  cursor: pointer;
}
.day-card:hover { background: rgba(28,28,32,0.7); border-color: var(--glass-edge-bright); }
.day-card.is-today { border-color: rgba(255,255,255,0.22); }
.day-card.is-today::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 2px;
  border-radius: 2px;
  background: var(--fg-0);
}
.day-card.is-closed {
  background: rgba(14,14,16,0.5);
}
.day-card.is-closed .day-shift { opacity: 0.35; }

.day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.day-num {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-0);
  line-height: 1;
}
.day-num .month {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-left: 8px;
  font-weight: 500;
}
.day-dow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-2);
}

.day-shift {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--glass-edge-soft);
}
.day-shift-mark {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--fg-3);
  text-transform: uppercase;
  width: 38px;
  flex: none;
}
.day-shift-stack {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}
.chip-dot {
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px 0 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-edge);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-1);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.chip-dot .dot {
  width: 7px; height: 7px; border-radius: 99px;
}
.chip-dot.is-more {
  color: var(--fg-3);
  background: transparent;
  border-style: dashed;
}
.day-shift-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-3);
  letter-spacing: 0.04em;
}

/* Empty shift state */
.day-shift.is-empty .day-shift-stack { color: var(--fg-3); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;}
.day-shift.is-closed {
  background: transparent;
  border-style: dashed;
}
.day-shift.is-closed .day-shift-stack { color: var(--fg-3); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; }

/* ─────────────────────────────────────────────
   Week separator
────────────────────────────────────────────── */
.week-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 2px 6px;
}
.week-sep .line { flex: 1; height: 1px; background: var(--glass-edge); }
.week-sep .label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--fg-3); text-transform: uppercase; }

/* ─────────────────────────────────────────────
   Range stepper (week / day nav)
────────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 40px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-edge);
}
.stepper button {
  width: 32px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--fg-1);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.stepper button:hover { background: rgba(255,255,255,0.05); color: var(--fg-0); }
.stepper .range {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
  padding: 0 8px;
}
.stepper .range .head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  line-height: 1.1;
}
.stepper .range .val {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg-0);
  line-height: 1.1;
}

/* ─────────────────────────────────────────────
   View tabs (Week / Two-week / Month)
────────────────────────────────────────────── */
.viewtabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-edge);
  gap: 2px;
}
.viewtabs button {
  height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  cursor: pointer;
}
.viewtabs button.is-active {
  background: rgba(255,255,255,0.08);
  color: var(--fg-0);
}

/* ─────────────────────────────────────────────
   Assignment list (Day detail)
────────────────────────────────────────────── */
.shift-section {
  border-radius: var(--radius-lg);
  background: rgba(22,22,26,0.5);
  border: 1px solid var(--glass-edge);
  overflow: hidden;
}
.shift-section + .shift-section { margin-top: 12px; }

.shift-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
}
.shift-section-head .left {
  display: flex; flex-direction: column; gap: 2px;
}
.shift-section-head .title {
  font-size: 15px; font-weight: 600; color: var(--fg-0); letter-spacing: -0.005em;
  display: flex; align-items: center; gap: 8px;
}
.shift-section-head .title .pulse {
  width: 6px; height: 6px; border-radius: 99px;
  background: var(--fg-0);
}
.shift-section-head .meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.section-group {
  padding: 8px 12px;
}
.section-group + .section-group { border-top: 1px dashed var(--glass-edge-soft); }
.section-group-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 8px;
}
.section-group-label .name {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.section-group-label .count {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--fg-3);
  letter-spacing: 0.06em;
}

.row-emp {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  border-radius: 10px;
  transition: background 120ms ease;
  cursor: pointer;
}
.row-emp:hover { background: rgba(255,255,255,0.03); }
.row-emp .swatch {
  width: 28px; height: 28px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 700; color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  flex: none;
}
.row-emp .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-emp .name { font-size: 14px; color: var(--fg-0); font-weight: 500; letter-spacing: -0.005em; }
.row-emp .pos { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.06em; }
.row-emp .remove {
  opacity: 0;
  transition: opacity 120ms ease;
  background: transparent;
  border: none;
  color: var(--fg-3);
  width: 24px; height: 24px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.row-emp:hover .remove { opacity: 1; }
.row-emp .remove:hover { color: var(--signal-err); background: rgba(217,112,112,0.08); }

.add-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 4px 8px 10px;
  border-radius: 10px;
  border: 1px dashed var(--glass-edge);
  background: transparent;
  cursor: pointer;
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: border-color 120ms ease, color 120ms ease;
  width: calc(100% - 16px);
}
.add-row:hover { border-color: var(--glass-edge-bright); color: var(--fg-0); }
.add-row svg { width: 14px; height: 14px; }

/* ─────────────────────────────────────────────
   Form bits (assign drawer)
────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field-label {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.field-label .hint { color: var(--fg-3); font-size: 9.5px; }

.emp-grid {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.emp-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 6px;
  border-radius: 99px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-edge);
  color: var(--fg-1);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  letter-spacing: -0.005em;
}
.emp-pill .swatch {
  width: 18px; height: 18px;
  border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 700; color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}
.emp-pill.is-active {
  background: rgba(255,255,255,0.07);
  border-color: var(--glass-edge-bright);
  color: var(--fg-0);
}

.select-row {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.choice {
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-edge);
  color: var(--fg-1);
  font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.choice.is-active { background: rgba(255,255,255,0.07); border-color: var(--glass-edge-bright); color: var(--fg-0); }
.choice .ic { font-size: 13px; }

/* Date stripe — also-add-to */
.datestripe {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-edge);
  border-radius: 12px;
}
.datestripe .cell { display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
.datestripe .num {
  font-family: var(--font-mono);
  font-size: 11px;
  text-align: center;
  color: var(--fg-2);
  letter-spacing: 0.02em;
  padding: 1px 0;
}
.datestripe .num.is-today { color: var(--fg-0); font-weight: 600; }
.datestripe .dow {
  font-family: var(--font-mono);
  font-size: 8.5px;
  text-align: center;
  color: var(--fg-4);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.datestripe .half {
  height: 18px;
  border-radius: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-edge);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--fg-3);
  letter-spacing: 0.16em;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.datestripe .half.is-current {
  background: var(--fg-0);
  border-color: var(--fg-0);
  color: #08080a;
}
.datestripe .half.is-on {
  background: rgba(255,255,255,0.16);
  color: var(--fg-0);
  border-color: var(--glass-edge-bright);
}

/* ─────────────────────────────────────────────
   Days-off preview panel (inside Assign drawer)
────────────────────────────────────────────── */
.days-off {
  margin-bottom: 18px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--glass-edge);
  position: relative;
}
.days-off::before {
  content: "";
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216,178,92,0.5), transparent);
}
.days-off-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.days-off-kicker {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--signal-warn);
  text-transform: uppercase;
  line-height: 1;
}
.days-off-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--fg-0);
  margin-top: 6px;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.days-off-count {
  font-size: 10.5px;
  color: var(--fg-3);
  font-weight: 500;
  letter-spacing: 0.06em;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-edge);
  padding: 1px 6px;
  border-radius: 99px;
}
.days-off-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.days-off-tab {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--glass-edge);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 100ms ease, transform 100ms ease;
}
.days-off-tab .swatch {
  width: 18px; height: 18px;
  border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700; color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  opacity: 0.55;
  transition: opacity 100ms ease;
}
.days-off-tab.is-active {
  border-color: var(--glass-edge-bright);
  background: rgba(255,255,255,0.06);
}
.days-off-tab.is-active .swatch { opacity: 1; }

.days-off-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.days-off-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--glass-edge-soft);
}
.days-off-row-left {
  flex: 1;
  min-width: 0;
}
.days-off-date {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg-0);
}
.days-off-reason {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--fg-2);
  margin-top: 2px;
  line-height: 1.4;
}
.days-off-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 99px;
  flex: none;
  border: 1px solid var(--glass-edge);
  white-space: nowrap;
}
.days-off-tag--allday {
  background: rgba(216,178,92,0.08);
  border-color: rgba(216,178,92,0.32);
  color: var(--signal-warn);
}
.days-off-tag--partial {
  background: rgba(255,255,255,0.04);
  color: var(--fg-2);
}

/* ─────────────────────────────────────────────
   Notification / status pills
────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-edge);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.tag .dot { width: 6px; height: 6px; border-radius: 99px; background: var(--fg-3); }
.tag--ok .dot { background: var(--signal-ok); }
.tag--warn .dot { background: var(--signal-warn); }
.tag--err .dot { background: var(--signal-err); }
.tag--event { color: var(--signal-warn); border-color: rgba(216,178,92,0.32); background: rgba(216,178,92,0.08); }
.tag--event .dot { background: var(--signal-warn); }

/* ─────────────────────────────────────────────
   Profile drawer bits
────────────────────────────────────────────── */
.profile-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-edge);
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-card .avatar {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 20px; font-weight: 700; color: #fff;
  border: 1px solid rgba(255,255,255,0.16);
}
.profile-card .who { display: flex; flex-direction: column; gap: 4px; }
.profile-card .who .name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.profile-card .who .role { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); letter-spacing: 0.14em; text-transform: uppercase; }

.color-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}
.color-grid button {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  position: relative;
  padding: 0;
}
.color-grid button.is-active {
  outline: 2px solid var(--fg-0);
  outline-offset: 2px;
}

/* Toggle */
.toggle {
  width: 38px; height: 22px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  transition: background 140ms ease;
  border: 1px solid var(--glass-edge);
  flex: none;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 99px;
  background: var(--fg-0);
  transition: transform 180ms ease;
}
.toggle.is-on { background: rgba(255,255,255,0.22); }
.toggle.is-on::after { transform: translateX(16px); }

/* Settings row */
.set-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-edge);
}
.set-row + .set-row { margin-top: 6px; }
.set-row .left { display: flex; flex-direction: column; gap: 2px; }
.set-row .left .t { font-size: 13.5px; color: var(--fg-0); }
.set-row .left .s { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.12em; text-transform: uppercase; }

/* Requests drawer cards */
.req-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-edge);
  display: flex; gap: 12px; align-items: flex-start;
}
.req-card + .req-card { margin-top: 8px; }
.req-card .swatch { width: 32px; height: 32px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: #fff; border: 1px solid rgba(255,255,255,0.15); }
.req-card .body { flex: 1; min-width: 0; }
.req-card .name { font-size: 14px; font-weight: 500; color: var(--fg-0); }
.req-card .when { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-2); letter-spacing: 0.06em; margin-top: 2px; }
.req-card .note { font-size: 12.5px; color: var(--fg-1); margin-top: 8px; line-height: 1.45; }
.req-card .actions { display: flex; gap: 6px; margin-top: 10px; }
.req-card .actions .btn { height: 30px; padding: 0 12px; font-size: 12px; }

/* Pill segmented at top of requests drawer */
.segmented {
  display: flex;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-edge);
  gap: 2px;
}
.segmented button {
  flex: 1;
  height: 30px;
  border-radius: 7px;
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  cursor: pointer;
}
.segmented button.is-active { background: rgba(255,255,255,0.08); color: var(--fg-0); }
.segmented button .badge {
  display: inline-block; min-width: 16px; padding: 0 4px;
  height: 14px; line-height: 13px;
  border-radius: 99px;
  background: rgba(217,112,112,0.16);
  color: var(--signal-err);
  font-size: 9.5px;
  margin-left: 6px;
  border: 1px solid rgba(217,112,112,0.24);
}

/* Section closed state in two-week */
.closed-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
  border: 1px dashed var(--glass-edge);
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--fg-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────
   Sheet (drawer for action confirm / picker)
   used internally — uses .drawer.is-stacked
────────────────────────────────────────────── */

/* Skeulur log mark text */
.mark-glyph {
  position: absolute;
  inset: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--fg-0);
  letter-spacing: -0.04em;
}

/* Mini metric */
.metric {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--glass-edge);
  display: flex; flex-direction: column; gap: 4px;
}
.metric .v { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.metric .k { font-family: var(--font-mono); font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.18em; text-transform: uppercase; }

/* ─────────────────────────────────────────────
   Landscape two-week / calendar grid
────────────────────────────────────────────── */
.ls-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  /* Sit below the iOS status bar (which is absolute top:0) */
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(80% 60% at 5% 0%, #1a1a1f 0%, transparent 60%),
    radial-gradient(60% 60% at 100% 100%, #14141a 0%, transparent 55%),
    linear-gradient(180deg, #0a0a0c 0%, #07070a 100%);
  color: var(--fg-0);
  overflow: hidden;
}

.ls-portrait-switch {
  height: 24px;
  padding: 0 10px 0 8px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-edge);
  color: var(--fg-1);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.ls-portrait-switch:hover { color: var(--fg-0); background: rgba(255,255,255,0.1); }

.ls-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(80% 60% at 5% 0%, #1a1a1f 0%, transparent 60%),
    radial-gradient(60% 60% at 100% 100%, #14141a 0%, transparent 55%),
    linear-gradient(180deg, #0a0a0c 0%, #07070a 100%);
  color: var(--fg-0);
  overflow: hidden;
}
.ls-shell::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

.ls-topbar {
  flex: none;
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--glass-edge-soft);
  background: rgba(12,12,14,0.4);
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 2;
}
.ls-brand { display: flex; align-items: center; gap: 10px; min-width: 140px; }

.ls-range {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ls-arrow {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-edge);
  color: var(--fg-1);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.ls-arrow:hover { background: rgba(255,255,255,0.06); color: var(--fg-0); }
.ls-range-label {
  text-align: center;
  padding: 0 8px;
  min-width: 220px;
}
.ls-range-val {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--fg-0);
  margin-top: 2px;
}

.ls-actions { display: flex; align-items: center; gap: 8px; min-width: 140px; justify-content: flex-end; }

/* The grid itself */
.ls-grid-scroll {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 12px 12px;
}
.ls-grid {
  display: grid;
  grid-template-columns: 78px repeat(7, minmax(0, 1fr));
  gap: 4px;
  min-width: 100%;
}

/* Top-left empty cell (so grid headers align) */
.ls-col-label {
  height: 40px;
}

/* Day headers */
.ls-day-head {
  height: 40px;
  border-radius: 9px;
  background: rgba(22, 22, 26, 0.55);
  border: 1px solid var(--glass-edge);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}
.ls-day-head.is-today {
  background: rgba(38, 38, 44, 0.75);
  border-color: rgba(255,255,255,0.22);
}
.ls-day-head.is-today::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%; transform: translateX(-50%);
  width: 3px; height: 3px;
  border-radius: 99px;
  background: var(--fg-0);
}
/* Subtle column highlight for today — uses background tint on shifts cells in that column */
.ls-grid .grid-cell.is-today-col {
  background: rgba(34, 34, 40, 0.7);
  border-color: rgba(255,255,255,0.14);
}
.ls-day-head .dow {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  line-height: 1;
}
.ls-day-head .num {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg-0);
}
.ls-day-head.is-today .num { color: var(--fg-0); }
.ls-day-head .month {
  display: none;
}

/* Row labels (Lunch / Dinner) */
.ls-row-label {
  border-radius: 9px;
  background: rgba(22, 22, 26, 0.55);
  border: 1px solid var(--glass-edge);
  padding: 10px 10px;
  position: relative;
  overflow: hidden;
}
.ls-row-label::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--fg-2);
}
.ls-row-label--lunch::before { background: rgba(255,255,255,0.45); }
.ls-row-label--dinner::before { background: rgba(255,255,255,0.85); }
.ls-row-label-inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ls-row-label .row-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-0);
}
.ls-row-label .row-time {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.ls-row-label .dot { display: none; }

/* Shift cells */
.grid-cell {
  background: rgba(22, 22, 26, 0.5);
  border: 1px solid var(--glass-edge);
  border-radius: 9px;
  padding: 6px 6px 4px;
  display: flex;
  flex-direction: column;
  min-height: 130px;
  position: relative;
}
.grid-cell:hover { background: rgba(28, 28, 32, 0.65); }

.grid-cell--closed {
  align-items: center;
  justify-content: center;
  background: rgba(14,14,16,0.6);
  border-style: dashed;
  border-color: var(--glass-edge-soft);
  min-height: 130px;
}
.reopen {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-edge);
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}
.reopen:hover { color: var(--fg-0); border-color: var(--glass-edge-bright); background: rgba(255,255,255,0.07); }

.grid-cell-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.grid-sec {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.grid-sec-head {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-2);
  padding: 4px 2px 2px;
  border-bottom: 1px solid var(--glass-edge-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.grid-sec-head .grid-sec-count {
  color: var(--fg-4);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.grid-chip {
  font-size: 10.5px;
  font-family: var(--font-sans);
  color: var(--fg-0);
  padding: 2px 5px 2px 7px;
  border-radius: 3px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.005em;
}

.grid-cell-foot {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 6px;
  margin-top: 4px;
  border-top: 1px solid var(--glass-edge-soft);
}
.cell-act {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--glass-edge-soft);
  color: var(--fg-3);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color 100ms ease, border-color 100ms ease, background 100ms ease;
}
.cell-act:hover { color: var(--fg-0); border-color: var(--glass-edge); background: rgba(255,255,255,0.05); }
.cell-act.is-on { color: var(--fg-0); }
.cell-act-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0 6px;
}
.cell-act:has(.cell-act-label) { width: auto; padding: 0 4px; margin-left: auto; }
.cell-event {
  margin-left: auto;
  color: var(--signal-warn);
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(216,178,92,0.1);
  border: 1px solid rgba(216,178,92,0.24);
}

/* ──────────────────────────────────────────────
   Form controls (shared across new drawers)
────────────────────────────────────────────── */
.sk-input, .sk-textarea, .sk-select {
  width: 100%;
  background: rgba(12,12,14,0.7);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-md);
  color: var(--fg-0);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 140ms ease, background 140ms ease;
}
.sk-input::placeholder, .sk-textarea::placeholder { color: var(--fg-3); }
.sk-input:focus, .sk-textarea:focus, .sk-select:focus {
  border-color: var(--glass-edge-bright);
  background: rgba(18,18,22,0.85);
}
.sk-textarea { resize: none; line-height: 1.5; }
.sk-select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-2) 50%), linear-gradient(135deg, var(--fg-2) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px;
}
.sk-select option { background: #15151a; color: var(--fg-0); }
.sk-money { position: relative; }
.sk-money .sk-input { padding-left: 24px; }
.sk-money .glyph { position: absolute; left: 12px; top: 11px; color: var(--fg-3); font-size: 13px; }
.sk-check {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 13px; color: var(--fg-1);
  background: none; border: none; padding: 0; width: 100%; text-align: left;
  font-family: var(--font-sans);
}
.sk-check .box {
  width: 18px; height: 18px; border-radius: 5px; flex: none;
  border: 1px solid var(--glass-edge-bright); background: rgba(12,12,14,0.7);
  display: flex; align-items: center; justify-content: center; color: #08080a;
  transition: background 120ms ease;
}
.sk-check.is-on .box { background: var(--fg-0); border-color: var(--fg-0); }

/* ──────────────────────────────────────────────
   Auth / login (entry screen)
────────────────────────────────────────────── */
.auth-root {
  height: 100%; display: flex; flex-direction: column; justify-content: safe center;
  padding: 24px 28px; position: relative; overflow-y: auto;
}
.app-fill .auth-root { padding-top: max(env(safe-area-inset-top, 0px), 24px); padding-bottom: max(env(safe-area-inset-bottom, 0px), 24px); }
.auth-root::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 45% at 50% 18%, rgba(90,90,102,0.16), transparent 70%);
  pointer-events: none;
}
.auth-card { position: relative; z-index: 1; width: 100%; }
.auth-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 22px; }
.auth-brand .brand-mark { width: 60px; height: 60px; border-radius: 16px; overflow: hidden; margin-bottom: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05); }
.auth-brand h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.auth-brand .sub {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--fg-2); margin-top: 8px;
}
.auth-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-2); margin-bottom: 7px; display: block;
}
.auth-err {
  font-size: 12.5px; color: var(--signal-err); background: rgba(217,112,112,0.1);
  border: 1px solid rgba(217,112,112,0.28); border-radius: var(--radius-md);
  padding: 9px 12px; margin-bottom: 14px;
}
.auth-skip { display: flex; gap: 10px; margin-top: 18px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 22px 0 16px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-3);
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--glass-edge);
}
.auth-link { background: none; border: none; color: var(--fg-2); font-size: 12.5px;
  cursor: pointer; text-align: center; width: 100%; margin-top: 18px; padding: 6px; }
.auth-link:hover { color: var(--fg-0); }

/* ──────────────────────────────────────────────
   Toasts
────────────────────────────────────────────── */
.toast-stack {
  position: absolute; top: 14px; left: 14px; right: 14px; z-index: 60;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px; border-radius: var(--radius-md);
  background: rgba(30,30,36,0.92); backdrop-filter: blur(24px);
  border: 1px solid var(--glass-edge); box-shadow: var(--shadow-lift);
  animation: toastIn 240ms cubic-bezier(0.2,0.8,0.2,1);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.toast .pip { width: 7px; height: 7px; border-radius: 99px; margin-top: 5px; flex: none; background: var(--fg-0); }
.toast--success .pip { background: var(--signal-ok); }
.toast--warn .pip { background: var(--signal-warn); }
.toast--error .pip { background: var(--signal-err); }
.toast .t-body { flex: 1; min-width: 0; }
.toast .t-title { font-size: 12.5px; font-weight: 600; color: var(--fg-0); }
.toast .t-msg { font-size: 11.5px; color: var(--fg-1); margin-top: 2px; line-height: 1.4; }
.toast .t-close { background: none; border: none; color: var(--fg-3); cursor: pointer; padding: 2px; flex: none; }
.toast .t-close:hover { color: var(--fg-0); }

/* "Viewing as" role switch (demo only) */
.role-switch { display: flex; padding: 3px; background: rgba(12,12,14,0.6);
  border: 1px solid var(--glass-edge); border-radius: 10px; gap: 2px; }
.role-switch button {
  flex: 1; height: 30px; border: none; background: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-2); border-radius: 8px;
}
.role-switch button.is-active { background: rgba(255,255,255,0.08); color: var(--fg-0); }

/* ──────────────────────────────────────────────
   Sheet modal (overlays inside a drawer)
────────────────────────────────────────────── */
.sheet-scrim {
  position: absolute; inset: 0;
  background: rgba(4, 4, 6, 0.6);
  backdrop-filter: blur(3px);
  z-index: 80;
  animation: scrimIn 200ms ease both;
}
@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }
.sheet-modal {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%;
  display: flex; flex-direction: column;
  background: rgba(24,24,28,0.98); backdrop-filter: blur(30px);
  border-top: 1px solid var(--glass-edge-bright);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  box-shadow: 0 -20px 50px -20px rgba(0,0,0,0.8);
  animation: sheetIn 240ms cubic-bezier(0.2,0.8,0.2,1) both;
}
@keyframes sheetIn { from { opacity: 0; } to { opacity: 1; } }
.sheet-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 12px; border-bottom: 1px solid var(--glass-edge-soft);
}
.sheet-modal-title { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.sheet-modal-body { overflow-y: auto; padding: 16px; flex: 1; }
.sheet-modal-foot { display: flex; gap: 10px; padding: 12px 16px 16px; border-top: 1px solid var(--glass-edge-soft); }

/* ──────────────────────────────────────────────
   Tabs (employee profile / management)
────────────────────────────────────────────── */
.sk-tabs { display: flex; border-bottom: 1px solid var(--glass-edge); margin-bottom: 16px; gap: 2px; }
.sk-tabs button {
  flex: 1; background: none; border: none; cursor: pointer; padding: 10px 4px;
  font-size: 12px; color: var(--fg-2); position: relative;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.sk-tabs button.is-active { color: var(--fg-0); }
.sk-tabs button.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: var(--fg-0); border-radius: 2px;
}
.sk-tabs button .cnt { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); }

/* employee list card */
.emp-card {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px;
  border-radius: var(--radius-lg); background: var(--glass-1);
  border: 1px solid var(--glass-edge); cursor: pointer; margin-bottom: 8px;
  transition: border-color 140ms ease, background 140ms ease;
}
.emp-card:hover { border-color: var(--glass-edge-bright); background: var(--glass-2); }
.emp-card .swatch {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 15px;
}
.emp-card .meta { flex: 1; min-width: 0; }
.emp-card .meta .nm { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.emp-card .meta .sub { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 3px; }
.emp-card .pos-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.pos-chip {
  font-family: var(--font-mono); font-size: 10px; padding: 2px 7px; border-radius: 99px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--glass-edge); color: var(--fg-1);
}

/* HR cards (notes / leave / history) */
.hr-card {
  padding: 13px 14px; border-radius: var(--radius-lg); background: var(--glass-1);
  border: 1px solid var(--glass-edge); margin-bottom: 8px; border-left-width: 3px;
}
.hr-card .hr-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.hr-card .hr-title { font-size: 14px; font-weight: 600; }
.hr-card .hr-body { font-size: 12.5px; color: var(--fg-1); line-height: 1.5; margin-top: 4px; }
.hr-card .hr-foot { font-family: var(--font-mono); font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 8px; }
.hr-card .hr-actions { display: flex; gap: 6px; margin-top: 10px; }
.hr-card--discipline { border-left-color: var(--signal-err); }
.hr-card--attendance { border-left-color: var(--signal-warn); }
.hr-card--positive { border-left-color: var(--signal-ok); }
.hr-card--general { border-left-color: var(--glass-edge-bright); }

.hr-empty { text-align: center; padding: 36px 16px; color: var(--fg-3); }
.hr-empty .font-mono { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }

/* timeline */
.hr-time { position: relative; padding-left: 20px; }
.hr-time::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: var(--glass-edge); }
.hr-time .node { position: relative; padding-bottom: 16px; }
.hr-time .node::before { content: ""; position: absolute; left: -19px; top: 4px; width: 8px; height: 8px; border-radius: 99px; background: var(--fg-2); border: 2px solid var(--ink-1); }
.hr-time .node .when { font-family: var(--font-mono); font-size: 9.5px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; }
.hr-time .node .chg { font-size: 13px; margin-top: 3px; }
.hr-time .node .rsn { font-size: 12px; color: var(--fg-2); margin-top: 2px; }
