/* =====================================================================
   Creative Club Work Tracker — styles (Design System v1.0, Phase 1)
   Brand: Yellow #FBED1B · Black #0D0D0D · White #FFFFFF
   Tech accent: Signal Blue #2A62D6 · Mist Blue #EEF4FF
   Fonts (all stored locally in /fonts):
     Plus Jakarta Sans → display & headings
     Inter            → body & interface
     JetBrains Mono   → codes, times, technical data (selective)
   Yellow is used as a background behind black text, never as text on white.
   ===================================================================== */

/* ---------------------------------------------------------------------
   Fonts (local files only; latin + latin-ext subsets)
   --------------------------------------------------------------------- */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/inter-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/inter-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------------------------------------------------------------------
   Design tokens
   --------------------------------------------------------------------- */
:root {
  /* Brand */
  --cc-yellow: #fbed1b;
  --cc-yellow-hover: #f2e20c;
  --cc-black: #0d0d0d;
  --cc-white: #ffffff;
  /* Technology accent */
  --blue: #2a62d6;
  --blue-700: #1e4fc2;
  --blue-300: #8fb4ff;
  --mist: #eef4ff;
  /* Neutrals */
  --canvas: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --hairline: #e4e7ec;
  --border: #d5d9e0;
  --ink: #0d0d0d;
  --ink-2: #33373d;
  --grey-600: #5b5f66;
  --grey-500: #6b7078;
  /* Sidebar (on black) */
  --nav-text: #e6e7ea;
  --nav-muted: #9aa0a6;
  --nav-hover: #17181a;
  --nav-active: #1f2023;
  --nav-line: #26272a;
  /* Status (text / tint) */
  --ok: #15703f;        --ok-bg: #e8f6ee;
  --warn: #b45309;      --warn-bg: #fff4e0;
  --danger: #c2362b;    --danger-bg: #fdedeb;
  --info: #1e4fc2;      --info-bg: #eef4ff;
  --neutral: #4b5058;   --neutral-bg: #eef1f5;
  /* Radius */
  --r-chip: 8px;
  --r-control: 12px;
  --r-card: 16px;
  --r-hero: 20px;
  --r-pill: 999px;
  /* Corner system: buttons and form fields match; badges and filter tabs are pills */
  --r-button: var(--r-control); /* 12px */
  --r-field: var(--r-control); /* 12px */
  /* Shadows */
  --shadow-card: 0 1px 2px rgba(13, 13, 13, 0.04), 0 8px 24px -12px rgba(13, 13, 13, 0.12);
  --shadow-raised: 0 12px 32px -12px rgba(13, 13, 13, 0.2);
  --shadow-dialog: 0 24px 56px -16px rgba(13, 13, 13, 0.3);
  --focus-ring: 0 0 0 3px rgba(42, 98, 214, 0.35);
  /* Layout */
  --nav-w: 248px;
  /* Typography */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Geeza Pro", "Noto Sans Arabic", Tahoma, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Geeza Pro", "Noto Sans Arabic", Tahoma, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--cc-yellow);
  color: var(--cc-black);
  padding: 8px 14px;
  border-radius: var(--r-control);
  font-weight: 600;
}
.skip-link:focus {
  left: 8px;
}

.loading {
  color: var(--grey-500);
  padding: 24px 0;
}
.boot {
  padding: 40px;
}
.noscript {
  padding: 24px;
}
.muted {
  color: var(--grey-500);
}
.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0;
}

/* Names and emails in any script display in their own direction */
.person-link,
.cell-email,
.sidenav-user-name,
.details dd,
.page-title {
  unicode-bidi: plaintext;
}

/* ---------------------------------------------------------------------
   Icons (Lucide, local SVG files used as masks → take the text colour)
   --------------------------------------------------------------------- */
.icon {
  display: inline-block;
  flex: none;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.icon-sm {
  width: 16px;
  height: 16px;
}
.icon-house { -webkit-mask-image: url("../assets/icons/house.svg"); mask-image: url("../assets/icons/house.svg"); }
.icon-users { -webkit-mask-image: url("../assets/icons/users.svg"); mask-image: url("../assets/icons/users.svg"); }
.icon-user-round { -webkit-mask-image: url("../assets/icons/user-round.svg"); mask-image: url("../assets/icons/user-round.svg"); }
.icon-log-out { -webkit-mask-image: url("../assets/icons/log-out.svg"); mask-image: url("../assets/icons/log-out.svg"); }
.icon-search { -webkit-mask-image: url("../assets/icons/search.svg"); mask-image: url("../assets/icons/search.svg"); }
.icon-calendar-check { -webkit-mask-image: url("../assets/icons/calendar-check.svg"); mask-image: url("../assets/icons/calendar-check.svg"); }
.icon-chart-column { -webkit-mask-image: url("../assets/icons/chart-column.svg"); mask-image: url("../assets/icons/chart-column.svg"); }
.icon-folder-kanban { -webkit-mask-image: url("../assets/icons/folder-kanban.svg"); mask-image: url("../assets/icons/folder-kanban.svg"); }
.icon-notebook-pen { -webkit-mask-image: url("../assets/icons/notebook-pen.svg"); mask-image: url("../assets/icons/notebook-pen.svg"); }
.icon-layout-dashboard { -webkit-mask-image: url("../assets/icons/layout-dashboard.svg"); mask-image: url("../assets/icons/layout-dashboard.svg"); }
.icon-chevron-right { -webkit-mask-image: url("../assets/icons/chevron-right.svg"); mask-image: url("../assets/icons/chevron-right.svg"); }
.icon-lock { -webkit-mask-image: url("../assets/icons/lock.svg"); mask-image: url("../assets/icons/lock.svg"); }
.icon-key-round { -webkit-mask-image: url("../assets/icons/key-round.svg"); mask-image: url("../assets/icons/key-round.svg"); }
.icon-mail { -webkit-mask-image: url("../assets/icons/mail.svg"); mask-image: url("../assets/icons/mail.svg"); }
.icon-briefcase-business { -webkit-mask-image: url("../assets/icons/briefcase-business.svg"); mask-image: url("../assets/icons/briefcase-business.svg"); }
.icon-calendar-days { -webkit-mask-image: url("../assets/icons/calendar-days.svg"); mask-image: url("../assets/icons/calendar-days.svg"); }
.icon-clock { -webkit-mask-image: url("../assets/icons/clock.svg"); mask-image: url("../assets/icons/clock.svg"); }
.icon-settings { -webkit-mask-image: url("../assets/icons/settings.svg"); mask-image: url("../assets/icons/settings.svg"); }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  background: var(--surface);
  color: var(--cc-black);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}
.btn-primary {
  background: var(--cc-yellow);
  border: 1.5px solid var(--cc-black);
}
.btn-ghost {
  background: var(--surface);
}
.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
.btn-danger-outline {
  border-color: #efb8b2;
  color: var(--danger);
}
.btn-block {
  width: 100%;
}

/* ---------------------------------------------------------------------
   Login
   --------------------------------------------------------------------- */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--canvas);
}
.login-brand {
  position: relative;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(42, 98, 214, 0.38), rgba(42, 98, 214, 0) 70%),
    radial-gradient(40% 35% at 10% 95%, rgba(42, 98, 214, 0.16), rgba(42, 98, 214, 0) 70%),
    var(--cc-black);
  color: var(--cc-white);
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  isolation: isolate;
}
/* Faint technical grid */
.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(143, 180, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 180, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.2));
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.2));
}
.login-logo {
  width: min(340px, 78%);
}
.login-product {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}
.login-tagline {
  margin: 0;
  max-width: 34ch;
  color: #c9ccd2;
  font-size: 17px;
  line-height: 1.55;
}
.login-bar {
  /* Replaced by the accent line below: the old bottom-edge bar sat behind
     the sign-in card on phones. The (decorative, hidden) element is kept. */
  display: none;
}
/* Decorative brand accent: a short, fully rounded yellow line above
   "Work Tracker", inside the black header (same idea as the Home card).
   Positioned absolutely so the header and sign-in card don't move. */
.login-brand-text {
  position: relative;
}
.login-brand-text::before {
  content: "";
  position: absolute;
  left: 0;
  top: -28px;
  width: 40px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--cc-yellow);
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}
.login-form {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--r-hero);
  box-shadow: var(--shadow-card);
  padding: 40px;
}
.login-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.login-sub {
  color: var(--grey-600);
  margin: 0 0 28px;
}
.login-help {
  color: var(--grey-500);
  font-size: 13.5px;
  margin: 18px 0 0;
  text-align: center;
}
.pw-wrap {
  position: relative;
}
.pw-wrap input {
  padding-right: 76px;
}
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: var(--r-chip);
  background: transparent;
  color: var(--blue);
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 10px;
  cursor: pointer;
}

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.req {
  color: var(--danger);
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-field);
  background: var(--surface);
  font-size: 16px; /* 16px stops phones zooming in */
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea {
  min-height: 92px;
  resize: vertical;
}
input::placeholder {
  color: var(--grey-500);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: var(--focus-ring);
  outline: none;
}
input:disabled {
  background: var(--surface-2);
  color: var(--grey-600);
  cursor: not-allowed;
}
.hint {
  color: var(--grey-500);
  font-size: 13px;
  line-height: 1.5;
  margin: 6px 0 0;
}
.form-error {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: var(--r-control);
  padding: 11px 14px 11px 16px;
  margin: 0 0 18px;
  font-weight: 500;
  box-shadow: inset 4px 0 0 var(--danger);
}
.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}
.form-card {
  max-width: 640px;
}

/* ---------------------------------------------------------------------
   App shell: persistent black sidebar + content
   --------------------------------------------------------------------- */
.shell {
  min-height: 100vh;
}
.topbar {
  display: none;
}
.sidenav {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--nav-w);
  background: var(--cc-black);
  color: var(--cc-white);
  display: flex;
  flex-direction: column;
  padding: 24px 14px 16px;
  overflow-y: auto;
  z-index: 30;
}
.sidenav :focus-visible {
  outline-color: var(--cc-yellow);
}
.sidenav-brand {
  display: block;
  text-decoration: none;
  padding: 4px 10px 22px;
  border-bottom: 1px solid var(--nav-line);
  margin-bottom: 14px;
}
.sidenav-logo {
  width: 100%;
  max-width: 196px;
}
.sidenav-product {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cc-white);
}
.navlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.navlink {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-control);
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
}
.navlink .icon {
  color: var(--nav-muted);
}
.navlink-active {
  background: var(--nav-active);
  color: #fff;
  font-weight: 600;
}
.navlink-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--cc-yellow);
}
.navlink-active .icon {
  color: var(--cc-yellow);
}
.navlist-heading {
  margin: 22px 12px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nav-muted);
}
.navlink-disabled {
  color: #7d8288;
  cursor: default;
  gap: 10px;
  font-size: 13.5px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.navlink-disabled .icon {
  color: #5d6167;
}
/* Keep each coming-soon label on one line next to its "Soon" tag */
.navlink > span:not(.icon):not(.soon-tag) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.navlink .icon,
.soon-tag {
  flex-shrink: 0;
}
.soon-tag {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: #1c1d20;
  color: var(--nav-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.sidenav-user {
  margin-top: auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: center;
  padding: 16px 8px 4px;
  border-top: 1px solid var(--nav-line);
}
.sidenav-user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}
.sidenav-user-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidenav-user-role {
  color: var(--nav-muted);
  font-size: 13px;
}
.btn-signout {
  grid-column: 1 / -1;
  margin-top: 12px;
  background: transparent;
  color: #fff;
  border: 1px solid #34363a;
  min-height: 40px;
}
.btn-signout .icon {
  color: var(--nav-muted);
}
.scrim {
  display: none;
}

.content {
  margin-left: var(--nav-w);
  padding: 36px clamp(20px, 3.2vw, 48px) 64px;
  max-width: calc(1320px + var(--nav-w));
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cc-yellow);
  color: var(--cc-black);
  font-weight: 700;
  font-size: 13px;
  flex: none;
}
.avatar-sm {
  width: 34px;
  height: 34px;
  font-size: 12px;
}
.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 20px;
}

/* ---------------------------------------------------------------------
   Page parts
   --------------------------------------------------------------------- */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 2.6vw, 32px);
  letter-spacing: -0.02em;
}
.page-count {
  display: block;
  color: var(--grey-600);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-weight: 600;
  font-size: 14px;
  color: var(--blue);
  text-decoration: none;
}
.card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
}
.card-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--grey-600);
  margin-bottom: 14px;
}
.card.empty {
  text-align: center;
  padding: 44px 24px;
  color: var(--ink-2);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 36px 0 14px;
  color: var(--ink);
}

/* ---------------------------------------------------------------------
   Home
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--r-hero);
  padding: 50px 40px 40px;
  color: #fff;
  background:
    radial-gradient(55% 90% at 100% 0%, rgba(42, 98, 214, 0.42), rgba(42, 98, 214, 0) 70%),
    var(--cc-black);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(143, 180, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 180, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
  mask-image: linear-gradient(90deg, transparent 30%, #000);
}
.hero::after {
  /* Decorative brand accent: a short, fully rounded yellow line above the date,
     kept well inside the card so it never looks cut off */
  content: "";
  position: absolute;
  left: 40px;
  top: 32px;
  width: 40px;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--cc-yellow);
}
.hero-date {
  margin: 0 0 10px;
  color: #b9bdc4;
  font-size: 14px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 3.6vw, 42px);
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.hero-role {
  margin: 0;
  color: #d5d8dd;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 150px;
  padding: 22px;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s;
}
.tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-control);
  background: var(--mist);
  color: var(--blue);
  margin-bottom: 10px;
}
.tile-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.tile-text {
  color: var(--grey-600);
  font-size: 14px;
  line-height: 1.5;
  padding-right: 24px;
}
.tile-arrow {
  position: absolute;
  right: 18px;
  top: 22px;
  color: var(--grey-500);
  font-size: 18px;
  font-weight: 600;
}
.tile-soon {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed var(--border);
  min-height: 132px;
}
.tile-soon .tile-icon {
  background: var(--surface-2);
  color: var(--grey-500);
}
.tile-soon .tile-title {
  color: var(--ink-2);
  font-size: 16px;
}
.tile-soon .tile-text {
  color: var(--grey-500);
}
.tile .soon-tag {
  position: absolute;
  top: 22px;
  right: 18px;
  background: var(--surface-2);
  color: var(--grey-600);
}

/* ---------------------------------------------------------------------
   Badges
   --------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-admin {
  background: var(--cc-black);
  color: var(--cc-yellow);
}
.badge-manager {
  background: #fff;
  color: var(--cc-black);
  border-color: var(--cc-black);
}
.badge-employee {
  background: var(--neutral-bg);
  color: var(--neutral);
}
.badge-active {
  background: var(--ok-bg);
  color: var(--ok);
}
.badge-former {
  background: var(--neutral-bg);
  color: var(--neutral);
}
.badge-active::before,
.badge-former::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-you {
  background: var(--cc-yellow);
  color: var(--cc-black);
}
.hero .badge-admin {
  background: var(--cc-yellow);
  color: var(--cc-black);
}
.hero .badge-manager,
.hero .badge-employee {
  background: #fff;
  color: var(--cc-black);
  border-color: #fff;
}
.badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ---------------------------------------------------------------------
   Team list
   --------------------------------------------------------------------- */
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.search-field {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
}
.search-field .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey-500);
  pointer-events: none;
}
.search-field input[type="search"] {
  padding-left: 42px;
  background: var(--surface);
}
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
}
.seg {
  border: 0;
  background: transparent;
  padding: 0 18px;
  min-height: 38px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 14px;
  color: var(--grey-600);
  cursor: pointer;
}
.seg-on {
  background: var(--cc-black);
  color: #fff;
  box-shadow: 0 1px 2px rgba(13, 13, 13, 0.2);
}
.table-wrap {
  padding: 0;
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-600);
  font-weight: 600;
  padding: 14px 18px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
.table td {
  padding: 14px 18px;
  border-bottom: 1px solid #eef0f3;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.row-link {
  cursor: pointer;
  transition: background 0.12s;
}
.cell-person {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cell-person-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}
.person-link {
  font-weight: 600;
  text-decoration: none;
}
.cell-person .muted {
  font-size: 13px;
}
.cell-email {
  word-break: break-all;
  color: var(--ink-2);
}
.login-state {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.login-state::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}
.login-linked::before {
  background: #1f9d57;
  box-shadow: 0 0 0 3px var(--ok-bg);
}
.login-waiting {
  color: var(--warn);
}
.login-waiting::before {
  background: #e0a800;
  box-shadow: 0 0 0 3px var(--warn-bg);
}

/* Person page */
.person-head {
  align-items: center;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
}
.person-head-main {
  display: flex;
  gap: 18px;
  align-items: center;
}
.details {
  margin: 0;
}
.details-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eef0f3;
}
.details-row:last-child {
  border-bottom: 0;
}
.details dt {
  color: var(--grey-600);
  font-size: 14px;
}
.details dd {
  margin: 0;
  font-weight: 500;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

/* Change history: timeline style (same data as before) */
.history {
  list-style: none;
  margin: 0;
  padding: 0 0 0 4px;
  position: relative;
}
.history-item {
  position: relative;
  padding: 0 0 18px 26px;
}
.history-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--blue);
}
.history-item::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: 2px;
  width: 1.5px;
  background: var(--hairline);
}
.history-item:last-child::after {
  display: none;
}
.history-item p {
  margin: 0;
}
.history-change {
  font-size: 14.5px;
}
.history-item .muted {
  font-size: 12.5px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.time-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--mist);
  color: var(--blue-700);
  font-size: 12px;
}

/* My account */
.profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
.profile-card .profile-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0;
  unicode-bidi: plaintext;
}
.profile-card .profile-meta {
  margin: 2px 0 8px;
  color: var(--grey-600);
  font-size: 14px;
  unicode-bidi: plaintext;
}

/* ---------------------------------------------------------------------
   Dialog
   --------------------------------------------------------------------- */
.dialog {
  border: 0;
  border-radius: var(--r-hero);
  padding: 0;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  box-shadow: var(--shadow-dialog);
}
.dialog::backdrop {
  background: rgba(13, 13, 13, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.dialog-inner {
  padding: 28px;
}
.dialog-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.dialog-text {
  color: var(--grey-600);
  margin: 0 0 20px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
   Toasts
   --------------------------------------------------------------------- */
.toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
  max-width: min(420px, calc(100vw - 40px));
}
.toast {
  background: var(--cc-black);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--r-control);
  box-shadow: var(--shadow-raised), inset 4px 0 0 var(--cc-yellow);
  transition: opacity 0.4s;
}
.toast-error {
  box-shadow: var(--shadow-raised), inset 4px 0 0 #ff6b5f;
}
.toast-hide {
  opacity: 0;
}

/* ---------------------------------------------------------------------
   Setup / no-access screens
   --------------------------------------------------------------------- */
.panel-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--canvas);
}
.panel-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-hero);
  box-shadow: var(--shadow-card);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
}
.panel-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--cc-yellow);
}
.panel-logo {
  width: 210px;
  margin-bottom: 28px;
}
.panel-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.panel-text {
  color: var(--grey-600);
  margin: 0 0 24px;
}

/* ---------------------------------------------------------------------
   Hover effects only on devices with a mouse
   --------------------------------------------------------------------- */
@media (hover: hover) {
  .btn:hover {
    border-color: #b9bfc8;
  }
  .btn-primary:hover {
    background: var(--cc-yellow-hover);
    border-color: var(--cc-black);
  }
  .btn-danger:hover {
    background: #a92e24;
  }
  .btn-danger-outline:hover {
    background: var(--danger-bg);
  }
  a.navlink:hover {
    background: var(--nav-hover);
    color: #fff;
  }
  a.navlink-active:hover {
    background: var(--nav-active);
  }
  .btn-signout:hover {
    border-color: var(--cc-yellow);
  }
  a.tile:hover {
    box-shadow: var(--shadow-raised);
    transform: translateY(-2px);
  }
  a.tile:hover .tile-arrow {
    color: var(--blue);
  }
  .row-link:hover td {
    background: var(--mist);
  }
  .person-link:hover {
    color: var(--blue);
  }
  .back-link:hover {
    text-decoration: underline;
  }
  .seg:not(.seg-on):hover {
    background: rgba(255, 255, 255, 0.7);
  }
}

/* ---------------------------------------------------------------------
   Tablet and phone
   --------------------------------------------------------------------- */
@media (max-width: 960px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .login {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .login-brand {
    padding: 28px 24px 34px;
    gap: 26px;
  }
  .login-logo {
    width: 210px;
  }
  .login-product {
    font-size: 38px;
    margin-bottom: 8px;
  }
  .login-tagline {
    font-size: 15px;
  }
  .login-brand-text::before {
    top: -15px;
  }
  .login-panel {
    align-items: flex-start;
    padding: 0 16px 40px;
    margin-top: -12px;
  }
  .login-form {
    padding: 28px 22px;
    border-radius: var(--r-hero);
  }

  .topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--cc-black);
    color: #fff;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
  }
  .topbar-logo {
    height: 26px;
    width: auto;
  }
  .topbar-product {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 11.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border-left: 1px solid #3a3b3f;
    padding-left: 12px;
    white-space: nowrap;
  }
  .menu-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid #3a3b3f;
    border-radius: var(--r-control);
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  .menu-toggle:focus-visible {
    outline-color: var(--cc-yellow);
  }
  .menu-icon,
  .menu-icon::before,
  .menu-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #fff;
    position: relative;
  }
  .menu-icon::before,
  .menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .menu-icon::before {
    top: -6px;
  }
  .menu-icon::after {
    top: 6px;
  }
  .sidenav {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    width: min(300px, 86vw);
    border-radius: 0 var(--r-hero) var(--r-hero) 0;
  }
  .nav-open .sidenav {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
  }
  .nav-open .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(13, 13, 13, 0.5);
    z-index: 25;
  }
  .content {
    margin-left: 0;
    padding: 20px 16px 56px;
  }
  .hero {
    padding: 40px 22px 30px;
  }
  .hero::after {
    left: 22px;
    top: 24px;
  }
}

@media (max-width: 720px) {
  /* Team table becomes cards */
  .table-wrap {
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }
  .table tr {
    background: var(--surface);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    margin-bottom: 12px;
    padding: 6px 0;
  }
  .table td {
    border: 0;
    padding: 6px 18px;
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
    align-items: center;
  }
  .table td > * {
    justify-self: start;
  }
  .table td[data-label]::before {
    content: attr(data-label);
    color: var(--grey-500);
    font-size: 13px;
  }
  .table td.cell-person {
    display: flex;
    padding-top: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef0f3;
    margin-bottom: 4px;
  }
  .search-field {
    max-width: none;
    flex-basis: 100%;
  }
  .segmented {
    width: 100%;
  }
  .seg {
    flex: 1;
  }
  .page-head .btn {
    width: 100%;
  }
  .page-actions {
    width: 100%;
  }
  .page-actions .btn {
    flex: 1;
  }
  .person-head {
    padding: 18px;
  }
  .details-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .card {
    padding: 18px;
  }
  .form-actions .btn {
    flex: 1;
  }
  .toasts {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
  .avatar-lg {
    width: 52px;
    height: 52px;
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}


/* =====================================================================
   Settings (build step 4)
   ===================================================================== */
.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13.5px;
}
.tabs {
  margin-bottom: 20px;
  max-width: 100%;
  overflow-x: auto;
}
.tabs .seg {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
}
.settings-body > * + * {
  margin-top: 20px;
}
.settings-body .grid-2 + .grid-2 {
  margin-top: 20px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-head .card-title {
  margin-bottom: 0;
}

/* Notices */
.notice {
  border-radius: var(--r-control);
  padding: 12px 14px 12px 16px;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
}
.notice-info {
  background: var(--info-bg);
  color: var(--info);
  box-shadow: inset 4px 0 0 var(--blue);
}
.notice-warn {
  background: var(--warn-bg);
  color: #7a3a06;
  box-shadow: inset 4px 0 0 var(--warn);
}

/* Rules */
.rule-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.35;
  margin: 0 0 6px;
}
.rule-text-sm {
  font-weight: 600;
  margin: 2px 0;
}
.rule-since {
  margin: 0;
  color: var(--ink-2);
  font-weight: 500;
}
.rule-meta {
  margin: 4px 0 0;
  font-size: 13px;
}
.rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rule-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eef0f3;
}
.rule-item:first-child {
  padding-top: 0;
}
.rule-item:last-child {
  border-bottom: 0;
}
.rule-preview {
  background: var(--surface-2);
  border-radius: var(--r-control);
  padding: 10px 14px;
  font-weight: 600;
  margin: 0 0 4px;
}

/* Tick boxes */
fieldset.checks {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  min-width: 0;
}
fieldset.checks legend {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink-2);
  margin-bottom: 8px;
  padding: 0;
}
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-field);
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
}
.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--cc-black);
  flex-shrink: 0;
}
.check:has(input:checked) {
  border-color: var(--cc-black);
  background: #fffbe0;
}
.check:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}
.check:has(input:focus-visible) {
  box-shadow: var(--focus-ring);
}

/* Year / month stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.stepper .btn {
  min-width: 40px;
  font-size: 18px;
  line-height: 1;
}
.stepper-label {
  min-width: 140px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
}

/* Holidays */
.holiday-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.holiday-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #eef0f3;
}
.holiday-item:first-child {
  padding-top: 0;
}
.holiday-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.holiday-main {
  flex: 1;
  min-width: 0;
}
.holiday-main p {
  margin: 0;
}
.holiday-name {
  font-weight: 600;
  overflow-wrap: anywhere;
  unicode-bidi: plaintext;
}
.holiday-past {
  opacity: 0.6;
}
.date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-control);
  background: var(--cc-yellow);
  color: var(--cc-black);
  flex-shrink: 0;
  line-height: 1.05;
}
.date-badge-day {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
}
.date-badge-month {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.badge-locked {
  background: var(--neutral-bg);
  color: var(--neutral);
}

/* Review step in dialogs */
.review-lead {
  font-weight: 600;
  margin: 14px 0 6px;
}
.review > .review-lead:first-child {
  margin-top: 0;
}
.effects,
.effects-list {
  margin: 0 0 14px;
  padding-left: 20px;
  line-height: 1.55;
  font-size: 14.5px;
}
.effects li + li {
  margin-top: 6px;
}
.effects-list {
  list-style: none;
  padding-left: 0;
}
.effect {
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  padding: 12px 14px;
}
.effect + .effect {
  margin-top: 10px;
}
.effect-head {
  font-weight: 700;
  margin: 0 0 4px;
}
.effect-line {
  margin: 4px 0 0;
  font-size: 14.5px;
  color: var(--ink-2);
}
.effect-warn {
  color: #7a3a06;
}

/* Calendar */
.cal-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin-bottom: 14px;
}
.cal-summary p {
  margin: 0;
}
.cal-total {
  font-weight: 600;
}
.cal-total-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.cal-head {
  font-size: 12px;
  font-weight: 600;
  color: var(--grey-600);
  text-align: center;
  padding-bottom: 2px;
}
.cal-cell {
  min-height: 64px;
  border-radius: var(--r-chip);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  overflow: hidden;
}
.cal-blank {
  background: transparent;
}
.cal-num {
  font-weight: 700;
  font-size: 14px;
}
.cal-label {
  line-height: 1.25;
  color: var(--grey-600);
  overflow-wrap: anywhere;
}
.cal-working {
  background: var(--surface);
  border: 1px solid var(--hairline);
}
.cal-weekly_off,
.cal-saturday_off {
  background: var(--surface-2);
}
.cal-holiday {
  background: #fff8c2;
}
.cal-holiday .cal-label {
  color: #5c5100;
  font-weight: 600;
}
.cal-today {
  box-shadow: inset 0 0 0 2px var(--blue);
}
.cal-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 14px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--grey-600);
}
.cal-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

@media (max-width: 720px) {
  .cal-grid {
    gap: 3px;
  }
  .cal-cell {
    min-height: 46px;
    padding: 4px;
  }
  .cal-label {
    display: none;
  }
  .cal-holiday .cal-num::after {
    content: " •";
    color: #8a7a00;
  }
  .holiday-item {
    flex-wrap: wrap;
  }
  .row-actions {
    width: 100%;
    padding-left: 66px;
  }
  .rule-item {
    flex-direction: column;
  }
  .stepper-label {
    min-width: 96px;
  }
}
.cal-holidays {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  font-size: 14px;
}
.cal-holidays li + li {
  margin-top: 4px;
}
.card + .toolbar {
  margin-top: 20px;
}
/* A list that is being refreshed after a save stays visible, slightly dimmed */
.settings-body [aria-busy="true"] {
  opacity: 0.55;
  transition: opacity 0.15s;
  pointer-events: none;
}

/* =====================================================================
   Attendance (build step 5)
   ===================================================================== */
.att-body > * + * {
  margin-top: 16px;
}
.att-datebar {
  flex-wrap: wrap;
  gap: 10px;
}
.att-date-label {
  min-width: 150px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
}
.att-date-pick input {
  width: auto;
  min-height: 40px;
  padding: 7px 12px;
}
.att-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.att-daytype {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 13px;
  background: var(--ok-bg);
  color: var(--ok);
}
.att-daytype-weekly_off,
.att-daytype-saturday_off {
  background: var(--neutral-bg);
  color: var(--neutral);
}
.att-daytype-holiday {
  background: #fff8c2;
  color: #5c5100;
}
.att-progress {
  color: var(--grey-600);
  font-weight: 500;
}
.att-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.att-actions-hint {
  margin: 0;
}

/* Status codes (always written; colour is never the only signal) */
.att-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 6px;
  border-radius: var(--r-chip);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  border: 1px solid transparent;
}
.att-code-present { background: var(--ok-bg); color: var(--ok); }
.att-code-wfh { background: var(--info-bg); color: var(--info); }
.att-code-paid_leave { background: #eef1f5; color: #475569; }
.att-code-unpaid_leave { background: var(--warn-bg); color: var(--warn); }
.att-code-absent { background: var(--danger-bg); color: var(--danger); }
.att-code-half_day { background: #fff7d6; color: #8a5a00; }
.att-code-unmarked {
  border: 1px dashed var(--border);
  color: var(--grey-500);
  background: transparent;
}

/* Rows */
.att-list {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.att-list[aria-busy="true"] {
  opacity: 0.55;
  pointer-events: none;
}
.att-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) auto minmax(150px, 0.6fr);
  align-items: center;
  gap: 12px 18px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--hairline);
}
.att-row:last-child {
  border-bottom: 0;
}
.att-row-changed {
  background: #fffbe0;
  box-shadow: inset 4px 0 0 var(--cc-yellow);
}
.att-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.att-person-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.att-name {
  font-weight: 600;
  overflow-wrap: anywhere;
  unicode-bidi: plaintext;
}
.att-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.att-chips {
  display: flex;
  gap: 6px;
}
.att-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-button);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
}
.att-chip-label {
  display: none;
}
.att-chip:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}
.att-chip-on.att-chip-present { background: var(--ok); border-color: var(--ok); color: #fff; }
.att-chip-on.att-chip-wfh { background: var(--info); border-color: var(--info); color: #fff; }
.att-chip-on.att-chip-paid_leave { background: #475569; border-color: #475569; color: #fff; }
.att-chip-on.att-chip-unpaid_leave { background: var(--warn); border-color: var(--warn); color: #fff; }
.att-chip-on.att-chip-absent { background: var(--danger); border-color: var(--danger); color: #fff; }
.att-chip-on.att-chip-half_day { background: #8a5a00; border-color: #8a5a00; color: #fff; }
.att-row-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.att-state {
  font-size: 13px;
  color: var(--grey-600);
  text-align: right;
}
.att-state-unmarked {
  color: var(--grey-500);
  font-style: italic;
}
.att-state-saved {
  color: var(--ok);
}
.att-state-changed {
  color: #7a5a00;
  font-weight: 600;
}
.att-problems {
  margin: 6px 0 10px;
  padding-left: 20px;
}

/* Sticky Save bar */
.att-savebar {
  position: static;
  bottom: 12px;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
}
.att-savebar-dirty {
  position: sticky; /* stays reachable only while there is something to save */
  background: var(--cc-black);
  color: #fff;
}
.att-savebar-dirty .btn-ghost {
  background: transparent;
  color: #fff;
  border-color: #3a3b3f;
}
.att-bar-text {
  font-weight: 600;
}
.att-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.history-after-close {
  box-shadow: inset 3px 0 0 var(--warn);
  padding-left: 10px;
}

/* My attendance */
.att-totals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}
.att-total {
  background: var(--surface);
  border-radius: var(--r-control);
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.att-total-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
}
.att-total-label {
  font-size: 13px;
  color: var(--grey-600);
}
.att-my-grid .cal-cell {
  gap: 4px;
}
.cal-outside,
.cal-future {
  opacity: 0.55;
}
.att-legend li .att-code {
  min-width: 30px;
  height: 20px;
  font-size: 11px;
}

@media (max-width: 720px) {
  .att-row {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .att-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .att-chip {
    min-height: 44px;
    flex-direction: column;
    gap: 0;
    padding: 4px;
  }
  .att-chip-label {
    display: block;
    font-family: var(--font);
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
  }
  .att-row-end {
    justify-content: space-between;
  }
  .att-savebar {
    bottom: 8px;
  }
  .att-savebar {
    padding: 10px 12px;
    gap: 8px;
  }
  .att-bar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 6px;
  }
  .att-bar-actions .btn {
    white-space: normal;
    line-height: 1.15;
    padding: 6px 8px;
    min-height: 44px;
  }
  .att-date-label {
    min-width: 0;
  }
  .att-my-grid .att-code {
    min-width: 0;
    width: 100%;
    font-size: 11px;
    padding: 0 2px;
  }
  .att-my-grid .cal-label {
    display: none;
  }
}
/* Keep notifications clear of the attendance Save bar: while there are
   unsaved changes they appear at the top instead of the bottom */
body:has(.att-savebar-dirty) .toasts {
  top: 24px;
  bottom: auto;
}
@media (max-width: 720px) {
  body:has(.att-savebar-dirty) .toasts {
    top: 76px;
  }
}

/* =====================================================================
   Reports and month closing (build step 6)
   ===================================================================== */
.rep-body > * + * {
  margin-top: 16px;
}
.rep-toolbar {
  margin-bottom: 0;
}
.rep-person-field select {
  min-width: 200px;
  max-width: 100%;
}
.rep-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.rep-status .hint {
  margin: 10px 0 0;
}
.rep-status .notice {
  margin: 12px 0 0;
}
.rep-version {
  font-weight: 700;
}
.badge-open {
  background: var(--ok-bg);
  color: var(--ok);
}
.rep-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rep-changes details {
  margin-top: 8px;
}
.rep-changes summary {
  cursor: pointer;
  font-weight: 600;
}
.rep-change-list,
.rep-check-list,
.rep-history-list {
  margin: 8px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}
.rep-history-list li p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
}
.rep-history-list li + li {
  margin-top: 6px;
}
.rep-reason {
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.rep-check .notice {
  margin-bottom: 10px;
}
.rep-check-list {
  max-height: 220px;
  overflow: auto;
  font-size: 14px;
}
.rep-close-anyway {
  margin-top: 12px;
}
.rep-former {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey-600);
  background: var(--surface-2);
  border-radius: var(--r-pill);
  padding: 2px 8px;
  vertical-align: middle;
}

/* Team table (computer and tablet) */
.rep-table-wrap {
  overflow-x: auto;
}
.rep-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  min-width: 100%;
}
.rep-table th,
.rep-table td {
  border-bottom: 1px solid #eef0f3;
  padding: 6px 3px;
  text-align: center;
  white-space: nowrap;
}
.rep-table thead th {
  background: #f8f9fb;
  font-weight: 600;
  color: var(--grey-600);
  position: sticky;
  top: 0;
}
.rep-table .rep-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  text-align: left;
  padding: 8px 12px 8px 16px;
  min-width: 150px;
  max-width: 220px;
  white-space: normal;
  overflow-wrap: anywhere;
  font-weight: 600;
  box-shadow: inset -1px 0 0 var(--hairline);
}
.rep-table thead .rep-name {
  background: #f8f9fb;
  z-index: 2;
}
.rep-table .rep-name a {
  color: var(--ink);
}
.rep-day {
  min-width: 30px;
}
.rep-day-num,
.rep-day-name {
  display: block;
  line-height: 1.2;
}
.rep-day-num {
  color: var(--ink);
  font-weight: 700;
}
.rep-day-name {
  font-size: 10.5px;
  font-weight: 500;
}
.rep-table .rep-weekly_off,
.rep-table .rep-saturday_off {
  background: var(--surface-2);
}
.rep-table .rep-holiday {
  background: #fff8c2;
}
.rep-table thead .rep-holiday {
  background: #fff3a0;
}
.rep-cell .att-code {
  min-width: 26px;
  height: 20px;
  padding: 0 3px;
  font-size: 10.5px;
}
.att-code-off {
  box-shadow: inset 0 0 0 1px currentColor;
}
.rep-table .rep-tot {
  font-variant-numeric: tabular-nums;
  padding: 6px 8px;
  font-weight: 600;
}
.rep-table thead .rep-tot {
  font-size: 11px;
}
.rep-table th.rep-tot:first-of-type,
.rep-table td.rep-tot:first-of-type {
  box-shadow: inset 1px 0 0 var(--hairline);
}
.rep-tot-warn {
  color: var(--warn);
}

/* Team cards (phone) */
.rep-cards {
  display: none;
}
.rep-card-name {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.rep-card .att-totals {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.rep-card .att-total {
  padding: 8px 10px;
  box-shadow: none;
  background: var(--surface-2);
}
.rep-card .att-total-num {
  font-size: 19px;
}
.rep-card .att-total-label {
  font-size: 12px;
  line-height: 1.25;
}

/* One person, day by day */
.rep-person-view > * + * {
  margin-top: 16px;
}
.rep-person-view .card-title .rep-former {
  font-family: var(--font);
}
.rep-days {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rep-dayrow {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 4px 12px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #eef0f3;
  font-size: 14px;
}
.rep-dayrow:last-child {
  border-bottom: 0;
}
.rep-dayrow.rep-weekly_off,
.rep-dayrow.rep-saturday_off {
  background: var(--surface-2);
}
.rep-dayrow.rep-holiday {
  background: #fff8c2;
}
.rep-dayrow-date {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rep-dayrow-type {
  color: var(--grey-600);
  overflow-wrap: anywhere;
}
.rep-dayrow-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rep-k-outside,
.rep-k-future {
  color: var(--grey-500);
}
.rep-legend {
  margin-top: 4px;
}

@media (max-width: 720px) {
  .rep-table-wrap {
    display: none;
  }
  .rep-cards {
    display: grid;
    gap: 12px;
  }
  .rep-toolbar {
    align-items: stretch;
  }
  .rep-person-field,
  .rep-person-field select {
    width: 100%;
  }
  .rep-toolbar .btn {
    flex: 1 1 auto;
  }
  .rep-dayrow {
    grid-template-columns: 1fr auto;
  }
  .rep-dayrow-type {
    grid-column: 1;
    grid-row: 2;
    font-size: 13px;
  }
  .rep-dayrow-status {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-content: flex-end;
    text-align: right;
  }
  .rep-status-line .muted {
    flex-basis: 100%;
  }
}

/* Reports: keep the name (left) and the totals (right) in view while the
   dates scroll sideways inside the table on smaller computer screens. */
.rep-table .rep-tot {
  position: sticky;
  z-index: 1;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  padding: 6px 2px;
  background: var(--surface);
}
.rep-table thead .rep-tot {
  background: #f8f9fb;
  z-index: 2;
}
.rep-table tr > .rep-tot:nth-last-child(1) { right: 0; }
.rep-table tr > .rep-tot:nth-last-child(2) { right: 42px; }
.rep-table tr > .rep-tot:nth-last-child(3) { right: 84px; }
.rep-table tr > .rep-tot:nth-last-child(4) { right: 126px; }
.rep-table tr > .rep-tot:nth-last-child(5) { right: 168px; }
.rep-table tr > .rep-tot:nth-last-child(6) { right: 210px; }
.rep-table tr > .rep-tot:nth-last-child(7) { right: 252px; }
.rep-table tr > .rep-tot:nth-last-child(8) { right: 294px; }
.rep-table tr > .rep-tot:nth-last-child(9) { right: 336px; box-shadow: inset 1px 0 0 var(--border), -6px 0 8px -6px rgba(13, 13, 13, 0.15); }
.rep-former-block {
  display: table;
  margin: 4px 0 0;
}
.rep-legend-abbr {
  flex-basis: 100%;
  color: var(--grey-600);
  font-size: 13px;
}
.rep-scroll-hint { margin: 0; }

/* =====================================================================
   Projects & tasks, Daily updates, Today at a glance (build step 7)
   ===================================================================== */
.work-body > * + *,
.upd-body > * + * {
  margin-top: 16px;
}
.work-toolbar {
  justify-content: space-between;
}
.work-selects {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.work-select select {
  width: auto;
  min-width: 180px;
  max-width: 260px;
  min-height: 40px;
  padding: 7px 12px;
  font-size: 15px;
}
.work-summary {
  margin: 0;
}
.pre-wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.link-button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.link-button:hover {
  color: var(--blue);
  text-decoration: underline;
}
.avatar-xs {
  width: 26px;
  height: 26px;
  font-size: 10.5px;
}
.cell-task-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
  gap: 2px;
}
.task-project {
  font-size: 13px;
}
.work-table .cell-person {
  gap: 8px;
  font-size: 14px;
}
.task-row-done .task-title,
.task-row-cancelled .task-title {
  color: var(--grey-600);
}
.task-row-cancelled .task-title {
  text-decoration: line-through;
}

/* Task status (always written; colour is never the only signal) */
.task-status-todo { background: var(--neutral-bg); color: var(--neutral); }
.task-status-in_progress { background: var(--info-bg); color: var(--info); }
.task-status-done { background: var(--ok-bg); color: var(--ok); }
.task-status-cancelled { background: var(--surface-2); color: var(--grey-600); text-decoration: line-through; }
.status-select {
  width: auto;
  min-width: 140px;
  min-height: 38px;
  padding: 6px 34px 6px 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--r-pill);
}
.status-select-in_progress { background: var(--info-bg); color: var(--info); border-color: #c9d8fb; }
.status-select-done { background: var(--ok-bg); color: var(--ok); border-color: #bfe3cd; }
.status-select-cancelled { background: var(--surface-2); color: var(--grey-600); }

/* Deadlines */
.due {
  display: inline-flex;
  align-items: center;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-2);
}
.due-overdue { color: var(--danger); font-weight: 600; }
.due-today { color: #7a3a06; font-weight: 600; }
.due-soon { color: var(--warn); }
.due-none,
.due-closed { color: var(--grey-500); }
.due-overdue::before,
.due-today::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 7px;
}

/* Projects */
.proj-status-active { background: var(--ok-bg); color: var(--ok); }
.proj-status-on_hold { background: var(--warn-bg); color: #7a3a06; }
.proj-status-completed { background: var(--neutral-bg); color: var(--neutral); }
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.proj-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.15s, transform 0.15s;
  min-width: 0;
}
.proj-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.proj-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  overflow-wrap: anywhere;
  min-width: 0;
}
.proj-client,
.proj-dates {
  font-size: 13.5px;
}
.proj-meta {
  display: flex;
  gap: 14px;
  font-size: 14px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.proj-overdue {
  color: var(--danger);
  font-weight: 600;
}
.proj-progress {
  display: block;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  overflow: hidden;
}
.proj-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--cc-black);
}
.proj-head-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
@media (hover: hover) {
  .proj-card:hover {
    box-shadow: var(--shadow-raised);
    transform: translateY(-1px);
  }
}

/* Forms inside dialogs */
.dialog:has(.work-form) {
  width: min(620px, calc(100vw - 32px));
}
.form-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.dialog-left {
  margin-right: auto;
}
.task-details .details-row {
  grid-template-columns: 110px 1fr;
}

/* Daily updates */
.upd-compose .card-title {
  margin-bottom: 16px;
}
.upd-counter {
  display: block;
  text-align: right;
}
.upd-toolbar {
  justify-content: space-between;
  margin-top: 28px;
}
.upd-list-title {
  margin: 0;
}
.upd-days {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.upd-day {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upd-day-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  margin: 0;
  color: var(--ink-2);
}
.upd-card {
  padding: 18px 20px;
}
.upd-person {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.upd-text {
  margin: 0 0 10px;
  line-height: 1.55;
}
.upd-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 13px;
}
.upd-task {
  display: inline-flex;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--mist);
  color: var(--info);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.upd-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

/* Today at a glance (Home) */
.glance-subtitle {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--grey-600);
  margin: 0 0 10px;
}
.glance-stats + .glance-subtitle {
  margin-top: 22px;
}
.glance-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.glance-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 20px;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  transition: box-shadow 0.15s, transform 0.15s;
}
.glance-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-600);
}
.glance-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.glance-note {
  font-size: 13px;
  color: var(--grey-500);
  overflow-wrap: anywhere;
}
.glance-alert {
  box-shadow: var(--shadow-card), inset 4px 0 0 var(--danger);
}
.glance-alert .glance-value {
  color: var(--danger);
}
.glance-todo {
  box-shadow: var(--shadow-card), inset 4px 0 0 var(--cc-yellow);
}
.glance-ok .glance-value {
  color: var(--ok);
}
.glance-deadlines {
  margin-top: 22px;
}
.deadline-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.deadline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #eef0f3;
}
.deadline-item:last-child {
  border-bottom: 0;
}
.deadline-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.35;
  font-size: 13.5px;
}
.deadline-title {
  font-weight: 600;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.glance-empty,
.glance-more {
  margin: 6px 0 0;
  font-size: 14px;
}
@media (hover: hover) {
  .glance-stat:hover {
    box-shadow: var(--shadow-raised);
    transform: translateY(-1px);
  }
  .glance-alert:hover {
    box-shadow: var(--shadow-raised), inset 4px 0 0 var(--danger);
  }
  .glance-todo:hover {
    box-shadow: var(--shadow-raised), inset 4px 0 0 var(--cc-yellow);
  }
}
@media (max-width: 1100px) {
  .glance-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .work-selects,
  .work-select,
  .work-select select {
    width: 100%;
    max-width: none;
  }
  .form-2 {
    grid-template-columns: 1fr;
  }
  .work-table td.cell-task {
    display: block;
    padding-top: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef0f3;
    margin-bottom: 4px;
  }
  .status-select {
    min-width: 0;
  }
  .glance-stats {
    gap: 10px;
  }
  .glance-stat {
    padding: 14px 16px;
  }
  .glance-value {
    font-size: 24px;
  }
  .upd-actions {
    margin-left: 0;
    width: 100%;
  }
  .upd-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .dialog-left {
    margin-right: 0;
    order: 3;
  }
}
@media (max-width: 720px) {
  /* Five filter choices must fit a phone screen without sideways scrolling */
  .work-toolbar .segmented {
    overflow-x: auto;
    max-width: 100%;
  }
  .work-toolbar .seg {
    padding: 0 8px;
    font-size: 13.5px;
    white-space: nowrap;
  }
}
