/* Colours: the Cosmos palette (main app assets/stylesheets/_colours.scss). */
:root {
  --primary: #08d9d6;        /* $primary - Cosmos teal */
  --primary-dark: #07c0bd;   /* $primary-darkened - pressed */
  --primary-ink: #067a78;    /* teal for text/icons on light backgrounds (plain teal is too faint to read) */
  --primary-light: #b4ffff;  /* $primary-light */
  --primary-soft: #7fe9e7;   /* between the two: quieter borders */
  --primary-tint: #e6fbfb;   /* a wash for selected/today rows */
  --on-primary: #444a54;     /* $primary--opposite: text on teal */
  --secondary: #ff5e63;      /* $secondary / $danger - coral */
  --secondary-light: #ffdde6;/* $secondary-light - the alerts box */
  --dark: #444a54;           /* $dark - the main nav bar */
  --on-dark: #ffffff;
  --gray-bg: #efefef;        /* $gray-200 */
  --gray-border: #e6e6e6;    /* $gray-300 */
  --text: #292929;           /* $gray-900 */
  --text-dim: #575757;       /* $gray-700 */
  --text-faint: #9a9a9a;
  --danger: #ff5e63;         /* $danger (fills) */
  --danger-ink: #c9363b;     /* coral text on light backgrounds */
  --ok: #7df0d1;             /* $success - mint (fills) */
  --ok-ink: #11806a;         /* mint text/borders on light backgrounds */
  --warn-bg: #fff1c7;        /* from $task-should-confirm #ffb90f */
  --warn: #ffb90f;
  --warn-ink: #7a5200;
}

* { box-sizing: border-box; }

[v-cloak] { display: none; }

.loading-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: var(--text-dim);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--gray-bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.hidden { display: none !important; }

.banner {
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: center;
  padding: 8px 12px;
  font-size: 14px;
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.banner-staging { background: #ffc107; color: var(--text); font-weight: 600; } /* the main app's staging bar */
.banner-error { background: var(--secondary-light); color: var(--danger-ink); }

/* Login */
#login-view, #no-access-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.login-card .subtitle { margin: 0 0 24px; color: var(--text-dim); font-size: 14px; }
.login-card .no-access-msg { color: var(--text); font-size: 16px; }
.signin-btn {
  width: 100%;
  padding: 13px;
  font-size: 16px;
  font-weight: 600;
  color: var(--on-primary);
  background: var(--primary);
  border: none;
  border-radius: 10px;
}
.signin-btn:active { background: var(--primary-dark); }
.signin-btn:disabled { opacity: 0.6; }

/* Schedule */
.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid var(--gray-border);
  position: sticky;
  top: 0;
}
.nav-btn {
  width: 40px;
  height: 40px;
  font-size: 22px;
  border: none;
  background: var(--gray-bg);
  border-radius: 50%;
  color: var(--text);
}
.date-display { text-align: center; font-size: 17px; font-weight: 600; }
.date-sub { font-size: 13px; font-weight: 400; color: var(--text-dim); }

.task-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  border-left: 4px solid var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.task-card.completed { border-left-color: var(--ok-ink); opacity: 0.7; }
.task-card.cancelled { border-left-color: var(--danger-ink); opacity: 0.6; }

.task-time { font-size: 15px; font-weight: 700; color: var(--primary-ink); }
.task-card.completed .task-time { color: var(--ok-ink); }
.task-card.cancelled .task-time { color: var(--danger-ink); }

.task-title { font-size: 16px; font-weight: 600; margin-top: 2px; }
.task-subtitle { font-size: 13px; color: var(--text-dim); }
.task-client { font-size: 14px; margin-top: 6px; }
.task-address { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.task-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 6px;
}
.task-badge.completed { background: #dcfbf2; color: var(--ok-ink); }
.task-badge.cancelled { background: var(--secondary-light); color: var(--danger-ink); }

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 20px;
  font-size: 15px;
}

.schedule-footer {
  display: flex;
  gap: 10px;
  padding: 16px;
}
.schedule-footer button {
  flex: 1;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: var(--on-primary);
}
.schedule-footer button.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--gray-border);
}

.build-label { text-align: center; font-size: 11px; color: var(--text-faint); padding: 0 0 16px; }

/* ---- App shell: header + drawer ---------------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--dark);
  color: var(--on-dark);
}
.app-title { flex: 1; font-size: 17px; font-weight: 600; }
.app-header .icon-btn { background: rgba(255,255,255,0.08); color: var(--primary); }
.app-header .icon-btn:active { background: rgba(255,255,255,0.16); }
.app-header .text-btn { color: var(--primary); }
.icon-btn {
  width: 40px; height: 40px;
  font-size: 22px; line-height: 1;
  border: none; border-radius: 50%;
  background: var(--gray-bg); color: var(--text);
}
.text-btn {
  border: none; background: none;
  color: var(--primary-ink); font-size: 15px; font-weight: 600;
  padding: 8px 6px;
}
.drawer-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 30; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0;
  width: 78%; max-width: 300px;
  z-index: 40;
  display: flex; flex-direction: column;
  background: #fff;
  padding: calc(16px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom));
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  box-shadow: 2px 0 16px rgba(0,0,0,0.12);
}
.drawer.open { transform: translateX(0); }
.drawer-head { font-size: 18px; font-weight: 700; padding: 8px 12px 16px; }
.drawer-item {
  display: block; width: 100%;
  text-align: left;
  padding: 14px 12px;
  font-size: 16px; color: var(--text);
  text-decoration: none;
  background: none; border: none; border-radius: 10px;
}
.drawer-item.router-link-active { background: var(--primary-tint); color: var(--primary-ink); font-weight: 600; }
.drawer-spacer { flex: 1; }
.drawer-item.drawer-note { align-items: flex-start; }
.drawer-note-sub { display: block; font-size: 13px; color: var(--text-dim); margin-top: 4px; line-height: 1.35; }
.drawer-error { color: var(--danger-ink); padding: 0 12px; }

/* ---- Push notifications opt-in (To-dos) ------------------------------- */
.push-card {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 12px; padding: 14px;
  border: 1px solid var(--primary-soft); border-radius: 12px;
  background: var(--primary-tint);
}
.push-card > .ct-icon { color: var(--primary-ink); flex: none; margin-top: 2px; }
.push-card-main { flex: 1; min-width: 0; }
.push-card-title { font-weight: 600; color: var(--text); }
.push-card-sub { font-size: 14px; color: var(--text-dim); margin-top: 4px; line-height: 1.35; }
.push-card-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.push-card-btn {
  border: none; border-radius: 999px; padding: 8px 18px;
  background: var(--primary); color: var(--on-primary);
  font-size: 15px; font-weight: 600;
}
.push-card-btn:disabled { opacity: 0.6; }

/* ---- Agenda ------------------------------------------------------------- */
.agenda { padding-bottom: 24px; }
.agenda-earlier, .agenda-later { text-align: center; padding: 14px; color: var(--text-dim); font-size: 13px; }
.pill-btn {
  border: 1px solid var(--gray-border); background: #fff;
  border-radius: 999px; padding: 8px 16px;
  font-size: 14px; color: var(--text);
}
.day { padding: 0 12px 6px; scroll-margin-top: 64px; }
.day-head {
  position: sticky; top: 61px; z-index: 5;
  margin: 0 -12px 8px; padding: 8px 16px;
  font-size: 14px; font-weight: 600; color: var(--text-dim);
  background: var(--gray-bg);
  display: flex; gap: 8px;
}
.day.today .day-head { color: var(--primary-ink); }
.day-rel { color: var(--text); }
.day.today .day-rel { color: var(--primary-ink); }
.day-empty { color: var(--text-dim); font-size: 14px; padding: 4px 4px 12px; }
.day.past .task-card:not(.completed):not(.cancelled) { border-left-color: var(--primary-soft); }
.day .task-card { margin-bottom: 10px; }

/* Cards are buttons (tap to open): reset button styling. */
button.task-card {
  display: block; width: 100%;
  text-align: left; font: inherit; color: inherit;
  border: none; cursor: pointer;
  border-left: 4px solid var(--primary);
}
button.task-card:active { background: var(--primary-tint); }
button.task-card.completed { border-left-color: var(--ok-ink); }
button.task-card.cancelled { border-left-color: var(--danger-ink); }

/* ---- Appointment detail ------------------------------------------------- */
.task-view { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.panel { background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.panel-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); margin-bottom: 6px; }
.detail-title { font-size: 20px; margin: 4px 0 2px; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.action-btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--primary-tint); color: var(--primary-ink);
  font-weight: 600; font-size: 15px;
  text-decoration: none; border: none;
}
.primary-btn {
  width: 100%; padding: 13px;
  font-size: 16px; font-weight: 600;
  color: var(--on-primary); background: var(--primary);
  border: none; border-radius: 10px;
}
.primary-btn:active { background: var(--primary-dark); }
.primary-btn:disabled { opacity: 0.6; }

/* ---- Fields, completion, notes ----------------------------------------- */
.muted { color: var(--text-dim); font-size: 14px; }
.small { font-size: 12px; }
.small-top { margin-top: 8px; }
.field-row { padding: 10px 0; border-top: 1px solid var(--gray-bg); }
.field-row:first-of-type { border-top: none; }
.field-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.req { color: var(--danger-ink); margin-left: 2px; }
.field-input {
  width: 100%;
  font: inherit; font-size: 16px; /* 16px stops iOS zooming in on focus */
  padding: 10px 12px;
  border: 1px solid var(--gray-border); border-radius: 10px;
  background: #fff; color: var(--text);
}
textarea.field-input { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.check input { width: 22px; height: 22px; }
.field-readonly { font-size: 15px; }
.field-status { font-size: 12px; margin-top: 4px; color: var(--text-dim); }
.field-status.saved { color: var(--ok-ink); }
.field-status.error, .field-error { color: var(--danger-ink); font-size: 13px; margin-top: 4px; }
.reasons { margin-bottom: 12px; }
.reasons ul { margin: 0; padding-left: 20px; color: var(--danger-ink); font-size: 14px; }
.done-note { font-weight: 600; color: var(--ok-ink); }
.note { border-top: 1px solid var(--gray-bg); padding: 10px 0; margin-top: 8px; }
.note-meta { font-size: 12px; color: var(--text-dim); }
.note-title { font-weight: 600; margin-top: 2px; }
.note-text { font-size: 15px; white-space: pre-wrap; margin-top: 2px; }
.note-alert { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; margin-right: 4px; background: var(--primary-light); color: var(--on-primary); }
.note-alert.lvl-a { background: var(--warn-bg); color: var(--warn-ink); }
.note-alert.lvl-x { background: var(--secondary-light); color: var(--danger-ink); }

/* iOS form controls don't inherit the page font by default. */
button, input, select, textarea { font-family: inherit; }

/* Lucide line icons (js/icons.js) */
.ct-icon { display: inline-block; vertical-align: -0.2em; flex-shrink: 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; }
.drawer-item, .action-btn, .done-note { display: flex; align-items: center; gap: 10px; }
.action-btn { display: inline-flex; gap: 8px; }
.drawer-item .ct-icon { color: var(--text-dim); }
.drawer-item.router-link-active .ct-icon { color: var(--primary-ink); }

/* Shifts */
.shift-group { margin-bottom: 14px; }
.shift-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 4px; margin-bottom: 6px;
  background: none; border: none; font: inherit; color: var(--text-dim); text-align: left;
}
.shift-head .shift-hours { font-weight: 600; color: var(--text); }
.shift-head .shift-stops { flex: 1; font-size: 13px; }
.shift-group .task-card { margin-left: 10px; width: calc(100% - 10px); }
.shift-ends { margin-top: 10px; font-size: 14px; display: grid; gap: 4px; }
.shift-ends .panel-label { display: inline; margin-right: 6px; }
.stop-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-right: 4px;
  border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 700;
}

/* Shifts list */
.shifts { padding-bottom: 24px; }
.week { padding: 0 12px 4px; }
.shift-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin-bottom: 8px; padding: 12px 14px;
  background: #fff; border: none; border-radius: 12px; border-left: 4px solid var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  font: inherit; color: inherit; text-align: left;
}
.shift-row:active { background: var(--primary-tint); }
.shift-row.today { background: var(--primary-tint); }
.shift-row.done { border-left-color: var(--ok-ink); opacity: 0.75; }
.shift-row-day { width: 92px; flex-shrink: 0; font-weight: 700; color: var(--primary-ink); font-size: 15px; }
.shift-row.done .shift-row-day { color: var(--ok-ink); }
.shift-row-main { flex: 1; min-width: 0; }
.shift-row-hours { font-weight: 600; }
.shift-row-sub { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.shift-row .ct-icon { color: var(--text-dim); }
.shift-row.done { border-left-color: var(--ok-ink) !important; }

/* Shift type (ct-shift-type): coloured dot + name */
.shift-type { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-dim); white-space: nowrap; }
.shift-type-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18); }
.shift-row-hours .shift-type { margin-left: 6px; font-weight: 600; }
.shift-type-line { margin: 2px 0 4px; }
.shift-type-line .shift-type { font-size: 14px; }

/* Client record */
.client-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 0; border: none; background: none; font: inherit; font-size: 15px; color: var(--primary-ink); font-weight: 600; }
.alerts ul { margin: 0; padding-left: 18px; color: var(--danger-ink); font-size: 14px; }
.list-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 0; border: none; border-top: 1px solid var(--gray-bg); background: none; font: inherit; color: inherit; text-align: left; }
.list-row:first-of-type { border-top: none; }
.list-row-main { flex: 1; }
.list-row .task-badge { margin: 0 0 0 6px; }
.list-row .ct-icon { color: var(--text-dim); }
.field-heading { font-size: 15px; margin: 16px 0 4px; padding-top: 8px; border-top: 1px solid var(--gray-border); }
.choice-row { display: flex; flex-wrap: wrap; gap: 6px; }
.choice { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--gray-border); background: #fff; font: inherit; font-size: 15px; color: var(--text); }
.choice.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }

/* Header client name: truncate rather than wrap */
.app-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.app-title-name { font-weight: 500; color: var(--primary); }

/* Find a client */
.search-view { padding: 12px; }
.search-box { display: flex; align-items: center; gap: 8px; padding: 0 12px; margin-bottom: 12px; background: #fff; border: 1px solid var(--gray-border); border-radius: 12px; }
.search-box .ct-icon { color: var(--text-dim); }
.search-box input { flex: 1; border: none; outline: none; padding: 12px 0; font: inherit; font-size: 16px; background: transparent; }
.prog-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--primary-tint); color: var(--primary-ink); font-size: 12px; font-weight: 600; }

/* Program: tasks & forms */
.list-row .ct-icon:first-child { color: var(--primary-ink); }
.list-row.done .ct-icon:first-child { color: var(--ok-ink); }
.list-row.inert { cursor: default; }
.list-row.inert .ct-icon:first-child { color: var(--text-dim); }
.list-row:disabled { opacity: 1; color: inherit; }
.list-row-sub { display: block; font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* Client info card */
.client-card .detail-title { margin-top: 0; }
.onhold-banner { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-weight: 600; font-size: 14px; }
.info-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 14px 0 0; font-size: 15px; }
.info-list dt { color: var(--text-dim); font-size: 13px; padding-top: 2px; }
.info-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.info-list dd.wide { grid-column: 1 / -1; }
.inline-link { display: inline-flex; align-items: center; gap: 4px; color: var(--primary-ink); font-weight: 600; text-decoration: none; }
.alerts-box { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--secondary-light); }
.alerts-box ul { margin: 0; padding-left: 18px; color: var(--danger-ink); font-size: 14px; }

/* Collapsible sections */
.section { padding: 0; }
.section-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 14px 16px; background: none; border: none;
  font: inherit; color: var(--text); text-align: left;
}
.section-chevron { color: var(--text-dim); transition: transform 0.15s ease; }
.section.open .section-chevron { transform: rotate(90deg); }
.section-title { font-size: 15px; font-weight: 700; }
.section-summary { font-size: 14px; color: var(--text-dim); }
.section-body { padding: 0 16px 14px; }

/* Forms not started yet */
.sub-label { margin: 14px 0 2px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); }
.start-btn { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; border: none; background: var(--primary); color: var(--on-primary); font: inherit; font-size: 14px; font-weight: 600; }
.start-btn:disabled { opacity: 0.6; }

/* Program page heading under the client card */
.program-head .detail-title { margin: 0 0 2px; font-size: 18px; }
.client-card h2.detail-title { font-size: 20px; }

/* Case-note level picker: a horizontal colour bar */
.level-bar { display: flex; margin-top: 8px; border-radius: 10px; overflow: hidden; border: 1px solid var(--gray-border); }
.level-opt { flex: 1; padding: 9px 2px; border: none; border-left: 1px solid var(--gray-border); background: #fff; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.15; color: var(--text-dim); }
.level-opt:first-child { border-left: none; }
.level-opt.lvl-n.on { background: var(--dark); color: var(--on-dark); }
.level-opt.lvl-i { color: var(--primary-ink); } .level-opt.lvl-i.on { background: var(--primary); color: var(--on-primary); }
.level-opt.lvl-a { color: var(--warn-ink); } .level-opt.lvl-a.on { background: var(--warn); color: var(--text); }
.level-opt.lvl-x { color: var(--danger-ink); } .level-opt.lvl-x.on { background: var(--secondary); color: #fff; }
.level-help { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* Messages */
.msg-view { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.msg-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.msg-row { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 12px 14px; background: #fff; border: none; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); font: inherit; color: inherit; text-align: left; }
.msg-row-top, .msg-row-bottom { display: flex; align-items: center; gap: 8px; }
.msg-name { flex: 1; font-weight: 600; }
.msg-when { font-size: 12px; color: var(--text-dim); }
.msg-last { flex: 1; font-size: 14px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-row.unread .msg-name, .msg-row.unread .msg-last { color: var(--text); font-weight: 700; }
.msg-badge, .drawer-badge { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 700; text-align: center; }
.drawer-badge { margin-left: auto; }
.menu-btn { position: relative; }
.dot-badge { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--secondary); border: 2px solid var(--dark); }
.thread-name { font-weight: 700; font-size: 17px; padding: 2px 4px 6px; }
.bubbles { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; }
.bubble-wrap { display: flex; }
.bubble-wrap.mine { justify-content: flex-end; }
.bubble { max-width: 82%; padding: 8px 12px; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.bubble-wrap.mine .bubble { background: var(--primary); color: var(--on-primary); }
.bubble-sender { font-size: 12px; font-weight: 700; color: var(--text-dim); margin-bottom: 2px; }
.bubble-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.bubble-when { font-size: 11px; opacity: 0.7; margin-top: 3px; text-align: right; }
.composer { position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); background: var(--gray-bg); }
.note-title-preview { font-size: 13px; color: var(--text-dim); margin: 4px 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* To-dos */
.todos-view { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.todo-list { display: flex; flex-direction: column; gap: 6px; }
.todo-row.inert { cursor: default; }
.todo-when { white-space: nowrap; }
.today-row { margin-bottom: 0; }
.today-row > .ct-icon:first-child { color: var(--primary-ink); }
