:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #6b7280;
  --line: #dde3ec;
  --rose: #d84f68;
  --coral: #f08a5d;
  --teal: #188f8b;
  --green: #4b9560;
  --blue: #4568dc;
  --amber: #b97916;
  --blocked: #aa3448;
  --shadow: 0 14px 40px rgba(22, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(216, 79, 104, 0.10), transparent 34%),
    linear-gradient(225deg, rgba(24, 143, 139, 0.10), transparent 38%),
    var(--bg);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  padding: 22px 16px;
  background: rgba(255, 255, 255, 0.82);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--teal));
  border-radius: 8px;
  font-weight: 800;
}

.brand span,
.eyebrow,
.muted {
  color: var(--muted);
}

.brand span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.nav-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  text-align: left;
}

.nav-button svg,
.icon-button svg,
.primary-button svg,
.secondary-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.nav-button.active {
  color: var(--ink);
  background: #eef5f4;
}

.shell {
  margin-left: 250px;
  padding: 28px;
}

.topbar {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
}

h2 {
  margin-bottom: 14px;
  font-size: 21px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.top-actions,
.toolbar,
.filters,
.chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.icon-button,
.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

.icon-button {
  width: 42px;
  padding: 0;
}

.primary-button {
  padding: 0 14px;
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.secondary-button {
  padding: 0 12px;
  text-decoration: none;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(260px, 0.8fr);
  gap: 18px;
  min-height: 340px;
  align-items: stretch;
}

.hero-panel,
.panel,
.task-table-wrap,
.vendor-card,
.doc-card,
.day-event {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  align-content: center;
  padding: 38px;
  overflow: hidden;
}

.couple {
  margin-bottom: 8px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
}

.hero-subtitle {
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 20px;
}

.heart {
  color: var(--rose);
}

.days {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}

.days strong {
  font-size: 76px;
  line-height: 0.88;
}

.progress-track {
  width: 100%;
  height: 14px;
  overflow: hidden;
  background: #e5e9f0;
  border-radius: 999px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--coral), var(--teal));
}

.hero-side {
  display: grid;
  gap: 18px;
}

.panel {
  padding: 20px;
}

.panel.tight {
  padding: 16px;
}

.dashboard-grid,
.budget-grid,
.vendor-grid,
.doc-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.dashboard-grid .panel:first-child {
  grid-column: span 2;
}

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

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.metric strong {
  display: block;
  margin-bottom: 4px;
  font-size: 28px;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 36px;
}

.box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 5px;
}

.status-pill,
.tag,
.priority {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-Todo {
  color: var(--blue);
  background: rgba(69, 104, 220, 0.11);
}

.status-In-Progress {
  color: var(--teal);
  background: rgba(24, 143, 139, 0.12);
}

.status-Waiting {
  color: var(--amber);
  background: rgba(185, 121, 22, 0.13);
}

.status-Done {
  color: var(--green);
  background: rgba(75, 149, 96, 0.14);
}

.status-Blocked {
  color: var(--blocked);
  background: rgba(170, 52, 72, 0.12);
}

.priority {
  color: var(--ink);
  background: #edf0f5;
}

.tag {
  color: #41505f;
  background: #edf5f4;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 96px 1fr 36px;
  gap: 10px;
  align-items: center;
}

.bar {
  height: 12px;
  overflow: hidden;
  background: #e6ebf2;
  border-radius: 999px;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.dependency-chain {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dependency-stack {
  display: grid;
  gap: 10px;
}

.dependency-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(170, 52, 72, 0.22);
  border-radius: 8px;
  background: rgba(170, 52, 72, 0.06);
}

.dependency-card p {
  margin-bottom: 0;
}

.blocked-note {
  color: var(--blocked);
}

.dependency-node {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dependency-node.blocked {
  border-color: rgba(170, 52, 72, 0.35);
  color: var(--blocked);
  background: rgba(170, 52, 72, 0.08);
}

.arrow {
  color: var(--muted);
}

.filters {
  justify-content: space-between;
  margin-bottom: 14px;
}

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

.input {
  min-width: min(320px, 100%);
}

.task-table-wrap {
  overflow-x: auto;
}

.task-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.task-table th,
.task-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.task-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.task-title {
  font-weight: 800;
}

.task-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.task-command,
.task-editor {
  margin-bottom: 18px;
}

.task-command,
.task-editor-head,
.form-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-command,
.task-editor-head {
  justify-content: space-between;
}

.task-command p,
.task-editor-head p {
  margin-bottom: 0;
}

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

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

.form-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.form-grid .wide {
  grid-column: span 3;
}

.textarea {
  min-height: 86px;
  padding-top: 10px;
  resize: vertical;
}

.multi-select {
  min-height: 112px;
  padding-top: 8px;
}

.form-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.table-action {
  width: 36px;
  min-height: 36px;
}

.danger {
  color: var(--blocked);
}

.hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.file-picker {
  cursor: pointer;
}

.timeline-months {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.month-row {
  display: grid;
  grid-template-columns: 100px 1fr 42px;
  gap: 12px;
  align-items: center;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.budget-card {
  display: grid;
  gap: 10px;
}

.budget-number {
  font-size: 36px;
  font-weight: 850;
}

.vendor-card,
.doc-card {
  padding: 18px;
}


.vendor-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.linked-list {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #40505f;
  font-size: 14px;
}

.linked-list strong {
  color: #17212b;
  font-size: 13px;
}

.vendor-money {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 750;
}

.vendor-money span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef4f8;
  color: #17212b;
}

.vendor-meta,
.doc-meta {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: #40505f;
  font-size: 14px;
}

.day-line {
  position: relative;
  display: grid;
  gap: 22px;
}

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

.day-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.day-group-head h2 {
  margin-bottom: 0;
}

.day-group-events {
  display: grid;
  gap: 12px;
}

.day-event {
  display: grid;
  grid-template-columns: 88px 1fr minmax(128px, auto);
  gap: 18px;
  align-items: start;
  padding: 18px;
}

.day-event time {
  color: var(--rose);
  font-size: 22px;
  font-weight: 850;
}

.day-event-side {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.day-mode .sidebar,
.day-mode .topbar {
  display: none;
}

.day-mode .shell {
  margin-left: 0;
  padding: 20px;
}

.day-mode #view-day {
  display: block;
}

.day-mode .view:not(#view-day) {
  display: none;
}

@media (max-width: 980px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    height: auto;
    padding: 12px;
    overflow-x: auto;
  }

  .brand {
    margin-bottom: 10px;
  }

  #nav {
    display: flex;
    gap: 6px;
  }

  .nav-button {
    flex: 0 0 auto;
    width: auto;
  }

  .shell {
    margin-left: 0;
    padding: 18px;
  }

  .hero,
  .dashboard-grid,
  .budget-grid,
  .vendor-grid,
  .doc-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid .panel:first-child {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .topbar,
  .filters,
  .day-event,
  .timeline-item {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .hero-panel {
    padding: 24px;
  }

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

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

  .form-grid .wide {
    grid-column: auto;
  }

  .task-command,
  .task-editor-head,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .days strong {
    font-size: 56px;
  }

  .month-row,
  .bar-row {
    grid-template-columns: 1fr;
  }

  .day-event-side {
    justify-items: start;
  }
}
