/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #e2e8f0;
  --text: #111827;
  --muted: #64748b;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --green: #15803d;
  --green-soft: #dcfce7;
  --violet: #7c3aed;
  --violet-soft: #ede9fe;
  --orange: #c2410c;
  --orange-soft: #ffedd5;
  --red: #dc2626;
  --shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.planner-shell {
  display: grid;
  grid-template-columns: 260px minmax(520px, 1fr) minmax(390px, 470px) 300px;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 20px;
}

.brand {
  align-items: center;
  display: flex;
  font-size: 18px;
  font-weight: 800;
  gap: 10px;
}

.brand-mark {
  align-items: center;
  border: 2px solid var(--blue);
  border-radius: 8px;
  color: var(--blue);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

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

.nav-item.nav-item-divider {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding-top: 16px;
}

.nav-item {
  border-radius: 8px;
  color: #334155;
  display: block;
  font-weight: 650;
  padding: 11px 12px;
}

.nav-item:hover,
.nav-item.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}

.info-box h2,
.rail-card h2 {
  font-size: 14px;
  margin: 0 0 12px;
}

.info-box,
.rail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.info-box {
  margin-top: auto;
}

.info-box p,
.rail-card p,
.muted {
  color: var(--muted);
}

.inbox-main,
.detail-panel,
.right-rail {
  padding: 28px;
}

.detail-panel,
.right-rail {
  border-left: 1px solid var(--line);
  background: #fbfdff;
}

.right-rail {
  display: grid;
  align-content: start;
  gap: 16px;
}

.page-header,
.capture-actions,
.section-header,
.filter-actions,
.suggestion-head,
.tabs,
.chip-row,
.header-actions {
  align-items: center;
  display: flex;
}

.page-header {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.page-header h1 {
  font-size: 30px;
  letter-spacing: 0;
  margin: 0 0 6px;
}

.page-header p {
  color: var(--muted);
  margin: 0;
}

.header-actions {
  gap: 10px;
}

.capture-card,
.list-card,
.suggestion-card,
.detail-block,
.empty-state,
.question-block,
.object-detail,
.routine-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.capture-card,
.list-card {
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.capture-heading {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.capture-heading h2 {
  color: var(--blue);
  font-size: 14px;
  margin: 0;
}

.capture-form {
  padding: 16px;
}

.capture-form textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 102px;
  outline-color: var(--blue);
  padding: 14px;
  resize: vertical;
  width: 100%;
}

.capture-actions {
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 12px;
}

.select-input,
.text-input {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #334155;
  min-height: 40px;
  padding: 0 12px;
}

.check-chip,
.filter-actions span,
.filter-actions select,
.ghost-button,
.primary-button {
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
}

.check-chip,
.filter-actions span,
.filter-actions select {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: #334155;
  display: inline-flex;
  gap: 8px;
}

.filter-actions select {
  cursor: pointer;
  font: inherit;
}

.filter-actions select {
  max-width: 180px;
}

.primary-button {
  align-items: center;
  background: var(--blue);
  border: 1px solid var(--blue);
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
}

.ghost-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
}

.ghost-button.danger {
  color: var(--red);
}

.section-header {
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  padding: 16px 20px;
}

.section-header h2 {
  font-size: 16px;
  margin: 0;
}

.section-header h2 span {
  color: var(--muted);
  font-weight: 500;
}

.filter-actions {
  gap: 10px;
}

.bulk-actions {
  align-items: center;
  background: #fbfdff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 18px;
}

.bulk-actions-label {
  color: var(--muted);
  font-size: 13px;
}

.action-menu {
  position: relative;
}

.action-menu-trigger {
  cursor: pointer;
  list-style: none;
  min-height: 36px;
}

.action-menu-trigger::-webkit-details-marker {
  display: none;
}

.action-menu-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  min-width: 210px;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
}

.action-menu-item {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  min-height: 34px;
  padding: 0 10px;
  text-align: left;
}

.action-menu-item:hover {
  background: var(--surface-soft);
}

.action-menu-item.danger {
  color: var(--red);
}

.inbox-list {
  display: grid;
}

.inbox-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: 24px 44px minmax(0, 1fr) auto;
  padding: 14px 20px;
}

.inbox-row-link {
  display: contents;
}

.bulk-select {
  height: 18px;
  justify-self: center;
  width: 18px;
}

.inbox-row:last-child {
  border-bottom: 0;
}

.inbox-row:hover,
.inbox-row.is-selected {
  background: #f8fbff;
}

.entry-icon {
  align-items: center;
  background: var(--blue-soft);
  border-radius: 8px;
  color: var(--blue);
  display: flex;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.entry-main {
  min-width: 0;
}

.entry-main strong,
.entry-main small {
  display: block;
}

.entry-main strong {
  overflow-wrap: anywhere;
}

.entry-main small {
  color: var(--muted);
  margin-top: 5px;
}

.status-chip,
.type-badge,
.area-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  padding: 6px 10px;
  white-space: nowrap;
}

.status-chip {
  background: #eef2f7;
  color: #475569;
}

.task,
.status-chip.task {
  background: var(--green-soft);
  color: var(--green);
}

.project,
.status-chip.project {
  background: var(--violet-soft);
  color: var(--violet);
}

.standard,
.status-chip.standard {
  background: var(--orange-soft);
  color: var(--orange);
}

.open_loop,
.status-chip.open_loop {
  background: var(--blue-soft);
  color: var(--blue);
}

.clarification_needed,
.status-chip.clarification_needed {
  background: #fef3c7;
  color: #a16207;
}

.detail-header {
  margin-bottom: 16px;
}

.detail-header h2 {
  font-size: 22px;
  letter-spacing: 0;
  margin: 12px 0 6px;
}

.detail-header p {
  color: var(--muted);
  margin: 0;
}

.tabs {
  border-bottom: 1px solid var(--line);
  gap: 18px;
  margin-bottom: 18px;
}

.tabs span,
.tabs a {
  color: var(--muted);
  padding: 0 0 12px;
}

.tabs .is-active {
  border-bottom: 2px solid var(--blue);
  color: var(--blue);
  font-weight: 800;
}

.detail-section {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.suggestion-card,
.detail-block,
.empty-state,
.question-block {
  padding: 16px;
}

.suggestion-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.detail-block h3,
.suggestion-card h3,
.question-block h4 {
  font-size: 14px;
  margin: 0 0 8px;
}

.detail-block p,
.suggestion-card p {
  margin: 0;
}

.structure-list {
  display: grid;
  gap: 10px;
}

.structure-list div {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.structure-list small,
.detail-block small {
  color: var(--muted);
}

.action-block {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-block h3 {
  flex-basis: 100%;
}

.action-block form,
.chip-row form {
  margin: 0;
}

.chip-row {
  flex-wrap: wrap;
  gap: 8px;
}

.answer-chip {
  background: var(--blue-soft);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: var(--blue);
  cursor: pointer;
  min-height: 36px;
  padding: 0 12px;
}

.legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flash-stack {
  display: grid;
  gap: 8px;
  position: fixed;
  right: 20px;
  top: 18px;
  z-index: 20;
}

.flash {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 440px;
  padding: 12px 14px;
}

.flash.notice {
  border-color: #86efac;
}

.flash.alert {
  border-color: #fecaca;
}

.simple-page {
  margin: 0 auto;
  max-width: 920px;
  padding: 36px 24px;
}

.back-link {
  color: var(--blue);
  font-weight: 750;
}

.simple-header {
  margin: 28px 0 20px;
}

.simple-header h1,
.object-detail h1 {
  font-size: 30px;
  letter-spacing: 0;
  margin: 0 0 8px;
}

.simple-header p {
  color: var(--muted);
  margin: 0;
}

.object-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
}

.object-row {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding: 16px 18px;
}

.object-row:last-child {
  border-bottom: 0;
}

.object-row span {
  color: var(--muted);
}

.object-detail {
  margin-top: 26px;
  padding: 24px;
}

.object-detail dl {
  display: grid;
  gap: 8px 18px;
  grid-template-columns: 180px 1fr;
  margin-top: 22px;
}

.object-detail dt {
  color: var(--muted);
}

.object-detail dd {
  margin: 0;
}

.routine-box {
  margin-top: 12px;
  padding: 14px;
}

@media (max-width: 1280px) {
  .planner-shell {
    grid-template-columns: 230px minmax(480px, 1fr) minmax(360px, 430px);
  }

  .right-rail {
    display: none;
  }
}

@media (max-width: 920px) {
  .planner-shell {
    display: block;
  }

  .sidebar,
  .detail-panel,
  .right-rail {
    border: 0;
  }

  .page-header,
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .inbox-main,
  .detail-panel,
  .right-rail {
    padding: 20px;
  }

  .inbox-row {
    grid-template-columns: 24px 44px minmax(0, 1fr);
  }

  .status-stack {
    grid-column: 3;
    justify-self: start;
  }
}

/* Left navigation matched to screen_4.png */
.planner-shell {
  grid-template-columns: 244px minmax(720px, 1fr) 310px;
}

.sidebar {
  background: rgba(255, 255, 255, 0.92);
  border-right: 1px solid #dfe6ef;
  gap: 22px;
  min-height: 100vh;
  padding: 22px 14px 18px;
}

.brand {
  align-items: center;
  color: #111827;
  display: flex;
  font-size: 17px;
  font-weight: 850;
  gap: 12px;
  padding: 0 6px;
}

.brand-mark {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #1267ee;
  height: 34px;
  width: 34px;
}

.brand-logo {
  display: block;
  height: 100%;
  width: 100%;
}

.app-icon {
  display: block;
  height: 100%;
  width: 100%;
}

.nav-list {
  display: grid;
  gap: 3px;
}

.nav-item.nav-item-divider {
  border-top-color: #dfe6ef;
  margin-top: 10px;
  padding-top: 13px;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #344054;
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 12px;
  min-height: 37px;
  padding: 8px 9px;
}

.nav-item:hover,
.nav-item.is-active {
  background: transparent;
  border-color: transparent;
  color: #111827;
}

.nav-item.is-muted {
  cursor: default;
}

.nav-item::before {
  content: none;
}

.nav-icon {
  align-items: center;
  color: #344054;
  display: inline-flex;
  flex: 0 0 18px;
  height: 18px;
  justify-content: center;
  line-height: 1;
  width: 18px;
}

.nav-item.is-active .nav-icon,
.nav-item:hover .nav-icon {
  color: #1267ee;
}

.info-box {
  background: #fbfdff;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  box-shadow: none;
  margin-top: 0;
  padding: 15px;
}

.info-box h2 {
  color: #111827;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 10px;
}

.info-box p {
  color: #667085;
  font-size: 12px;
  line-height: 1.65;
  margin: 0 0 14px;
}

.info-box span {
  color: #1267ee;
  display: inline-block;
  font-size: 13px;
  font-weight: 750;
}

/* Inbox visual system inspired by mockups/screens/screen_4.png */
:root {
  --app-bg: #f6f8fb;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --ink: #101828;
  --ink-soft: #344054;
  --faint: #667085;
  --hairline: #dfe6f0;
  --hairline-soft: #edf1f7;
  --focus-blue: #1267ee;
  --focus-blue-dark: #0757d8;
  --cyan-soft: #e8f4ff;
  --green-ink: #1f7a3a;
  --green-wash: #eaf8ee;
  --purple-ink: #7a38d6;
  --purple-wash: #f1eaff;
  --orange-ink: #df6b13;
  --orange-wash: #fff2e4;
  --pink-ink: #c4326f;
  --pink-wash: #ffeaf2;
  --shadow: 0 18px 44px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 10px 24px rgba(16, 24, 40, 0.06);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 248, 251, 0.96)),
    var(--app-bg);
  color: var(--ink);
}

.planner-shell {
  display: grid;
  grid-template-columns: 244px minmax(720px, 1fr) 300px;
  min-height: 100vh;
}

.sidebar {
  background: rgba(255, 255, 255, 0.86);
  border-right: 1px solid var(--hairline);
  gap: 26px;
  padding: 24px 18px;
}

.brand {
  color: #111827;
  font-size: 18px;
  letter-spacing: 0;
}

.brand-mark {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--focus-blue);
  height: 36px;
  width: 36px;
}

.nav-list {
  gap: 5px;
}

.nav-item.nav-item-divider {
  border-top-color: var(--hairline-soft);
  margin-top: 12px;
  padding-top: 14px;
}

.nav-item {
  border: 1px solid transparent;
  border-radius: 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 650;
  min-height: 40px;
  padding: 10px 11px;
}

.nav-item:hover,
.nav-item.is-active {
  background: #eef5ff;
  border-color: #cfe0ff;
  color: var(--focus-blue);
}

.info-box h2,
.rail-card h2 {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.entry-icon.familie {
  background: var(--pink-wash);
  color: var(--pink-ink);
}

.entry-icon.zuhause {
  background: var(--cyan-soft);
  color: var(--focus-blue);
}

.entry-icon.gesundheit {
  background: var(--green-wash);
  color: var(--green-ink);
}

.entry-icon.arbeit {
  background: var(--orange-wash);
  color: var(--orange-ink);
}

.entry-icon.finanzen {
  background: #eef8e7;
  color: #4f8a21;
}

.entry-icon.beziehungen {
  background: var(--purple-wash);
  color: var(--purple-ink);
}

.info-box,
.rail-card {
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.info-box {
  padding: 16px;
}

.info-box p,
.rail-card p,
.muted {
  color: var(--faint);
  font-size: 13px;
  line-height: 1.55;
}

.inbox-main {
  min-width: 0;
  padding: 28px 22px 34px 28px;
}

.right-rail {
  background: transparent;
  border-left: 0;
  gap: 16px;
  padding: 97px 22px 28px 0;
}

.page-header {
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--focus-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
}

.page-header h1 {
  color: var(--ink);
  font-size: 29px;
  font-weight: 850;
  line-height: 1.12;
}

.page-header p:not(.eyebrow) {
  color: var(--faint);
  font-size: 14px;
}

.header-actions {
  gap: 10px;
}

.capture-card,
.list-card,
.detail-panel {
  background: var(--panel-strong);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.capture-card {
  margin-bottom: 20px;
  overflow: hidden;
}

.capture-heading {
  border-bottom: 1px solid var(--hairline-soft);
  padding: 14px 16px;
}

.capture-heading h2 {
  color: #475467;
  font-size: 13px;
  margin: 0;
}

.capture-form {
  padding: 14px 16px 16px;
}

.capture-form textarea {
  background: #fbfdff;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  color: var(--ink);
  font-size: 15px;
  min-height: 94px;
  padding: 16px;
}

.capture-form textarea::placeholder {
  color: #667085;
}

.capture-actions {
  gap: 10px;
  margin-top: 12px;
}

.select-input,
.text-input,
.check-chip,
.filter-actions span,
.filter-actions select,
.ghost-button,
.icon-button {
  background: #f8fbff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  color: #344054;
  min-height: 40px;
}

.select-input,
.text-input {
  padding: 0 12px;
}

.check-chip,
.filter-actions span,
.filter-actions select {
  font-size: 13px;
  padding: 0 12px;
}

.primary-button {
  background: linear-gradient(180deg, #2f7cf3, #1064e8);
  border: 1px solid var(--focus-blue-dark);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(18, 103, 238, 0.22);
  min-height: 40px;
  padding: 0 15px;
}

.primary-button:hover {
  background: linear-gradient(180deg, #1f70f0, #075bdc);
}

.ai-generate-button {
  gap: 9px;
}

.ai-generate-button::before {
  content: "";
  display: none;
}

.ai-generate-button[disabled] {
  background: #e5eaf2;
  border-color: #d4dce8;
  box-shadow: none;
  color: #667085;
  cursor: wait;
  opacity: 1;
}

.ai-generate-button[disabled]::before {
  animation: ai-spinner 0.8s linear infinite;
  border: 2px solid #b8c2d2;
  border-top-color: var(--focus-blue);
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 15px;
  width: 15px;
}

@keyframes ai-spinner {
  to {
    transform: rotate(360deg);
  }
}

.ghost-button,
.icon-button {
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.03);
}

.icon-button {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  padding: 0;
  width: 46px;
}

.inbox-workspace {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(440px, 1fr) minmax(340px, 430px);
}

.list-card {
  margin-bottom: 0;
  overflow: hidden;
}

.section-header {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 15px 18px;
}

.section-header h2 {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.filter-actions {
  gap: 8px;
}

.filter-actions span,
.filter-actions select {
  color: #475467;
  white-space: nowrap;
}

.inbox-list {
  background: #fff;
}

.inbox-row {
  border-bottom: 1px solid var(--hairline-soft);
  gap: 14px;
  grid-template-columns: 24px 42px minmax(0, 1fr) auto;
  min-height: 68px;
  padding: 12px 18px;
}

.inbox-row:hover {
  background: #f8fbff;
}

.inbox-row.is-selected {
  background: #f3f8ff;
  box-shadow: inset 3px 0 0 var(--focus-blue);
}

.entry-icon {
  border: 1px solid rgba(18, 103, 238, 0.1);
  border-radius: 9px;
  font-size: 15px;
  height: 42px;
  width: 42px;
}

.entry-main strong {
  color: #111827;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
}

.entry-main small {
  color: var(--faint);
  font-size: 12px;
}

.status-chip,
.type-badge,
.area-pill,
.ai-job-chip {
  border-radius: 999px;
  font-size: 12px;
  padding: 5px 10px;
}

.status-stack {
  align-items: end;
  display: grid;
  gap: 5px;
  justify-items: end;
}

.status-chip {
  background: #eef2f7;
  color: #475467;
}

.ai-job-chip {
  background: #f8fafc;
  color: #667085;
  font-weight: 750;
  white-space: nowrap;
}

.ai-job-chip.queued,
.ai-job-chip.running {
  background: #eef5ff;
  color: var(--focus-blue);
}

.ai-job-chip.token_waiting {
  background: #fef3c7;
  color: #a16207;
}

.ai-job-chip.succeeded {
  background: var(--green-wash);
  color: var(--green-ink);
}

.ai-job-chip.failed {
  background: #fee2e2;
  color: var(--red);
}

.new,
.status-chip.new {
  background: #eef2f7;
  color: #475467;
}

.detail-panel {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-left: 1px solid var(--hairline);
  padding: 18px;
}

.detail-header {
  border-bottom: 1px solid var(--hairline-soft);
  margin: -18px -18px 14px;
  padding: 18px 18px 15px;
}

.detail-header h2 {
  color: var(--ink);
  font-size: 20px;
  font-weight: 840;
  line-height: 1.2;
  margin: 11px 0 7px;
}

.detail-header p {
  color: var(--faint);
  font-size: 13px;
}

.error-note {
  color: var(--red) !important;
  margin-top: 8px !important;
}

.area-pill {
  background: #eef5ff;
  color: var(--focus-blue);
}

.tabs {
  border-bottom: 1px solid var(--hairline-soft);
  gap: 14px;
  margin-bottom: 15px;
  overflow-x: auto;
}

.tabs span,
.tabs a {
  color: #667085;
  font-size: 13px;
  white-space: nowrap;
}

.tabs .is-active {
  color: var(--focus-blue);
}

.detail-section {
  gap: 12px;
}

.suggestion-card,
.detail-block,
.empty-state,
.question-block {
  background: #ffffff;
  border: 1px solid var(--hairline-soft);
  border-radius: 8px;
  box-shadow: none;
  padding: 14px;
}

.suggestion-card {
  background: #f8fbff;
  border-color: #d8e7ff;
}

.suggestion-head {
  margin-bottom: 10px;
}

.suggestion-head small,
.detail-block small {
  color: var(--faint);
  font-size: 12px;
}

.detail-block h3,
.suggestion-card h3,
.question-block h4 {
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.detail-block p,
.suggestion-card p {
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.prompt-block {
  display: grid;
  gap: 10px;
}

.prompt-form {
  display: grid;
  gap: 10px;
}

.prompt-form textarea {
  background: #fbfdff;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  color: var(--ink);
  min-height: 120px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.prompt-form .ghost-button,
.prompt-regenerate-form {
  justify-self: start;
}

.inline-button-form {
  margin: 0;
}

.settings-panel {
  background: var(--panel-strong);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 14px;
  max-width: 720px;
  padding: 20px;
}

.settings-panel h2,
.settings-panel p {
  margin: 0;
}

.settings-panel p,
.toggle-row small {
  color: var(--faint);
}

.settings-form {
  display: grid;
  gap: 16px;
}

.edit-panel {
  background: var(--panel-strong);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  max-width: 880px;
  overflow: hidden;
}

.edit-panel-header {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 18px;
}

.edit-panel-header h2 {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
  margin: 10px 0 6px;
}

.edit-panel-header p {
  color: var(--faint);
  font-size: 13px;
  margin: 0;
}

.inbox-edit-form {
  display: grid;
  gap: 18px;
  padding: 18px;
}

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

.form-field {
  display: grid;
  gap: 7px;
}

.form-field span {
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

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

.text-area-input {
  background: #fbfdff;
  border: 1px solid #d8e1ee;
  border-radius: 8px;
  color: var(--ink);
  min-height: 180px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.form-actions {
  border-top: 1px solid var(--hairline-soft);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
}

.form-errors {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  padding: 12px 14px;
}

.form-errors ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.toggle-row {
  align-items: start;
  background: #f8fbff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  padding: 14px;
}

.toggle-row input {
  margin-top: 3px;
}

.toggle-row span {
  display: grid;
  gap: 4px;
}

.structure-list div {
  background: #f8fafc;
  border: 1px solid var(--hairline-soft);
  border-radius: 8px;
  padding: 10px 11px;
}

.structure-list strong {
  color: var(--focus-blue);
  font-size: 12px;
}

.structure-list span {
  color: #1f2937;
  font-size: 13px;
}

.action-block {
  background: #fbfdff;
}

.answer-chip {
  background: #eef5ff;
  border-color: #cfe0ff;
  color: var(--focus-blue);
  font-size: 13px;
}

.rail-card {
  padding: 16px;
}

.rail-legend {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.rail-legend div {
  display: grid;
  gap: 3px 10px;
  grid-template-columns: 38px 1fr;
}

.rail-legend strong {
  color: #1f2937;
  font-size: 13px;
}

.rail-legend small {
  color: var(--faint);
  font-size: 13px;
  grid-column: 2;
  line-height: 1.45;
}

.legend-icon {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 15px;
  font-weight: 850;
  grid-row: span 2;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.legend-icon.task {
  background: var(--green-wash);
  color: var(--green-ink);
}

.legend-icon.project {
  background: var(--purple-wash);
  color: var(--purple-ink);
}

.legend-icon.standard {
  background: var(--orange-wash);
  color: var(--orange-ink);
}

.legend-icon.open_loop {
  background: var(--cyan-soft);
  color: var(--focus-blue);
}

.metric-list {
  display: grid;
  gap: 10px;
}

.metric-list span {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--hairline-soft);
  border-radius: 8px;
  color: #475467;
  display: flex;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px;
}

.metric-list strong {
  color: var(--focus-blue);
  font-size: 18px;
}

@media (max-width: 1360px) {
  .planner-shell {
    grid-template-columns: 226px minmax(680px, 1fr);
  }

  .right-rail {
    display: none;
  }
}

@media (max-width: 1060px) {
  .inbox-workspace {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    border-left: 1px solid var(--hairline);
  }
}

@media (max-width: 820px) {
  .planner-shell {
    display: block;
  }

  .sidebar {
    border-bottom: 1px solid var(--hairline);
    border-right: 0;
  }

  .inbox-main {
    padding: 20px;
  }

  .header-actions,
  .filter-actions {
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    justify-content: center;
  }

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

  .form-actions {
    flex-direction: column-reverse;
  }
}

/* Screen 4 closer pass */
.planner-shell {
  grid-template-columns: 244px minmax(720px, 1fr) 310px;
}

.sidebar {
  padding: 22px 18px;
}

.nav-item.is-muted {
  cursor: default;
}

.info-box {
  box-shadow: none;
}

.inbox-main {
  padding: 26px 20px 34px 26px;
}

.page-header {
  min-height: 50px;
}

.page-header h1 {
  font-size: 28px;
  margin-bottom: 6px;
}

.right-rail {
  display: grid;
  padding: 97px 22px 28px 0;
}

.capture-card,
.list-card {
  border-color: #d9e1ec;
  box-shadow: none;
}

.capture-card {
  margin-bottom: 22px;
}

.capture-heading {
  min-height: 54px;
}

.capture-heading h2 {
  align-items: center;
  display: inline-flex;
  font-weight: 650;
  min-height: 26px;
}

.capture-form {
  padding: 16px 18px 18px;
}

.capture-form textarea {
  min-height: 88px;
}

.capture-actions {
  justify-content: flex-end;
}

.microphone-button .app-icon {
  height: 18px;
  width: 18px;
}

.suggestion-chip,
.due-input {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  color: #344054;
  display: inline-flex;
  font-size: 13px;
  min-height: 40px;
  padding: 0 13px;
}

.due-input {
  min-width: 150px;
}

.select-input {
  max-width: 148px;
}

.section-header {
  min-height: 60px;
}

.inbox-row {
  grid-template-columns: 24px 44px minmax(0, 1fr) minmax(134px, auto);
  min-height: 67px;
}

.entry-icon {
  height: 42px;
  width: 42px;
}

.status-chip {
  justify-content: center;
}

.list-footer {
  align-items: center;
  border-top: 1px solid var(--hairline-soft);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 54px;
  padding: 10px 18px;
}

.pagination-summary {
  color: #667085;
  font-size: 13px;
  white-space: nowrap;
}

.pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.pagination-link,
.pagination-gap {
  align-items: center;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  display: inline-flex;
  font-size: 13px;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 0 10px;
}

.pagination-link {
  background: #f8fbff;
  color: #344054;
  font-weight: 750;
  text-decoration: none;
}

.pagination-link.is-current {
  background: var(--focus-blue);
  border-color: var(--focus-blue);
  color: #fff;
}

.pagination-link.is-disabled {
  color: #98a2b3;
}

.pagination-gap {
  border-color: transparent;
  color: #667085;
}

@media (max-width: 720px) {
  .list-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination {
    justify-content: flex-start;
  }
}

.detail-panel {
  margin-top: 22px;
}

.show-main .detail-panel {
  margin-top: 0;
}

.rail-card {
  border-color: #d9e1ec;
  box-shadow: none;
}

.rail-legend div {
  align-items: start;
}

.metric-list {
  grid-template-columns: 1fr;
}

.recent-list {
  display: grid;
  gap: 12px;
}

.recent-list span {
  align-items: center;
  color: #344054;
  display: grid;
  font-size: 13px;
  gap: 8px;
  grid-template-columns: 18px 1fr auto;
}

.recent-list i {
  background: var(--cyan-soft);
  border-radius: 5px;
  height: 18px;
  width: 18px;
}

.recent-list small {
  color: var(--faint);
}

.quick-card {
  display: grid;
  gap: 0;
  padding-bottom: 8px;
}

.quick-card a,
.quick-card span {
  border-top: 1px solid var(--hairline-soft);
  color: #344054;
  font-size: 14px;
  padding: 13px 0;
}

@media (max-width: 1360px) {
  .planner-shell {
    grid-template-columns: 226px minmax(680px, 1fr);
  }
}

.app-shell-two {
  grid-template-columns: 244px minmax(0, 1fr);
}

.planning-main {
  padding: 28px;
}

.today-main {
  min-width: 0;
}

.today-grid,
.task-detail-grid,
.review-grid {
  display: grid;
  gap: 18px;
}

.today-grid {
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.15fr);
}

.task-detail-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 340px;
}

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

.review-postpone-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.2fr) auto;
}

.review-postpone-form label {
  display: grid;
  gap: 6px;
}

.review-postpone-form label span {
  color: var(--faint);
  font-size: 12px;
  font-weight: 800;
}

.review-postpone-form .text-input,
.review-postpone-form .select-input {
  width: 100%;
}

.task-detail-header {
  margin-top: 18px;
}

.task-list,
.plan-item-list,
.review-list,
.activity-list {
  display: grid;
}

.task-row,
.plan-item,
.review-item,
.activity-row {
  border-bottom: 1px solid var(--hairline-soft);
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}

.task-row {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.task-row.compact {
  grid-template-columns: minmax(0, 1fr);
}

.task-row:last-child,
.plan-item:last-child,
.review-item:last-child,
.activity-row:last-child {
  border-bottom: 0;
}

.task-row-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.task-title {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.task-meta,
.plan-item span,
.review-item span,
.activity-row span {
  color: var(--faint);
  font-size: 13px;
  line-height: 1.45;
}

.task-chip-row,
.task-actions,
.capacity-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-actions {
  justify-content: flex-end;
}

.task-actions form,
.header-actions form,
.task-side-actions form {
  margin: 0;
}

.task-actions .ghost-button,
.task-actions .primary-button {
  min-height: 34px;
  padding: 0 10px;
}

.capacity-box {
  border-bottom: 1px solid var(--hairline-soft);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.capacity-box div {
  background: var(--surface-soft);
  display: grid;
  gap: 4px;
  padding: 14px;
}

.capacity-box strong {
  font-size: 22px;
}

.capacity-box span {
  color: var(--faint);
  font-size: 12px;
  font-weight: 750;
}

.capacity-box.is-over div {
  background: #fff1f2;
}

.warning-note {
  color: var(--red);
  font-weight: 700;
  margin: 14px 18px 0;
}

.capacity-form {
  border-bottom: 1px solid var(--hairline-soft);
  padding: 14px 18px;
}

.capacity-form .text-input {
  max-width: 120px;
}

.plan-item {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.plan-item.done {
  background: var(--green-wash);
}

.plan-item.moved,
.plan-item.skipped {
  background: #fff8ed;
}

.task-edit-form {
  display: grid;
  gap: 12px;
}

.task-edit-form label {
  color: var(--faint);
  font-size: 12px;
  font-weight: 800;
}

.text-area {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #334155;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

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

.form-grid > div {
  display: grid;
  gap: 6px;
}

.form-grid .text-input,
.form-grid .select-input {
  width: 100%;
}

.compact-dl {
  display: grid;
  gap: 8px 14px;
  grid-template-columns: 92px minmax(0, 1fr);
  margin: 0 0 18px;
}

.compact-dl dt {
  color: var(--faint);
}

.compact-dl dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-side-actions {
  display: grid;
}

.activity-section {
  margin-top: 18px;
}

@media (max-width: 1100px) {
  .today-grid,
  .task-detail-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .task-row,
  .plan-item {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .task-actions {
    justify-content: flex-start;
  }

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

  .review-postpone-form .ghost-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  .inbox-row {
    grid-template-columns: 24px 44px minmax(0, 1fr);
  }
}

/* Inbox layout without the right-side card rail */
.planner-shell {
  grid-template-columns: 244px minmax(720px, 1fr);
}

.calendar-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
}

.calendar-day-main {
  min-width: 0;
  padding: 28px;
}

.calendar-day-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: 300px minmax(520px, 1fr) 310px;
}

.task-pool-panel,
.calendar-board-panel,
.calendar-detail-panel {
  min-width: 0;
}

.task-pool-panel,
.calendar-detail-panel .detail-block,
.day-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task-pool-panel {
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.task-pool-groups {
  display: grid;
}

.task-pool-group {
  border-top: 1px solid var(--line);
  padding: 14px;
}

.task-pool-group:first-child {
  border-top: 0;
}

.task-pool-group h3 {
  font-size: 13px;
  margin: 0 0 10px;
}

.task-pool-list {
  display: grid;
  gap: 10px;
}

.calendar-task-card {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: grab;
  display: grid;
  gap: 7px;
  padding: 11px;
}

.calendar-task-card:active {
  cursor: grabbing;
}

.calendar-task-card strong,
.calendar-time-block strong {
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.calendar-task-card span,
.calendar-time-block span,
.calendar-column-header span,
.connection-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.calendar-board-panel {
  display: grid;
  gap: 16px;
}

.calendar-board-scroll {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.calendar-board {
  display: grid;
  grid-template-columns: 58px repeat(var(--calendar-users), minmax(180px, 1fr));
  min-width: calc(58px + (180px * var(--calendar-users)));
}

.calendar-time-axis,
.person-calendar-column {
  min-width: 0;
}

.calendar-column-header {
  align-content: center;
  background: #fbfdff;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 9px 10px;
  position: sticky;
  top: 0;
  z-index: 3;
}

.calendar-time-grid,
.calendar-column-body {
  position: relative;
}

.calendar-time-grid {
  border-right: 1px solid var(--line);
}

.time-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
}

.calendar-column-body {
  background: repeating-linear-gradient(
    to bottom,
    #ffffff 0,
    #ffffff 17px,
    #eef2f7 18px
  );
  border-right: 1px solid var(--line);
}

.calendar-drop-slot {
  border-bottom: 1px solid transparent;
  position: relative;
}

.calendar-drop-slot.is-hour {
  border-top: 1px solid #cbd5e1;
}

.calendar-drop-slot.is-drop-target {
  background: rgba(37, 99, 235, 0.12);
  outline: 1px solid var(--blue);
}

.calendar-time-block {
  background: #e8f0ff;
  border: 1px solid #93b4ff;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  cursor: grab;
  display: grid;
  left: 7px;
  min-height: 36px;
  overflow: hidden;
  padding: 7px 9px 10px;
  position: absolute;
  right: 7px;
  z-index: 2;
}

.calendar-time-block.is-grouped {
  background: #ecfdf5;
  border-color: #86efac;
  border-left-color: var(--green);
}

.calendar-time-block-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.calendar-resize-handle {
  background: rgba(15, 23, 42, 0.22);
  border-radius: 999px;
  bottom: 3px;
  cursor: ns-resize;
  height: 4px;
  left: 40%;
  position: absolute;
  right: 40%;
}

.day-summary {
  padding: 16px;
}

.day-summary h2,
.calendar-detail-panel h2 {
  font-size: 15px;
  margin: 0 0 12px;
}

.day-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.day-summary-grid article {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 11px;
}

.day-summary-grid span {
  color: var(--muted);
  font-size: 12px;
}

.calendar-detail-panel {
  display: grid;
  gap: 16px;
}

.calendar-detail-panel .detail-block {
  padding: 16px;
}

.calendar-detail-panel h3 {
  font-size: 17px;
  margin: 0 0 8px;
}

.calendar-detail-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.calendar-detail-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
}

.calendar-detail-form label,
.form-label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

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

.participant-grid label {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  display: flex;
  gap: 8px;
  padding: 8px;
}

.connection-list {
  display: grid;
  gap: 10px;
}

.connection-list article {
  display: grid;
  gap: 6px;
}

@media (max-width: 1280px) {
  .calendar-day-layout {
    grid-template-columns: 280px minmax(520px, 1fr);
  }

  .calendar-detail-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  .calendar-shell {
    grid-template-columns: 1fr;
  }

  .calendar-day-layout {
    grid-template-columns: 1fr;
  }

  .task-pool-panel {
    max-height: none;
  }
}

@media (max-width: 1360px) {
  .planner-shell {
    grid-template-columns: 226px minmax(680px, 1fr);
  }
}
