:root {
  --bg: #eef3f1;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --text: #16211d;
  --muted: #60716a;
  --line: rgba(22, 33, 29, 0.08);
  --primary: #0d8a6a;
  --primary-soft: #d8f4eb;
  --accent: #f3b562;
  --danger: #c85d52;
  --shadow: 0 20px 60px rgba(20, 41, 35, 0.12);
  --radius: 24px;
  --phone-width: 390px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(13, 138, 106, 0.12), transparent 26%),
    linear-gradient(135deg, #f6f7f2 0%, #edf4f2 48%, #e5efe9 100%);
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(244, 247, 245, 0.85);
  backdrop-filter: blur(18px);
}

.brand h1,
.workspace-header h2,
.notes-panel h3,
.doc-summary h2 {
  margin: 0;
}

.brand {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.brand-badge,
.section-tag,
.tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand p,
.doc-summary li,
.legend span,
.meta,
.subtle,
.list-plain li,
.status-card p,
.timeline li,
.menu-list li,
.rules li {
  color: var(--muted);
}

.doc-summary,
.notes-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.doc-summary {
  padding: 18px 20px;
}

.doc-summary ul,
.screen-nav,
.list-plain,
.timeline,
.menu-list,
.rules {
  padding: 0;
  margin: 0;
  list-style: none;
}

.doc-summary ul {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.screen-nav {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.nav-item {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: 180ms ease;
}

.nav-item:hover,
.nav-item.active {
  transform: translateX(4px);
  background: var(--panel-strong);
  border-color: rgba(13, 138, 106, 0.18);
  box-shadow: 0 16px 32px rgba(14, 49, 39, 0.1);
}

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

.nav-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  padding: 28px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
}

.dot-primary {
  background: var(--primary);
}

.dot-muted {
  background: #b8c7c0;
}

.prototype-stage {
  display: grid;
  grid-template-columns: minmax(360px, 460px) minmax(320px, 1fr);
  gap: 28px;
  align-items: start;
}

.phone-frame {
  position: sticky;
  top: 28px;
  width: min(100%, var(--phone-width));
  padding: 14px;
  border-radius: 40px;
  background: linear-gradient(160deg, #1e2a26 0%, #0f1513 100%);
  box-shadow: 0 26px 70px rgba(8, 16, 14, 0.3);
}

.phone-notch {
  width: 132px;
  height: 28px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: #0a0f0d;
}

.phone-screen {
  overflow: hidden;
  min-height: 780px;
  background: #f7faf8;
  border-radius: 30px;
}

.notes-panel {
  padding: 24px;
  display: grid;
  gap: 18px;
}

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

.page {
  min-height: 780px;
  padding: 20px 18px 28px;
  display: grid;
  gap: 16px;
  align-content: start;
  background:
    radial-gradient(circle at top right, rgba(243, 181, 98, 0.18), transparent 22%),
    linear-gradient(180deg, #f7faf8 0%, #f3f7f4 100%);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.signal {
  font-size: 12px;
  color: var(--muted);
}

.hero-card,
.card,
.stats-grid .stat,
.task-card,
.income-card,
.menu-card,
.status-card {
  background: var(--panel-strong);
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 34px rgba(19, 35, 31, 0.06);
}

.hero-card {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.hero-card h3,
.card h3,
.task-card h4,
.income-card h4,
.menu-card h4,
.status-card h4 {
  margin: 0;
}

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

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

.metric {
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

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

.btn-row,
.chip-row,
.quick-grid,
.stats-grid,
.list-stack {
  display: grid;
  gap: 12px;
}

.btn-row {
  grid-template-columns: repeat(2, 1fr);
}

.quick-grid,
.stats-grid {
  grid-template-columns: repeat(2, 1fr);
}

.btn,
.ghost-btn,
.chip {
  border: none;
  border-radius: 18px;
  font: inherit;
}

button {
  cursor: pointer;
}

.btn,
.ghost-btn {
  padding: 14px 16px;
  font-weight: 700;
}

.btn {
  background: var(--primary);
  color: #fff;
}

.ghost-btn {
  background: #eef4f1;
  color: var(--text);
}

.chip-row {
  grid-template-columns: repeat(3, 1fr);
}

.chip {
  padding: 10px 12px;
  background: #eef4f1;
  color: var(--text);
  text-align: center;
}

.chip:hover,
.action-card:hover,
.menu-button:hover,
.nav-chip:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.stat,
.card,
.status-card {
  padding: 16px;
}

.action-card {
  border: 1px solid var(--line);
  text-align: left;
}

.stat strong,
.card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}

.task-card,
.income-card,
.menu-card {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.primary {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge.warn {
  background: #fff1df;
  color: #b87319;
}

.badge.danger {
  background: #fde7e4;
  color: var(--danger);
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #e8efec;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d8a6a 0%, #5cb89e 100%);
}

.timeline,
.list-plain,
.rules,
.menu-list {
  display: grid;
  gap: 10px;
}

.timeline li,
.list-plain li,
.menu-list li,
.rules li {
  padding: 12px 14px;
  border-radius: 16px;
  background: #f4f7f5;
}

.bottom-nav {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
}

.nav-chip {
  border: none;
  background: transparent;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  border-radius: 14px;
  padding: 10px 4px;
}

.nav-chip.active {
  color: var(--primary);
  font-weight: 700;
  background: #eef8f4;
}

.menu-card {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.menu-button {
  width: 100%;
  border: 1px solid var(--line);
  text-align: left;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 12px;
  background: #eef4f1;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.text-link {
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  padding: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 18px);
  background: rgba(22, 33, 29, 0.92);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: 180ms ease;
  z-index: 1000;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.field {
  display: grid;
  gap: 8px;
}

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

.input-like {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f7faf8;
}

.input-like.split {
  gap: 12px;
}

.mini-btn {
  border: none;
  border-radius: 12px;
  background: #e6f3ee;
  color: var(--primary);
  padding: 8px 12px;
  font-weight: 700;
}

.search-bar,
.tab-bar,
.grid-six,
.upload-grid,
.ladder {
  display: grid;
  gap: 12px;
}

.search-bar {
  grid-template-columns: 1fr auto;
}

.tab-bar {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-btn {
  border: none;
  border-radius: 999px;
  background: #eef4f1;
  color: var(--muted);
  padding: 10px 14px;
  font-weight: 700;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.grid-six {
  grid-template-columns: repeat(3, 1fr);
}

.entry-card,
.upload-box,
.ladder-step {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  padding: 14px;
}

.entry-card {
  text-align: left;
}

.entry-card strong,
.entry-card span {
  display: block;
}

.entry-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.task-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.task-row:first-of-type {
  border-top: 0;
}

.money {
  font-weight: 800;
  margin-bottom: 8px;
}

.align-right {
  text-align: right;
}

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

.upload-box {
  min-height: 88px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f7faf8;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 21, 19, 0.38);
}

.overlay-card {
  width: 100%;
  border-radius: 24px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.qr-box {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #eef4f1;
  font-weight: 800;
}

.ladder {
  grid-template-columns: repeat(3, 1fr);
}

.ladder-step.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(13, 138, 106, 0.18);
}

.banner-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.disabled-card {
  opacity: 0.58;
}

.scrollable {
  overflow-x: auto;
}

.auth-page {
  min-height: 780px;
}

.divider {
  height: 1px;
  background: var(--line);
}

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

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

  .prototype-stage {
    grid-template-columns: 1fr;
  }

  .phone-frame {
    position: static;
  }
}

@media (max-width: 720px) {
  .workspace,
  .sidebar {
    padding: 18px;
  }

  .workspace-header {
    align-items: start;
    flex-direction: column;
  }

  .btn-row,
  .quick-grid,
  .stats-grid,
  .chip-row,
  .grid-six,
  .upload-grid,
  .ladder,
  .search-bar {
    grid-template-columns: 1fr;
  }

  .phone-frame {
    width: 100%;
  }
}
