:root {
  --bg: #edf6f5;
  --bg-soft: #f6fbfa;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --surface-muted: #f4f8f8;
  --line: #dfe9e8;
  --line-strong: #cfdddc;
  --ink: #172b33;
  --ink-soft: #52666d;
  --muted: #809197;
  --mint: #26b99a;
  --mint-dark: #138b75;
  --mint-pale: #dff6ef;
  --blue: #4d82e8;
  --blue-pale: #e9f0ff;
  --amber: #e4a43b;
  --amber-pale: #fff4dd;
  --rose: #ef786e;
  --rose-pale: #fff0ee;
  --violet: #8b74d6;
  --violet-pale: #f1edff;
  --shadow-sm: 0 1px 2px rgba(32, 65, 70, 0.04), 0 6px 18px rgba(32, 65, 70, 0.04);
  --shadow-md: 0 14px 40px rgba(42, 81, 84, 0.10);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --sidebar: 232px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-width: 1180px; min-height: 100%; background: var(--bg); }

body {
  background:
    radial-gradient(circle at 18% -10%, rgba(91, 211, 184, 0.16), transparent 31%),
    radial-gradient(circle at 95% 5%, rgba(98, 151, 231, 0.12), transparent 28%),
    var(--bg);
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(77, 130, 232, 0.28);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; display: flex; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 26px 18px 20px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid rgba(205, 224, 221, 0.9);
  backdrop-filter: blur(18px);
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  color: var(--mint-dark); background: linear-gradient(145deg, #e2faf4, #ffffff);
  border: 1px solid #bfeade; box-shadow: var(--shadow-sm); font-weight: 800; font-size: 19px;
}
.brand-name { font-weight: 760; font-size: 16px; letter-spacing: 0.01em; }
.brand-subtitle { margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: 0.06em; }
.side-label { padding: 0 12px 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; }
.side-nav { display: grid; gap: 5px; }
.nav-item {
  width: 100%; border: 0; background: transparent; display: grid; grid-template-columns: 24px 1fr auto;
  align-items: center; gap: 7px; padding: 11px 12px; border-radius: 11px; cursor: pointer;
  text-align: left; color: var(--ink-soft); transition: 160ms ease;
}
.nav-item:hover { background: rgba(236, 247, 245, 0.9); color: var(--ink); }
.nav-item.active { color: #116f60; background: #e7f7f2; box-shadow: inset 0 0 0 1px #ccece3; font-weight: 700; }
.nav-icon { width: 22px; color: #789195; font-weight: 800; font-size: 17px; text-align: center; }
.nav-item.active .nav-icon { color: var(--mint-dark); }
.nav-count { min-width: 22px; padding: 2px 6px; border-radius: 999px; text-align: center; background: #edf2f2; color: var(--muted); font-size: 11px; }
.sidebar-spacer { flex: 1; }
.prototype-note { display: flex; gap: 10px; margin: 16px 4px 12px; padding: 13px; border-radius: 13px; background: #f6faf9; border: 1px solid var(--line); }
.prototype-dot { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px var(--mint-pale); }
.prototype-note strong { font-size: 12px; }
.prototype-note p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.side-action { border: 1px solid var(--line); background: white; border-radius: 10px; padding: 9px 12px; color: var(--ink-soft); cursor: pointer; font-size: 12px; }
.side-action:hover { border-color: #a9d9cf; color: var(--mint-dark); }

.main-shell { width: calc(100% - var(--sidebar)); margin-left: var(--sidebar); min-height: 100vh; }
.topbar {
  height: 88px; padding: 18px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-bottom: 1px solid rgba(209, 226, 224, 0.78); background: rgba(246, 251, 250, 0.72); backdrop-filter: blur(16px);
  position: sticky; top: 0; z-index: 15;
}
.eyebrow { color: var(--mint-dark); font-size: 11px; font-weight: 750; letter-spacing: 0.06em; margin-bottom: 4px; }
.topbar h1 { margin: 0; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.search-box { height: 38px; width: 210px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.82); color: var(--muted); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.sample-chip { color: #8a6727; background: var(--amber-pale); border: 1px solid #f0d9a9; border-radius: 999px; padding: 6px 9px; font-size: 11px; font-weight: 700; }
.sync-chip { min-width: 104px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 9px; cursor: pointer; background: white; color: var(--ink-soft); font-size: 10px; font-weight: 750; }
.sync-chip.syncing { color: #3266a8; border-color: #b9d1f0; background: #edf5ff; }
.sync-chip.synced { color: #14715f; border-color: #b9e2d8; background: #eaf8f4; }
.sync-chip.offline { color: #7b6650; border-color: #e7d8c5; background: #fff8ee; }
.sync-chip.conflict { color: #a54742; border-color: #efc2be; background: #fff0ee; }
.sync-summary { display:grid; gap:9px; margin-top:14px; }
.sync-summary > div { display:flex; justify-content:space-between; gap:14px; padding:9px 11px; border-radius:9px; background:var(--surface-muted); font-size:10px; }
.sync-summary span { color:var(--muted); }
.button { border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-size: 12px; font-weight: 700; transition: 150ms ease; }
.hidden { display: none !important; }
.codex-workspace-link { display: inline-flex; align-items: center; white-space: nowrap; text-decoration: none; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: linear-gradient(135deg, #22ad91, #168a77); box-shadow: 0 8px 20px rgba(28, 155, 131, 0.18); }
.button.secondary { color: var(--ink-soft); background: white; border: 1px solid var(--line); }
.button.ghost { padding: 8px 10px; color: var(--ink-soft); background: transparent; border: 1px solid var(--line); }
.button.danger { color: #b94b45; background: var(--rose-pale); border: 1px solid #f4c9c5; }
.button.small { padding: 7px 10px; }

.workspace { padding: 24px 28px 42px; max-width: 1600px; margin: 0 auto; }
.view-intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.view-intro h2 { margin: 0 0 5px; font-size: 18px; }
.view-intro p { margin: 0; color: var(--ink-soft); font-size: 12px; }
.segmented { display: inline-flex; gap: 3px; padding: 4px; border-radius: 11px; background: #e6efee; }
.segment { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; cursor: pointer; color: var(--ink-soft); font-size: 12px; }
.segment.active { background: white; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 700; }

.card { background: var(--surface); border: 1px solid rgba(213, 228, 226, 0.9); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.card-header { padding: 17px 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h3 { margin: 0; font-size: 14px; }
.card-subtitle { color: var(--muted); font-size: 11px; }
.card-body { padding: 16px 18px 18px; }
.text-button { border: 0; background: transparent; cursor: pointer; color: var(--mint-dark); font-weight: 700; font-size: 11px; padding: 4px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr) 320px; gap: 16px; align-items: start; }
.dashboard-main { display: grid; gap: 16px; }
.dashboard-middle { display: grid; gap: 16px; }
.dashboard-side { display: grid; gap: 16px; }
.hero-card { overflow: hidden; position: relative; min-height: 188px; padding: 24px; background: linear-gradient(125deg, rgba(255,255,255,.96) 0 54%, #dff5ee 54% 78%, #dceafa 78% 100%); }
.hero-card::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; right: -150px; bottom: -175px; border: 38px solid rgba(255,255,255,.38); }
.hero-kicker { color: var(--mint-dark); font-size: 11px; font-weight: 800; }
.hero-card h2 { max-width: 580px; margin: 12px 0 8px; font-size: clamp(23px, 2.25vw, 33px); line-height: 1.18; letter-spacing: -0.04em; }
.hero-card p { max-width: 570px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.hero-meta { margin-top: 18px; display: flex; gap: 8px; }
.soft-pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.72); border: 1px solid rgba(205,224,221,.8); color: var(--ink-soft); font-size: 10px; }

.capture-card { padding: 16px; }
.capture-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.capture-label strong { font-size: 13px; }
.capture-label span { color: var(--muted); font-size: 10px; }
.capture-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.capture-row input { border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: var(--bg-soft); color: var(--ink); font-size: 12px; }
.capture-hint { margin: 8px 2px 0; color: var(--muted); font-size: 10px; }

.priority-list, .decision-list, .schedule-list, .record-list { display: grid; gap: 9px; }
.priority-item { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 11px; border-radius: 12px; background: var(--surface-muted); border: 1px solid transparent; cursor: pointer; }
.priority-item:hover { border-color: #cde8e2; background: white; }
.priority-index { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: var(--mint-dark); background: var(--mint-pale); font-size: 11px; font-weight: 800; }
.item-title { font-size: 12px; font-weight: 730; line-height: 1.4; }
.item-meta { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; border-radius: 999px; padding: 4px 7px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.badge.mint { color: #137b68; background: var(--mint-pale); }
.badge.blue { color: #3465bd; background: var(--blue-pale); }
.badge.amber { color: #9b6a18; background: var(--amber-pale); }
.badge.rose { color: #b04e47; background: var(--rose-pale); }
.badge.violet { color: #654fb3; background: var(--violet-pale); }
.badge.gray { color: #60747a; background: #eaf0f0; }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-card { padding: 14px; min-height: 94px; }
.stat-label { color: var(--muted); font-size: 10px; }
.stat-value { margin-top: 7px; font-size: 25px; font-weight: 760; letter-spacing: -0.04em; }
.stat-note { margin-top: 5px; color: var(--ink-soft); font-size: 9px; }
.schedule-item, .decision-item { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px; border-radius: 11px; background: var(--surface-muted); }
.schedule-item.personal { background: #f0f6ff; box-shadow: inset 0 0 0 1px #cfdef7; }
.schedule-date { min-width: 38px; padding: 6px 4px; text-align: center; border-radius: 9px; background: white; border: 1px solid var(--line); }
.schedule-date strong { display: block; color: var(--ink); font-size: 15px; }
.schedule-date span { color: var(--muted); font-size: 8px; }
.decision-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px var(--amber-pale); }
.decision-item p { margin: 4px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.record-item { display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: start; padding: 7px 1px; }
.record-line { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--mint); }
.record-time { color: var(--muted); font-size: 9px; white-space: nowrap; }

.board-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.board-summary { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 11px; }
.board-grid { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 12px; min-height: calc(100vh - 205px); }
.board-column { flex: 1 0 292px; min-width: 292px; max-width: 390px; padding: 10px; border-radius: 15px; background: rgba(226, 237, 236, 0.62); border: 1px solid rgba(207, 222, 220, .8); }
.board-column.drag-over { background: #def3ed; border-color: #9ed6c9; }
.column-header { display: flex; justify-content: space-between; align-items: center; padding: 4px 3px 11px; }
.column-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 760; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; }
.column-count { color: var(--muted); font-size: 10px; }
.column-cards { display: grid; gap: 9px; min-height: 76px; }
.task-card { padding: 13px; background: white; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 2px 7px rgba(42, 70, 74, .04); cursor: pointer; transition: 150ms ease; }
.task-card.linked { border-color: #9ec1f0; background: linear-gradient(145deg, #ffffff, #f3f7ff); }
.task-card:hover { transform: translateY(-1px); border-color: #bcded6; box-shadow: 0 7px 18px rgba(42, 70, 74, .07); }
.task-card.dragging { opacity: .42; }
.task-id { color: var(--muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.task-title { margin: 6px 0 9px; font-size: 12px; font-weight: 740; line-height: 1.48; }
.task-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { padding: 3px 6px; color: var(--ink-soft); background: #f3f6f6; border: 1px solid #e3ebea; border-radius: 6px; font-size: 8px; }
.task-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 11px; padding-top: 9px; border-top: 1px solid #edf2f1; color: var(--muted); font-size: 9px; }
.empty-column { padding: 22px 10px; text-align: center; color: var(--muted); font-size: 10px; border: 1px dashed #cbdad8; border-radius: 10px; }

.filter-row { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.content-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.content-card { overflow: hidden; }
.content-card.linked { border-color: #a8c8f2; }
.content-cover { height: 92px; padding: 14px; position: relative; background: linear-gradient(135deg, #daf4ed, #e7effc); }
.content-cover.ad { background: linear-gradient(135deg, #fff0dd, #f4eaff); }
.content-cover.linked { background: linear-gradient(135deg, #dceaff, #e4f6f1); }
.content-cover::after { content: ""; position: absolute; right: -20px; bottom: -50px; width: 125px; height: 125px; border: 22px solid rgba(255,255,255,.42); border-radius: 50%; }
.content-type { position: relative; z-index: 1; display: inline-flex; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.76); border: 1px solid rgba(255,255,255,.9); color: var(--ink-soft); font-size: 9px; font-weight: 760; }
.content-body { padding: 14px; }
.content-title { min-height: 38px; margin: 0 0 10px; font-size: 13px; line-height: 1.45; }
.content-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.meta-block { padding: 8px; border-radius: 8px; background: var(--surface-muted); }
.meta-block label { display: block; color: var(--muted); font-size: 8px; margin-bottom: 4px; }
.meta-block span { font-size: 10px; font-weight: 690; }
.progress-track { height: 5px; margin-top: 12px; background: #edf2f1; border-radius: 999px; overflow: hidden; }
.progress-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--mint), var(--blue)); }

.calendar-shell { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 15px; align-items: start; }
.calendar-card { padding: 17px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calendar-toolbar h2 { margin: 0; font-size: 17px; }
.calendar-nav { display: flex; gap: 6px; }
.icon-button { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays div { padding: 8px; text-align: center; color: var(--muted); font-size: 9px; }
.calendar-day { min-height: 106px; padding: 8px; border-right: 1px solid #e8efee; border-bottom: 1px solid #e8efee; background: rgba(255,255,255,.54); }
.calendar-day:nth-child(7n+1) { border-left: 1px solid #e8efee; }
.calendar-day:nth-child(-n+7) { border-top: 1px solid #e8efee; }
.calendar-day.muted { color: #b5c1c3; background: rgba(243,247,247,.55); }
.calendar-day.today { background: #eef9f6; box-shadow: inset 0 0 0 1px #a9dacd; }
.day-number { font-size: 10px; font-weight: 700; }
.calendar-event { display: block; width: 100%; margin-top: 5px; padding: 4px 6px; border: 0; border-radius: 6px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; color: #226c5f; background: var(--mint-pale); font-size: 8px; }
.calendar-event.delivery { color: #8c6119; background: var(--amber-pale); }
.calendar-event.course { color: #3a64b1; background: var(--blue-pale); }
.calendar-event.publish { color: #654fb3; background: var(--violet-pale); }
.calendar-event.personal { color: #174e93; background: #dbeaff; box-shadow: inset 0 0 0 1px #78a6e7; font-weight: 760; }
.calendar-event.linked { color: #176b5d; background: #dff5ee; box-shadow: inset 0 0 0 1px #8ccfbe; font-weight: 720; }
.agenda-card { padding-bottom: 8px; }
.agenda-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 12px 11px 16px; border-bottom: 1px solid #edf2f1; }
.agenda-item.personal { background: #f2f7ff; }
.agenda-item.linked { background: #f2faf7; }
.agenda-item:last-child { border-bottom: 0; }
.agenda-time { color: var(--mint-dark); font-size: 10px; font-weight: 760; }
.agenda-item strong { display: block; font-size: 11px; line-height: 1.4; }
.agenda-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.agenda-tag { display: inline-flex; margin-left: 6px; padding: 2px 5px; border-radius: 999px; background: #dbeaff; color: #174e93; font-size: 8px; font-style: normal; vertical-align: 1px; }
.agenda-tag.linked { background: #dff5ee; color: #176b5d; }
.agenda-delete { padding: 5px 7px; border: 1px solid transparent; border-radius: 7px; color: #a74a46; background: transparent; cursor: pointer; font-size: 9px; }
.agenda-delete:hover { border-color: #f0c5c1; background: var(--rose-pale); }
.delete-confirm-copy { display:grid; gap:10px; font-size:11px; line-height:1.7; }
.delete-confirm-copy .item-meta { margin:0; }
.delete-confirm-copy span { color:var(--muted); }
.delete-impact { display:block; padding:10px 12px; border-radius:10px; color:#8d3f36; background:#fff1ef; }
.calendar-detail { display: grid; gap: 8px; }
.calendar-detail > div { display: grid; grid-template-columns: 60px 1fr; gap: 12px; padding: 10px 12px; border-radius: 9px; background: var(--surface-muted); }
.calendar-detail span { color: var(--muted); font-size: 10px; }
.calendar-detail strong { font-size: 11px; }

.worklog-layout, .report-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
.timeline { padding: 18px; }
.timeline-day { margin-bottom: 22px; }
.timeline-day:last-child { margin-bottom: 0; }
.timeline-date { margin-bottom: 12px; color: var(--ink); font-size: 12px; font-weight: 760; }
.timeline-entry { position: relative; display: grid; grid-template-columns: 86px 16px 1fr; gap: 8px; padding: 0 0 17px; }
.timeline-entry::after { content: ""; position: absolute; left: 93px; top: 14px; bottom: 0; width: 1px; background: var(--line); }
.timeline-entry:last-child::after { display: none; }
.timeline-time { padding-top: 2px; color: var(--muted); text-align: right; font-size: 9px; }
.timeline-bullet { position: relative; z-index: 1; width: 9px; height: 9px; margin: 3px auto 0; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px white; }
.timeline-content strong { display: block; font-size: 11px; }
.timeline-content p { margin: 4px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.55; }
.source-list { display: grid; gap: 8px; }
.source-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px; border-radius: 9px; background: var(--surface-muted); font-size: 10px; }

.report-paper { padding: 24px 28px; background: white; }
.report-stamp { display: inline-flex; padding: 5px 8px; border-radius: 6px; color: #9a691a; background: var(--amber-pale); font-size: 9px; font-weight: 800; }
.report-title { margin: 14px 0 5px; font-size: 24px; letter-spacing: -0.035em; }
.report-period { color: var(--muted); font-size: 10px; }
.report-summary { margin: 20px 0; padding: 15px; border-radius: 12px; color: #30535a; background: linear-gradient(135deg, #eefaf6, #f2f7ff); font-size: 11px; line-height: 1.7; }
.report-section { margin-top: 22px; }
.report-section h3 { margin: 0 0 10px; font-size: 13px; }
.report-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.report-metric { padding: 12px; border-radius: 10px; background: var(--surface-muted); }
.report-metric strong { display: block; font-size: 20px; }
.report-metric span { color: var(--muted); font-size: 8px; }
.report-list { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 10px; line-height: 1.8; }
.report-side { display: grid; gap: 13px; }
.check-row { display: flex; gap: 9px; align-items: start; padding: 9px 0; border-bottom: 1px solid #edf2f1; font-size: 10px; line-height: 1.5; }
.check-row:last-child { border-bottom: 0; }
.check-mark { width: 17px; height: 17px; display: grid; place-items: center; flex: 0 0 17px; border-radius: 50%; background: var(--mint-pale); color: var(--mint-dark); font-size: 9px; font-weight: 800; }

.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 26px; background: rgba(19, 38, 43, .32); backdrop-filter: blur(6px); z-index: 100; }
.modal { width: min(540px, calc(100vw - 52px)); max-height: calc(100vh - 52px); overflow: auto; border-radius: 18px; background: white; border: 1px solid rgba(255,255,255,.9); box-shadow: 0 24px 80px rgba(24, 53, 58, .22); }
.modal.wide { width: min(720px, calc(100vw - 52px)); }
.modal-header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.modal-header h2 { margin: 0; font-size: 17px; }
.modal-close { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fbfdfd; }
.footer-actions { margin-left: auto; display: flex; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { color: var(--ink-soft); font-size: 10px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 11px; color: var(--ink); background: var(--bg-soft); font-size: 11px; }
.field textarea { min-height: 78px; resize: vertical; line-height: 1.55; }
.advice-card { margin-top: 15px; padding: 15px; border-radius: 12px; background: linear-gradient(135deg, #edf9f5, #f2f6ff); border: 1px solid #d7eae6; }
.advice-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11px; font-weight: 800; }
.ai-mark { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: white; background: linear-gradient(135deg, var(--mint), var(--blue)); font-size: 9px; }
.advice-card p { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.65; }
.status-editor-list { display: grid; gap: 8px; }
.status-editor-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 10px; }
.status-editor-row input { border: 0; outline: 0; min-width: 0; font-size: 11px; font-weight: 700; }
.status-actions { display: flex; gap: 4px; }
.mini-button { width: 27px; height: 27px; border: 1px solid var(--line); background: white; border-radius: 7px; cursor: pointer; font-size: 10px; }
.add-status-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.add-status-row input { border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; font-size: 11px; }
.trash-list { display: grid; gap: 8px; }
.trash-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.trash-row strong { font-size: 11px; }
.empty-state { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink-soft); font-size: 13px; margin-bottom: 5px; }
.empty-state span { font-size: 10px; }

.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 130; display: grid; gap: 8px; }
.toast { min-width: 240px; max-width: 350px; padding: 12px 14px; border-radius: 11px; color: white; background: #24464c; box-shadow: var(--shadow-md); font-size: 11px; animation: toast-in 180ms ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1320px) {
  :root { --sidebar: 216px; }
  .topbar { padding-inline: 22px; }
  .workspace { padding-inline: 22px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); }
  .dashboard-side { grid-column: 1 / -1; grid-template-columns: 1fr 1fr 1fr; }
  .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-box { width: 176px; }
  .sync-chip { min-width: 92px; padding-inline: 7px; }
}

@media (max-width: 720px) {
  :root { --sidebar: 0px; }
  html, body { width: 100%; min-width: 0; overflow-x: hidden; }
  .app-shell { display: block; }
  .sidebar {
    inset: auto 0 0; width: 100%; height: calc(68px + env(safe-area-inset-bottom));
    padding: 5px 4px env(safe-area-inset-bottom); border: 0; border-top: 1px solid var(--line);
    background: rgba(255,255,255,.96); backdrop-filter: blur(18px);
  }
  .brand, .side-label, .sidebar-spacer, .prototype-note, .side-action { display: none; }
  .side-nav { display: flex; align-items: stretch; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .nav-item {
    flex: 1 0 62px; min-width: 62px; display: flex; flex-direction: column; justify-content: center;
    gap: 2px; padding: 6px 3px; text-align: center; font-size: 9px; line-height: 1.15;
  }
  .nav-icon { width: auto; font-size: 16px; }
  .nav-count { position: absolute; margin: -21px 0 0 27px; min-width: 17px; padding: 1px 4px; font-size: 8px; }
  .main-shell { width: 100%; margin-left: 0; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .topbar {
    height: auto; min-height: 0; padding: 11px 12px; display: block;
    background: rgba(246,251,250,.96);
  }
  .eyebrow { margin-bottom: 2px; font-size: 9px; }
  .topbar h1 { font-size: 19px; }
  .topbar-actions { width: 100%; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
  .search-box { order: -1; width: 100%; height: 36px; }
  .button { padding: 8px 10px; font-size: 10px; }
  .sync-chip { min-width: 0; padding: 6px 8px; }
  .sample-chip { padding: 6px 8px; font-size: 9px; }
  .install-app-button { display: inline-flex; align-items: center; }
  .workspace { padding: 12px 12px 24px; }
  .view-intro { align-items: flex-start; gap: 10px; }
  .view-intro h2 { font-size: 17px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 12px; }
  .dashboard-main, .dashboard-middle, .dashboard-side { gap: 12px; }
  .dashboard-side { grid-column: auto; grid-template-columns: 1fr; }
  .hero-card { min-height: 0; padding: 18px; }
  .hero-card h2 { margin-top: 9px; font-size: 24px; }
  .hero-card p { font-size: 12px; }
  .hero-meta { flex-wrap: wrap; }
  .capture-row { grid-template-columns: 1fr; }
  .priority-item { grid-template-columns: 28px minmax(0,1fr); }
  .priority-item .badge { grid-column: 2; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 84px; }
  .board-toolbar { align-items: flex-start; }
  .board-grid { min-height: 0; margin-right: -12px; padding-right: 12px; }
  .board-column { flex-basis: 84vw; min-width: 84vw; }
  .filter-row { overflow-x: auto; padding-bottom: 3px; }
  .content-grid { grid-template-columns: 1fr; }
  .calendar-shell, .worklog-layout, .report-layout { grid-template-columns: 1fr; }
  .calendar-card { overflow-x: auto; }
  .calendar-toolbar, .calendar-weekdays, .calendar-grid { min-width: 640px; }
  .calendar-day { min-height: 92px; }
  .report-paper { padding: 18px; }
  .report-metrics { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .modal-backdrop { padding: 12px; }
  .modal, .modal.wide { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  .modal-footer { align-items: stretch; flex-wrap: wrap; }
  .footer-actions { width: 100%; margin-left: 0; justify-content: flex-end; }
  .toast-region { right: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); left: 12px; }
  .toast { min-width: 0; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.agenda-open {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}
.agenda-open strong, .agenda-open span { display: block; }
.agenda-open:focus-visible { outline: 2px solid #26b99a; outline-offset: 4px; }
#calendar-today { min-width: 46px; font-size: 12px; }
#event-time-field[hidden] { display: none; }

/* Existing M4 income view retained during the cloud upgrade. */
.privacy-toggle { min-width: 76px; }
.dashboard-income-compact { grid-column: 1 / -1; min-height: 18px; display: flex; justify-content: flex-end; margin: -4px 2px -6px; }
.dashboard-income-compact button { max-width: 100%; display: flex; align-items: baseline; justify-content: flex-end; gap: 7px; padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; white-space: nowrap; }
.dashboard-income-compact span { font-size: 9px; font-weight: 750; }
.dashboard-income-compact strong { color: var(--mint-dark); font-family: "DIN Alternate", "Avenir Next", sans-serif; font-size: 15px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dashboard-income-compact small { font-size: 9px; }
.dashboard-income-compact i { color: var(--mint-dark); font-size: 10px; font-style: normal; }
.dashboard-income-compact button:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.income-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.income-summary-card { min-height: 126px; padding: 20px; display: grid; align-content: center; gap: 8px; }
.income-summary-card span { color: var(--muted); font-size: 10px; font-weight: 700; }
.income-summary-card strong { color: var(--mint-dark); font-size: 25px; line-height: 1.1; letter-spacing: -.03em; }
.income-summary-card small { color: var(--ink-soft); font-size: 9px; }
.income-ledger-card { overflow: hidden; }
.income-ledger { padding: 12px 18px 18px; }
.income-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 15px 2px; border-bottom: 1px solid #edf2f1; }
.income-row:last-child { border-bottom: 0; }
.income-row-main { display: flex; align-items: baseline; gap: 10px; }
.income-row-main strong { color: var(--mint-dark); font-size: 17px; }
.income-row-main span, .income-row-meta { color: var(--muted); font-size: 9px; }
.income-row-meta { display: flex; gap: 12px; white-space: nowrap; }
.income-empty { padding: 48px 20px; text-align: center; }
.income-empty strong { display: block; font-size: 14px; }
.income-empty p { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
@media (max-width: 1200px) { .income-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .income-summary-card { min-height:104px; padding:15px; } .income-summary-card strong { font-size:20px; } .income-row { grid-template-columns:1fr; gap:7px; } .income-row-meta { flex-wrap:wrap; gap:7px 12px; } .dashboard-income-compact button { flex-wrap:wrap; white-space:normal; } }
