:root {
  --surface: #faf9f5;
  --surface-low: #f4f4f0;
  --surface-high: #e8e8e4;
  --surface-lowest: #ffffff;
  --surface-ink: #1a1c1a;
  --surface-muted: #404945;
  --outline: rgba(113, 121, 117, 0.2);
  --outline-strong: rgba(113, 121, 117, 0.35);
  --primary: #134235;
  --primary-strong: #0c3026;
  --primary-soft: #d1e4db;
  --primary-soft-strong: #bcedda;
  --danger: #7b2f28;
  --danger-soft: #ffdad6;
  --warning: #a86a16;
  --warning-soft: #f5e0b8;
  --success: #23543f;
  --success-soft: #cfe9dc;
  --shadow-soft: 0 24px 60px -32px rgba(26, 28, 26, 0.22);
  --shadow-card: 0 10px 30px -12px rgba(26, 28, 26, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --content-width: 1440px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--surface-ink);
  background: var(--surface);
  font-family: "Plus Jakarta Sans", sans-serif;
  line-height: 1.5;
}

body::selection {
  background: var(--primary-soft-strong);
  color: var(--primary-strong);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.hidden {
  display: none !important;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  font-size: 1.1rem;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  filter: blur(50px);
  opacity: 0.6;
}

.ambient-auth::before {
  width: 38rem;
  height: 38rem;
  left: -12rem;
  top: -10rem;
  border-radius: 42% 58% 53% 47%;
  background: radial-gradient(circle, rgba(19, 66, 53, 0.12), rgba(19, 66, 53, 0));
}

.ambient-auth::after {
  width: 28rem;
  height: 28rem;
  right: -6rem;
  bottom: -4rem;
  border-radius: 57% 43% 61% 39%;
  background: radial-gradient(circle, rgba(188, 237, 218, 0.45), rgba(188, 237, 218, 0));
}

.ambient-app::before {
  width: 34rem;
  height: 34rem;
  top: -10rem;
  right: 6rem;
  border-radius: 59% 41% 43% 57%;
  background: radial-gradient(circle, rgba(188, 237, 218, 0.32), rgba(188, 237, 218, 0));
}

.ambient-app::after {
  width: 30rem;
  height: 30rem;
  bottom: -6rem;
  left: 10rem;
  border-radius: 45% 55% 60% 40%;
  background: radial-gradient(circle, rgba(19, 66, 53, 0.08), rgba(19, 66, 53, 0));
}

.panel {
  background: rgba(250, 249, 245, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(16px);
}

.soft-shadow {
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--surface-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.display-title,
.section-title,
.brand-title,
.page-title,
.card-title {
  margin: 0;
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.04em;
}

.display-title {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 0.96;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.page-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 800;
}

.muted-copy,
.page-subtitle,
.helper-text {
  color: var(--surface-muted);
}

.auth-body {
  display: grid;
  align-items: center;
  padding: 2rem;
}

.auth-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 440px);
  gap: 2rem;
  align-items: stretch;
}

.hero-panel,
.auth-card {
  border-radius: var(--radius-xl);
  padding: 2rem;
}

.hero-panel {
  min-height: 42rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.88), rgba(244, 244, 240, 0.92)),
    var(--surface);
}

.brand-lockup {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.brand-sidebar {
  margin-bottom: 2rem;
}

.brand-mark {
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, var(--primary), #2d5a4c);
  color: #fff;
  box-shadow: 0 18px 30px -22px rgba(19, 66, 53, 0.85);
}

.brand-mark .material-symbols-outlined {
  font-size: 2rem;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.brand-mark-small {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 0.95rem;
}

.brand-mark-small .material-symbols-outlined {
  font-size: 1.35rem;
}

.hero-stack {
  display: grid;
  gap: 1.25rem;
}

.hero-card {
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.hero-card h2 {
  margin: 0 0 0.7rem;
  font-size: 1.7rem;
  line-height: 1.1;
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.03em;
}

.hero-card p,
.hero-point span:last-child {
  margin: 0;
  color: var(--surface-muted);
}

.hero-kicker,
.section-kicker {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
}

.hero-points {
  display: grid;
  gap: 0.9rem;
}

.hero-point {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  background: rgba(244, 244, 240, 0.8);
}

.hero-point > .material-symbols-outlined {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.2rem;
}

.hero-point strong {
  display: block;
  margin-bottom: 0.15rem;
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card-head,
.auth-footer {
  display: grid;
  gap: 0.55rem;
}

.form-stack {
  display: grid;
  gap: 1rem;
  margin: 1.4rem 0 1.2rem;
}

.field-group {
  display: grid;
  gap: 0.45rem;
  position: relative;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--surface-muted);
}

.field-icon {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  color: rgba(64, 73, 69, 0.65);
}

.field-input,
.field-textarea,
.field-select {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: rgba(244, 244, 240, 0.95);
  color: var(--surface-ink);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.field-input.with-icon {
  padding-left: 3rem;
}

.field-textarea {
  min-height: 8rem;
  resize: vertical;
}

.field-input:focus,
.field-textarea:focus,
.field-select:focus {
  outline: none;
  border-color: rgba(19, 66, 53, 0.35);
  box-shadow: 0 0 0 4px rgba(19, 66, 53, 0.08);
  background: #fff;
}

.btn {
  border: 0;
  border-radius: var(--radius-md);
  padding: 0.82rem 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, color 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #2d5a4c);
  box-shadow: 0 20px 26px -20px rgba(19, 66, 53, 0.8);
}

.btn-secondary {
  color: var(--primary);
  background: rgba(209, 228, 219, 0.9);
}

.btn-ghost {
  color: var(--surface-ink);
  background: rgba(244, 244, 240, 0.84);
}

.btn-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.btn-sm {
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.btn-lg {
  padding: 1rem 1.15rem;
}

.btn-block {
  width: 100%;
}

.inline-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--surface-muted);
  font-size: 0.92rem;
}

.alert {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.95rem;
}

.app-body {
  padding: 1.25rem;
  overflow-x: hidden;
  overflow-y: auto;
}

.app-shell {
  width: min(var(--content-width), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr) 408px;
  gap: 1rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 1.25rem;
  max-height: calc(100vh - 2.5rem);
  padding: 1.25rem;
  border-radius: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(244, 244, 240, 0.88);
  overflow-y: auto;
  scrollbar-width: thin;
}

.sidebar-nav,
.sidebar-footer,
.sidebar-actions,
.sidebar-dock {
  display: grid;
  gap: 0.55rem;
}

.sidebar-dock {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-card);
}

.sidebar-actions {
  margin-top: auto;
  padding-top: 1rem;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 0.75rem;
}

.nav-link,
.mobile-nav-link {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--surface-muted);
  padding: 0.78rem 0.95rem;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  text-align: left;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav-link:hover,
.mobile-nav-link:hover {
  background: rgba(232, 232, 228, 0.9);
  color: var(--surface-ink);
}

.nav-link.active,
.mobile-nav-link.active {
  color: var(--primary);
  background: rgba(209, 228, 219, 0.84);
}

.nav-muted {
  color: var(--surface-muted);
}

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1rem;
  align-content: start;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 1.5rem;
  background: rgba(250, 249, 245, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.search-shell {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.82rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(244, 244, 240, 0.95);
}

.search-shell input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--surface-ink);
}

.search-shell input:focus {
  outline: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-chip {
  border: 0;
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(244, 244, 240, 0.95);
  color: var(--surface-ink);
  font-weight: 600;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(113, 121, 117, 0.45);
}

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

.status-dot.offline {
  background: var(--danger);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem 0.45rem 0.45rem;
  border-radius: 999px;
  background: rgba(244, 244, 240, 0.95);
}

.user-avatar {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #2d5a4c);
  color: #fff;
  font-weight: 700;
}

.user-meta {
  display: grid;
  gap: 0.05rem;
}

.user-meta strong {
  font-size: 0.95rem;
}

.user-meta span {
  font-size: 0.78rem;
  color: var(--surface-muted);
}

.workspace-body {
  display: block;
}

.content-column {
  min-width: 0;
  overflow: visible;
}

.content-column {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.ai-sidebar {
  position: sticky;
  top: 1.25rem;
  max-height: calc(100vh - 2.5rem);
  padding: 1rem;
  border-radius: 1.75rem;
  display: grid;
  gap: 1rem;
  overflow-y: auto;
  scrollbar-width: thin;
  background: rgba(244, 244, 240, 0.88);
}

.ai-shell {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.ai-sidebar-head,
.calendar-day-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem;
}

.ai-stream-shell {
  max-height: 28rem;
  overflow-y: auto;
  padding-right: 0.2rem;
  scrollbar-width: thin;
}

.chat-stream-sidebar {
  padding-right: 0.1rem;
}

.chat-stream-sidebar .message-bubble {
  width: 100%;
}

.composer-textarea-compact {
  min-height: 6.5rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.78fr);
  gap: 1rem;
  align-items: start;
}

.view-main,
.view-side {
  min-width: 0;
  display: grid;
  gap: 1rem;
  align-content: start;
}

.calendar-grid {
  display: grid;
  gap: 1rem;
}

.calendar-day-card {
  display: grid;
  gap: 0.95rem;
}

.page-panel,
.list-card,
.detail-card,
.project-card,
.setting-card,
.metric-card,
.timeline-card,
.empty-state,
.hero-module {
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-card);
}

.page-panel-muted {
  background: rgba(244, 244, 240, 0.92);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.section-head > div {
  min-width: 0;
}

.section-head .page-subtitle,
.section-subtitle {
  margin: 0.45rem 0 0;
  max-width: 50rem;
}

.header-actions,
.filter-row,
.inline-actions,
.pill-group,
.metadata-row,
.tag-list,
.stats-row,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-grid,
.capture-form-grid,
.settings-grid,
.metric-grid {
  display: grid;
  gap: 1rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
}

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

.quick-capture,
.info-card,
.upload-box,
.project-summary,
.voice-recorder {
  display: grid;
  gap: 1rem;
}

.voice-recorder {
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(244, 244, 240, 0.92);
}

.voice-recorder-header {
  display: grid;
  gap: 0.4rem;
}

.voice-recorder-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--surface-muted);
  font-size: 0.95rem;
}

.voice-recorder-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(113, 121, 117, 0.45);
}

.voice-recorder-dot.recording {
  background: var(--danger);
  animation: recorder-pulse 1.1s ease-in-out infinite;
}

.voice-recorder-dot.uploading {
  background: var(--warning);
}

.voice-recorder-note {
  margin: 0;
  color: var(--surface-muted);
  font-size: 0.88rem;
}

.voice-recorder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.voice-transcript {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.voice-transcript strong {
  font-size: 0.82rem;
  color: var(--surface-muted);
}

.voice-transcript p {
  margin: 0;
  min-height: 3.25rem;
  color: var(--surface-ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}

@keyframes recorder-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: 0.55; }
  100% { transform: scale(1); opacity: 1; }
}

.info-card {
  min-height: 100%;
  align-content: space-between;
}

.info-card.accent {
  background: linear-gradient(160deg, #245244, #173c31);
  color: #fff;
}

.info-card.accent .muted-copy,
.info-card.accent .helper-text {
  color: rgba(255, 255, 255, 0.75);
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(244, 244, 240, 0.95);
}

.segmented-option,
.chip {
  border: 0;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: transparent;
  color: var(--surface-muted);
  font-weight: 600;
}

.segmented-option.active,
.chip.active {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 18px -18px rgba(26, 28, 26, 0.55);
}

.filter-bar {
  display: grid;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
}

.filter-row {
  align-items: center;
  justify-content: space-between;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.select-inline {
  min-width: 12rem;
}

.task-list,
.capture-list,
.timeline,
.stack {
  display: grid;
  gap: 0.8rem;
}

.task-row,
.capture-row {
  position: relative;
  border: 0;
  width: 100%;
  text-align: left;
  display: grid;
  gap: 0.85rem;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-card);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.task-row:hover,
.capture-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 24px 48px -34px rgba(26, 28, 26, 0.28);
}

.task-row.selected,
.capture-row.selected {
  background: rgba(255, 255, 255, 0.96);
  outline: 2px solid rgba(19, 66, 53, 0.12);
}

.row-head,
.row-main,
.detail-head,
.project-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.row-body,
.detail-head > div,
.detail-item,
.badge,
.tag,
.stat-pill {
  min-width: 0;
}

.row-main h3,
.detail-head h2,
.project-head h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.03em;
}

.row-main h3 {
  font-size: 1.1rem;
}

.detail-head h2 {
  font-size: 1.75rem;
  line-height: 1.08;
}

.row-body p,
.detail-body p,
.project-body p {
  margin: 0;
  color: var(--surface-muted);
}

.row-main h3,
.row-body p,
.detail-section p,
.detail-item span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.metadata-row {
  align-items: center;
}

.badge,
.tag,
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
}

.badge.status-inbox {
  background: rgba(209, 228, 219, 0.95);
  color: var(--primary);
}

.badge.status-todo,
.badge.status-in_progress {
  background: rgba(244, 244, 240, 0.98);
  color: var(--surface-ink);
}

.badge.status-done {
  background: var(--success-soft);
  color: var(--success);
}

.badge.status-archived {
  background: rgba(232, 232, 228, 0.98);
  color: var(--surface-muted);
}

.badge.priority-low {
  background: rgba(244, 244, 240, 0.98);
  color: var(--surface-muted);
}

.badge.priority-medium {
  background: rgba(209, 228, 219, 0.95);
  color: var(--primary);
}

.badge.priority-high {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.source,
.tag,
.stat-pill {
  background: rgba(244, 244, 240, 0.95);
  color: var(--surface-muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.detail-section {
  display: grid;
  gap: 0.7rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.detail-item {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(244, 244, 240, 0.92);
}

.detail-item strong,
.detail-item span {
  display: block;
}

.detail-item strong {
  margin-bottom: 0.2rem;
  font-size: 0.82rem;
  color: var(--surface-muted);
}

.timeline {
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: 1.2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0.22rem;
  top: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--primary);
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 1rem;
  bottom: -0.7rem;
  width: 1px;
  background: rgba(19, 66, 53, 0.12);
}

.timeline-item:last-child::after {
  display: none;
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
}

.timeline-meta strong {
  font-size: 0.95rem;
}

.timeline-meta span,
.timeline-body {
  color: var(--surface-muted);
  font-size: 0.9rem;
}

.empty-state {
  display: grid;
  gap: 0.75rem;
  place-items: start;
}

.empty-state .material-symbols-outlined {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.metric-card strong,
.setting-card strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
  color: var(--surface-muted);
}

.metric-value {
  font-size: 2rem;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.chat-layout {
  display: grid;
  gap: 1rem;
}

.chat-card,
.chat-context-card,
.action-receipt,
.message-bubble {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-card);
}

.chat-card {
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
}

.chat-stream {
  display: grid;
  gap: 1rem;
}

.message-row {
  display: flex;
}

.message-row.user {
  justify-content: flex-end;
}

.message-row.assistant,
.message-row.system {
  justify-content: flex-start;
}

.message-bubble {
  width: min(100%, 46rem);
  padding: 1rem 1.1rem;
  display: grid;
  gap: 0.75rem;
}

.message-row.user .message-bubble {
  background: linear-gradient(135deg, rgba(209, 228, 219, 0.95), rgba(255, 255, 255, 0.95));
}

.message-row.assistant .message-bubble {
  background: rgba(255, 255, 255, 0.96);
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--surface-muted);
  font-size: 0.82rem;
}

.message-plan {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(244, 244, 240, 0.94);
}

.message-plan strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: var(--surface-muted);
}

.message-plan p,
.message-copy,
.chat-context-list li,
.receipt-copy {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-actions {
  display: grid;
  gap: 0.75rem;
}

.action-receipt {
  padding: 0.95rem 1rem;
  display: grid;
  gap: 0.65rem;
  border: 1px solid rgba(113, 121, 117, 0.14);
}

.receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.receipt-head strong {
  font-size: 0.95rem;
}

.receipt-copy {
  color: var(--surface-muted);
  font-size: 0.93rem;
}

.chat-composer {
  display: grid;
  gap: 0.9rem;
}

.chat-composer-sidebar .btn {
  width: 100%;
}

.composer-textarea {
  min-height: 8.8rem;
}

.chat-context-grid {
  display: grid;
  gap: 1rem;
}

.chat-context-card {
  padding: 1.1rem 1.15rem;
  display: grid;
  gap: 0.8rem;
}

.chat-context-card ul {
  margin: 0;
  padding-left: 1rem;
}

.chat-context-card li + li {
  margin-top: 0.35rem;
}

.context-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.context-stat {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(244, 244, 240, 0.92);
}

.context-stat strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--surface-muted);
  font-size: 0.8rem;
}

.context-stat span {
  font-family: "Manrope", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.project-grid-wide {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-summary-grid {
  display: grid;
  gap: 0.8rem;
}

.project-summary-grid .detail-item {
  min-height: 100%;
}

.empty-panel {
  min-height: 18rem;
}

.project-card {
  display: grid;
  gap: 1rem;
}

.project-card button {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: inherit;
}

.progress-track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(232, 232, 228, 0.95);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #2d5a4c);
}

.stats-row {
  gap: 0.45rem;
}

.stat-pill {
  justify-content: center;
}

.settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 26, 24, 0.24);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  z-index: 100;
}

.modal {
  width: min(42rem, 100%);
  max-height: min(88vh, 54rem);
  overflow: auto;
  padding: 1.4rem;
  border-radius: 1.5rem;
  background: rgba(250, 249, 245, 0.92);
  box-shadow: var(--shadow-soft);
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-head {
  margin-bottom: 1rem;
}

.modal-actions {
  margin-top: 1rem;
}

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

.form-grid .field-group[data-span="2"] {
  grid-column: 1 / -1;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.7rem;
  z-index: 120;
}

.toast {
  min-width: 18rem;
  max-width: 24rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  color: #fff;
  background: rgba(19, 66, 53, 0.92);
  box-shadow: var(--shadow-card);
}

.toast.error {
  background: rgba(123, 47, 40, 0.94);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1180px) {
  .auth-layout,
  .hero-grid,
  .capture-form-grid,
  .metric-grid,
  .detail-grid,
  .form-grid,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

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

  .ai-sidebar {
    position: static;
    max-height: none;
    grid-column: 2;
  }
}

@media (max-width: 1024px) {
  .app-body {
    padding: 1rem 1rem 6rem;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .ai-sidebar {
    position: static;
    max-height: none;
  }

  .mobile-nav {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.5rem;
    border-radius: 1.25rem;
    z-index: 90;
  }

  .mobile-nav-link {
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.55rem 0.35rem;
    font-size: 0.72rem;
    justify-content: center;
  }
}

@media (max-width: 880px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: auto;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-sidebar-head,
  .calendar-day-head {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .auth-body,
  .app-body {
    padding: 0.9rem;
  }

  .hero-panel,
  .auth-card,
  .page-panel,
  .list-card,
  .detail-card,
  .project-card,
  .setting-card,
  .metric-card,
  .empty-state,
  .modal {
    padding: 1.1rem;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

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