/* ==========================================================================
   MORDOLOGIE — main desktop stylesheet
   ==========================================================================

   Single global stylesheet driving the entire desktop UI. No preprocessor,
   no methodology (BEM/utility) — selectors mirror the HTML structure.

   Maintenance conventions:
     • Design tokens (colors, radii, shadows) live in :root as CSS variables.
       Add new tokens there, never inline magic numbers.
     • Class naming is feature-prefixed (.composer-*, .journal-*, .agenda-*,
       .timer-*, .users-admin-*) — keep new classes consistent with the
       block they belong to.
     • Component states use modifier classes (.X--running, .X--paused) and
       data-attributes ([data-tone="warning"]) — prefer these over inline
       styles.

   Section index (search for "SECTION:" markers):
     VARIABLES & BASE
     APP SHELL & TOPBAR
     AUTH SHELL & DROPDOWN
     STATUS TOASTS
     COMPOSER FORM (capture grid)
     JOURNAL FILTERS & SESSION LIST
     TIMER PANEL
     PERSONAL STATS
     CATEGORY & TAG ROWS
     AGENDA INTERACTION (drag/clone)
     SESSION ROW DISPLAY/EDIT
     JOURNAL DAY HEADERS
     TIMER STATES & UI POLISH
     GUIDE VIEW

   See CODEMAP.md for the cross-reference with app.js sections.
   ========================================================================== */


/* ==========================================================================
   SECTION: VARIABLES & BASE
   Purpose: Design tokens (color palette, radii, shadows, content width)
     and global resets. All other sections consume these via var(--name).
   ========================================================================== */

:root {
  --bg: #f0f2f5;
  --bg-gradient:
    radial-gradient(ellipse at 80% 0%, rgba(13, 148, 136, 0.06), transparent 50%);
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --panel-soft: #f8fafc;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --text: #111827;
  --muted: #6b7280;
  --accent: #0d9488;
  --accent-strong: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.1);
  --warm: #f97316;
  --warm-soft: rgba(249, 115, 22, 0.12);
  --sage: #fbbf24;
  --sage-soft: rgba(251, 191, 36, 0.18);
  --sky: #e2e8f0;
  --sky-soft: rgba(226, 232, 240, 0.5);
  --sky-soft-weak: rgba(226, 232, 240, 0.25);
  --sky-soft-strong: rgba(226, 232, 240, 0.7);
  --ink-soft: rgba(0, 0, 0, 0.03);
  --ink-soft-strong: rgba(0, 0, 0, 0.06);
  --panel-edge: rgba(0, 0, 0, 0.07);
  --panel-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 20px rgba(0, 0, 0, 0.05);
  --panel-glow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --success: #16a34a;
  --danger: #dc2626;
  --radius-panel: 10px;
  --radius-card: 8px;
  --radius-input: 6px;
  --content-width: 1380px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-gradient), var(--bg);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  cursor: pointer;
}


/* ==========================================================================
   SECTION: APP SHELL & TOPBAR
   Purpose: Outer page grid, max-width wrapper, topbar with brand and
     navigation buttons. Drives the global layout rhythm.
   ========================================================================== */

.app-shell {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 28px;
  display: grid;
  gap: 16px;
}

.topbar,
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  border-radius: var(--radius-panel);
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0)),
    var(--panel);
  position: relative;
  overflow: visible;
  z-index: 10;
}

.topbar-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.topbar-logo {
  height: 22px;
  width: auto;
  display: block;
  opacity: 0.88;
}

.eyebrow,
.panel-copy,
.summary-card p,
.summary-card span,
.hint,
.muted-copy,
.section-minihead p,
.session-secondary,
.session-date,
.session-notes,
.active-task-label,
.timer-label {
  margin: 0;
}

.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel-head h2,
.dialog-head h2 {
  margin: 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  letter-spacing: -0.045em;
  line-height: 0.94;
}
.panel-copy,
.section-minihead p,
.hint,
.summary-card span,
.muted-copy,
.session-secondary,
.session-date,
.session-notes,
.active-task-label {
  color: var(--muted);
}

.topbar-nav,
.button-row,
.period-switch,
.view-switch,
.dialog-actions,
.chip-row,
.distribution-legend,
.token-row,
.memory-meta,
.token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-nav {
  flex: 0 0 auto;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}


/* ==========================================================================
   SECTION: AUTH SHELL & DROPDOWN
   Purpose: Guest landing (rescue select), authenticated user identity
     trigger, and the identity dropdown with role badge and sign-out.
   ========================================================================== */

/* ── Auth: guest shell ── */

.auth-shell-guest {
  display: flex;
  align-items: center;
}

.auth-rescue-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-rescue-select {
  min-width: min(180px, 100%);
  min-height: 36px;
  padding: 6px 10px;
  font-size: 0.9rem;
}

/* ── Auth: user shell ── */

.auth-shell-user {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.auth-identity-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-user-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(173, 108, 31, 0.28);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 236, 189, 0.96), rgba(204, 132, 46, 0.92) 58%, rgba(67, 42, 17, 0.96) 100%);
  color: #fff7ea;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  padding: 0;
  transition: box-shadow 160ms ease;
}

.auth-user-avatar:hover {
  box-shadow: 0 3px 10px rgba(39, 56, 68, 0.2);
}

.auth-user-avatar:focus-visible {
  outline: 2px solid rgba(49, 153, 158, 0.55);
  outline-offset: 3px;
}

.auth-user-avatar.has-photo {
  color: transparent;
  text-shadow: none;
}

.topbar-username {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Auth: identity dropdown ── */

.auth-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 300px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 14px;
  display: grid;
  gap: 0;
  z-index: 100;
}

.auth-dropdown-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
}

.auth-dropdown-email {
  flex: 1;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-dropdown-actions {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  margin-top: 2px;
}

.auth-calendar-section {
  display: grid;
  gap: 7px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  margin-top: 2px;
}

.auth-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-calendar-labelrow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-calendar-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success);
  white-space: nowrap;
}

.auth-calendar-actions {
  display: flex;
  gap: 6px;
}

.auth-calendar-input--multi {
  resize: vertical;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.auth-calendar-input {
  border-radius: var(--radius-input);
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  padding: 6px 9px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.auth-calendar-input::placeholder {
  color: var(--muted);
  font-size: 0.72rem;
}

.agenda-calendar-sync-btn {
  white-space: nowrap;
  font-size: 0.82rem;
  padding: 6px 12px;
}

.auth-role-pill {
  background: rgba(6, 148, 148, 0.14);
  color: var(--accent-strong);
  width: fit-content;
}

/* ==========================================================================
   SECTION: STATUS TOASTS
   Purpose: Floating status messages (success / warning / error tones)
     used by auth, save, and sync feedback. Driven by data-tone attributes.
   ========================================================================== */

/* ── Status toast ── */

.status-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  pointer-events: none;
}

.status-toast:not([hidden]) {
  animation: toast-in 200ms ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

#auth-status {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
  padding: 8px 18px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

#auth-status[data-tone="success"] {
  color: var(--success);
  background: rgba(230, 249, 239, 0.98);
  border-color: rgba(63, 147, 94, 0.22);
}

#auth-status[data-tone="warning"] {
  color: #8b661a;
  background: rgba(255, 245, 221, 0.98);
  border-color: rgba(173, 127, 22, 0.2);
}

#auth-status[data-tone="error"] {
  color: var(--danger);
  background: rgba(255, 237, 232, 0.98);
  border-color: rgba(209, 104, 82, 0.22);
}

.topbar-nav a,
.topbar-nav button,
.chip,
.period-btn,
.btn,
.token-chip,
.pill,
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border-radius: var(--radius-input);
  font-weight: 700;
}

.topbar-nav a,
.topbar-nav button {
  width: 40px;
  height: 40px;
  justify-content: center;
  padding: 0;
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  appearance: none;
  font-size: 0.92rem;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.topbar-nav button {
  font: inherit;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.topbar-nav .active {
  background: rgba(6, 148, 148, 0.12);
  border-color: rgba(6, 148, 148, 0.22);
  box-shadow: 0 8px 20px rgba(39, 56, 68, 0.07);
}

.topbar-nav button {
  position: relative;
  overflow: visible;
}

.nav-tooltip {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 4px 9px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
}

.nav-tooltip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-bottom-color: var(--text);
}

.topbar-nav button:hover .nav-tooltip {
  opacity: 1;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.workspace-grid,
.manager-grid,
.manager-analysis-grid,
.journal-grid {
  display: grid;
  gap: 20px;
}

.cadre-layout {
  display: grid;
  gap: 20px;
}

.app-view {
  display: none;
  gap: 20px;
}

.app-view.is-active {
  display: grid;
}

.workspace-grid {
  grid-template-columns: 1fr;
}

.manager-grid,
.manager-analysis-grid,
.journal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  border-radius: var(--radius-panel);
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0)),
    var(--panel);
}

.panel-head,
.section-minihead,
.time-form,
.session-list,
.journal-filters,
.memory-list,
.table-stack,
.cadre-stack {
  display: grid;
  gap: 14px;
}

.panel-head {
  gap: 10px;
}

.panel-head-compact {
  gap: 4px;
}

.journal-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-head-inline {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
  align-items: end;
}

.panel-head h2,
.dialog-head h2 {
  font-size: clamp(1.6rem, 2vw, 2.3rem);
}

.panel-copy {
  max-width: 60ch;
  line-height: 1.45;
}

.form-grid,
.cadre-summary,
.manager-kpis,
.dialog-grid {
  display: grid;
  gap: 14px;
}

/* ==========================================================================
   SECTION: COMPOSER FORM (capture grid)
   Purpose: The main 3-column capture form (collaborator, project,
     category/tags, notion, task, notes). Includes field-management
     buttons, single-selection chips, and the manual/planned dialogs.
   ========================================================================== */

/* ── Composer: 3-column capture grid ── */

.capture-3col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.6fr);
  gap: 16px;
  align-items: stretch;
}

.capture-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px;
  border-radius: var(--radius-card);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.capture-col--themes .chip-row--fill {
  flex: 1;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 5px;
  align-content: start;
  overflow-y: auto;
}

.capture-col--timer {
  gap: 12px;
}

.capture-col--timer .timer-panel {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.capture-col--timer .timer-actions {
  display: flex;
  gap: 8px;
}

.capture-col--timer .timer-actions .btn {
  flex: 1;
  min-width: 0;
}

.col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
}

.col-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.col-sublabel {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.75;
}

.col-subhead {
  display: flex;
  align-items: center;
}

.col-clear-btn {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}

.col-clear-btn:hover {
  color: var(--danger);
  text-decoration-color: currentColor;
}

.col-divider {
  height: 1px;
  background: var(--line);
  margin: 0 -16px;
  flex-shrink: 0;
}

.reprises-strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.capture-col--form {
  gap: 10px;
}

.capture-col--form .field {
  gap: 6px;
}

/* Legacy rules kept for manual/planned dialogs */
.capture-layout,
.capture-quick-column,
.capture-form-panel {
  display: grid;
  gap: 14px;
}

.focus-rail {
  padding: 14px;
  border-radius: var(--radius-panel);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.focus-rail > * + * {
  margin-top: 2px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cadre-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.manager-kpis {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.journal-filters {
  gap: 8px;
}

.session-list {
  margin-top: 12px;
}

/* ==========================================================================
   SECTION: JOURNAL FILTERS & SESSION LIST
   Purpose: Journal toolbar (date range, category, tags, subject), session
     list rows with inline edit affordances, and pagination/empty states.
   ========================================================================== */

.journal-filter-row {
  display: grid;
  gap: 8px;
  align-items: end;
}

.journal-filter-row-top {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.journal-filter-row-bottom {
  grid-template-columns: minmax(0, 1fr) auto;
}

.journal-filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  align-self: end;
}

.journal-filters .field {
  gap: 5px;
}

.journal-filters .field span {
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}

.journal-filters .select-input {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 0.84rem;
}

#journal-filter-reset,
#journal-filter-help {
  min-width: 34px;
  min-height: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 0.92rem;
  border-radius: var(--radius-input);
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-manage-button {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  min-height: auto;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  text-decoration: underline;
  text-decoration-color: rgba(24, 56, 74, 0.18);
  text-underline-offset: 0.16em;
}

.field-manage-button:hover {
  color: var(--text);
  text-decoration-color: rgba(24, 56, 74, 0.34);
}

.field-full,
.field-wide {
  grid-column: 1 / -1;
}


.single-select-field {
  display: grid;
  gap: 8px;
}

.single-select-token[hidden] {
  display: none;
}

.single-token-chip {
  width: fit-content;
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
}

.field input,
.field textarea,
.date-input,
.select-input {
  width: 100%;
  border-radius: var(--radius-input);
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  padding: 10px 12px;
  min-height: 42px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.select-input {
  padding-right: 15px;
}

select.select-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5.25 7 8.9l4-3.65' stroke='%23263D47' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
  padding-right: 42px;
}

.date-input,
.field input[type="date"],
.field input[type="time"] {
  appearance: none;
  -webkit-appearance: none;
}

.field input::placeholder,
.field textarea::placeholder,
.token-field input::placeholder {
  color: rgba(107, 115, 120, 0.78);
}

.field input:focus,
.field textarea:focus,
.date-input:focus,
.select-input:focus,
.token-field:focus-within {
  outline: none;
  border-color: rgba(15, 118, 110, 0.46);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.11);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.note-textarea {
  min-height: 46px;
}

.token-field {
  min-height: 42px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--panel-strong);
  cursor: text;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.token-field:hover {
  border-color: rgba(15, 118, 110, 0.28);
}

.token-field input {
  flex: 1 1 150px;
  min-width: 140px;
  padding: 0;
  min-height: auto;
  border: none;
  background: transparent;
  outline: none;
}

.token-chip-remove {
  cursor: pointer;
  opacity: 0.4;
  pointer-events: auto;
  transition: opacity 120ms ease;
}

.token-chip:hover .token-chip-remove {
  opacity: 1;
}

.token-field--single input[hidden] {
  display: none;
}

.token-chip,
.chip,
.pill,
.legend-item {
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  font-size: 0.84rem;
}

.token-chip {
  align-items: center;
}

.token-chip--category {
  padding-right: 8px;
  font-weight: 800;
  color: var(--text);
}

.token-chip-label {
  line-height: 1.1;
}

.chip {
  font-weight: 700;
  cursor: grab;
  user-select: none;
  will-change: transform;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.chip--theme {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.chip-theme-label {
  line-height: 1.1;
}

.chip-theme-send,
.chip-theme-remove {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-input);
  background: rgba(255, 255, 255, 0.36);
  color: rgba(24, 56, 58, 0.8);
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 120ms ease, background 120ms ease;
}

.chip-theme-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.chip--theme:hover .chip-theme-send,
.chip--theme:hover .chip-theme-remove {
  opacity: 1;
}

.chip-theme-send:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
}

.chip-theme-remove:hover {
  background: rgba(255, 255, 255, 0.72);
}

.chip--dragging {
  opacity: 0.55;
  transform: scale(0.98);
  cursor: grabbing;
  box-shadow: 0 10px 24px rgba(24, 56, 74, 0.12);
}

.chip-row--sorting .chip {
  transition:
    transform 180ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.chip--drop-target {
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
}

.token-chip button {
  width: 19px;
  height: 19px;
  border: none;
  padding: 0;
  border-radius: var(--radius-input);
  background: transparent;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1;
}

.token-chip button:hover {
  background: rgba(24, 56, 74, 0.08);
}

.token-chip--category button {
  color: rgba(24, 56, 58, 0.78);
}

.memory-strip,
.timer-panel,
.inner-card,
.summary-card,
.agenda-day,
.session-item,
.memory-card {
  border-radius: var(--radius-card);
  background: var(--panel-strong);
  border: 1px solid rgba(39, 56, 68, 0.08);
  box-shadow: var(--panel-glow);
}

.memory-strip,
.timer-panel,
.inner-card,
.summary-card,
.agenda-day {
  padding: 16px;
}

.focus-rail .quick-strip {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.focus-rail .quick-strip + .quick-strip {
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.focus-rail .timer-panel + .quick-strip {
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.memory-strip-inline {
  background: var(--panel-soft);
  border-style: solid;
  border-color: var(--line);
  box-shadow: none;
}

.day-themes-panel {
  display: grid;
  gap: 12px;
}

.day-themes-panel {
  background: transparent;
  padding: 0;
  border-color: transparent;
}

.day-themes-bar {
  padding: 12px 14px;
  border-radius: var(--radius-card);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  margin-bottom: 2px;
}

.day-themes-bar .day-inline-form .select-input,
.day-themes-bar .day-inline-form .btn {
  min-height: 36px;
}

.day-themes-panel .section-minihead,
.memory-strip-inline .section-minihead {
  gap: 3px;
}

.section-minihead-compact {
  gap: 0;
}

.day-themes-panel .section-minihead h3,
.memory-strip-inline .section-minihead h3 {
  font-size: 0.94rem;
  letter-spacing: -0.02em;
}

.section-minihead-compact h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.day-themes-panel .section-minihead p,
.memory-strip-inline .section-minihead p {
  font-size: 0.78rem;
  line-height: 1.32;
}

.section-meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(39, 56, 68, 0.06);
  border: 1px solid rgba(39, 56, 68, 0.08);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.day-inline-form {
  display: grid;
  gap: 8px;
}

.day-inline-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.focus-rail .day-inline-form .select-input,
.focus-rail .day-inline-form .btn {
  min-height: 38px;
}

.chip--theme {
  display: flex;
  width: 100%;
  justify-content: space-between;
  cursor: grab;
  font-weight: 700;
  padding: 9px 12px;
  font-size: 0.84rem;
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.09);
}

.chip--theme:active {
  cursor: grabbing;
}

.chip--drag-over {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}

.day-inline-form .select-input {
  min-height: 40px;
  padding: 9px 11px;
  font-size: 0.84rem;
}

.day-inline-form .btn {
  min-height: 40px;
  padding: 10px 12px;
}

.memory-strip-inline .chip {
  padding: 6px 9px;
  font-size: 0.78rem;
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.07);
}

.memory-strip-inline .section-minihead p {
  max-width: 32ch;
}

.reprise-actions {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.reprise-dropzone {
  flex: 0 1 148px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-input);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 248, 250, 0.9);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.reprise-dropzone-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.reprise-dropzone--active {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(39, 56, 68, 0.08);
}

.reprise-dropzone--archive.reprise-dropzone--active {
  border-color: rgba(184, 106, 78, 0.24);
  background: rgba(184, 106, 78, 0.12);
  color: #8a4e38;
}

.reprise-dropzone--done.reprise-dropzone--active {
  border-color: rgba(45, 106, 102, 0.24);
  background: rgba(45, 106, 102, 0.12);
  color: #255955;
}

.field-manage-color-shell {
  margin-top: -4px;
}

.view-toolbar {
  padding: 0 16px;
  height: 52px;
  display: flex;
  align-items: center;
}

.analysis-toolbar-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  height: 100%;
}

.toolbar-seg {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
}

.toolbar-seg--utility {
  margin-left: auto;
  gap: 8px;
}

.toolbar-sep {
  width: 1px;
  height: 18px;
  background: var(--line);
  flex-shrink: 0;
  margin: 0 10px;
}

.toolbar-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--muted);
  margin-right: 2px;
}

.btn-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.toolbar-select {
  min-height: 32px;
  height: 32px;
  padding: 4px 34px 4px 6px;
  font-size: 0.85rem;
  font-weight: 600;
  border-color: transparent;
  background-color: transparent;
  min-width: 130px;
  transition: border-color 160ms ease, background 160ms ease;
}

.toolbar-select:hover,
.toolbar-select:focus {
  border-color: var(--line);
  background-color: var(--panel-strong);
}

.toolbar-date-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-date-input {
  min-height: 32px;
  padding: 4px 8px;
  font-size: 0.82rem;
  width: 132px;
}

.toolbar-export-btn {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 0.8rem;
  gap: 5px;
}

.analysis-toolbar-bar .period-btn {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  gap: 5px;
  box-shadow: none;
}

.analysis-toolbar-bar .period-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: transparent;
  box-shadow: none;
}

.analysis-toolbar-bar .period-btn.active {
  background: rgba(6, 148, 148, 0.1);
  color: var(--accent);
  border-color: rgba(6, 148, 148, 0.2);
}

.toolbar-filter[hidden] {
  display: none;
}

.timer-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  justify-items: stretch;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.06), transparent 60%),
    var(--panel-strong);
  padding: 17px 16px;
  box-shadow: none;
  border-color: var(--line);
}

.focus-rail .timer-panel {
  padding: 18px 17px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 14px 28px rgba(39, 56, 68, 0.06);
}


/* ==========================================================================
   SECTION: TIMER PANEL
   Purpose: Live-session card with elapsed display, pause / resume / stop
     controls, current project/category summary, and pending-sync hint.
   ========================================================================== */

.timer-head {
  display: grid;
  gap: 4px;
}

.timer-label {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.timer-display {
  margin: 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: clamp(2.9rem, 4vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.timer-head .active-task-label {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  max-width: 24ch;
}

.compact-field {
  width: 100%;
}

.start-inline {
  display: grid;
  gap: 6px;
  width: 100%;
}

.start-display-button {
  width: fit-content;
  max-width: 100%;
  border: none;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
}

.start-display-button:not(:disabled) {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(6, 148, 148, 0.28);
  text-underline-offset: 0.18em;
}

.start-display-button:disabled {
  cursor: default;
}

.start-inline input[hidden] {
  display: none;
}

.timer-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.timer-actions .btn {
  width: 100%;
  justify-content: center;
  padding-inline: 12px;
}

.focus-rail .empty-state {
  padding: 13px 14px;
  border-radius: var(--radius-card);
  border: 1px dashed rgba(0, 0, 0, 0.07);
  background: rgba(250, 252, 253, 0.72);
  text-align: left;
}

.btn,
.period-btn {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.875rem;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.btn:hover,
.period-btn:hover,
.chip:hover,
.topbar-nav a:hover {
  border-color: rgba(45, 106, 102, 0.28);
  box-shadow: 0 2px 8px rgba(39, 56, 68, 0.07);
}

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-secondary {
  background: var(--panel-soft);
  border-color: var(--line);
}

.btn-ghost-danger {
  min-height: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(24, 56, 74, 0.18);
  text-underline-offset: 0.18em;
}

.btn-ghost-danger:hover {
  transform: none;
  border-color: transparent;
  color: var(--danger);
  text-decoration-color: rgba(183, 75, 53, 0.36);
}

.btn--sm {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 0.8rem;
}

.btn--danger-outline {
  border-color: rgba(183, 75, 53, 0.28);
  color: var(--danger);
  background: transparent;
}

.btn--danger-outline:hover {
  background: rgba(183, 75, 53, 0.06);
  border-color: rgba(183, 75, 53, 0.5);
  box-shadow: none;
}

.btn-primary.running {
  background: rgba(24, 121, 78, 0.11);
  color: var(--success);
  border-color: rgba(24, 121, 78, 0.26);
}

.btn-secondary.paused {
  background: var(--warm-soft);
  color: var(--warm);
  border-color: rgba(201, 128, 43, 0.28);
}

.period-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(45, 106, 102, 0.28);
}

.summary-card {
  display: grid;
  gap: 6px;
}

.summary-card p {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.summary-card strong {
  font-size: clamp(1.6rem, 2vw, 2.3rem);
  letter-spacing: -0.05em;
  line-height: 0.96;
}

.kpi-delta {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 20px;
  align-self: start;
  justify-self: start;
}

.kpi-delta--up {
  color: #1a7a4a;
  background: rgba(26, 122, 74, 0.12);
}

.kpi-delta--down {
  color: #b92d20;
  background: rgba(185, 45, 32, 0.1);
}

.kpi-delta--flat {
  color: var(--muted);
  background: var(--panel-strong);
}

.section-minihead {
  gap: 4px;
}

.section-minihead h3,
.agenda-day h3,
.memory-card h3,
.session-task {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -0.03em;
}

.distribution-bar {
  min-height: 18px;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(39, 56, 68, 0.08);
}

/* ==========================================================================
   SECTION: PERSONAL STATS
   Purpose: Solo dashboard card — period switcher, week bar, distribution
     by category, top projects, evolution metrics.
   ========================================================================== */

/* ── Personal stats card ───────────────────────────────── */

.personal-stats-card {
  padding: 14px 16px 16px;
}

.personal-card-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

/* Mode switch: iOS-style segmented control */
.personal-mode-switch {
  display: flex;
  background: rgba(39, 56, 68, 0.07);
  border-radius: var(--radius-input);
  padding: 3px;
  gap: 2px;
}

.personal-mode-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: calc(var(--radius-input) - 1px);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
  line-height: 1.3;
  min-height: 0;
}

.personal-mode-btn.active {
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(39, 56, 68, 0.13), 0 0 0 1px rgba(39, 56, 68, 0.07);
}

/* Period block: switch + nav stacked, right-aligned */
.personal-period-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.personal-period-switch .period-btn {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 0.76rem;
}

.personal-period-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.personal-period-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  padding: 0 4px;
}

.personal-period-arrow {
  padding: 3px 6px;
  line-height: 1;
  min-height: 0;
  color: var(--muted);
}

.personal-custom-range {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.personal-custom-label {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.personal-week-bar {
  margin-bottom: 14px;
}

/* ==========================================================================
   SECTION: CATEGORY & TAG ROWS
   Purpose: Reusable row layout for category and tag managers (color
     swatch, label, count, rename/delete affordances).
   ========================================================================== */

/* ── Category rows ──────────────────────────────────────── */

.personal-category-rows {
  display: grid;
  gap: 12px;
}

.personal-cat-row {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-input);
  background: rgba(39, 56, 68, 0.025);
  transition: background 120ms ease;
}

.personal-cat-row:hover {
  background: rgba(39, 56, 68, 0.055);
}

.personal-cat-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.personal-cat-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.personal-cat-name {
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.personal-cat-meta {
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.personal-cat-track {
  height: 5px;
  background: rgba(39, 56, 68, 0.09);
  border-radius: 999px;
  overflow: hidden;
}

.personal-cat-fill {
  height: 100%;
  border-radius: 999px;
  opacity: 0.85;
}

.personal-distribution-shell {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.personal-distribution-donut {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(rgba(0, 0, 0, 0.08) 0deg 360deg);
}

.personal-distribution-donut-inner {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: var(--panel-strong);
  display: grid;
  place-items: center;
  text-align: center;
  gap: 3px;
  padding: 8px;
}

.personal-distribution-donut-inner strong {
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 1.15rem;
  line-height: 1;
}

.personal-distribution-donut-inner span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.personal-distribution-legend {
  display: grid;
  gap: 8px;
}

.personal-legend-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.personal-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 5px;
}

.personal-legend-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.personal-legend-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.personal-legend-top strong {
  font-size: 0.86rem;
  line-height: 1.2;
}

.personal-legend-top span,
.personal-legend-copy p {
  color: var(--muted);
}

.personal-legend-top span {
  font-size: 0.78rem;
  font-weight: 800;
}

.personal-legend-copy p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.3;
}

.distribution-segment {
  min-width: 2%;
  height: 18px;
  transition: opacity 0.15s;
}

.distribution-segment--dimmed {
  opacity: 0.3;
}

.legend-item {
  background: transparent;
  padding: 7px 10px;
  transition: opacity 0.15s;
}

.legend-item--dimmed {
  opacity: 0.4;
}

.hover-detail-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1200;
  max-width: min(280px, calc(100vw - 24px));
  padding: 10px 12px;
  border-radius: 5px;
  border: 1px solid rgba(5, 113, 113, 0.22);
  background: rgba(248, 251, 252, 0.98);
  box-shadow: 0 18px 40px rgba(39, 56, 68, 0.16);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-line;
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.agenda-board {
  display: grid;
  grid-template-columns: 52px repeat(7, minmax(148px, 1fr));
  gap: 0;
  align-items: start;
}

.agenda-board-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 220px);
  border-radius: var(--radius-panel);
}

.agenda-board-wide {
  overflow-x: auto;
  padding-bottom: 0;
}

.agenda-panel {
  padding: 18px 18px 14px;
}

.agenda-panel .panel-head {
  gap: 6px;
  margin-bottom: 2px;
}

.agenda-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}

.planned-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}

.planned-summary-card {
  display: grid;
  gap: 2px;
  min-height: 68px;
  padding: 10px 12px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: color-mix(in srgb, var(--panel-strong) 82%, #069494 18%);
}

.planned-summary-card strong {
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 1.05rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.planned-summary-card span {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.planned-summary-card--muted {
  background: color-mix(in srgb, var(--panel-strong) 92%, #6b7378 8%);
}

.planned-summary-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2px 2px 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.summary-card,
.planned-summary-card {
  min-height: 82px;
  align-content: start;
}

.agenda-week-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agenda-week-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.agenda-time-rail {
  display: grid;
  gap: 0;
  min-width: 52px;
}

.agenda-time-head {
  min-height: 36px;
  border-right: 1px solid rgba(0, 0, 0, 0.07);
}

.agenda-time-body {
  position: relative;
  border-right: 1px solid rgba(0, 0, 0, 0.07);
}

.agenda-time-mark {
  position: absolute;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: right;
  padding-right: 6px;
}

.agenda-day {
  min-width: 0;
  display: grid;
  gap: 0;
  padding: 5px 0 0;
}

.agenda-day-head {
  min-height: 36px;
  display: grid;
  align-items: center;
  padding: 0 8px 4px;
  border-left: 1px solid rgba(0, 0, 0, 0.07);
}

.agenda-day-meta {
  display: flex;
  align-items: start;
  gap: 6px;
}

.agenda-day-number {
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 1.32rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.agenda-day-copy {
  display: grid;
  gap: 1px;
}

.agenda-day h3,
.agenda-day p {
  margin: 0;
}

.agenda-day h3 {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.agenda-day p {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.agenda-day-track {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.05) 0,
      rgba(0, 0, 0, 0.05) 1px,
      transparent 1px,
      transparent var(--agenda-hour-height, 52px)
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--agenda-hour-height, 52px) / 2),
      rgba(0, 0, 0, 0.022) calc(var(--agenda-hour-height, 52px) / 2),
      rgba(0, 0, 0, 0.022) calc(var(--agenda-hour-height, 52px) / 2 + 1px),
      transparent calc(var(--agenda-hour-height, 52px) / 2 + 1px),
      transparent var(--agenda-hour-height, 52px)
    ),
    var(--panel-strong);
  border-left: 1px solid rgba(0, 0, 0, 0.07);
}

.agenda-day--today .agenda-day-head {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  border-left-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.agenda-day--today .agenda-day-number {
  color: var(--accent);
}

.agenda-day--today .agenda-day-track {
  border-left-color: color-mix(in srgb, var(--accent) 22%, transparent);
}

.agenda-empty-state {
  position: absolute;
  inset: 8px;
  display: grid;
  align-items: center;
}

.agenda-event {
  position: absolute;
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 5px 6px 5px 6px;
  border-radius: var(--radius-card);
  background: rgba(45, 106, 102, 0.1);
  border: 1px solid rgba(45, 106, 102, 0.14);
  color: var(--text);
  text-align: left;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 1px 4px rgba(24, 56, 74, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  overflow: hidden;
  --agenda-accent: #2d6a66;
}

.agenda-event:not(.agenda-event--planned):not(.agenda-event--tiny) {
  padding-left: 10px;
}

.agenda-event:not(.agenda-event--planned)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--agenda-accent);
  pointer-events: none;
}

.agenda-event--planned {
  cursor: pointer;
  touch-action: auto;
  border-style: dashed;
  box-shadow: none;
}

.agenda-event--planned:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(24, 56, 74, 0.08);
}

.agenda-event--planned .agenda-event-time {
  color: color-mix(in srgb, var(--text) 72%, white);
}

.agenda-event--planned .agenda-event-client,
.agenda-event--planned .agenda-event-category,
.agenda-event--planned .agenda-event-subject {
  color: color-mix(in srgb, var(--text) 62%, white);
}

.agenda-event--planned .agenda-resize-handle,
.agenda-event--planned .agenda-event-icon {
  display: none;
}

.agenda-event--compact {
  gap: 1px;
  padding: 4px 5px;
  align-content: center;
}

.agenda-event:not(.agenda-event--planned).agenda-event--compact {
  padding-left: 10px;
}

.agenda-event--compact .agenda-event-client {
  font-size: 0.68rem;
  line-height: 1.1;
}

.agenda-event--tiny {
  padding: 0;
  border-radius: 4px;
  box-shadow: none;
  border-color: transparent;
}

.agenda-event:not(.agenda-event--planned):hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--agenda-accent) 46%, transparent);
  box-shadow: 0 6px 18px rgba(24, 56, 74, 0.14);
  background: color-mix(in srgb, var(--agenda-accent) 16%, white);
}

.agenda-event--dragging {
  cursor: grabbing;
  transform: scale(1.02);
  opacity: 0.92;
  box-shadow: 0 12px 32px rgba(24, 56, 74, 0.22);
  z-index: 10;
}

/* ==========================================================================
   SECTION: AGENDA INTERACTION (drag/clone)
   Purpose: Cursor states, ghost previews, and Alt/Option clone styling
     for the agenda drag/drop/resize interactions defined in app.js.
   ========================================================================== */

/* ── Alt / Option clone mode ─────────────────────────────── */
body.alt-clone-mode .agenda-event[data-session-id] {
  cursor: copy !important;
}

body.alt-clone-mode .agenda-event[data-session-id]:hover {
  outline: 2px dashed color-mix(in srgb, var(--agenda-accent) 65%, transparent);
  outline-offset: 2px;
  transform: translateY(-2px) !important;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--agenda-accent) 10%, transparent),
              0 6px 20px rgba(24, 56, 74, 0.16);
  background: color-mix(in srgb, var(--agenda-accent) 20%, white);
}

@keyframes agenda-clone-flash {
  0%   { transform: scale(1)    translateY(0);    filter: brightness(1);    }
  35%  { transform: scale(1.07) translateY(-3px); filter: brightness(1.18); }
  100% { transform: scale(1)    translateY(0);    filter: brightness(1);    }
}

.agenda-event--cloning {
  animation: agenda-clone-flash 280ms cubic-bezier(.22, .68, 0, 1.2) forwards;
  pointer-events: none;
  z-index: 10;
}

.agenda-event p,
.agenda-event span {
  margin: 0;
}

.agenda-event-time {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agenda-event--compact .agenda-event-time {
  font-size: 0.58rem;
  line-height: 1.1;
}

.agenda-event-client {
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.14;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-event-status {
  display: inline-block;
  min-width: 0.7rem;
  margin-right: 2px;
  font-weight: 900;
}

.agenda-event-subject {
  max-width: 100%;
}

.agenda-event-category {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.agenda-resize-handle {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 12px;
  opacity: 0;
  transition: opacity 140ms ease;
  pointer-events: auto;
  z-index: 2;
}

.agenda-resize-handle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--agenda-accent) 70%, white);
  transform: translateY(-50%);
}

.agenda-resize-handle--start {
  top: 0;
  cursor: ns-resize;
}

.agenda-resize-handle--end {
  bottom: 0;
  cursor: ns-resize;
}

.agenda-event:hover .agenda-resize-handle,
.agenda-event--dragging .agenda-resize-handle {
  opacity: 1;
}

.agenda-now-marker {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px solid var(--accent);
  pointer-events: none;
  z-index: 2;
}

.agenda-now-marker::before {
  content: "";
  position: absolute;
  left: -1px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.agenda-now-label {
  position: absolute;
  right: 6px;
  top: -12px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.64rem;
  font-weight: 800;
}

.evolution-grid {
  min-height: 210px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.evolution-filter-badge {
  grid-column: 1 / -1;
  align-self: start;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text);
}

.evolution-filter-badge-clear {
  background: none;
  border: none;
  padding: 2px 3px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  border-radius: 50%;
  line-height: 1;
}

.evolution-filter-badge-clear:hover {
  background: var(--line);
  color: var(--text);
}

.evolution-item {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.evolution-value,
.evolution-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.evolution-bar {
  width: 100%;
  min-height: 14px;
  border-radius: var(--radius-card);
  background: var(--accent);
}


.table-shell {
  overflow-x: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--ink-soft-strong);
  background: var(--panel-strong);
}

.users-panel {
  gap: 14px;
}

.users-admin-shell {
  display: grid;
  gap: 10px;
}

.users-admin-head {
  display: flex;
  justify-content: flex-end;
}

.users-admin-list {
  display: grid;
  gap: 6px;
}

/* ==========================================================================
   SECTION: SESSION ROW DISPLAY/EDIT
   Purpose: Two-mode journal entry row — collapsed display and inline edit
     form. Toggling between them is driven by data-state in app.js.
   ========================================================================== */

/* ── Display row ── */

.users-user-card {
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.users-user-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  min-height: 48px;
}

.users-user-card--editing {
  background:
    linear-gradient(180deg, rgba(6, 148, 148, 0.06), rgba(255, 255, 255, 0)),
    var(--panel-strong);
  border-color: rgba(6, 148, 148, 0.2);
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}

.users-row-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 200px;
  min-width: 0;
}

.users-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(173, 108, 31, 0.22);
  background: radial-gradient(circle at 50% 42%, rgba(255, 236, 189, 0.96), rgba(204, 132, 46, 0.88) 58%, rgba(67, 42, 17, 0.92) 100%);
  color: #fff7ea;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.users-row-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.users-row-copy strong {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.users-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.users-status-dot--active {
  background: var(--success);
}

.users-status-dot--inactive {
  background: var(--muted);
  opacity: 0.5;
}

.users-row-email {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.84rem;
}

.users-role-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
}

.users-role-badge--admin {
  background: rgba(6, 148, 148, 0.1);
  color: var(--accent-strong);
  border-color: rgba(6, 148, 148, 0.18);
}

.users-role-badge--manager {
  background: rgba(201, 128, 43, 0.1);
  color: var(--warm);
  border-color: rgba(201, 128, 43, 0.18);
}

.users-role-badge--cadre {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}

.users-edit-btn {
  margin-left: auto;
  min-height: 30px;
  width: 30px;
  padding: 0;
  justify-content: center;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  flex-shrink: 0;
}

.users-edit-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--line);
  color: var(--text);
  box-shadow: none;
}

/* ── Edit form ── */

.users-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

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

.users-role-select {
  min-width: 150px;
}

.users-table-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0)),
    var(--panel-strong);
}

.users-table td {
  vertical-align: middle;
}

.users-cell-copy {
  display: grid;
  gap: 4px;
}

.users-cell-copy strong {
  font-size: 0.96rem;
}

.users-save-button {
  min-height: 38px;
  padding-inline: 12px;
}

.report-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.compact-table {
  min-width: 100%;
}

.report-table th,
.report-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.report-table th {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.report-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.03);
}

.report-table tbody tr:last-child td {
  border-bottom: none;
}

.session-item,
.memory-card {
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: start;
}

.session-item:hover {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(255, 192, 203, 0)), rgba(0, 0, 0, 0.02);
}

.session-item[title] {
  cursor: default;
}

.session-copy,
.memory-copy {
  display: grid;
  gap: 0;
  min-width: 0;
}

.session-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}

.session-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

.session-categories .pill {
  padding: 5px 9px;
  background: rgba(45, 106, 102, 0.11);
  border-color: rgba(45, 106, 102, 0.18);
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 800;
}

.session-tags {
  display: none;
}

.session-tags .pill {
  padding: 4px 8px;
  background: rgba(24, 56, 74, 0.03);
  border-color: rgba(24, 56, 74, 0.06);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.session-task,
.memory-card h3 {
  font-weight: 800;
}

.session-task {
  font-size: 0.95rem;
  line-height: 1.15;
  margin: 0;
}

.session-secondary,
.session-date {
  display: none;
}

.session-notes {
  font-size: 0.82rem;
  line-height: 1.35;
}

.session-side {
  display: grid;
  grid-template-rows: auto auto;
  gap: 2px;
  justify-items: end;
  text-align: right;
  align-content: start;
}

.session-duration {
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.15;
  margin: 0;
  align-self: start;
}

.session-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  align-self: start;
}

.session-edit-button,
.session-delete-button {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ink-soft-strong);
  border-radius: var(--radius-input);
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.session-edit-button:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.10);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.session-delete-button:hover {
  transform: translateY(-1px);
  border-color: rgba(183, 75, 53, 0.24);
  background: rgba(183, 75, 53, 0.08);
  color: var(--danger);
}

.dialog-shell {
  width: min(860px, calc(100% - 24px));
  border: none;
  border-radius: var(--radius-panel);
  padding: 0;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(39, 56, 68, 0.18);
  overflow: hidden;
}

.dialog-shell::backdrop {
  background: rgba(39, 56, 68, 0.24);
  backdrop-filter: blur(6px);
}

.autocomplete-popover {
  z-index: 1200;
  max-height: min(340px, 42vh);
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: rgba(250, 252, 253, 0.98);
  box-shadow: 0 18px 45px rgba(39, 56, 68, 0.16);
  backdrop-filter: blur(12px);
}

.autocomplete-hint {
  padding: 11px 14px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.autocomplete-option {
  width: 100%;
  display: block;
  padding: 14px 15px;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 700;
  white-space: normal;
  line-height: 1.4;
}

.autocomplete-option:first-of-type {
  border-top: none;
}

.autocomplete-option:hover,
.autocomplete-option.active {
  background: rgba(45, 106, 102, 0.09);
}

.autocomplete-option-create {
  color: var(--accent-strong);
}

.dialog-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
  max-height: min(88vh, 920px);
  overflow: hidden;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(255, 192, 203, 0)),
    var(--panel);
}

.dialog-close {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-input);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.03);
  color: var(--muted);
}

.dialog-body {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px 20px;
  display: grid;
  gap: 14px;
}

.dialog-actions {
  padding: 16px 20px 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  background: var(--panel);
  justify-content: flex-end;
}

.dialog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.dialog-section {
  display: grid;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid var(--ink-soft-strong);
  border-radius: var(--radius-card);
  background: rgba(0, 0, 0, 0.03);
}

.dialog-section--timing {
  background:
    linear-gradient(180deg, rgba(184, 106, 78, 0.08), rgba(184, 106, 78, 0)),
    rgba(0, 0, 0, 0.02);
}

.dialog-section-head {
  display: grid;
  gap: 3px;
}

.dialog-section-head h3,
.dialog-time-card-title {
  margin: 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 0.98rem;
  letter-spacing: -0.03em;
}

.dialog-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.35;
}

.dialog-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dialog-time-card {
  display: grid;
  gap: 8px;
  padding: 12px 12px 11px;
  border: 1px solid var(--ink-soft-strong);
  border-radius: var(--radius-card);
  background: rgba(250, 252, 253, 0.92);
}

.dialog-time-card-single {
  max-width: 420px;
}

.dialog-time-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, 0.8fr);
  gap: 12px;
}

.dialog-card .eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.dialog-card .field {
  gap: 6px;
}

.dialog-card .field span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: none;
}

.dialog-card .field input,
.dialog-card .select-input,
.dialog-card .date-input {
  min-height: 46px;
  padding: 12px 13px;
}

.dialog-card input[type="date"],
.dialog-card input[type="time"] {
  font-variant-numeric: tabular-nums;
}

.dialog-card input[type="time"] {
  text-align: left;
}

.dialog-section .field-full + .field-full {
  margin-top: -2px;
}


.dialog-time-card-title {
  color: var(--text);
}

.dialog-time-card .field span {
  color: var(--muted);
}

.dialog-actions .btn {
  min-height: 42px;
}

.dialog-action-danger {
  margin-right: auto;
}

.dialog-card--planned .muted-copy {
  margin: 0 0 8px;
}

.dialog-card--planned .dialog-grid {
  align-items: start;
}

.dialog-card--planned .note-textarea {
  min-height: 118px;
}



.planned-dialog-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 5px;
  border: 1px solid rgba(6, 148, 148, 0.18);
  background: color-mix(in srgb, var(--panel-strong) 88%, #069494 12%);
}

.planned-dialog-suggestion-copy {
  display: grid;
  gap: 2px;
}

.planned-dialog-suggestion-label {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.planned-dialog-suggestion-copy strong {
  font-size: 0.96rem;
  line-height: 1.1;
}

.planned-dialog-suggestion-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.btn-compact {
  min-height: 36px;
  padding: 0 12px;
}

.conflict-copy {
  display: grid;
  gap: 8px;
}

.conflict-copy p {
  margin: 0;
}

.empty-state {
  padding: 16px;
  border-radius: var(--radius-card);
  border: 1px dashed rgba(24, 56, 74, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  text-align: center;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 1180px) {
  .topbar,
  .workspace-grid,
  .manager-grid,
  .manager-analysis-grid,
  .journal-grid,
  .capture-layout,
  .manager-kpis,
  .cadre-summary,
  .dialog-grid,
  .panel-head-inline {
    grid-template-columns: 1fr;
  }

  .capture-3col {
    grid-template-columns: 1fr 1fr;
  }

  .capture-col--form {
    grid-column: 1 / -1;
  }

  .journal-filter-row-top,
  .journal-filter-row-bottom {
    grid-template-columns: 1fr;
  }

  .topbar-row {
    align-items: start;
  }

  .topbar-nav {
    justify-content: flex-start;
  }

  .topbar-context {
    min-width: 100%;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .auth-panel {
    grid-template-columns: 1fr;
  }

  .auth-shell-user {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-user-identity {
    width: 100%;
  }

  .users-edit-grid {
    grid-template-columns: 1fr;
  }

  .users-user-row {
    flex-wrap: wrap;
  }

  .users-row-identity {
    flex: 1 1 100%;
  }
}

@media (max-width: 780px) {
  .planned-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell {
    width: min(100% - 18px, 100%);
    padding-top: 14px;
  }

  .topbar,
  .panel {
    padding: 18px;
  }

  .topbar-context,
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .capture-3col {
    grid-template-columns: 1fr;
  }

  .capture-col--form {
    grid-column: auto;
  }

  .auth-user-meta,
  .auth-rescue-row {
    flex-direction: column;
    align-items: stretch;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .planned-summary {
    grid-template-columns: 1fr;
  }

  .agenda-board-wide {
    grid-template-columns: 52px repeat(7, minmax(148px, 1fr));
  }

  .dialog-grid,
  .dialog-time-grid,
  .dialog-time-inputs {
    grid-template-columns: 1fr;
  }

  .day-inline-form {
    grid-template-columns: 1fr;
  }



  .timer-actions {
    grid-template-columns: 1fr;
  }

  .personal-distribution-shell {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .personal-distribution-legend {
    width: 100%;
  }

  .session-item,
  .memory-card {
    grid-template-columns: 1fr;
  }

  .session-side {
    justify-items: start;
    text-align: left;
  }

  .report-table {
    min-width: 440px;
  }
}


.timer-status-copy,
.dialog-status,
.users-edit-status {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.timer-status-copy {
  min-height: 1.2em;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.7);
}

.timer-status-actions {
  justify-content: flex-start;
  padding-top: 0;
}

.dialog-status,
.users-edit-status {
  padding: 10px 12px;
  border: 1px solid var(--ink-soft-strong);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.7);
}

.timer-status-copy[data-tone="success"],
.dialog-status[data-tone="success"],
.users-edit-status[data-tone="success"] {
  color: var(--success);
}

.timer-status-copy[data-tone="warning"],
.dialog-status[data-tone="warning"],
.users-edit-status[data-tone="warning"] {
  color: #8b661a;
  border-color: rgba(252, 232, 131, 0.35);
  background: rgba(252, 232, 131, 0.16);
}

.timer-status-copy[data-tone="error"],
.dialog-status[data-tone="error"],
.users-edit-status[data-tone="error"] {
  color: var(--danger);
  border-color: rgba(183, 75, 53, 0.18);
  background: rgba(255, 130, 67, 0.08);
}



.users-edit-status {
  margin: 0;
}

.journal-panel-main,
.journal-panel-side {
  gap: 16px;
}

.journal-filters {
  padding: 14px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(0, 0, 0, 0.07);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0)),
    var(--panel-strong);
  box-shadow: var(--panel-glow);
}

.session-list,
.memory-list {
  padding: 4px;
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0)),
    var(--panel-strong);
  border: 1px solid rgba(39, 56, 68, 0.08);
}

.session-item,
.memory-card {
  min-height: 58px;
  padding: 10px 12px;
}

.session-item + .session-item,
.memory-card + .memory-card {
  margin-top: 6px;
}

.journal-filters .field span {
  color: var(--muted);
}

.journal-filters .select-input,
.journal-filters input[type="text"],
.journal-filters input[type="date"] {
  min-height: 42px;
  padding: 10px 12px;
  background: rgba(249, 252, 253, 0.98);
}


.pill[data-kind="category"] {
  color: var(--text);
  font-weight: 800;
}

.pill[data-kind="tag"] {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(39, 56, 68, 0.1);
  color: var(--muted);
  font-weight: 700;
}

.pill[data-kind="link"] {
  background: rgba(6, 148, 148, 0.08);
  border-color: rgba(6, 148, 148, 0.16);
  color: var(--accent-strong);
  font-weight: 800;
}

.journal-panel-main .panel-head,
.journal-panel-side .panel-head {
  gap: 8px;
  margin-bottom: 2px;
}

.journal-panel-main .panel-head {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.btn-sync-local {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.01em;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: var(--radius-input);
  cursor: pointer;
  transition: background 120ms, border-color 120ms, opacity 120ms;
  white-space: nowrap;
}

.btn-sync-local:hover {
  background: rgba(13, 148, 136, 0.16);
  border-color: rgba(15, 118, 110, 0.35);
}

.btn-sync-local:disabled {
  opacity: 0.55;
  cursor: default;
}

.tag-manager-divider {
  height: 1px;
  background: rgba(39, 56, 68, 0.07);
  margin: 14px 0 6px;
}

.journal-side-switch {
  flex: 1;
}

.tag-manager-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tag-manager-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px;
  border-radius: 5px;
  min-height: 28px;
  transition: background 80ms;
}

.tag-manager-item:hover {
  background: rgba(39, 56, 68, 0.04);
}

.tag-manager-item.is-editing {
  background: rgba(6, 148, 148, 0.04);
  padding: 4px 4px;
  gap: 5px;
}

.tag-hash {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.55;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}

.tag-manager-label {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-manager-count {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(39, 56, 68, 0.08);
  padding: 1px 5px;
  border-radius: 8px;
  flex-shrink: 0;
  line-height: 1.6;
}

.tag-manager-actions {
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity 100ms;
  flex-shrink: 0;
}

.tag-manager-item:hover .tag-manager-actions {
  opacity: 1;
}

.btn-tag-action {
  display: inline-flex;
  align-items: center;
  min-height: auto;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  transition: background 80ms, color 80ms, border-color 80ms;
  line-height: 1;
}

.btn-tag-action:hover {
  background: rgba(39, 56, 68, 0.07);
  border-color: rgba(39, 56, 68, 0.1);
  color: var(--text);
  transform: none;
}

.btn-tag-action.is-merge:hover {
  background: rgba(6, 148, 148, 0.07);
  border-color: rgba(6, 148, 148, 0.14);
  color: var(--accent-strong);
}

.tag-edit-input {
  flex: 1;
  font-size: 0.82rem;
  padding: 3px 7px;
  border: 1px solid rgba(6, 148, 148, 0.28);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  height: 26px;
}

.tag-edit-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(6, 148, 148, 0.1);
}

.btn-tag-confirm {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  height: 26px;
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: inherit;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
}

.btn-tag-confirm:hover {
  opacity: 0.88;
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.btn-tag-confirm:disabled {
  opacity: 0.5;
}

.btn-tag-cancel {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  height: 26px;
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: inherit;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  flex-shrink: 0;
  line-height: 1;
}

.btn-tag-cancel:hover {
  color: var(--text);
  transform: none;
  border-color: transparent;
  box-shadow: none;
  background: rgba(39, 56, 68, 0.06);
}

.tag-merge-source {
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.session-list {
  margin-top: 0;
}

.journal-day-group {
  display: grid;
  gap: 10px;
}

.journal-day-group + .journal-day-group {
  margin-top: 28px;
}

.journal-day-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 6px 10px;
  border-bottom: 1.5px solid var(--line);
}

.journal-day-copy {
  display: grid;
  gap: 2px;
}

/* ==========================================================================
   SECTION: JOURNAL DAY HEADERS
   Purpose: Sticky day headers in the journal list (date label, entry
     count, daily total), plus the empty-state copy when filters yield none.
   ========================================================================== */

.journal-day-title {
  margin: 0;
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.journal-day-subtitle {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.journal-day-total {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.journal-day-list {
  display: grid;
  gap: 6px;
}

.session-item {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: start;
  border-radius: 18px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  cursor: pointer;
}

.session-item:hover,
.session-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(6, 148, 148, 0.18);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(39, 56, 68, 0.08);
}

.session-item:focus-visible {
  outline: 2px solid rgba(6, 148, 148, 0.18);
  outline-offset: 2px;
}

.session-copy {
  gap: 5px;
}

.session-task {
  font-size: 1rem;
  line-height: 1.22;
}

.session-activity {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.3;
}

.session-secondary {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.session-meta-row {
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 0;
  padding-top: 2px;
}

.session-categories,
.session-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.session-categories .pill,
.session-tags .pill,
.memory-card .pill {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 0.76rem;
  border-radius: 999px;
}

.session-side {
  display: grid;
  gap: 10px;
  justify-items: end;
  align-self: start;
  min-width: 140px;
}

.session-timing {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.session-time-range {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  border-radius: 4px;
  padding: 1px 4px;
  margin-right: -4px;
  transition: color 120ms, background 120ms;
}

.session-time-range:hover {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.session-time-range.is-editing {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  cursor: default;
  background: transparent;
  width: 100%;
  justify-content: flex-end;
}

.session-time-range.time-updated-flash {
  color: var(--accent-strong);
  background: var(--accent-soft);
  cursor: default;
  font-size: 0.72rem;
}

.time-quick-input {
  width: 80px;
  height: 24px;
  padding: 2px 5px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-input);
  background: var(--panel-strong);
  color: var(--text);
  line-height: 1;
  transition: border-color 120ms, box-shadow 120ms;
}

.time-quick-input:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.46);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.11);
}

.time-quick-sep {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
  flex-shrink: 0;
}

.time-quick-confirm,
.time-quick-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 80ms, color 80ms;
}

.time-quick-confirm {
  color: var(--accent-strong);
}

.time-quick-confirm:hover {
  background: var(--accent-soft);
}

.time-quick-cancel {
  color: var(--muted);
}

.time-quick-cancel:hover {
  background: var(--ink-soft-strong);
  color: var(--text);
}

.session-duration {
  font-size: 0.98rem;
  font-weight: 800;
}

.session-notes {
  margin: 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.35;
}

.session-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}


@media (max-width: 780px) {
  .analysis-toolbar-bar {
    flex-wrap: wrap;
    height: auto;
    padding-block: 10px;
    gap: 6px;
  }

  .view-toolbar {
    height: auto;
  }

  .toolbar-seg--utility {
    margin-left: 0;
    width: 100%;
  }
}


.token-field--tags {
  min-height: 78px;
  align-content: flex-start;
  padding-top: 12px;
  padding-bottom: 12px;
}

.token-field--tags .token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.token-field--tags input {
  flex-basis: 100%;
  min-width: 100%;
}

.note-textarea {
  min-height: 112px;
  padding-top: 12px;
  padding-bottom: 12px;
  line-height: 1.45;
  resize: vertical;
}

.dialog-card .note-textarea {
  min-height: 120px;
}

/* ==========================================================================
   SECTION: TIMER STATES & UI POLISH
   Purpose: Running/paused visual states for the timer card, capture form
     visual weight tweaks, button icons, token inline edit, and save toasts.
     Late-in-file overrides — keep cascade order in mind when adding rules.
   ========================================================================== */

/* ── Timer running / paused visual states ── */

@keyframes timer-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.62; }
}

.focus-rail .timer-panel.timer-panel--running {
  box-shadow:
    inset 3px 0 0 rgba(24, 121, 78, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 14px 28px rgba(39, 56, 68, 0.06);
}

.focus-rail .timer-panel.timer-panel--paused {
  box-shadow:
    inset 3px 0 0 rgba(255, 130, 67, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 14px 28px rgba(39, 56, 68, 0.06);
}

.timer-panel--running .timer-display {
  animation: timer-pulse 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .timer-panel--running .timer-display {
    animation: none;
  }
}

/* ── Capture form panel: visual weight reduction ── */

.capture-form-panel .section-minihead h3 {
  font-size: 0.94rem;
}

.capture-form-panel .field span {
  font-size: 0.75rem;
}

.capture-form-panel .form-grid {
  gap: 10px 12px;
}

/* --- Button icons --- */

.btn-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: block;
}

.btn-icon--fill {
  fill: currentColor;
  stroke: none;
}

/* --- Token inline edit --- */

.token-chip {
  cursor: default;
}

.token-chip[title] {
  cursor: text;
}

.token-chip--editing {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.token-chip-edit-input {
  background: transparent;
  border: none;
  outline: none;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  padding: 0;
  margin: 0;
  min-width: 3ch;
  line-height: 1.1;
}

/* --- Save toasts --- */

.toast-stack {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}

.save-toast {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 13px 16px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13), 0 1px 4px rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 264px;
  cursor: pointer;
  pointer-events: all;
  overflow: hidden;
  position: relative;
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.22s ease;
  margin-bottom: 8px;
}

.save-toast--in {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.save-toast--out {
  transform: translateY(6px) scale(0.97);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.18s ease;
}

.save-toast-check {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.save-toast-check circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 54;
  stroke-dashoffset: 54;
  animation: toast-circle 0.38s 0.08s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.save-toast-check path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 11;
  stroke-dashoffset: 11;
  animation: toast-check 0.25s 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toast-circle {
  to { stroke-dashoffset: 0; }
}

@keyframes toast-check {
  to { stroke-dashoffset: 0; }
}

.save-toast-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 13px;
}

.save-toast-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.save-toast-project {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.save-toast-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  width: 100%;
  background: var(--accent);
  transform-origin: left center;
  border-radius: 0 0 14px 14px;
  animation: toast-progress 3000ms linear forwards;
}

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ==========================================================================
   SECTION: GUIDE VIEW
   Purpose: Three guide variants — guest landing, new-user onboarding
     steps, and existing-user tips grid. Each variant has its own scope.
   ========================================================================== */

/* --- Guide view --- */

.guide-panel {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 32px 24px 64px;
}

/* Guest: hero + features */

.guide-hero {
  margin-bottom: 32px;
}

.guide-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text);
}

.guide-hero-sub {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 600px;
}

.guide-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(13, 148, 136, 0.25);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 40px;
}

.guide-cta-icon {
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
}

.guide-cta p {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  margin: 0;
}

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

.guide-feature-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-feature-icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 4px;
}

.guide-feature-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.guide-feature-card p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* New user: onboarding steps */

.guide-onboarding-head,
.guide-tips-head {
  margin-bottom: 28px;
}

.guide-onboarding-head h2,
.guide-tips-head h2 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text);
}

.guide-onboarding-sub,
.guide-tips-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

.guide-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.guide-step--done {
  background: var(--panel-soft);
  border-color: rgba(13, 148, 136, 0.2);
}

.guide-step-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.guide-step--done .guide-step-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.guide-step-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guide-step-body strong {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.guide-step--done .guide-step-body strong {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(13, 148, 136, 0.4);
}

.guide-step-body p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

.guide-step-btn {
  margin-top: 10px;
  align-self: flex-start;
}

/* Existing user: tips grid */

.guide-tips-group {
  display: block;
}

.guide-tips-group + .guide-tips-group {
  margin-top: 28px;
}

.guide-tips-group-heading {
  font-family: "Manrope", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink-soft);
}

.guide-tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.guide-tip-card {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-tip-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 4px;
  display: block;
}

.guide-tip-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.guide-tip-card p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 700px) {
  .guide-features {
    grid-template-columns: 1fr;
  }
  .guide-tips-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar-brand {
    display: none;
  }
}


/* ==========================================================================
   SECTION: CHIP ACTION POPOVER
   Purpose: Anchored popover triggered by clicking a tag or category chip
     in a journal entry — actions for rename, color (categories only),
     and global delete. Positioned absolutely via JS in setupChipAction*.
   ========================================================================== */

.session-categories .pill,
.session-tags .pill {
  cursor: pointer;
  transition: filter 0.15s, transform 0.08s;
}

.session-categories .pill:hover,
.session-tags .pill:hover {
  filter: brightness(0.95);
}

.session-categories .pill:active,
.session-tags .pill:active {
  transform: scale(0.97);
}

.chip-action-popover {
  position: absolute;
  z-index: 200;
  min-width: 200px;
  max-width: 280px;
  padding: 8px;
  background: var(--panel-strong);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius-panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 8px 24px rgba(39, 56, 68, 0.18);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chip-action-popover[hidden] {
  display: none;
}

.chip-action-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 4px 6px 6px;
}

.chip-action-label {
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.chip-action-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chip-action-btn {
  appearance: none;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--radius-input);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.chip-action-btn:hover:not(:disabled) {
  background: var(--ink-soft);
}

.chip-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chip-action-btn.is-primary {
  background: var(--accent);
  color: #fff;
  text-align: center;
}

.chip-action-btn.is-primary:hover:not(:disabled) {
  background: var(--accent-strong);
}

.chip-action-btn.is-danger {
  color: var(--danger);
}

.chip-action-btn.is-danger:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.10);
}

.chip-action-buttons {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.chip-action-buttons .chip-action-btn {
  flex: 1;
  text-align: center;
}

.chip-action-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  font: inherit;
  font-size: 14px;
  background: var(--panel-soft);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.chip-action-input:focus {
  border-color: var(--accent);
}

.chip-action-color-input {
  width: 100%;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  cursor: pointer;
}

.chip-action-explain {
  font-size: 13px;
  color: var(--muted);
  padding: 0 6px;
  line-height: 1.45;
}


/* ==========================================================================
   SECTION: JOURNAL UNIFIED SEARCH
   Purpose: Layout for the single-input search bar, active filter chips,
     and the help panel that replaces the legacy three-input filter row.
   ========================================================================== */

.journal-filter-search-field {
  flex: 1;
  min-width: 0;
}

.journal-filter-search-input {
  width: 100%;
}

.journal-filter-search-input::placeholder {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 12px;
  opacity: 0.6;
}

.journal-filter-active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding: 0 2px;
}

.journal-filter-active-chips[hidden] {
  display: none;
}

.journal-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: var(--ink-soft);
  color: var(--text);
  border: 1px solid var(--line);
  line-height: 1;
}

.journal-filter-chip.is-tag {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: rgba(13, 148, 136, 0.20);
}

.journal-filter-chip.is-category {
  background: rgba(249, 115, 22, 0.10);
  color: #b45309;
  border-color: rgba(249, 115, 22, 0.20);
}

.journal-filter-chip.is-collaborator {
  background: rgba(99, 102, 241, 0.10);
  color: #4338ca;
  border-color: rgba(99, 102, 241, 0.20);
}

.journal-filter-chip.is-phrase {
  font-family: ui-monospace, "SF Mono", monospace;
  font-weight: 500;
}

.journal-filter-chip-close {
  appearance: none;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 6px;
  border-radius: 99px;
  opacity: 0.65;
  transition: opacity 0.12s, background 0.12s;
}

.journal-filter-chip-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.08);
}

.journal-filter-help-panel {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--panel-strong);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius-card);
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.journal-filter-help-panel[hidden] {
  display: none;
}

.journal-filter-help-panel strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.journal-filter-help-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.journal-filter-help-panel code {
  display: inline-block;
  padding: 1px 6px;
  background: var(--ink-soft);
  border-radius: 4px;
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", monospace;
  color: var(--text);
}


/* ==========================================================================
   SECTION: TAG / CATEGORY MANAGER SEARCH
   Purpose: Quick-filter input above the tag and category manager list.
     One input filters both modes (Tags / Catégories) — switching modes
     keeps the search value so the filter context is consistent.
   ========================================================================== */

.tag-manager-search {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 0 4px;
}

.tag-manager-search-input {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}

.tag-manager-search-input::placeholder {
  opacity: 0.5;
}

.tag-manager-sort {
  flex-shrink: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  padding: 6px 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tag-manager-sort:hover {
  color: var(--text);
  border-color: rgba(0, 0, 0, 0.18);
}

.tag-manager-sort:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.30);
  outline-offset: 1px;
}


/* ==========================================================================
   SECTION: JOURNAL EDITORIAL HIERARCHY (visual redesign)
   Purpose: Project-first hierarchy for the journal. Reduces visual noise,
     establishes a clear typographic scale, anchors each entry to its primary
     category color via a left bar, moves actions out of the default state
     and into hover-reveal. Numbers are monospace for vertical scanning.
     Pure CSS override — no DOM changes. Loads last so the cascade resolves
     in favor of these rules over the legacy session-item styles above.
   ========================================================================== */

/* ── Day header ─────────────────────────────────────────────────────────── */

.journal-day-group + .journal-day-group {
  margin-top: 36px;
}

.journal-day-header {
  align-items: baseline;
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--ink-soft);
}

.journal-day-title {
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: capitalize;
  color: var(--text);
  line-height: 1.15;
}

.journal-day-subtitle {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

.journal-day-total {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.journal-day-list {
  gap: 0;
  margin-top: 2px;
}

/* ── Entry row ──────────────────────────────────────────────────────────── */

.session-item {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--ink-soft);
  border-left: 3px solid var(--journal-entry-bar, rgba(0, 0, 0, 0.10));
  padding: 14px 14px 14px 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 18px;
  align-items: start;
  transition: background 0.15s ease, border-left-color 0.15s ease;
  box-shadow: none;
  cursor: pointer;
}

.journal-day-list .session-item:last-child {
  border-bottom: none;
}

.session-item:hover {
  background: rgba(13, 148, 136, 0.04);
  transform: none;
  box-shadow: none;
  border-color: transparent transparent var(--ink-soft) var(--journal-entry-bar, rgba(0, 0, 0, 0.20));
}

.session-item:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.30);
  outline-offset: -2px;
}

/* ── Left content column ────────────────────────────────────────────────── */

.session-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 1px 0;
}

.session-task {
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.005em;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-activity {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.25;
  margin: 0;
  letter-spacing: 0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-meta-row {
  margin-top: 6px;
  gap: 5px;
  min-height: 0;
  padding-top: 0;
}

/* ── Pills — desaturated, outlined, low chrome ──────────────────────────── */

.session-categories .pill {
  padding: 2px 9px;
  background: transparent;
  border: 1px solid var(--journal-entry-bar, rgba(13, 148, 136, 0.30));
  color: var(--journal-entry-bar, var(--accent-strong));
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 0;
  border-radius: 99px;
  line-height: 1.6;
}

.session-tags .pill {
  padding: 2px 9px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  min-height: 0;
  border-radius: 99px;
  line-height: 1.6;
}

.session-notes {
  font-size: 0.81rem;
  line-height: 1.5;
  color: var(--muted);
  font-style: italic;
  margin: 8px 0 0;
  padding: 0 0 0 8px;
  border-left: 2px solid var(--ink-soft);
}

/* ── Right side column — timing + actions ───────────────────────────────── */

.session-side {
  display: grid;
  grid-template-rows: auto auto;
  gap: 6px;
  justify-items: end;
  text-align: right;
  align-content: start;
  padding: 1px 0;
}

.session-timing {
  display: grid;
  gap: 1px;
  justify-items: end;
  align-content: start;
}

.session-time-range {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.session-duration {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: 0;
  margin: 0;
  line-height: 1.15;
}

/* ── Actions — hover-reveal ─────────────────────────────────────────────── */

.session-actions {
  opacity: 0;
  transition: opacity 0.15s ease;
  gap: 4px;
  margin-top: 2px;
}

.session-item:hover .session-actions,
.session-item:focus-within .session-actions {
  opacity: 1;
}

.session-edit-button,
.session-delete-button {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.session-edit-button:hover {
  transform: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

.session-delete-button:hover {
  transform: none;
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger);
  border: none;
}


/* ==========================================================================
   SECTION: SIDE PANEL EDITORIAL HIERARCHY (Contextes + Tags / Catégories)
   Purpose: Apply the same project-first, low-noise editorial treatment to
     the right column. Memory cards (Contextes mémorisés) and manager rows
     (Tags / Catégories) become flat lists with hover-revealed actions,
     desaturated outlined pills, and monospace numerics — visually coherent
     with the journal entries.
   ========================================================================== */

/* ── Contextes mémorisés (memory cards) ─────────────────────────────────── */

.memory-list {
  display: grid;
  gap: 0;
  margin-top: 4px;
  max-height: 380px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.memory-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 12px 8px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink-soft);
  border-radius: 0;
  box-shadow: none;
  transition: background 0.15s ease;
}

.memory-list .memory-card:last-child {
  border-bottom: none;
}

.memory-card:hover {
  background: rgba(13, 148, 136, 0.04);
}

.memory-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.memory-card h3 {
  font-family: "Manrope", sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-card .muted-copy {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.35;
  margin: 0;
}

.memory-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.memory-card .pill {
  padding: 2px 9px;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.10);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  min-height: 0;
  border-radius: 99px;
  line-height: 1.6;
}

.memory-card .pill[data-kind="category"] {
  border-color: rgba(13, 148, 136, 0.30);
  color: var(--accent-strong);
}

.memory-card .pill[data-kind="tag"] {
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
}

.memory-card .pill[data-kind="link"] {
  border-color: rgba(99, 102, 241, 0.30);
  color: #4338ca;
}

.memory-card > .btn,
.memory-card > .btn-secondary {
  opacity: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 500;
  border-radius: var(--radius-input);
  transition: opacity 0.15s ease, border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  box-shadow: none;
}

.memory-card:hover > .btn,
.memory-card:focus-within > .btn,
.memory-card:hover > .btn-secondary,
.memory-card:focus-within > .btn-secondary {
  opacity: 1;
}

.memory-card > .btn:hover,
.memory-card > .btn-secondary:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.04);
}

/* ── Tag / Category manager rows ────────────────────────────────────────── */

.tag-manager-list {
  display: grid;
  gap: 0;
  margin-top: 2px;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.tag-manager-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 9px 8px;
  border-bottom: 1px solid var(--ink-soft);
  border-radius: 0;
  min-height: 0;
  transition: background 0.15s ease;
}

.tag-manager-list .tag-manager-item:last-child {
  border-bottom: none;
}

.tag-manager-item:hover {
  background: rgba(13, 148, 136, 0.04);
}

.tag-manager-item.is-editing {
  display: flex;
  gap: 6px;
  padding: 8px;
}

.tag-hash {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
  width: 12px;
  text-align: center;
}

.tag-manager-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.005em;
}

.tag-manager-count {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  letter-spacing: 0;
}

.tag-manager-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.tag-manager-item:hover .tag-manager-actions,
.tag-manager-item:focus-within .tag-manager-actions {
  opacity: 1;
}

.btn-tag-action {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: var(--radius-input);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  line-height: 1.4;
}

.btn-tag-action:hover {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: rgba(13, 148, 136, 0.04);
}

.btn-tag-action.is-merge:hover {
  color: var(--warm);
  border-color: rgba(249, 115, 22, 0.40);
  background: rgba(249, 115, 22, 0.06);
}


/* ==========================================================================
   SECTION: GUIDE PHASES (editorial 3-column timeline)
   Purpose: Avant / Pendant / Après — three temporal phase columns that
     organize the guide as a linear narrative of a working day. The same
     skeleton serves guest (value prop), new user (next steps), and
     existing user (mastery tips). Visual language aligned with the
     journal: flat list rows, uppercase eyebrows, display titles,
     muted captions, low-noise typography.
   ========================================================================== */

.guide-phases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 24px;
}

@media (max-width: 920px) {
  .guide-phases {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.guide-phase-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.guide-phase-head {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--ink-soft-strong);
  margin-bottom: 4px;
}

.guide-phase-eyebrow {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.guide-phase-title {
  font-family: "Bricolage Grotesque", "Manrope", sans-serif;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--text);
  margin: 0;
  line-height: 1.15;
}

.guide-phase-caption {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
  font-style: italic;
  letter-spacing: 0.005em;
}

.guide-phase-items {
  display: flex;
  flex-direction: column;
}

.guide-phase-item {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-soft);
}

.guide-phase-items > .guide-phase-item:last-child {
  border-bottom: none;
}

.guide-phase-item-title {
  font-family: "Manrope", sans-serif;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.guide-phase-item--done .guide-phase-item-title::before {
  content: "✓";
  display: inline-block;
  width: 1.2em;
  margin-right: 2px;
  color: var(--accent-strong);
  font-weight: 800;
}

.guide-phase-item--todo .guide-phase-item-title::before {
  content: "○";
  display: inline-block;
  width: 1.2em;
  margin-right: 2px;
  color: var(--muted);
  font-weight: 400;
}

.guide-phase-item-desc {
  font-size: 0.81rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.guide-phase-item-action-btn {
  align-self: start;
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent-strong);
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-input);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.guide-phase-item-action-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* New-user status banner — sits above the phases grid */

.guide-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(13, 148, 136, 0.06);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--text);
}

.guide-status-banner-check {
  color: var(--accent-strong);
  font-weight: 800;
  font-family: ui-monospace, "SF Mono", monospace;
}

/* Compact hero variant for new-user / existing-user (less display weight
   than the guest landing — the value prop has already been heard). */

.guide-hero--compact h1 {
  font-size: 1.6rem;
}

.guide-hero--compact .guide-hero-sub {
  font-size: 0.92rem;
}


/* ==========================================================================
   SECTION: CATEGORY REQUEST DIALOG
   Purpose: Minimal styling for the "Demander une catégorie" dialog —
     readonly label field, justification textarea, error message hook.
     Reuses the existing dialog-shell / dialog-card chrome.
   ========================================================================== */

#category-request-dialog .auth-field input[readonly],
#category-request-dialog .auth-field input[readonly]:focus {
  background: var(--ink-soft);
  cursor: default;
  color: var(--text);
  font-weight: 600;
}

#category-request-dialog textarea {
  width: 100%;
  min-height: 86px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}

#category-request-dialog textarea:focus {
  border-color: var(--accent);
}

#category-request-dialog textarea::placeholder {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
}

.category-request-error {
  color: var(--danger);
  font-size: 0.82rem;
  margin: 0;
}
