/* ---------- Personal color ----------
 Everything "blue" comes from --brand. Each person can change it (Customize);
 the lighter and darker shades are worked out from it automatically. */
:root {
  --brand: #17466b; /* deep blue, same as the welcome page */
  --brand-text: var(--brand); /* made darker in code when someone picks a very light color */
  --on-brand: #ffffff; /* text on top of --brand */
  --brand-dark: color-mix(in srgb, var(--brand) 80%, black);
  --brand-light: color-mix(in srgb, var(--brand) 9%, white);
  --brand-soft: color-mix(in srgb, var(--brand) 16%, white);
}

/* Fonts (served from /fonts): DM Serif Display for headings, Inter for everything else */
@font-face {
  font-family: "DM Serif Display";
  src: url("/fonts/dm-serif-display-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

body {
  font-family: "Inter", Arial, sans-serif;
  background-color: #f5f3ef;
  color: #1f2933;
  margin: 0;
  padding: 24px;
}

h1 {
  color: var(--brand-text);
  font-size: 48px;
  margin-bottom: 8px;
}

p {
  font-size: 18px;
  color: #52606d;
}

[hidden] {
  display: none !important;
}

/* ---------- Top bar ---------- */
.top-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.top-bar h1 {
  margin: 0 0 4px 0;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}


button.primary,
button.secondary {
  border-radius: 6px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
}

button.primary {
  background-color: var(--brand);
  color: var(--on-brand);
  border: none;
}

button.primary:hover {
  background-color: var(--brand-dark);
}

button.secondary {
  background-color: white;
  color: var(--brand-text);
  border: 1px solid var(--brand);
}

button.secondary:hover {
  background-color: var(--brand-light);
}

/* Approvals button turns red while something is waiting */
button.primary.alerting {
  background-color: #c0392b;
}

button.primary.alerting:hover {
  background-color: #a93226;
}

.count {
  display: inline-block;
  min-width: 18px;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.25);
  font-size: 13px;
  text-align: center;
}

/* ---------- Messages and alerts ---------- */
#message,
#drawer-message {
  font-size: 14px;
  margin: 0 0 16px 0;
  color: var(--brand-text);
}

#message.warning,
#drawer-message.warning {
  color: #c0392b;
  font-weight: bold;
}

.alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background-color: #fdecea;
  border: 2px solid #c0392b;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.alert p {
  margin: 0;
  font-size: 14px;
  color: #8e1b10;
  white-space: pre-line;
}

.alert button {
  background-color: white;
  border: 1px solid #c0392b;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}

/* ---------- Toolbar ---------- */
.toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* label sits in the true middle */
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.view-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #52606d;
}

.view-picker select {
  padding: 4px 8px;
  font-size: 14px;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
}

.week-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.week-nav button {
  background-color: white;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}

.week-nav button:hover {
  background-color: #eae6df;
}

.period-label {
  justify-self: center;
  margin: 0;
  font-size: 22px;
  color: var(--brand-text);
  text-align: center;
  white-space: nowrap;
}

.mode-switch {
  display: inline-flex;
  gap: 4px;
  margin-left: 28px;
}

.mode-switch button.active,
.tab.active {
  background-color: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
}

/* ---------- Calendar (shared by Day, Week and Month) ---------- */
.weekday-names {
  display: none;
}

.weekday-names.month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  font-size: 12px;
  font-weight: bold;
  color: #52606d;
  margin-bottom: 4px;
}

.weekday-names span {
  padding-left: 6px;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid #d9d4cc;
  border-left: 1px solid #d9d4cc;
  background-color: white;
}

.calendar.dayview {
  grid-template-columns: minmax(0, 1fr);
}

.day {
  min-width: 0;
  min-height: 320px;
  padding: 6px;
  background-color: white;
  border-right: 1px solid #d9d4cc;
  border-bottom: 1px solid #d9d4cc;
}

.calendar.dayview .day {
  min-height: 420px;
}

.day h3 {
  margin: 0 0 6px 0;
  font-size: 13px;
  font-weight: normal;
  color: #52606d;
}

.weekend {
  background-color: #f3f6fb;
}

.today {
  background-color: var(--brand-light);
}

.today h3 {
  color: var(--brand-text);
  font-weight: bold;
}

.outside h3 {
  color: #9aa5b1;
}

/* ---------- Cards (same colors in every view) ---------- */
.task-card {
  background-color: #fdf1e4;
  border-left: 3px solid #d9822b;
  border-radius: 3px;
  padding: 4px 6px;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.task-card.urgent {
  background-color: #fbe3e0;
  border-left-color: #c0392b;
}

.task-card.emergency {
  background-color: #f9d0cb;
  border-left-color: #8e1b10;
}

.task-card h2 {
  font-size: 13px;
  margin: 0 0 2px 0;
}

.task-card p {
  font-size: 12px;
  margin: 0;
}

.task-card .person {
  color: var(--brand-text);
  font-weight: bold;
}

.task-card .due {
  color: #7b8794;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.card-actions button {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid #cbd2d9;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
}

.card-actions button:hover {
  background-color: #eae6df;
}

.timeoff-card {
  background-color: #d9e2ec;
  color: #334e68;
  border-radius: 3px;
  padding: 3px 6px;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: bold;
}

.timeoff-card.pending {
  background-color: transparent;
  border: 1px dashed #829ab1;
  font-weight: normal;
}

/* ---------- Month view: fixed squares, one line per item ---------- */
.calendar.month .day {
  height: 120px;
  min-height: 0;
  overflow: hidden;
  padding: 4px 6px;
  cursor: pointer;
}

.calendar.month .day:hover {
  background-color: #eef3f9;
}

.calendar.month .today h3 {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  background-color: var(--brand);
  color: var(--on-brand);
  font-weight: normal;
}

.calendar.month .task-card,
.calendar.month .timeoff-card {
  padding: 1px 6px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar.month .task-card h2 {
  display: inline;
  font-size: 12px;
  font-weight: normal;
}

.calendar.month .task-card p,
.calendar.month .card-actions {
  display: none;
}

.calendar.month .timeoff-card {
  font-size: 11px;
}

/* ---------- Slide-out panel ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(31, 41, 51, 0.35);
  z-index: 5;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 400px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  background-color: white;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
  padding: 16px;
  z-index: 10;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0.25s;
}

.drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.drawer-header h2 {
  margin: 0;
  font-size: 18px;
  color: var(--brand-text);
}

.tabs {
  flex-wrap: wrap;
  display: flex;
  gap: 4px;
}

.tab {
  background-color: white;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
}

.close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #52606d;
  cursor: pointer;
}

.hint {
  font-size: 13px;
  margin: 0 0 12px 0;
}

/* Forms inside the panel */
#drawer form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#drawer label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #52606d;
}

#drawer input,
#drawer select {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
}

#drawer form button[type="submit"] {
  background-color: var(--brand);
  color: var(--on-brand);
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
}

#drawer form button[type="submit"]:hover {
  background-color: var(--brand-dark);
}

/* Approvals list */
#inbox-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 14px;
}

#inbox-list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid #eae6df;
}

/* Task list table */
#drawer table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#drawer th,
#drawer td {
  text-align: left;
  padding: 6px 8px 6px 0;
  border-bottom: 1px solid #eae6df;
}

#drawer th {
  font-size: 12px;
  color: #52606d;
}

/* ---------- Team panel ---------- */
#drawer details {
  border: 1px solid #eae6df;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

#drawer summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  color: #1f2933;
}

#drawer details[open] summary {
  margin-bottom: 10px;
}

.team-person label {
  margin-bottom: 8px;
}

#drawer label.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #1f2933;
}

#drawer label.check input {
  width: auto;
}

#drawer .small-button {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #cbd2d9;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
}

#drawer .small-button.danger {
  color: #c0392b;
  border-color: #c0392b;
}

.team-removed-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
}

/* ---------- Clients panel ---------- */
#drawer textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
}

.client-card label {
  margin-bottom: 8px;
}

.client-hours {
  background-color: var(--brand-light);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.client-hours p {
  margin: 2px 0;
  font-size: 13px;
  color: #1f2933;
}

.client-section {
  margin-bottom: 12px;
}

.client-section h4 {
  margin: 0 0 4px 0;
  font-size: 13px;
  color: var(--brand-text);
}

.client-section ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}

.client-section li {
  margin-bottom: 3px;
}

.client-section p {
  margin: 2px 0;
  font-size: 13px;
}

#drawer .over {
  color: #c0392b;
  font-weight: bold;
}

.client-downloads {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.client-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: bold;
}

.badge.active {
  background-color: #e3f4e8;
  color: #1e7b3c;
}

.badge.closed {
  background-color: #e4e7eb;
  color: #52606d;
}

.status-note {
  font-size: 12px;
  color: #7b8794;
}

/* ---------- Bank holidays ---------- */
.holiday {
  background-color: #f3f6fb;
}

.holiday-label {
  background-color: #e8f0e0;
  color: #3f6212;
  border-radius: 3px;
  padding: 2px 6px;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar.month .holiday-label {
  font-size: 11px;
  padding: 1px 6px;
}

/* ---------- Completed tasks, notes and notifications ---------- */
.task-card.completed {
  background-color: #eef0f2;
  border-left-color: #9aa5b1;
  opacity: 0.8;
}

.task-card.completed h2 {
  color: #52606d;
}

.task-info {
  background-color: #f5f3ef;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 12px;
}

.task-info p {
  margin: 2px 0;
  font-size: 13px;
  color: #1f2933;
}

.notes-heading {
  margin: 0 0 6px 0;
  font-size: 13px;
  color: var(--brand-text);
}

.notes-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  font-size: 13px;
}

.notes-list li {
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 6px;
  background-color: #eef3f9;
  overflow-wrap: anywhere;
}

.note-meta {
  font-size: 11px;
  color: #7b8794;
  margin-bottom: 2px;
}

.note-sent-back {
  border-left: 3px solid #c0392b;
}

.note-changes-made {
  border-left: 3px solid #d9822b;
}

.note-approved,
.note-completed {
  border-left: 3px solid #1e7b3c;
}

.notes-list li.unread {
  background-color: var(--brand-light);
  border-left: 3px solid var(--brand);
}

.notes-list li.clickable {
  cursor: pointer;
}

.notes-list li.clickable:hover {
  background-color: var(--brand-soft);
}

/* ---------- Fully approved tasks are green ---------- */
.task-card.completed {
  background-color: #e3f4e8;
  border-left-color: #1e7b3c;
  opacity: 1;
}

.task-card.completed h2 {
  color: #1e7b3c;
}

/* ---------- Approvals: tasks to review ---------- */
#inbox-list li.approval-heading {
  padding: 12px 0 4px 0;
  border-bottom: none;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  color: #52606d;
}

.approval-task strong {
  font-size: 14px;
}

.approval-badge {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: bold;
  background-color: var(--brand-light);
  color: var(--brand-text);
}

.approval-badge.rereview {
  background-color: #fdf1e4;
  color: #a0521a;
}

.exchange-note {
  background-color: #eef3f9;
  border-left: 3px solid #cbd2d9;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.exchange-note:nth-of-type(odd) {
  border-left-color: #c0392b;
}

.exchange-note:nth-of-type(even) {
  border-left-color: #d9822b;
}

/* ---------- Recurring tracker ---------- */
#recurring-tabs {
  margin-bottom: 12px;
}

.tracker-period {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: bold;
  color: #1f2933;
}

.tracker-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.tracker-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  border-radius: 6px;
  background-color: #f5f3ef;
  font-size: 12px;
  color: #52606d;
}

.tracker-stat strong {
  font-size: 22px;
  color: #1f2933;
}

.tracker-stat.stat-done {
  background-color: #e3f4e8;
}

.tracker-stat.stat-done strong {
  color: #1e7b3c;
}

.tracker-stat.stat-pending {
  background-color: #fdf1e4;
}

.tracker-stat.stat-pending strong {
  color: #a0521a;
}

.notes-list li.tracker-done {
  background-color: #e3f4e8;
}

.notes-list li.tracker-warn {
  background-color: #fbe3e0;
}

/* ---------- Full or short weekday names ----------
   Each day column (and each name in the weekday row) measures its own width.
   The full name shows when it fits; otherwise the short name takes its place. */
.day,
.weekday-names span {
  container-type: inline-size;
}

.weekday-names b {
  font-weight: bold;
}

.short-name {
  display: none;
}

/* Weekday row above Month view: "Wednesday" needs about 80px */
@container (max-width: 80px) {
  .weekday-names .long-name {
    display: none;
  }
  .weekday-names .short-name {
    display: inline;
  }
}

/* Week view headings: "Wednesday, Sep 30" needs about 125px */
@container (max-width: 125px) {
  .day h3 .long-name {
    display: none;
  }
  .day h3 .short-name {
    display: inline;
  }
}

/* Recurring tracker: employee filter and per-employee counts */
#recurring-person-label {
  margin-bottom: 10px;
}

#recurring-person-label select {
  width: auto;
}

#drawer label#recurring-person-label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.tracker-breakdown {
  margin-bottom: 12px;
}

/* ---------- Toolbar: label centered, controls on each side ---------- */
.toolbar .view-picker {
  justify-self: start;
}

.toolbar .week-nav {
  justify-self: end;
}

/* Not enough room for three columns: label on its own row, controls below */
@media (max-width: 1150px) {
  .toolbar {
    grid-template-columns: 1fr auto;
  }
  .period-label {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

/* Long "September 2026" normally; short "Sep 2026" when the window is narrow */
@media (max-width: 640px) {
  .period-label .long-name {
    display: none;
  }
  .period-label .short-name {
    display: inline;
  }
}

/* ---------- Customize panel ---------- */
.color-preview {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #eae6df;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.color-preview h4 {
  width: 100%;
}

.preview-badge {
  background-color: var(--brand-light);
  color: var(--brand-text);
}

.preview-text {
  color: var(--brand-text);
  font-weight: bold;
  font-size: 14px;
}

/* ---------- Floating Customize button (bottom-right) ---------- */
body {
  padding-bottom: 84px; /* room so the button never covers the last calendar row */
}

.customize-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #d9d4cc;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 4; /* below the side panel and its dark backdrop */
}

.customize-fab:hover {
  transform: scale(1.06);
}

/* ---------- Color wheel ---------- */
.wheel-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

#color-wheel {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  cursor: crosshair;
  touch-action: none; /* dragging on a phone picks colors instead of scrolling */
}

#drawer label.brightness-label {
  font-size: 13px;
  margin-bottom: 10px;
}

#drawer #color-brightness {
  padding: 0;
  border: none;
  accent-color: var(--brand);
}

.color-chosen {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin: 0 0 12px 0;
}

#color-chip {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #cbd2d9;
}

#color-hex {
  font-family: monospace;
  color: #52606d;
}

/* ---------- Login and first-time setup ---------- */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 30; /* above everything, including the side panel */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: #f5f3ef;
}

.auth-box {
  width: 100%;
  max-width: 380px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  padding: 28px;
}

.auth-box h1 {
  margin: 0 0 4px 0;
  font-size: 36px;
}

.auth-box h2 {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: #1f2933;
}

.auth-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-box label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #52606d;
}

.auth-box input,
.auth-box select {
  padding: 8px 10px;
  font-size: 15px;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
}

.auth-message {
  min-height: 1em;
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: bold;
  color: #c0392b;
}

/* ---------- Account button and panel ---------- */
.account-button {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  margin-top: 18px;
}

/* Team panel: password row */
.password-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.password-row .note-meta {
  width: 100%;
}

#drawer .password-row input {
  flex: 1;
  width: auto;
  min-width: 140px;
}
/* ---------- Lesson 20: at risk (orange) and overdue (red) ---------- */
.task-card.at-risk {
  background-color: #fdebd3;
  border-left-color: #d9822b;
}

.task-card.overdue {
  background-color: #f9d0cb;
  border-left-color: #8e1b10;
  outline: 2px solid #c0392b;
}

.task-card.at-risk .due,
.task-card.overdue .due {
  font-weight: 700;
  color: #8e1b10;
}

#inbox-list li.attention-overdue {
  border-left: 4px solid #c0392b;
  padding-left: 8px;
}

#inbox-list li.attention-at-risk {
  border-left: 4px solid #d9822b;
  padding-left: 8px;
}

/* ---------- Lesson 21: deadline changes ---------- */
#task-deadline-fields .checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#task-deadline-fields .checkbox-row input {
  width: auto;
}

.note-deadline-change {
  border-left: 4px solid #d9822b;
}

/* ---------- Lesson 22: deadline-only tasks ---------- */
#deadline-only-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

#deadline-only-label[hidden] {
  display: none;
}

#deadline-only-label input {
  width: auto;
}

/* ---------- Lesson 24: forgot password ---------- */
.auth-message.good {
  color: #2f7d4f;
}

.auth-box .link-button {
  align-self: flex-start;
  padding: 0;
  border: none;
  background: none;
  color: var(--brand);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Lesson 26: change log ---------- */
.changelog-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.changelog-filters label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

#changelog-rows td {
  font-size: 12px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

/* ---------- Lesson 28: firms ---------- */
.firm-name {
  margin: 2px 0 0 0;
  font-weight: 700;
}

.firm-name:empty {
  display: none;
}

/* ---------- Lesson 35: account choices ---------- */
#account-view .check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#account-view .check-row input {
  width: auto;
}

.holiday-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.holiday-list li {
  padding: 4px 0;
}

/* ---------- Lesson 35: custom alerts ---------- */
.alert-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.alert-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.alert-share {
  border: 1px solid #e4e7eb;
  border-radius: 6px;
  padding: 6px 10px;
}

.alert-share .check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-share .check-row input {
  width: auto;
}

/* ---------- Lesson 37: hard deadlines ---------- */
#hard-deadline-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

#hard-deadline-label[hidden] {
  display: none;
}

#hard-deadline-label input {
  width: auto;
}

.task-card.hard-deadline {
  border-left-color: #1f2933;
  border-left-width: 6px;
}

.task-card.hard-deadline .due {
  font-weight: 700;
}

/* ---------- Lesson 38: meetings ---------- */
.meeting-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  background-color: #e3f8ff;
  color: #0b4f71;
  border-left: 3px solid #2bb0ed;
  border-radius: 3px;
  padding: 3px 6px;
  margin-bottom: 4px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

#meeting-people .check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#meeting-people .check-row input {
  width: auto;
}

/* ---------- Lesson 39: waiting on client ---------- */
.task-card.paused {
  background-color: #f0f4f8;
  border-left-color: #9aa5b1;
  border-left-style: dashed;
  opacity: 0.85;
}

#inbox-list li.attention-paused {
  border-left: 4px solid #9aa5b1;
  padding-left: 8px;
}

/* ---------- Lesson 40: capacity forecast ---------- */
.capacity-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
}

.capacity-legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-radius: 2px;
  vertical-align: middle;
}

.capacity-scroll {
  overflow-x: auto;
}

#capacity-table th {
  text-align: left;
  font-size: 12px;
  white-space: nowrap;
}

.capacity-cell {
  min-width: 120px;
  vertical-align: top;
}

.capacity-bar {
  height: 8px;
  background-color: #e4e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.capacity-bar div {
  height: 100%;
}

.capacity-text {
  margin-top: 3px;
  font-size: 11px;
  color: #52606d;
}

.cap-ok .capacity-bar div,
.capacity-legend .cap-ok::before {
  background-color: #2f9e6a;
}

.cap-near .capacity-bar div,
.capacity-legend .cap-near::before {
  background-color: #d9822b;
}

.cap-over .capacity-bar div,
.capacity-legend .cap-over::before {
  background-color: #c0392b;
}

.cap-over .capacity-text {
  color: #c0392b;
  font-weight: 700;
}

.capacity-total th,
.capacity-total td {
  border-top: 2px solid #cbd2d9;
}

/* ---------- Lesson 41: ethical walls ---------- */
.wall-box .check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wall-box .check-row input {
  width: auto;
}

.team-walls {
  border-left: 4px solid #8e1b10;
  padding-left: 10px;
  margin-bottom: 10px;
}

/* ---------- Lesson 43: setup spreadsheet ---------- */
.setup-sheet {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background-color: #f8fafc;
}

.setup-download {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 8px;
}

.setup-upload {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.setup-result {
  margin-top: 8px;
  font-size: 13px;
}

.setup-problems li {
  color: #8e1b10;
}

/* ---------- Lesson 44: bulk actions ---------- */
.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  margin-bottom: 8px;
  background-color: #f0f4f8;
  border-radius: 6px;
  font-size: 13px;
}

.bulk-bar input[type="text"] {
  flex: 1;
  min-width: 160px;
}

#alltasks-view td,
#alltasks-view th {
  font-size: 12px;
  vertical-align: top;
}

/* ---------- Lesson 45: data export ---------- */
.export-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 8px;
}

.export-sections div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.export-sections .check-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.export-sections .check-row input {
  width: auto;
}

/* ---------- Lesson 46: restore points and reset ---------- */
.restore-save {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.restore-save input {
  flex: 1;
}

.danger-heading {
  color: #8e1b10;
}

#restore-box .check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#restore-box .check-row input {
  width: auto;
}

/* ---------- Tidy dropdowns of tick boxes ---------- */
/* Every tick box sits on one line with its words, left aligned */
#drawer label.check,
#drawer label.check-row,
.pick-list label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-size: 13px;
  color: #323f4b;
  margin: 0;
  padding: 3px 0;
}

#drawer input[type="checkbox"] {
  width: auto;
  margin: 0;
  flex: none;
}

.pick-list {
  border: 1px solid #e4e7eb;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 8px 0;
  background-color: #fff;
}

.pick-list summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-text);
}

.pick-count {
  font-weight: normal;
  color: #7b8794;
  margin-left: 8px;
}

.pick-list[open] summary {
  margin-bottom: 6px;
}

.pick-list .hint {
  margin: 0 0 6px 0;
}

/* ---------- Phone menus: ☰ for the top buttons, 📅 for calendar controls ---------- */
.menu-toggle {
  display: none;
}

.menu-dot {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #c0392b;
}

.menu-toggle.alerting .menu-dot {
  display: block;
}

@media (max-width: 640px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 22px;
    background-color: #fff;
    color: var(--brand-text);
    border: 1px solid #d9dee3;
    border-radius: 8px;
  }

  .top-bar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .top-bar > div:first-child {
    flex: 1;
    min-width: 0;
  }

  .top-actions {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-top: 10px;
  }

  .top-bar.menu-open .top-actions {
    display: flex;
  }

  .top-actions button,
  .top-actions .account-button {
    width: 100%;
    max-width: none;
  }

  .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .toolbar .period-label {
    order: 1;
  }

  .toolbar #cal-toggle {
    order: 2;
  }

  .toolbar .view-picker,
  .toolbar .week-nav {
    display: none;
    order: 3;
    width: 100%;
  }

  .toolbar.menu-open .view-picker,
  .toolbar.menu-open .week-nav {
    display: flex;
  }

  /* Prev | Next on one row, Today | Week | Month on the next, each filling the width */
  .toolbar .week-nav > button {
    flex: 1;
  }

  .mode-switch {
    display: flex;
    width: 100%;
    margin-left: 0;
  }

  .mode-switch button {
    flex: 1;
  }

  .toolbar .view-picker select {
    flex: 1;
  }
}

/* ---------- Welcome page ---------- */
.welcome {
  position: fixed;
  inset: 0;
  z-index: 31; /* above the login screen */
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #eef3f9;
  color: #1f2933;
}

.welcome[hidden] {
  display: none;
}

.welcome > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

.welcome-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
}

.welcome-logo {
  font-size: 34px;
  font-weight: bold;
  color: #1d4e89;
}

.welcome-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

.welcome-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  font-weight: bold;
  color: #1f5f8b;
  margin: 0 0 12px 0;
}

.welcome-hero h1 {
  font-size: 52px;
  line-height: 1.08;
  margin: 0 0 20px 0;
  color: #12355b;
}

.welcome-hero h1 em {
  font-style: normal;
  color: #1f5f8b;
}

.welcome-lead {
  font-size: 18px;
  line-height: 1.6;
  color: #3e4c59;
  margin: 0 0 28px 0;
}

.welcome-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.welcome-cta,
.welcome .welcome-ghost {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}

.welcome-cta {
  background-color: #1d4e89;
  color: #fff;
  box-shadow: 0 6px 18px rgba(29, 78, 137, 0.25);
}

.welcome-cta:hover {
  background-color: #163d6b;
}

.welcome .welcome-ghost {
  background-color: transparent;
  color: #1d4e89;
  border: 2px solid #1d4e89;
}

/* The little calendar picture */
.welcome-mock {
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(18, 53, 91, 0.15);
  padding: 18px;
  transform: rotate(-1.5deg);
}

.mock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  color: #12355b;
  margin-bottom: 12px;
}

.mock-dots i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #d9dee3;
  margin-left: 4px;
}

.mock-week {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.mock-day {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 170px;
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 8px 6px;
}

.mock-day b {
  font-size: 12px;
  color: #616e7c;
  text-align: center;
}

.mock-task {
  font-size: 11px;
  line-height: 1.3;
  padding: 6px;
  border-radius: 6px;
  border-left: 3px solid;
}

.mock-task.p1 { background-color: #e6f0fa; border-color: #5b8fd1; }
.mock-task.p2 { background-color: #e3f1ef; border-color: #1f5f8b; }
.mock-task.p3 { background-color: #efe8f8; border-color: #7b5ea7; }
.mock-task.done { background-color: #e3f4e1; border-color: #3f8f3a; }
.mock-task.risk { background-color: #fdf0e1; border-color: #d9822b; }
.mock-task.court { background-color: #fbe9e7; border-color: #8e1b10; font-weight: bold; }
.mock-task.meet { background-color: #f0f4f8; border-color: #829ab1; }
.mock-task.review { background-color: #fff7d6; border-color: #c99a06; }
.mock-task.holiday { background-color: #e8f0e0; border-color: #6b8e23; }
.mock-task.off { background-color: #eceff1; border-color: #9aa5b1; color: #616e7c; }

.welcome-tagline {
  text-align: center;
  font-size: 22px;
  font-style: italic;
  color: #1f5f8b;
  padding-top: 24px;
  padding-bottom: 24px;
}

.welcome-section {
  padding-top: 48px;
  padding-bottom: 24px;
}

.welcome-section h2,
.welcome-final h2 {
  text-align: center;
  font-size: 32px;
  color: #12355b;
  margin: 0 0 32px 0;
}

.welcome-steps,
.welcome-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.welcome-steps,
.welcome-features {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1050px) {
  .welcome-steps,
  .welcome-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

.welcome-step,
.feature {
  background-color: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.welcome-step h3,
.feature h3 {
  margin: 12px 0 8px 0;
  color: #12355b;
  font-size: 18px;
}

.welcome-step p,
.feature p {
  margin: 0;
  line-height: 1.55;
  color: #52606d;
  font-size: 15px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #1f5f8b;
  color: #fff;
  font-weight: bold;
}

.feature-icon {
  font-size: 28px;
}

.welcome-more {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 32px;
  max-width: 720px;
}

.welcome-more li {
  font-size: 16px;
  color: #3e4c59;
}

.welcome-more li::before {
  content: "✓";
  color: #1f5f8b;
  font-weight: bold;
  margin-right: 10px;
}

.welcome .welcome-final {
  margin-top: 56px;
  margin-bottom: 40px;
  padding: 48px 24px;
  background: linear-gradient(135deg, #12355b, #1f5f8b);
  border-radius: 20px;
  text-align: center;
  color: #fff;
}

.welcome-final h2 {
  color: #fff;
  margin-bottom: 12px;
}

.welcome-final p {
  font-size: 17px;
  margin: 0 0 24px 0;
  opacity: 0.9;
}

.welcome-final .welcome-buttons {
  justify-content: center;
}

.welcome-cta.light {
  background-color: #fff;
  color: #12355b;
}

.welcome .welcome-ghost.light {
  color: #fff;
  border-color: #fff;
}

.welcome-footer {
  text-align: center;
  font-size: 14px;
  color: #7b8794;
  padding-bottom: 32px;
}

.welcome-footer a {
  color: inherit;
}

@media (max-width: 860px) {
  .welcome-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 16px;
  }
  .welcome-hero h1 {
    font-size: 38px;
  }
  .welcome-steps,
  .welcome-features {
    grid-template-columns: 1fr;
  }
  .welcome-more {
    grid-template-columns: 1fr;
  }
  .welcome-mock {
    transform: none;
  }
  .mock-day {
    min-height: 130px;
  }
  .mock-task {
    font-size: 10px;
    padding: 4px;
  }
}

.welcome .welcome-final p {
  color: #fff;
}


.welcome-who-note {
  text-align: center;
  color: #52606d;
  font-size: 16px;
  margin: 24px auto 0 auto;
  max-width: 640px;
  line-height: 1.6;
}

.welcome-trades {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 900px;
}

.welcome-trades li {
  background-color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 15px;
  color: #12355b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ---------- Welcome page background ---------- */
/* Faint calendar grid behind the whole page (shows below the dark top) */
.welcome {
  background:
    linear-gradient(rgba(29, 78, 137, 0.07) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(29, 78, 137, 0.07) 1px, transparent 1px) 0 0 / 56px 56px,
    #eef3f9;
  background-attachment: local;
}

/* Full-width bands: an element stretched edge to edge with a shadow, trimmed top and bottom */
.welcome-nav,
.welcome-hero,
.welcome-tagline {
  clip-path: inset(0 -100vmax);
}

/* Bold dark top */
.welcome-nav {
  background-color: #12355b;
  box-shadow: 0 0 0 100vmax #12355b;
}

.welcome-hero {
  background-color: #17466b;
  box-shadow: 0 0 0 100vmax #17466b;
}

.welcome .welcome-tagline {
  background-color: #1f5f8b;
  box-shadow: 0 0 0 100vmax #1f5f8b;
  color: #fff;
  margin: 0;
}

.welcome-logo,
.welcome-hero h1,
.welcome-lead {
  color: #fff;
}

.welcome-hero h1 em,
.welcome-eyebrow {
  color: #9cc6ef;
}

.welcome-hero .welcome-cta {
  background-color: #fff;
  color: #12355b;
}

.welcome-nav .welcome-login,
.welcome-hero .welcome-ghost {
  background-color: transparent;
  color: #fff;
  border: 2px solid #fff;
}

/* Lower sections: colored bands with the calendar grid drawn on them too */
.welcome section:nth-of-type(3),
.welcome section:nth-of-type(4) {
  position: relative;
  isolation: isolate;
  padding-bottom: 56px;
}

.welcome section:nth-of-type(3)::before,
.welcome section:nth-of-type(4)::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background:
    linear-gradient(rgba(29, 78, 137, 0.08) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(29, 78, 137, 0.08) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--band);
}

.welcome section:nth-of-type(3) {
  --band: #dce6f3; /* soft blue */
}

.welcome section:nth-of-type(4) {
  --band: #e4ecf7; /* lighter blue */
}

/* Warm gold accent: used only for the main action (Book a demo) and the step numbers */
.welcome .welcome-cta,
.welcome .welcome-hero .welcome-cta,
.welcome .welcome-cta.light {
  background-color: #f2b84b;
  color: #12355b;
  box-shadow: 0 6px 18px rgba(242, 184, 75, 0.35);
}

.welcome .welcome-cta:hover {
  background-color: #e5a832;
}

.welcome .step-number {
  background-color: #f2b84b;
  color: #12355b;
}

.welcome-trades .welcome-trades-more {
  background-color: transparent;
  box-shadow: none;
  font-style: italic;
  color: #52606d;
}

/* Headings in DM Serif Display (it has one weight, so no bold) */
h1,
.period-label,
.welcome h2,
.welcome-logo,
.auth-box h1,
.auth-box h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Buttons and form fields use the page font too */
button,
input,
select,
textarea {
  font-family: inherit;
}

/* Top bar stays at the top while scrolling, with Book a demo beside Log in */
.welcome-nav {
  position: sticky;
  top: 0;
  z-index: 5;
}

.welcome-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.welcome .welcome-nav-cta {
  padding: 9px 18px;
  font-size: 14px;
  box-shadow: none;
}

/* ---------- Login screen: same look as the welcome page ---------- */
.auth-screen {
  background: linear-gradient(160deg, #12355b, #17466b 55%, #1f5f8b);
}

.auth-box {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.auth-box h1 {
  color: #12355b;
}

.auth-box h2 {
  color: #17466b;
}

.auth-box button.primary {
  background-color: #f2b84b;
  color: #12355b;
  font-weight: bold;
}

.auth-box button.primary:hover {
  background-color: #e5a832;
}

.auth-box .link-button {
  color: #1f5f8b;
}

/* ---------- App look: matches the welcome page ---------- */
body {
  background-color: #eef3f9; /* palest blue */
}

.weekend {
  background-color: #f3f6fb;
}

.task-info,
.tracker-stat {
  background-color: #eef3f9;
}

/* Top bar: a full-width band in the person's color (deep blue by default) */
.top-bar {
  margin: -24px -24px 20px -24px;
  padding: 20px 24px;
  background: linear-gradient(160deg, var(--brand-dark), var(--brand));
  align-items: center;
}

.top-bar h1 {
  color: var(--on-brand);
}

.top-bar p,
.top-bar .firm-name {
  color: var(--on-brand);
  opacity: 0.85;
}

.top-bar p {
  margin: 0;
  font-size: 15px;
}

.top-actions button.primary {
  background-color: rgba(255, 255, 255, 0.14);
  color: var(--on-brand);
}

.top-actions button.primary:hover {
  background-color: rgba(255, 255, 255, 0.24);
}

.top-actions button.primary.alerting {
  background-color: #c0392b;
  color: #fff;
}

.top-actions .account-button {
  background-color: transparent;
  color: var(--on-brand);
  border: 2px solid var(--on-brand);
}

.top-actions .account-button:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

/* + New is the main action: gold, like Book a demo */
.top-actions #open-drawer {
  background-color: #f2b84b;
  color: #12355b;
  font-weight: bold;
}

.top-actions #open-drawer:hover {
  background-color: #e5a832;
}

/* Sizes that grow and shrink with the screen */
h1 {
  font-size: clamp(32px, 4.5vw, 48px);
}

.period-label {
  font-size: clamp(26px, 3.4vw, 44px);
}

@media (max-width: 640px) {
  body {
    padding: 16px;
  }

  .top-bar {
    margin: -16px -16px 16px -16px;
    padding: 16px;
  }
}

/* Weekends and holidays: one shared soft beige so they stand out from the blue page */
.weekend,
.holiday,
.calendar .day.weekend,
.calendar .day.holiday {
  background-color: #fbf7f1; /* soft beige */
}

/* Eye button inside password boxes */
.password-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.password-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 44px;
}

.password-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: #616e7c;
  cursor: pointer;
}

.password-eye:hover {
  color: #12355b;
}

/* ---------- Lesson 47: cases / projects ---------- */
.case-card,
.case-add {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 6px 0;
  background-color: #fff;
}

.case-card summary,
.case-add summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-text);
}

.case-card summary.case-closed {
  color: #7b8794;
}

.case-card p {
  margin: 6px 0;
  font-size: 14px;
}

.case-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

/* ---------- Lesson 48: progress bar and updates ---------- */
.case-progress,
.case-updates {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e4e7eb;
}

.case-progress h5,
.case-updates h5 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #12355b;
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background-color: #e4ecf7;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f5f8b, #17466b);
}

.stage-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stage-list li {
  display: inline-flex;
  flex-direction: column;
  position: relative;
  padding: 6px 26px 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  background-color: #f0f4f8;
  color: #52606d;
  border: 1px solid #d9e2ec;
}

.stage-list li.done {
  background-color: #e3f4e1;
  border-color: #3f8f3a;
  color: #27500a;
}

.stage-list li.current {
  background-color: #fff7d6;
  border-color: #f2b84b;
  color: #12355b;
  font-weight: 600;
}

.stage-list li.clickable {
  cursor: pointer;
}

.stage-list small {
  font-size: 11px;
  opacity: 0.8;
}

.stage-remove {
  position: absolute;
  top: 2px;
  right: 4px;
  border: none;
  background: transparent;
  color: #9aa5b1;
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
}

.inline-add {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0 8px 0;
}

.inline-add input[type="text"] {
  flex: 1;
  min-width: 180px;
}

.update-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.update-list li {
  border-left: 3px solid #d9e2ec;
  padding: 4px 0 8px 10px;
  margin-bottom: 8px;
}

.update-list p {
  margin: 2px 0;
}

.update-text {
  font-size: 14px;
  color: #1f2933;
}

.share-status {
  font-size: 12px;
}

.share-status.shared {
  color: #3f8f3a;
  font-weight: 600;
}

.share-status.private {
  color: #7b8794;
}

/* Lesson 48: publish-to-client box on the task panel */
.publish-fields {
  border: 2px solid #f2b84b;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 12px 0;
  background-color: #fffaf0;
}

.publish-fields legend {
  font-weight: 700;
  color: #12355b;
  padding: 0 4px;
}

#publish-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

#drawer #publish-choices input[type="radio"] {
  width: auto;
  margin: 0;
}

/* ---------- Lesson 49: client portal ---------- */
.portal-body {
  padding: 0;
  background-color: #eef3f9;
}

.portal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px max(24px, calc((100% - 960px) / 2));
  background: linear-gradient(160deg, #12355b, #17466b);
  color: #fff;
}

.portal-top h1 {
  color: #fff;
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
}

.portal-kicker {
  margin: 0 0 4px 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9cc6ef;
  font-weight: 700;
}

.portal-logout {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 15px;
  cursor: pointer;
}

.portal-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
}

.portal-welcome {
  font-size: 18px;
  color: #12355b;
}

.portal-empty {
  background-color: #fff;
  border-radius: 14px;
  padding: 24px;
  color: #52606d;
}

.portal-case {
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(18, 53, 91, 0.08);
  padding: 24px;
  margin-bottom: 20px;
}

.portal-case-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-case-head h2 {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  font-size: clamp(24px, 3vw, 32px);
  color: #12355b;
}

.portal-status {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.portal-status.open {
  background-color: #fff3d6;
  color: #7a5200;
}

.portal-status.closed {
  background-color: #e4e7eb;
  color: #52606d;
}

.portal-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.portal-fact {
  background-color: #f3f6fb;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.portal-fact-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7b8794;
  font-weight: 700;
}

.portal-fact-value {
  font-size: 16px;
  color: #12355b;
}

.portal-progress h3,
.portal-updates h3 {
  margin: 18px 0 10px 0;
  font-size: 16px;
  color: #12355b;
}

.portal-steps {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.portal-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  color: #7b8794;
}

.portal-step-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #e4ecf7;
  font-weight: 700;
}

.portal-steps li.done {
  color: #27500a;
}

.portal-steps li.done .portal-step-dot {
  background-color: #3f8f3a;
  color: #fff;
}

.portal-steps li.current {
  color: #12355b;
  font-weight: 700;
}

.portal-steps li.current .portal-step-dot {
  background-color: #f2b84b;
  color: #12355b;
}

.portal-step-date {
  font-size: 12px;
  font-weight: normal;
}

.portal-update-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.portal-update-list li {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f5;
}

.portal-update-date {
  flex: none;
  width: 110px;
  font-size: 13px;
  color: #7b8794;
}

.portal-update-text {
  color: #1f2933;
}

.portal-footer {
  text-align: center;
  color: #9aa5b1;
  font-size: 13px;
  padding: 24px;
}

@media (max-width: 640px) {
  .portal-update-list li {
    flex-direction: column;
    gap: 2px;
  }
}

/* Client portal access on the client card (management) */
.portal-access {
  border: 1px dashed #9cc6ef;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 8px 0;
}

.portal-access summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-text);
}

.portal-user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #eef1f5;
  font-size: 14px;
}

.portal-user .hint {
  margin: 0;
}

/* Lesson 49: the private portal link to copy */
.portal-link {
  background-color: #fffaf0;
  border: 2px solid #f2b84b;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-link p {
  margin: 0;
  font-size: 14px;
  color: #12355b;
}

/* ---------- Lesson 50: requested from the client ---------- */
.case-requests {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e4e7eb;
}

.case-requests h5 {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #12355b;
}

.request-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.request-list li {
  border-left: 3px solid #f2b84b;
  padding: 4px 0 8px 10px;
  margin-bottom: 8px;
}

.request-list li.received {
  border-left-color: #3f8f3a;
}

.request-list p {
  margin: 2px 0;
}

.request-status {
  font-size: 12px;
  font-weight: 600;
}

.request-status.pending {
  color: #9a6700;
}

.request-status.received {
  color: #3f8f3a;
}

.portal-requests h3 {
  margin: 18px 0 10px 0;
  font-size: 16px;
  color: #12355b;
}

.portal-request-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.portal-request-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  background-color: #f3f6fb;
}

.portal-request-list li.pending {
  background-color: #fffaf0;
  border: 1px solid #f2b84b;
}

.portal-request-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.portal-request-badge.pending {
  background-color: #f2b84b;
  color: #12355b;
}

.portal-request-badge.received {
  background-color: #3f8f3a;
  color: #fff;
}

.portal-request-text {
  flex: 1;
  color: #1f2933;
}

.portal-request-date {
  font-size: 13px;
  color: #7b8794;
}

/* Client cards in the person's own color (follows the 🎨 personal color) */
#drawer details.client-card {
  border: 1px solid var(--brand-soft);
  border-left: 6px solid var(--brand);
  background-color: #fff;
}

#drawer details.client-card > summary {
  color: var(--brand-text);
  background-color: var(--brand-light);
  margin: -8px -10px 0 -10px;
  padding: 10px 12px;
  border-radius: 0 5px 5px 0;
}

#drawer details.client-card[open] > summary {
  margin-bottom: 10px;
}

/* My account: each part is a dropdown */
#drawer details.account-group {
  border: 1px solid var(--brand-soft);
  border-left: 6px solid var(--brand);
  border-radius: 6px;
  padding: 0;
  margin-bottom: 10px;
  background-color: #fff;
}

#drawer details.account-group > summary {
  padding: 12px 14px;
  font-size: 15px;
  color: var(--brand-text);
  background-color: var(--brand-light);
}

#drawer details.account-group[open] > summary {
  margin-bottom: 0;
  border-bottom: 1px solid var(--brand-soft);
}

#drawer details.account-group > :not(summary) {
  margin-left: 14px;
  margin-right: 14px;
}

#drawer details.account-group > :last-child {
  margin-bottom: 14px;
}

#drawer details.account-group > :nth-child(2) {
  margin-top: 12px;
}

/* ---------- Welcome page: the client portal (navy band) ---------- */
.welcome .welcome-portal {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
  background-color: #12355b;
  box-shadow: 0 0 0 100vmax #12355b;
  clip-path: inset(0 -100vmax);
  color: #fff;
}

.welcome-portal h2 {
  color: #fff;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 10px 0;
  text-align: left;
}

.welcome .welcome-portal p {
  color: #dbe7f5;
  font-size: 17px;
  line-height: 1.6;
}

.welcome .welcome-portal .welcome-portal-sub {
  color: #f2b84b;
  font-size: 19px;
  font-style: italic;
  margin: 0 0 16px 0;
}

.welcome-portal-points {
  list-style: none;
  padding: 0;
  margin: 24px 0 0 0;
  display: grid;
  gap: 14px;
}

.welcome-portal-points li {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 10px;
  color: #c9d8ea;
  font-size: 15px;
  line-height: 1.45;
}

.welcome-portal-points span {
  grid-row: span 2;
  font-size: 22px;
}

.welcome-portal-points b {
  color: #fff;
  display: block;
  font-size: 16px;
}

/* The phone picture */
.portal-phone {
  justify-self: center;
  width: 270px;
  padding: 12px;
  border-radius: 36px;
  background-color: #0b1f36;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.portal-phone-screen {
  border-radius: 26px;
  overflow: hidden;
  background-color: #eef3f9;
  color: #1f2933;
  font-size: 12px;
}

.pp-top {
  background: linear-gradient(160deg, #12355b, #17466b);
  color: #fff;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
}

.pp-top small {
  color: #9cc6ef;
  font-size: 9px;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.pp-top b {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  font-size: 20px;
}

.pp-card {
  background-color: #fff;
  margin: 10px;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pp-title {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  font-size: 18px;
  color: #12355b;
}

.pp-goal {
  background-color: #f3f6fb;
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  color: #12355b;
}

.pp-goal small,
.pp-label {
  font-size: 9px;
  font-weight: 700;
  color: #7b8794;
  letter-spacing: 0.04em;
}

.pp-label {
  margin-top: 4px;
  color: #12355b;
}

.pp-bar {
  height: 7px;
  border-radius: 999px;
  background-color: #e4ecf7;
  overflow: hidden;
}

.pp-bar span {
  display: block;
  width: 67%;
  height: 100%;
  background: linear-gradient(90deg, #1f5f8b, #17466b);
}

.pp-steps {
  display: flex;
  justify-content: space-around;
}

.pp-steps i {
  font-style: normal;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
}

.pp-steps .done {
  background-color: #3f8f3a;
  color: #fff;
}

.pp-steps .now {
  background-color: #f2b84b;
  color: #12355b;
}

.pp-need {
  background-color: #fffaf0;
  border: 1px solid #f2b84b;
  border-radius: 8px;
  padding: 6px 8px;
}

.pp-need em {
  font-style: normal;
  font-weight: 700;
  font-size: 9px;
  background-color: #f2b84b;
  color: #12355b;
  border-radius: 999px;
  padding: 1px 6px;
  margin-right: 4px;
}

.pp-update {
  border-bottom: 1px solid #eef1f5;
  padding: 3px 0;
}

.pp-update small {
  color: #7b8794;
  margin-right: 6px;
}

@media (max-width: 860px) {
  .welcome .welcome-portal {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Phone picture: gold frame, step names under the dots */
.portal-phone {
  background-color: #f2b84b;
}

.pp-steps span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: #52606d;
  text-align: center;
}

/* ---------- Lesson 51: uploads ---------- */
.request-list li.review {
  border-left-color: #1f5f8b;
}

.request-status.review {
  color: #1f5f8b;
}

.request-files p {
  margin: 4px 0;
  font-size: 14px;
}

.portal-request-list li.review {
  background-color: #eef4fb;
  border: 1px solid #9cc6ef;
}

.portal-request-badge.review {
  background-color: #1f5f8b;
  color: #fff;
}

.portal-request-files {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-file {
  font-size: 13px;
  color: #1f5f8b;
}

.portal-file.archived {
  color: #7b8794;
}

.portal-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 8px;
  background-color: #f2b84b;
  color: #12355b;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.portal-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.portal-upload.busy {
  opacity: 0.6;
  pointer-events: none;
}

/* Top bar, iPhone-safe: a real full-width navy bar (no clip-path / shadow trick, which
   Safari can cut in half on a pinned bar). The logo and buttons stay lined up with the page. */
.welcome .welcome-nav {
  max-width: none;
  width: 100%;
  margin: 0;
  padding-left: max(24px, calc((100% - 1100px) / 2 + 24px));
  padding-right: max(24px, calc((100% - 1100px) / 2 + 24px));
  background-color: #12355b;
  box-shadow: none;
  clip-path: none;
  -webkit-transform: translateZ(0); /* keeps Safari drawing the pinned bar in one piece */
  transform: translateZ(0);
}

/* Welcome page as a NORMAL page (iPhone Safari): the whole document scrolls, not a box laid
   over the app, so scrolling never gets stuck and the pinned top bar isn't hidden under
   Safari's own bar. While it shows, everything else on the page is hidden. */
body.on-welcome {
  padding: 0;
  background-color: #eef3f9;
}

body.on-welcome > :not(#welcome) {
  display: none !important;
}

.welcome {
  position: relative;
  inset: auto;
  z-index: auto;
  min-height: 100vh;
  overflow: visible;
  overflow-x: clip; /* trims the full-width bands without making a scroll box */
  background-attachment: scroll;
}

.welcome .welcome-nav {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Client card dropdowns: a little space inside the open client */
#drawer details.client-card > details.account-group {
  margin-top: 10px;
}

#drawer details.client-group .client-section {
  border: none;
  padding: 0;
}

#drawer details.client-card details.account-group > summary {
  margin: 0;
}

/* The dropdowns inside a client use the second color (opposite the person's own color),
   so they stand out from the client's name. Both follow the person's 🎨 color. */
:root {
  --accent: hsl(30, 60%, 42%);
  --accent-text: hsl(30, 60%, 26%);
  --accent-soft: hsl(30, 42%, 82%);
  --accent-light: hsl(30, 48%, 94%);
}

#drawer details.client-card details.account-group {
  border-color: var(--accent-soft);
  border-left-color: var(--accent);
}

#drawer details.client-card details.account-group > summary {
  color: var(--accent-text);
  background-color: var(--accent-light);
}

#drawer details.client-card details.account-group[open] > summary {
  border-bottom-color: var(--accent-soft);
}

/* Uploaded files history (client portal dropdown) */
.file-history {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
}

.file-history li {
  border-left: 3px solid #d9e2ec;
  padding: 4px 0 6px 10px;
  margin-bottom: 8px;
}

.file-history p {
  margin: 2px 0 0 0;
}

.file-history-name {
  font-size: 14px;
  margin-right: 8px;
}

.file-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.file-status.review {
  background-color: #e4ecf7;
  color: #1f5f8b;
}

.file-status.received {
  background-color: #e3f4e1;
  color: #27500a;
}

.file-status.archived {
  background-color: #eef1f5;
  color: #7b8794;
}

.file-history li.received {
  border-left-color: #3f8f3a;
}

.file-history li.review {
  border-left-color: #1f5f8b;
}

.file-history-file {
  font-size: 14px;
}

/* Ethical walls: search instead of a long list */
#drawer .wall-search {
  width: 100%;
  box-sizing: border-box;
  margin: 4px 0 6px 0;
}

/* Task form: "Deadline only" and "Hard deadline" tick boxes on one line with their words */
#drawer label.checkbox-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  font-size: 14px;
  color: #323f4b;
  margin: 4px 0;
}

#drawer label.checkbox-row input[type="checkbox"] {
  width: auto;
  margin: 2px 0 0 0;
  flex: none;
}

#drawer label.checkbox-row[hidden] {
  display: none;
}

/* ---------- Lesson 53: client meetings, owner area ---------- */
.portal-meetings h3 {
  margin: 18px 0 10px 0;
  font-size: 16px;
  color: #12355b;
}

.portal-meeting-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.portal-meeting-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background-color: #eef4fb;
  border-left: 4px solid #1f5f8b;
}

.portal-meeting-when {
  font-weight: 700;
  color: #12355b;
}

.portal-meeting-title {
  color: #3e4c59;
  font-size: 14px;
}

.portal-contact {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  color: #12355b;
  font-size: 15px;
}

#drawer details.owner-group {
  border-left-color: #f2b84b;
}

.owner-firms {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.owner-firms th,
.owner-firms td {
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: top;
}

/* Lesson 55: the time-off policy note on the time-off form */
.policy-note {
  background: #fff7e3;
  border-left: 4px solid #f2b84b;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

/* Lesson 55: feedback in the owner area */
.owner-feedback-item {
  border-top: 1px solid #dce6f3;
  padding: 8px 0;
}

/* Lesson 56: holds shared with the client, and reordering stages */
.pause-client-box {
  background: #f4f7fb;
  border-left: 4px solid #1f5f8b;
  padding: 8px 12px;
  margin: 6px 0 10px;
}
.pause-client-box input::placeholder {
  color: #9aa5b1;
}
.portal-holds {
  background: #fff7e3;
  border-left: 4px solid #f2b84b;
  padding: 8px 12px;
  margin: 12px 0;
}
.portal-hold {
  margin: 4px 0;
}
.stage-list li.draggable {
  cursor: grab;
}
.stage-list li.dragging {
  opacity: 0.5;
}
.stage-move {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0 4px;
  font-size: 0.85rem;
  color: #1f5f8b;
}

/* Lesson 58: small steps and client sign-off */
.small-steps {
  margin: 4px 0 2px 18px;
  font-size: 0.85rem;
}
.small-steps input[type="text"] {
  margin-top: 4px;
  font-size: 0.85rem;
}
.checkpoint-status {
  display: block;
  color: #1f5f8b;
}
.stage-extras {
  flex-basis: 100%;
  font-size: 0.85rem;
}
.portal-signoff {
  background: #eef3f9;
  border-left: 4px solid #1f5f8b;
  padding: 10px 14px;
  margin: 12px 0;
}
.portal-signoff-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.portal-approve {
  background: #f2b84b;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}
.portal-ask {
  background: transparent;
  border: 1px solid #1f5f8b;
  color: #1f5f8b;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

/* Lesson 59: health line, timeline and the client's step path */
.health-line {
  font-weight: 600;
  margin: 6px 0;
}
.health-line.on-track, .health-line.complete { color: #2f7a4d; }
.health-line.at-risk { color: #b7791f; }
.health-line.late { color: #c0392b; }
.health-line.nodates { color: #5b6b7c; }
.timeline-chart {
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid #dce6f3;
  border-radius: 6px;
  background: #fff;
}
.timeline-chart.large { cursor: default; }
.timeline-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 53, 91, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.timeline-window {
  background: #fff;
  border-radius: 10px;
  padding: 18px 20px;
  max-width: 1040px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
}
.timeline-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.stage-date {
  font-size: 0.8rem;
  margin-left: 6px;
  max-width: 140px;
}
.step-path {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  list-style: none;
}
.step-path li {
  flex: 1 1 120px;
  position: relative;
  text-align: center;
  padding: 0 6px 8px;
}
.step-path li::before {
  content: "";
  position: absolute;
  top: 14px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: #b7c4d3;
  z-index: 0;
}
.step-path li:first-child::before { display: none; }
.step-path li.done::before, .step-path li.current::before { background: #2f7a4d; }
.step-path .portal-step-dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin: 0 auto 4px;
}
.step-path .portal-step-name, .step-path .portal-step-date, .step-path .portal-step-hold {
  display: block;
}
.portal-step-hold {
  color: #b7791f;
  font-size: 0.85rem;
}
