/* Orbit — Eclipse360 internal project console.
 * v14: light treatment, matched to the new eclipse3sixty.com direction
 * (cream ground, near-black ink, burnt orange accent, Cormorant Garamond
 * headlines with an italic orange turn, DM Sans for everything else) and
 * the calm, rounded feel of the wellness-app references Jay picked.
 *
 * Every selector the JS relies on is unchanged from v13; only the look
 * moved. Keep the two explicit [hidden] overrides (.sched-select-bar and
 * .fcast-day-cards) -- see the notes beside them.
 */

:root {
  --bg: #F5F2EC;
  --card: #FFFFFF;
  --card-soft: #F8F4EE;
  --card-border: #ECE5DA;
  --line: #E4DDD2;
  --text: #1A1817;
  --body: #4A4640;
  --muted: #6B6760;
  --accent: #C94F1A;        /* fills, bars, rings */
  --accent-ink: #B4461A;    /* accent as text on cream/white, passes 4.5:1 */
  --accent-text: #FFFFFF;
  --ok: #2F6B45;
  --warn: #7A4E0F;
  --danger: #B42318;
  --alert: #D92D20;
  --shadow-sm: 0 1px 2px rgba(26, 24, 23, 0.05);
  --shadow-md: 0 1px 2px rgba(26, 24, 23, 0.05), 0 8px 24px rgba(26, 24, 23, 0.05);
  --shadow-lg: 0 12px 32px rgba(26, 24, 23, 0.08);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

/* Anything given the hidden attribute stays hidden, whatever display its
   own class sets. This exact bug (a class's display:flex beating [hidden])
   bit the select bar, the carried list and then the status legend; this
   one rule ends it everywhere. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  /* Nothing on the page should ever be able to push it wider than the
     viewport -- any element that needs to scroll sideways (the Schedule
     board) does so in its own box, never the whole page. */
  overflow-x: hidden;
}
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 520px at 85% -10%, rgba(201, 79, 26, 0.10), rgba(201, 79, 26, 0) 70%),
    var(--bg);
  background-repeat: no-repeat;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 700; }

a { color: var(--accent-ink); }
a:hover { color: #8A3414; }

.mono { font-variant-numeric: tabular-nums; }

/* ---------- Avatars ---------- */

.avatar {
  border-radius: 999px;
  object-fit: cover;
  object-position: center 22%;
  display: inline-block;
  flex: 0 0 auto;
  background: var(--card-soft);
}
.avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1A1817;
  color: #F5F2EC;
  font-weight: 600;
  font-family: var(--sans);
}
.avatar-ring { box-shadow: 0 0 0 3px #FFFFFF, 0 6px 16px rgba(26, 24, 23, 0.10); }
.avatar-ring-light { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.75); }
.avatar-all { background: var(--accent); color: #FFFFFF; font-size: 13px; }

/* ---------- Wordmark + topbar ---------- */

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.wordmark:hover { color: var(--text); }
.wordmark-name {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
}
.wordmark-by {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.wordmark-by .accent { color: var(--accent-ink); }

.topbar {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 40px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
}
.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.nav-link {
  color: var(--body);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover { color: var(--text); background: rgba(26, 24, 23, 0.05); }
.nav-link.active { background: var(--text); color: #FFFFFF; }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.who {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

/* ---------- Buttons + fields ---------- */

button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--text);
  padding: 0 20px;
  min-height: 44px;
  cursor: pointer;
  background: var(--text);
  color: #FFFFFF;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
button:hover { background: #2E2B28; }
button:disabled { opacity: 0.5; cursor: default; }
button.ghost {
  background: transparent;
  border: 1px solid #DCD5CA;
  color: var(--text);
}
button.ghost:hover { background: rgba(255, 255, 255, 0.8); border-color: #CFC6B8; }

input, textarea {
  font-family: inherit;
  font-size: 14px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 79, 26, 0.14);
}
input::placeholder, textarea::placeholder { color: #8E897F; }
textarea { min-height: 72px; resize: vertical; }

/* ---------- Layout ---------- */

.wrap {
  max-width: 880px;
  margin: 28px auto;
  padding: 0 40px 64px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.wrap.wide { max-width: 1200px; }
.wrap.full { max-width: 1440px; }

.card {
  background: var(--card);
  border: none;
  border-radius: 28px;
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
}

.status-line { color: var(--muted); font-size: 13px; }
.error-text { color: var(--danger); }
.empty { color: var(--muted); padding: 24px 0; text-align: center; }
.empty-inline { color: var(--muted); font-size: 13px; }

.back-link {
  align-self: flex-start;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
}
.back-link:hover { color: var(--accent-ink); }

/* ---------- Hero (greeting + page titles) ---------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 12px 0 6px;
}
.hero-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 520px;
  min-width: 0;
}
.hero-eyebrow { display: flex; align-items: center; gap: 14px; }
.eyebrow {
  font-size: 12px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 600;
}
.eyebrow-muted {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.hero-title {
  margin: 0;
  font-size: 68px;
  line-height: 1.02;
  letter-spacing: -1px;
}
.hero-title em { color: var(--accent); font-style: italic; }
.hero-sub {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--body);
  max-width: 600px;
}

/* Team capacity ring on the Schedule greeting */
.cap-ring-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 26px;
  background: #FFFFFF;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}
.cap-ring { width: 88px; height: 88px; flex: 0 0 auto; }
.cap-ring-track { fill: none; stroke: #EFE9DF; stroke-width: 9; }
.cap-ring-fill { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray 0.4s ease; }
.cap-ring-fill.over { stroke: var(--danger); }
.cap-ring-pct { font-family: var(--sans); font-size: 18px; font-weight: 600; fill: var(--text); }
.cap-ring-text { display: flex; flex-direction: column; gap: 4px; }
.cap-ring-hours { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1; }
.cap-ring-of { font-size: 20px; color: var(--muted); }
.cap-ring-note { font-size: 12px; color: var(--muted); }

/* ---------- Login ---------- */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--card);
  border-radius: 32px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.login-card h1 {
  margin: 28px 0 6px;
  font-size: 44px;
  line-height: 1.05;
}
.login-card h1 em { color: var(--accent); }
.login-card .sub {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 15px;
}
.login-card form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-card button { margin-top: 6px; }

.error-banner {
  background: #FBEDE5;
  color: #8A3414;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ---------- All Jobs list ---------- */

.list-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.list-controls input[type=search] { flex: 1 1 260px; border-radius: 999px; padding: 12px 20px; }
.list-controls .status-line { flex: 1 1 auto; }

.jobs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.jobs-table th, .jobs-table td {
  text-align: left;
  padding: 15px 20px;
  border-bottom: 1px solid #F0EBE3;
  font-size: 14px;
}
.jobs-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  cursor: pointer;
  user-select: none;
  background: var(--card-soft);
}
.jobs-table th.sorted { color: var(--text); }
.jobs-table tbody tr:last-child td { border-bottom: none; }
.jobs-table tbody tr.job-row { cursor: pointer; transition: background 0.12s ease; }
.jobs-table tbody tr.job-row:hover { background: #FBF8F3; }
.jobs-table td.mono { color: var(--muted); }

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--card-soft);
  color: var(--muted);
}
.pill.status-open { color: var(--ok); background: #E3EFE6; }
.pill.status-on-hold { color: var(--warn); background: #F6E9D3; }

/* ---------- Job Hub ---------- */

#job-hub-content { display: flex; flex-direction: column; gap: 22px; }

/* Job page: On the schedule + Brief */
.job-sched-list { display: flex; flex-direction: column; gap: 8px; }
.job-sched-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: var(--card-soft);
  color: var(--text);
  text-align: left;
  font-weight: 400;
}
.job-sched-row:hover { background: #F3EEE6; border-color: rgba(201, 79, 26, 0.35); }
.job-sched-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.job-sched-title { font-size: 14px; font-weight: 500; }
.job-sched-meta { font-size: 12px; color: var(--muted); }
.job-brief { display: flex; flex-direction: column; gap: 8px; }
.job-brief-title { font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.1; }
.job-brief-objective { margin: 0; font-size: 14px; line-height: 1.5; color: var(--body); }
.job-brief-open { align-self: flex-start; font-weight: 500; text-decoration: none; padding: 10px 18px; border-radius: 999px; background: var(--text); color: #FFFFFF; font-size: 14px; }
.job-brief-open:hover { color: #FFFFFF; background: #2E2B28; }
.job-brief-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) { .job-sched-row { flex-wrap: wrap; } }

/* The job's header is the one warm, image-like moment in the app: the
   burnt-orange gradient from the approved mockup, white type on top. */
.job-hero {
  border-radius: 36px;
  padding: 44px 44px 36px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background:
    radial-gradient(700px 360px at 85% 20%, #E0703F, rgba(224, 112, 63, 0) 70%),
    linear-gradient(135deg, #3A1A0C 0%, #8A3414 55%, #C94F1A 100%);
  box-shadow: var(--shadow-lg);
}
.job-hero h1 {
  margin: 0;
  font-size: 60px;
  line-height: 1;
  letter-spacing: -1px;
  color: #FFFFFF;
  overflow-wrap: anywhere;
}
.job-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 500;
}
.job-hero-meta { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; }
.job-hero-field { display: flex; flex-direction: column; gap: 4px; font-size: 16px; font-weight: 500; }
.job-hero-person { flex-direction: row; align-items: center; gap: 12px; }
.job-hero-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
}
.job-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.fp-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.fp-link:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.12); }
.job-hero #add-to-schedule-btn { background: #FFFFFF; border-color: #FFFFFF; color: var(--text); }
.job-hero #add-to-schedule-btn:hover { background: #F5F2EC; }

.card h2 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.note-list, .link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.note-item {
  background: var(--card-soft);
  border-radius: 18px;
  padding: 14px 16px;
}
.note-text { white-space: pre-wrap; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.note-text a { text-decoration: underline; text-underline-offset: 2px; }
.note-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.note-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.link-item {
  background: var(--card-soft);
  border-radius: 18px;
  padding: 12px 16px;
}
.link-item a { font-size: 14px; font-weight: 500; text-decoration: none; }

.inline-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.inline-form input, .inline-form textarea { margin-bottom: 0; }
.inline-form button { align-self: flex-start; }

@media (max-width: 640px) {
  .wrap { margin: 16px auto; padding: 0 16px 48px; }
  .topbar { padding: 16px 16px 0; }
  .topbar-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .nav-link { white-space: nowrap; padding: 10px 14px; }
  .who-name { display: none; }
  .hero-title { font-size: 44px; }
  .job-hero { padding: 28px 22px; border-radius: 28px; }
  .job-hero h1 { font-size: 40px; }
  .cap-ring-card { width: 100%; }
  .jobs-table thead { display: none; }
  .jobs-table, .jobs-table tbody, .jobs-table tr, .jobs-table td {
    display: block;
    width: 100%;
  }
  .jobs-table tr {
    border-bottom: 1px solid #F0EBE3;
    padding: 10px 0;
  }
  .jobs-table td { border-bottom: none; padding: 4px 18px; }
}

/* ---------- Schedule (kanban) ---------- */

.sched-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  /* Fallback for a narrow window: the board scrolls sideways inside its
     own box rather than ever cutting a column off or widening the page
     (html/body has overflow-x: hidden as a backstop for that). Styled so
     the scrollbar itself is visible instead of a hairline that's easy to
     miss. */
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #D6CEC2 transparent;
}
.sched-board::-webkit-scrollbar { height: 10px; }
.sched-board::-webkit-scrollbar-track { background: transparent; }
.sched-board::-webkit-scrollbar-thumb {
  background: #D6CEC2;
  border-radius: 999px;
}
.sched-board::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.sched-col {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  padding: 16px;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sched-col-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 0;
}
.sched-col-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sched-col-head h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1;
}
.sched-col-count {
  color: var(--muted);
  font-size: 12px;
}
.sched-col-cap { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 4px; }
.sched-col-cap-text {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--body);
}
.sched-col-cap-text .over { color: var(--danger); font-weight: 600; }
.sched-col-cap-text span:last-child:not(.over) { color: var(--muted); }
.sched-col-cap-bar { height: 6px; border-radius: 999px; background: #EFE9DF; overflow: hidden; }
.sched-col-cap-fill { height: 100%; border-radius: 999px; background: var(--accent); }
.sched-col-cap-fill.over { background: var(--danger); }

.sched-col-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 60px;
  border-radius: 20px;
  padding: 2px;
  transition: background 0.1s ease;
}
.sched-col-body.drag-over {
  background: rgba(201, 79, 26, 0.06);
  outline: 2px dashed rgba(201, 79, 26, 0.5);
}

.sched-card {
  background: var(--card);
  border-radius: 22px;
  padding: 16px 16px 14px;
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: var(--shadow-md);
  border: 1px solid transparent;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.sched-card:hover { border-color: rgba(201, 79, 26, 0.45); }
.sched-card.dragging { opacity: 0.4; }

/* Drop-position indicator while dragging a card over another one -- shows
   exactly which side it'll land on, for reordering within or across a
   column (see moveCard() in schedule.js). */
.sched-card.drop-before { box-shadow: 0 -4px 0 0 var(--accent), var(--shadow-md); }
.sched-card.drop-after { box-shadow: 0 4px 0 0 var(--accent), var(--shadow-md); }

/* Multi-select mode: cards aren't draggable while picking several to
   remove, so the cursor reads as "click to pick" rather than "drag me",
   and a checkbox sits top-right of each card. */
.sched-card.sched-select-mode {
  position: relative;
  cursor: pointer;
  padding-right: 40px;
}
.sched-card.sched-select-mode.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent) inset, var(--shadow-md);
  background: #FDF6F1;
}
.sched-card-checkbox {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  cursor: pointer;
  accent-color: var(--accent);
}

.sched-select-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px 10px 20px;
  background: var(--card);
  border-radius: 999px;
  font-size: 13px;
  box-shadow: var(--shadow-md);
}
/* Same specificity as the rule above, so without this the [hidden]
   attribute's own display:none (a user-agent default, lower priority than
   any author rule) would silently lose to display:flex here. */
.sched-select-bar[hidden] { display: none; }
#sched-select-count,
#fcast-select-count {
  color: var(--text);
  font-weight: 600;
  margin-right: 4px;
}
#fcast-select-bar { margin-bottom: 16px; }

.sched-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sched-docket {
  color: var(--muted);
  font-size: 12px;
}
.sched-hours {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--card-soft);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.sched-hours:hover { background: #EFE9DF; }
.sched-hours-input {
  width: 72px;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 999px;
}

.sched-card-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

/* Small muted line under the title: tells the creative at a glance that
   there's something to open before they start -- instructions, a brief,
   or links (a proof to review, a Dropbox folder) -- without having to
   click in to find out. */
/* Links right on the card: the docket's Function Point links plus the
   card's own, up to three, each opening in a new tab. */
.sched-card-links { display: flex; flex-wrap: wrap; gap: 6px; }
.sched-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #FBEDE5;
  color: #8A3414;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}
.sched-card-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-card-link:hover { background: #F8E1D6; color: #6B2A0F; }
.sched-card-links-more { font-size: 12px; color: var(--muted); align-self: center; }
/* The job's latest note, right on the card (see cardNoteHtml). */
.sched-card-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--card-soft);
}
.sched-card-note.is-new { background: #FDF1EE; box-shadow: inset 0 0 0 1px rgba(217, 45, 32, 0.25); }
.sched-card-note-head { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.sched-note-label { font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; font-size: 10px; color: var(--muted); }
.sched-note-new {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 10px;
  color: #FFFFFF;
  background: var(--alert);
  padding: 2px 7px;
  border-radius: 999px;
}
.sched-card-note { min-width: 0; }
.sched-card-note-text {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sched-card-note-more { font-size: 11px; color: var(--muted); }

/* Notes thread in the card window */
.sched-notes { display: flex; flex-direction: column; gap: 10px; }
.sched-notes-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 500; color: var(--body); flex-wrap: wrap; }
.sched-notes-list { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.sched-notes-add { display: flex; flex-direction: column; gap: 8px; }
.sched-notes-add textarea { min-height: 64px; }
.sched-notes-add-btn { align-self: flex-start; }
.note-meta-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.h2-hint { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; margin-left: 8px; color: var(--muted); }

/* Docket # check line under the field (see jobdata.js). */
.docket-check { font-size: 12px; color: var(--muted); min-height: 16px; }
.docket-check.ok { color: var(--ok); }
.docket-check.bad { color: var(--danger); font-weight: 500; }
.docket-check.warn { color: var(--warn); }

.sched-card-meta {
  font-size: 12px;
  color: var(--muted);
}

/* "New info" alert: a small red dot, the editor's photo when we have it,
   plus who/when, shown until anyone opens the card. */
.sched-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #F0EBE3;
  font-size: 12px;
  color: var(--body);
  font-weight: 500;
}
.sched-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--alert);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.15);
  flex: 0 0 auto;
}

/* ---------- Status legend ---------- */

.sched-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sched-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.sched-legend-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.sched-legend-swatch.sched-status-rush-due-today { background: var(--s-rush); }
.sched-legend-swatch.sched-status-scheduled { background: var(--s-scheduled); }
.sched-legend-swatch.sched-status-pending { background: var(--s-pending); }
.sched-legend-swatch.sched-status-on-proof { background: var(--s-proof); }
.sched-legend-swatch.sched-status-completed { background: var(--s-completed); }
.sched-legend-swatch.sched-status-holidays-vacation-sick { background: var(--s-holiday); }
.sched-legend-swatch.sched-status-meetings { background: var(--s-meeting); }

/* ---------- Status colours ----------
 * One colour per status. Soft tint + dark ink on the pill (readable at
 * 12px), the stronger dot colour on legend swatches and calendar stripes.
 */
:root {
  --s-rush: #C94F1A;
  --s-scheduled: #4F8C63;
  --s-pending: #6E8DB5;
  --s-proof: #3F8F92;
  --s-completed: #7E9470;
  --s-holiday: #8E72AA;
  --s-meeting: #B59A45;
}
.sched-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.sched-card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--card-soft);
  color: var(--muted);
}
.sched-card-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}
.sched-due {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.sched-due-overdue {
  color: var(--danger);
  font-weight: 600;
}
.sched-due-final {
  font-size: 12px;
  color: #9A3412;
  background: #FBEDE5;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 500;
}
.sched-card-status.sched-status-rush-due-today { color: #9A3412; background: #F8E1D6; }
.sched-card-status.sched-status-scheduled { color: #2F6B45; background: #E3EFE6; }
.sched-card-status.sched-status-pending { color: #3B5A80; background: #E6ECF4; }
.sched-card-status.sched-status-on-proof { color: #21605F; background: #DFEEED; }
.sched-card-status.sched-status-completed { color: #4D6342; background: #EAEDE6; }
.sched-card-status.sched-status-holidays-vacation-sick { color: #5E4479; background: #ECE6F1; }
.sched-card-status.sched-status-meetings { color: #6E5A1C; background: #F3ECD9; }

/* ---------- Links & instructions (in the card-detail modal) ---------- */



.sched-links-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sched-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-soft);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
}
.sched-link-item a {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sched-link-remove {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
  min-height: 0;
}
.sched-link-remove:hover { color: var(--danger); background: transparent; }
.sched-add-link-row {
  display: flex;
  gap: 8px;
}
.sched-add-link-row input { flex: 1; }
.sched-add-link-row input[name="linkDescription"] { flex: 0 0 40%; }
.sched-add-link-btn {
  flex: 0 0 auto;
}

@media (max-width: 1000px) {
  .sched-board {
    grid-template-columns: 1fr;
  }
  .sched-add-link-row { flex-direction: column; }
  .fcast-weekday-head, .fcast-week-row {
    grid-template-columns: 1fr;
  }
  .fcast-weekday-head { display: none; } /* each day already labels itself when stacked */
  .sched-field-row-3 { flex-direction: column; }
  .hero-title { font-size: 52px; }
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 24, 23, 0.32);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal {
  background: var(--card);
  border-radius: 28px;
  padding: 30px 32px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(26, 24, 23, 0.18);
}
.modal-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.modal-job-link { font-size: 14px; font-weight: 500; text-decoration: none; }
.modal h2 {
  margin: 0 0 20px;
  font-size: 32px;
  line-height: 1.05;
}
.modal form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* label/select were originally modal-only; the Brief tab is a full-page
   form (not a modal) that needs the exact same look, so these are generic
   now. Nothing else on the page sets its own label/select styling, so
   promoting them is a no-op everywhere else. */
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--body);
}
.sched-field-row {
  display: flex;
  gap: 14px;
}
.sched-field-row label { flex: 1; min-width: 0; }
select {
  font-family: inherit;
  font-size: 14px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 14px;
}
.modal textarea { min-height: 56px; }
.modal textarea.sched-instructions { min-height: 110px; }
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.modal-actions-right {
  display: flex;
  gap: 10px;
}

/* ---------- Brief tab ---------- */
/* Replaces Digital_Brief_Template.xlsx. Lives entirely in Orbit (api/brief.php,
   its own JSON file) -- Function Point has nowhere to put this content. See
   js/brief.js for the full writeup. */

.brief-subnav {
  display: flex;
  gap: 8px;
}
.brief-subnav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: #FFFFFF;
  border: 1px solid var(--line);
}
.brief-subnav-link:hover { color: var(--text); border-color: #CFC6B8; }
.brief-subnav-link.active {
  color: #FFFFFF;
  background: var(--text);
  border-color: var(--text);
}

.brief-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* .brief-form sits on a .card element, so without this it would inherit
   .card h2's small uppercase section-label treatment -- this is the
   form's real heading. */
.brief-form h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.05;
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
}

.brief-section-divider {
  margin: 10px 0 -2px;
  padding-top: 18px;
  border-top: 1px solid #F0EBE3;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}

.brief-deliverables-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
}
.brief-deliverables-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brief-deliverables-group h4 {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}
.brief-deliverable-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  font-weight: 400;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--card-soft);
}
.brief-deliverable-item input { width: auto; accent-color: var(--accent); }

.brief-bottom-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid #F0EBE3;
}
.brief-bottom-bar label { flex: 1; max-width: 360px; }

.brief-saved-list {
  display: flex;
  flex-direction: column;
}
.brief-saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 4px;
  border-bottom: 1px solid #F0EBE3;
  cursor: pointer;
}
.brief-saved-item:last-child { border-bottom: none; }
.brief-saved-item:hover .brief-saved-title { color: var(--accent-ink); }
.brief-saved-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.brief-saved-title {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brief-saved-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* The "a brief exists for this docket" banner inside the Schedule board's
   Edit job modal (see openCardDetail() in schedule.js). */
.sched-brief-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  background: #FBEDE5;
  border-radius: 18px;
  font-size: 13px;
  color: #6B2A0F;
}
.sched-brief-banner button { white-space: nowrap; }

/* ---------- Forecast tab ---------- */
/* A month calendar over the same cards Schedule uses (see js/forecast.js
   -- same schedCache, same api/schedule.php). 5 columns, Mon-Fri, since
   nothing gets scheduled on a weekend. */

.fcast-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}
.fcast-person-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fcast-person-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0 18px 0 6px;
  min-height: 46px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.fcast-person-tab:hover { background: #FFFFFF; }
.fcast-person-tab.active {
  background: var(--text);
  border-color: var(--text);
  color: #FFFFFF;
}
/* "All" is a sixth tab but not a sixth person -- a dashed border sets it
   apart from the five real name tabs sitting next to it. */
.fcast-person-tab-all {
  border-style: dashed;
  margin-left: 4px;
}
.fcast-person-tab-all.active { border-style: solid; }
.fcast-month-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fcast-month-nav h2 {
  margin: 0;
  font-size: 30px;
  min-width: 190px;
  text-align: center;
}
.fcast-month-nav .ghost {
  min-width: 44px;
  padding: 0 14px;
  font-size: 18px;
  line-height: 1;
}
#fcast-today-btn { font-size: 14px; }
.fcast-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
#fcast-add-btn { background: var(--accent); border-color: var(--accent); }
#fcast-add-btn:hover { background: #B4461A; }

/* A card that isn't actually due today but is showing on today's cell
   anyway -- undated, or overdue from an earlier day that never got done.
   See the "carried" badge in fcastCardHtml(). */
.fcast-card-carried {
  display: block;
  font-weight: 600;
  font-size: 11px;
  margin-top: 2px;
  color: var(--muted);
}
.fcast-card-carried.fcast-card-carried-overdue { color: var(--danger); }

/* Collapsed-by-default toggle for today's carried-over backlog -- same
   pattern as My Hours' Outstanding section (see .ts-outstanding-toggle),
   so a big backlog doesn't blow out today's cell by default. */
.fcast-carried-toggle {
  width: 100%;
  min-height: 0;
  background: transparent;
  border: 1px dashed rgba(201, 79, 26, 0.55);
  border-radius: 14px;
  padding: 8px 10px;
  margin-top: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.fcast-carried-toggle:hover { background: #FDF6F1; color: var(--text); }
.fcast-carried-caret { display: inline-block; margin-left: 4px; color: var(--accent-ink); }
#fcast-carried-list { margin-top: 6px; }

/* The job's real due date on a spread-job slice -- its dueDate is just
   "this day's hours", not the deadline. */
.fcast-card-final-due {
  display: block;
  color: #9A3412;
  font-weight: 600;
  font-size: 11px;
  margin-top: 2px;
}

/* Select mode -- same look as Schedule's .sched-card.sched-select-mode,
   just scoped to .fcast-card since these aren't .sched-card elements. */
.fcast-card.sched-select-mode {
  position: relative;
  padding-right: 26px;
}
.fcast-card.sched-select-mode.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent) inset;
  background: #FDF6F1;
}
.fcast-card .sched-card-checkbox {
  top: 7px;
  right: 7px;
  width: 14px;
  height: 14px;
}

.fcast-calendar { display: flex; flex-direction: column; }
.fcast-weekday-head {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.fcast-weekday-head div {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  font-weight: 600;
  padding: 0 8px;
}
.fcast-week-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.fcast-day {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  padding: 12px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.fcast-day.fcast-other-month { opacity: 0.5; }
.fcast-day.fcast-today {
  background: #FFFFFF;
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
}
.fcast-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.fcast-day-num {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.fcast-today .fcast-day-num { color: var(--accent-ink); }
.fcast-day-total { font-size: 12px; font-weight: 600; color: var(--muted); }
.fcast-day-total.fcast-over { color: var(--danger); }

/* Thin fill bar under the date -- the at-a-glance read of how full a
   person's day already is against the 7.5hr cap. */
.fcast-cap-bar {
  height: 4px;
  background: #EFE9DF;
  border-radius: 999px;
  overflow: hidden;
}
.fcast-cap-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}
.fcast-cap-fill.fcast-over { background: var(--danger); }

.fcast-day-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* #fcast-carried-list also carries the .fcast-day-cards class (same card
   layout), and its own display:flex ties [hidden] on specificity -- same
   bug as .sched-select-bar's once did (see schedule.js round six), same
   fix: an explicit override so [hidden] actually wins. */
.fcast-day-cards[hidden] { display: none; }
.fcast-card {
  background: var(--card-soft);
  border: 1px solid transparent;
  border-left: 3px solid #D6CEC2;
  border-radius: 12px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.35;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.fcast-card:hover { border-top-color: rgba(201, 79, 26, 0.45); border-right-color: rgba(201, 79, 26, 0.45); border-bottom-color: rgba(201, 79, 26, 0.45); }
.fcast-card .mono { color: var(--muted); }
/* Only rendered in the "All" view (see fcastCardHtml's showPerson) --
   a single-person tab already makes whose card it is obvious. */
.fcast-card-person {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-ink);
  margin-right: 4px;
}
.fcast-card.sched-status-rush-due-today { border-left-color: var(--s-rush); }
.fcast-card.sched-status-scheduled { border-left-color: var(--s-scheduled); }
.fcast-card.sched-status-pending { border-left-color: var(--s-pending); }
.fcast-card.sched-status-on-proof { border-left-color: var(--s-proof); }
.fcast-card.sched-status-completed { border-left-color: var(--s-completed); }
.fcast-card.sched-status-holidays-vacation-sick { border-left-color: var(--s-holiday); }
.fcast-card.sched-status-meetings { border-left-color: var(--s-meeting); }

/* ---------- My Hours (timesheet helper) ---------- */

.ts-header { margin-bottom: 4px; }
.ts-header h1 { margin: 0 0 4px; }
.ts-week-total {
  margin: 18px 0;
  font-size: 15px;
  color: var(--body);
}
.ts-week-total strong { color: var(--text); font-family: var(--serif); font-size: 26px; }
.ts-days {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ts-day, .ts-outstanding {
  background: var(--card);
  border: 1px solid transparent;
  border-radius: 22px;
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}
.ts-day-today { border: 2px solid var(--accent); }
.ts-outstanding { margin-top: 18px; }
.ts-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.ts-day-total { color: var(--muted); font-weight: 600; }
.ts-outstanding-toggle {
  width: 100%;
  min-height: 0;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.ts-outstanding-toggle:hover { background: none; }
.ts-outstanding-toggle:hover .ts-day-total { color: var(--text); }
.ts-outstanding-caret {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  color: var(--accent-ink);
}
#ts-outstanding-list { margin-top: 8px; }
.ts-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  border-top: 1px solid #F0EBE3;
}
.ts-row:first-of-type { border-top: none; }
.ts-row-job { flex: 1 1 auto; min-width: 0; }
.ts-row-job .mono { color: var(--muted); }
.ts-row-hours { color: var(--muted); white-space: nowrap; }

/* 3-field row in the "Add a spread job" modal (total hours / start date /
   due date) -- same pattern as .sched-field-row, just a 3-up variant. */
.sched-field-row-3 { flex-wrap: wrap; }
.sched-field-row-3 label { flex: 1 1 140px; }


/* ---------- v21: Board | Week | Done ---------- */

.sched-controls { gap: 10px; }
.view-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.view-toggle-btn {
  min-height: 38px;
  padding: 0 18px;
  background: transparent;
  border: none;
  color: var(--body);
  font-weight: 500;
}
.view-toggle-btn:hover { background: rgba(26, 24, 23, 0.05); color: var(--text); }
.view-toggle-btn.active { background: var(--text); color: #FFFFFF; }
.status-line.flash { color: var(--ok); font-weight: 500; }
.sched-select-bar select { min-height: 40px; padding: 0 14px; border-radius: 999px; }
.sched-board.view-week, .sched-board.view-done { display: block; overflow: visible; }

/* Compact card */
.sched-card.compact { gap: 8px; padding: 14px 14px 10px 16px; }
.sched-card.compact .sched-card-title { font-size: 15px; }
.sched-card-keyline {
  height: 3px;
  border-radius: 999px;
  background: var(--line);
  margin-top: 2px;
}
.sched-card.sched-status-rush-due-today .sched-card-keyline { background: var(--s-rush); }
.sched-card.sched-status-scheduled .sched-card-keyline { background: var(--s-scheduled); }
.sched-card.sched-status-pending .sched-card-keyline { background: var(--s-pending); }
.sched-card.sched-status-on-proof .sched-card-keyline { background: var(--s-proof); }
.sched-card.sched-status-completed .sched-card-keyline { background: var(--s-completed); }
.sched-card.sched-status-holidays-vacation-sick .sched-card-keyline { background: var(--s-holiday); }
.sched-card.sched-status-meetings .sched-card-keyline { background: var(--s-meeting); }
.sched-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.sched-card-info { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--body); min-width: 0; line-height: 1.3; }
.sched-card-info > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.sched-card-status-text { color: var(--muted); }
.sched-card-expand {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-height: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text);
}
.sched-card-expand:hover { background: var(--card-soft); }
.sched-card-details { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.sched-card-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--card-soft);
  color: var(--muted);
}
.sched-card-tag.overdue { background: #FDECEA; color: var(--danger); }
.sched-card.is-proof { opacity: 0.6; }
.sched-card.is-proof:hover { opacity: 1; }

/* On proof tray */
.sched-tray { border-top: 1px dashed var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.sched-tray-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font-weight: 500;
  text-align: left;
}
.sched-tray-toggle:hover { background: #FFFFFF; }
.sched-tray-label { font-size: 13px; }
.sched-tray-count { font-size: 12px; color: var(--muted); }
.sched-tray-new { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--alert); }
.sched-tray-caret { margin-left: auto; color: var(--accent-ink); font-size: 12px; }
.sched-tray-body { display: flex; flex-direction: column; gap: 8px; }
.sched-back-btn { min-height: 32px; padding: 0 12px; font-size: 12px; }

/* Week view */
.wk-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.wk-label { margin: 0; font-size: 28px; min-width: 200px; text-align: center; }
.wk-hint { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.wk-scroll { overflow-x: auto; padding-bottom: 8px; }
.wk-grid { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; min-width: 1100px; }
.wk-grid.wk-everyone { grid-template-columns: 130px repeat(5, minmax(200px, 1fr)); min-width: 1200px; }
.wk-day-head { display: flex; align-items: baseline; gap: 8px; padding: 0 6px 2px; }
.wk-dow { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.wk-date { font-family: var(--serif); font-size: 24px; font-weight: 700; line-height: 1; }
.wk-day-head.is-today .wk-date, .wk-day-head.is-today .wk-dow { color: var(--accent-ink); }
.wk-person-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 4px; font-family: var(--serif); font-size: 22px; font-weight: 700; }
.wk-cell {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 140px;
  padding: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--card-border);
  min-width: 0;
}
.wk-cell.is-today { background: rgba(255, 255, 255, 0.9); border: 2px solid var(--accent); }
.wk-cell.is-past { opacity: 0.8; }
.wk-cell.drag-over { background: rgba(201, 79, 26, 0.06); outline: 2px dashed rgba(201, 79, 26, 0.5); }
.wk-cell .sched-col-cap { padding: 0 2px; }
.wk-cell-cards { display: flex; flex-direction: column; gap: 8px; }
.wk-cell .sched-card.compact { padding: 12px 12px 8px 14px; }
.wk-cell .sched-card.compact .sched-card-title { font-size: 14px; }

/* Done */
.done-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.done-count { font-size: 12px; opacity: 0.75; margin-left: 4px; }
.done-person { flex-direction: row; align-items: center; gap: 8px; }
.done-person select { min-height: 42px; padding: 0 14px; border-radius: 999px; }
#done-search { flex: 1 1 240px; border-radius: 999px; padding: 11px 18px; }
.done-row { cursor: pointer; }
.done-back-btn { min-height: 36px; padding: 0 14px; font-size: 13px; flex: 0 0 auto; }
.done-more { align-self: center; margin-top: 6px; }

/* ---------- v22: For you, Undo, time off, link check ---------- */

/* Your photo in the topbar doubles as the "For you" button */
.foryou-wrap { position: relative; display: inline-flex; }
button.who {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0 10px 0 0;
  min-height: 44px;
  border-radius: 999px;
}
button.who:hover { background: rgba(255, 255, 255, 0.7); }
.foryou-badge {
  position: absolute;
  top: 0;
  left: 28px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--alert);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.foryou-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: min(380px, calc(100vw - 32px));
  max-height: 70vh;
  overflow-y: auto;
  background: #FFFFFF;
  border-radius: 22px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(26, 24, 23, 0.18);
}
.foryou-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 10px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.foryou-clear { min-height: 32px; padding: 0 12px; font-size: 12px; text-transform: none; letter-spacing: 0; background: transparent; color: var(--accent-ink); border: none; }
.foryou-clear:hover { background: var(--card-soft); }
.foryou-list { display: flex; flex-direction: column; gap: 4px; }
.foryou-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border-radius: 14px;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 400;
}
.foryou-item:hover { background: var(--card-soft); }
.foryou-dot { width: 10px; height: 10px; margin: 0 9px; border-radius: 50%; background: var(--alert); flex: 0 0 auto; }
.foryou-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.foryou-title { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foryou-why { font-size: 12px; color: var(--muted); }
.foryou-empty { margin: 0; padding: 18px 10px; text-align: center; font-size: 14px; color: var(--muted); }

/* Undo bar */
.undo-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100vw - 32px);
  padding: 10px 10px 10px 20px;
  border-radius: 999px;
  background: var(--text);
  color: #FFFFFF;
  font-size: 14px;
  box-shadow: 0 16px 40px rgba(26, 24, 23, 0.3);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}
.undo-bar.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.undo-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.undo-btn { min-height: 36px; padding: 0 18px; background: #FFFFFF; color: var(--text); border-color: #FFFFFF; font-weight: 600; flex: 0 0 auto; }
.undo-btn:hover { background: #F5F2EC; }
@media (prefers-reduced-motion: reduce) { .undo-bar { transition: none; } }

/* Time off */
.out-band {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #5E4479;
  background: repeating-linear-gradient(135deg, #ECE6F1 0 10px, #F3EFF6 10px 20px);
  text-align: left;
}
.out-band:hover { background: #E4DCEC; color: #4A3561; }
.out-band.half { background: repeating-linear-gradient(135deg, #F3EFF6 0 10px, #FAF8FC 10px 20px); }
.out-band + .out-band { margin-top: 4px; }
.fcast-day .out-band { min-height: 28px; font-size: 11px; padding: 0 8px; border-radius: 8px; }
.out-conflict { margin: 0; font-size: 12px; font-weight: 600; color: var(--danger); }
.wk-cell.is-out { background: rgba(236, 230, 241, 0.35); }
.add-kind { margin: -6px 0 18px; background: var(--card-soft); box-shadow: none; }
.part-choice { border: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.part-choice legend { font-size: 13px; font-weight: 500; color: var(--body); margin-bottom: 6px; padding: 0; }
.part-option {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
}
.part-option input { width: auto; accent-color: var(--accent); }
.part-option:has(input:checked) { border-color: var(--text); background: var(--card-soft); }
.modal-small { max-width: 400px; }
.timeoff-detail { margin: 0 0 8px; font-size: 16px; line-height: 1.5; }
.timeoff-note { margin: 0 0 8px; font-size: 14px; color: var(--body); }

/* Link check */
.field-error { margin: 2px 0 0; font-size: 12px; font-weight: 500; color: var(--danger); }

/* ---------- v23: emails into job notes ---------- */
.mail-banner {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin: 0 0 14px; padding: 11px 16px; text-align: left;
  background: #fbf6ea; color: #5c4a1e; border: 1px solid #ecdcb4; border-radius: 12px;
  font: inherit; font-size: 14px; cursor: pointer;
}
.mail-banner:hover { background: #f8efd9; }
.mail-banner-dot { width: 8px; height: 8px; border-radius: 50%; background: #c99a2e; flex: none; }
.mail-banner-go { margin-left: auto; font-weight: 600; }
.mail-modal { max-width: 640px; }
.mail-list { display: flex; flex-direction: column; gap: 12px; max-height: 62vh; overflow-y: auto; margin: 6px 0 4px; }
.mail-item { border: 1px solid var(--line, #e6e2da); border-radius: 12px; padding: 12px 14px; }
.mail-item-head { display: flex; flex-direction: column; gap: 2px; }
.mail-item-head strong { overflow-wrap: anywhere; }
.mail-item-meta, .mail-item-reason { font-size: 12.5px; color: var(--muted, #7a756c); margin: 0; }
.mail-item-text { margin: 8px 0 4px; font-size: 13.5px; overflow-wrap: anywhere; }
.mail-item-files { white-space: nowrap; font-size: 12px; color: var(--muted, #7a756c); }
.modal form.mail-item-file { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 10px; }
.mail-docket-field { display: flex; flex-direction: column; gap: 3px; flex: 0 1 220px; min-width: 0; }
.mail-docket-field input { width: 120px; min-height: 40px; padding-top: 8px; padding-bottom: 8px; }
.mail-item-file button { min-height: 40px; }
.mail-item-file .mail-dismiss { margin-left: auto; }
@media (max-width: 560px) { .mail-item-file .mail-dismiss { margin-left: 0; } }
.note-email-tag {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  background: #eef1f6; color: #4a5a78; font-size: 11px; font-weight: 600; letter-spacing: .02em;
}

/* ---------- v24: My Hours sends to Function Point ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tsx-week { display: flex; align-items: center; gap: 8px; margin: 6px 0 16px; flex-wrap: wrap; }
.tsx-days { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; }
.tsx-nav { min-height: 40px; width: 40px; padding: 0; font-size: 18px; }
.tsx-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 0; padding: 9px 14px; border-radius: 14px; min-width: 84px;
  background: var(--card); color: var(--text); border: 1px solid var(--card-border); text-align: left;
}
.tsx-chip:hover { background: var(--card-soft); }
.tsx-chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.tsx-chip.today:not(.active) { border-color: var(--accent); }
.tsx-chip.future { opacity: .45; }
.tsx-chip-day { font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.tsx-chip-hours { font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.tsx-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.tsx-week-total { margin-left: auto; color: var(--muted); font-size: 14px; white-space: nowrap; }
.tsx-week-total strong { color: var(--text); font-family: var(--serif); font-size: 24px; margin-left: 4px; }
.tsx-day { padding: 22px 24px; }
.tsx-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tsx-day-head h2 { margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 500; }
.tsx-day-total { font-family: var(--serif); font-size: 28px; }
.tsx-hint { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.tsx-rows { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.tsx-row { background: var(--card-soft); border: 1px solid var(--card-border); border-radius: 14px; padding: 12px 14px; }
.tsx-row.removed { opacity: .55; }
.tsx-row.removed .tsx-job strong, .tsx-row.removed .tsx-job-name { text-decoration: line-through; }
.tsx-job { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tsx-job-name { color: var(--body); min-width: 0; overflow-wrap: anywhere; }
.tsx-tag { margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tsx-tag.sent { background: #e8f1ea; color: var(--ok); }
.tsx-tag.new { background: #fbefe7; color: var(--accent-ink); }
.tsx-tag.edit { background: #fbf6ea; color: var(--warn); }
.tsx-tag.remove { background: #fdecea; color: var(--danger); }
.tsx-fields { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tsx-line select { padding: 9px 12px; min-width: 190px; max-width: 240px; }
.tsx-line select.needs { border-color: var(--accent); color: var(--accent-ink); }
.tsx-hours { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.tsx-hours input { width: 64px; border: 0; border-radius: 0; text-align: center; padding: 9px 4px; -moz-appearance: textfield; }
.tsx-hours input::-webkit-outer-spin-button, .tsx-hours input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tsx-step { min-height: 40px; width: 36px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 18px; }
.tsx-step:hover { background: var(--card-soft); }
.tsx-desc { flex: 1 1 220px; min-width: 0; padding: 9px 12px; }
.tsx-remove { min-height: 36px; width: 36px; padding: 0; background: transparent; color: var(--muted); border-color: transparent; font-size: 18px; }
.tsx-remove:hover { background: #fff; color: var(--text); border-color: var(--line); }
.tsx-add { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; }
.tsx-add-form { display: flex; gap: 8px; align-items: flex-start; }
.tsx-add-field { display: flex; flex-direction: column; gap: 3px; }
.tsx-add-field input { width: 110px; padding: 9px 12px; }
.tsx-add-form button { min-height: 40px; }
.tsx-recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.tsx-recent-btn { min-height: 32px; padding: 0 12px; font-size: 13px; background: #fff; color: var(--text); border-color: var(--line); }
.tsx-recent-btn:hover { background: var(--card-soft); }
.tsx-recent-btn span { color: var(--muted); margin-left: 4px; }
.tsx-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.tsx-foot-msg { font-size: 13px; color: var(--muted); margin-right: auto; }
.tsx-foot-msg.warn { color: var(--danger); }
@media (max-width: 640px) {
  .tsx-day { padding: 16px; }
  .tsx-line select { min-width: 0; max-width: none; width: 100%; }
  .tsx-line { flex: 1 1 100%; }
  .tsx-week-total { margin-left: 0; }
}
.tsx-day-head h2 { text-transform: none; letter-spacing: 0; color: var(--text); }
.tsx-none { color: var(--muted); }
.tsx-chip.active .tsx-none { color: rgba(255,255,255,.6); }
.tsx-row.closed { background: #fbf3f2; border-color: #f0d6d2; }
.tsx-row-note { margin: 8px 0 0; font-size: 12.5px; color: var(--danger); }

/* ---------- v26: My Hours laid out like FP's Timesheets panel ---------- */
.tsf { padding: 0; overflow: visible; }
.tsf-title {
  margin: 0; padding: 16px 24px; border-bottom: 1px solid var(--line);
  font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text);
}
.tsf-form { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px 18px; align-items: center; padding: 20px 24px; }
.tsf-label { font-size: 14px; color: var(--muted); text-align: right; font-weight: 500; flex-direction: row; justify-content: flex-end; }
.tsf-field { min-width: 0; }
.tsf-field select, .tsf-field textarea, .tsf-job input { width: 100%; }
.tsf-field textarea { min-height: 76px; resize: vertical; }
.tsf-date-row { display: flex; gap: 8px; align-items: center; }
.tsf-date-row input { flex: 0 1 220px; padding: 10px 12px; }
.tsf-date-row button { min-height: 42px; }
.tsf-week { grid-column: 2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tsf-week[hidden] { display: none !important; }
.tsf-field select.needs { border-color: var(--accent); color: var(--accent-ink); }
.tsf-job { position: relative; }
.tsf-job-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; max-height: 320px; overflow-y: auto;
}
.tsf-job-opt {
  display: flex; gap: 10px; width: 100%; min-height: 0; padding: 9px 10px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); text-align: left; font-weight: 400;
}
.tsf-job-opt span { color: var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsf-job-opt.active, .tsf-job-opt:hover { background: var(--card-soft); }
.tsf-job-empty { margin: 6px 10px; font-size: 13px; color: var(--muted); }
.tsf-note { margin: 6px 0 0; font-size: 13px; color: var(--danger); }
.tsf-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.tsf-msg { margin-right: auto; font-size: 13px; color: var(--muted); }
.tsf-msg.warn, .tsf-confirm-head p.warn { color: var(--danger); }
.tsf-list { border-top: 1px solid var(--line); }
.tsf-grid {
  display: grid; grid-template-columns: minmax(0, 1.7fr) 56px minmax(0, 1.2fr) 64px minmax(0, 1.8fr) 96px;
  gap: 10px; align-items: center; padding: 11px 24px;
}
.tsf-grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.tsf-grid-head { background: var(--card-soft); font-size: 13px; font-weight: 600; color: var(--text); padding-top: 10px; padding-bottom: 10px; }
.tsf-row { border-top: 1px solid var(--line); font-size: 14px; }
.tsf-row:nth-of-type(even):not(.suggest) { background: #fbf9f6; }
.tsf-job-cell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsf-job-cell a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.tsf-sub { color: var(--muted); }
.tsf-co, .tsf-svc { color: var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsf-desc-cell { color: var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsf-acts { display: flex; gap: 6px; justify-content: flex-end; }
.tsf-icon {
  min-height: 34px; width: 34px; padding: 0; border-radius: 10px; font-size: 15px;
  background: var(--card-soft); color: var(--text); border-color: var(--card-border);
}
.tsf-icon:hover { background: #fff; }
.tsf-ok { background: var(--text); color: #fff; border-color: var(--text); }
.tsf-ok:hover { background: #2E2B28; }
.tsf-row input, .tsf-row select { width: 100%; padding: 7px 10px; font-size: 14px; border-radius: 10px; }
.tsf-row .num input { text-align: right; }
.tsf-row.editing { background: #fbf6ea; }
.tsf-row.editing .tsf-acts button { min-height: 34px; padding: 0 12px; }
.tsf-empty { padding: 14px 24px; margin: 0; border-top: 1px solid var(--line); }
.tsf-total { border-top: 1px solid var(--line); font-weight: 600; }
.tsf-total-label { grid-column: 3; text-align: right; }
.tsf-total .num { grid-column: 4; }
.tsf-total-note { grid-column: 5 / -1; font-weight: 400; font-size: 13px; color: var(--accent-ink); }
.tsf-confirm { border-top: 1px solid var(--line); background: #fdfaf6; border-radius: 0 0 var(--radius-lg, 24px) var(--radius-lg, 24px); padding-bottom: 8px; }
.tsf-confirm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px 6px; }
.tsf-confirm-head h3 { margin: 0; font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text); }
.tsf-confirm-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.tsf-confirm-head button { min-height: 40px; }
.tsf-row.suggest { border-top: 1px dashed var(--line); }
.tsf-row.suggest select.needs { border-color: var(--accent); color: var(--accent-ink); }
.tsf-row.closed { background: #fbf3f2; }
.tsf-row-note { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--danger); }
@media (max-width: 760px) {
  .tsf-form { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 16px; }
  .tsf-label { text-align: left; justify-content: flex-start; margin-top: 6px; }
  .tsf-week { grid-column: 1; }
  .tsf-grid-head { display: none; }
  .tsf-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 12px 16px; }
  .tsf-row > span { grid-column: 1 / -1; }
  .tsf-row .tsf-job-cell { grid-column: 1; white-space: normal; }
  .tsf-row .tsf-acts { grid-column: 2; grid-row: 1; }
  .tsf-row .tsf-co { display: none; }
  .tsf-row .num { text-align: left; }
  .tsf-row .tsf-desc-cell { white-space: normal; }
  .tsf-total-label { grid-column: 1; text-align: left; }
  .tsf-total .num { grid-column: 2; }
  .tsf-total-note { grid-column: 1 / -1; }
  .tsf-confirm-head { padding: 14px 16px 6px; flex-wrap: wrap; }
}

.tsf-week .tsx-days { min-width: 0; }
@media (max-width: 760px) { .tsf-week .tsx-week-total { margin-left: auto; } }

/* ---------- v27: ClickUp on the Schedule page (digital team) ---------- */
.cu-source { margin-right: 4px; }
.cu-source .view-toggle-btn[data-source="clickup"].active { background: #7B68EE; border-color: #7B68EE; color: #fff; }
.sched-board.view-clickup { display: block; }
.cu-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
.cu-who { display: flex; gap: 8px; flex-wrap: wrap; }
.cu-who-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 8px;
  background: var(--card); color: var(--text); border: 1px solid var(--card-border); font-weight: 500;
}
.cu-who-btn:first-child { padding-left: 14px; }
.cu-who-btn:hover { background: var(--card-soft); }
.cu-who-btn.active { background: var(--text); color: #fff; border-color: var(--text); }
.cu-count { font-size: 12px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.cu-who-btn.active .cu-count { color: rgba(255,255,255,.7); }
.cu-open { margin-left: auto; font-size: 14px; color: var(--accent-ink); text-decoration: none; font-weight: 500; }
.cu-note { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.cu-group { margin-bottom: 22px; }
.cu-group h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-family: inherit; }
.cu-overdue h3 { color: var(--danger); }
.cu-list { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; overflow: hidden; }
.cu-task { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 96px auto; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.cu-task:first-child { border-top: 0; }
.cu-pri { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.cu-pri-urgent { background: #D92D20; }
.cu-pri-high { background: #E8A13A; }
.cu-pri-normal { background: #4F7BD9; }
.cu-pri-low { background: #A3A09A; }
.cu-main { min-width: 0; }
.cu-task { cursor: pointer; transition: background .15s; }
.cu-task:hover { background: var(--card-soft); }
.cu-name { all: unset; cursor: pointer; color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.cu-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.cu-task:hover .cu-name { color: var(--accent-ink); }
.cu-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cu-job { color: var(--accent-ink); text-decoration: none; font-weight: 500; }
.cu-status {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px; color: color-mix(in srgb, var(--cu-c) 62%, #1A1817); background: color-mix(in srgb, var(--cu-c) 16%, transparent);
}
.cu-due { font-size: 13px; color: var(--body); text-align: right; white-space: nowrap; }
.cu-due.late { color: var(--danger); font-weight: 600; }
.cu-avatars { display: inline-flex; gap: 2px; }
.cu-empty { padding: 24px 0; }
.cu-empty-box { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: 24px; max-width: 560px; }
.cu-empty-box h3 { margin: 0 0 6px; font-size: 17px; font-family: inherit; }
.cu-empty-box p { margin: 0; color: var(--body); }
@media (max-width: 700px) {
  .cu-task { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .cu-task .cu-status { grid-column: 2; justify-self: start; }
  .cu-task .cu-avatars { display: none; }
  .cu-open { margin-left: 0; }
}

/* ClickUp task details */
.cu-modal { max-width: 720px; }
.cu-modal h2 { margin: 0; overflow-wrap: anywhere; }
.cu-where { margin: 0 0 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cu-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 18px; margin: 16px 0 18px; padding: 14px 16px; background: var(--card-soft); border-radius: 14px; }
.cu-facts dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.cu-facts dd { margin: 0; font-size: 14px; color: var(--text); }
.cu-people { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.cu-people .avatar { margin-right: 4px; vertical-align: middle; }
.cu-late { color: var(--danger); font-weight: 600; }
.cu-sec { margin-bottom: 18px; }
.cu-sec h3 { margin: 0 0 8px; font: 600 13px/1.3 var(--sans, inherit); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cu-desc { font-size: 14.5px; color: var(--body); overflow-wrap: anywhere; max-height: 360px; overflow-y: auto; padding-right: 6px; }
.cu-desc p { margin: 0 0 8px; }
.cu-desc h4 { margin: 12px 0 6px; font-size: 15px; color: var(--text); }
.cu-desc ul, .cu-check, .cu-subs { margin: 0 0 8px; padding: 0; list-style: none; }
.cu-desc li, .cu-check li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; }
.cu-desc li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); flex: none; transform: translateY(-2px); }
.cu-desc li:has(.cu-box)::before { display: none; }
.cu-box { width: 14px; height: 14px; border: 1.5px solid var(--line); border-radius: 4px; flex: none; transform: translateY(2px); }
.cu-box.done { background: var(--ok); border-color: var(--ok); }
.cu-check li.done { color: var(--muted); text-decoration: line-through; }
.cu-subs li { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cu-subs li:first-child { border-top: 0; }
.cu-sub-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cu-sub-due { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cu-nodesc { margin: 0 0 16px; }
.cu-foot { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.cu-open-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: #7B68EE; color: #fff; text-decoration: none; font-weight: 500; font-size: 14px; }
.cu-open-btn:hover { background: #6a57e0; }
