:root {
  --bg: #09111f;
  --surface: #111c2e;
  --surface-2: #18243b;
  --card: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.08);
  --text: #f8fafc;
  --muted: #a7b0c0;
  --accent: #c6a96a;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, #08111e 0%, #0d1627 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, Arial, sans-serif;
}
a { color: inherit; }
button, input, select, textarea {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
}
.app-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 16px calc(100px + env(safe-area-inset-bottom)) 16px;
}
.hero {
  padding: 18px 0 10px;
}
.badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(198,169,106,.12);
  color: #e7d5a8;
  border: 1px solid rgba(198,169,106,.25);
  font-size: 13px;
}
.hero h1 {
  font-size: 34px;
  line-height: 1.05;
  margin: 12px 0 10px;
  letter-spacing: -.03em;
}
.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.grid {
  display: grid;
  gap: 14px;
}
.grid.stats { grid-template-columns: repeat(2, 1fr); margin-top: 18px; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.035));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.card-inner { padding: 16px; }
.stat-label {
  color: var(--muted);
  font-size: 12px;
}
.stat-value {
  font-size: 28px;
  margin-top: 8px;
  font-weight: 700;
  letter-spacing: -.03em;
}
.stat-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
}
.section-title h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
}
.chip-row, .tab-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar, .tab-row::-webkit-scrollbar { display: none; }
.chip, .tab {
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line);
  color: var(--muted);
}
.chip.active, .tab.active {
  background: var(--accent);
  color: #111827;
  border-color: transparent;
  font-weight: 700;
}
.client-list, .task-list, .inbox-list, .offer-list { display: grid; gap: 12px; }
.client-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.client-name { font-weight: 700; }
.muted { color: var(--muted); font-size: 13px; }
.progress {
  height: 10px;
  width: 100%;
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c6a96a, #f1dca9);
  border-radius: 999px;
}
.kpi-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.kpi {
  font-size: 12px;
  color: #d5dbe5;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line);
}
.task-item, .inbox-item, .offer-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.task-main strong, .offer-main strong { display: block; margin-bottom: 6px; }
.pill {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}
.pill.good { background: rgba(34,197,94,.12); color: #93f7b2; border-color: rgba(34,197,94,.18); }
.pill.warn { background: rgba(245,158,11,.12); color: #f7cc76; border-color: rgba(245,158,11,.18); }
.pill.bad { background: rgba(239,68,68,.12); color: #fdb4b4; border-color: rgba(239,68,68,.18); }
.form-grid { display: grid; gap: 12px; }
.input, .textarea, .select {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--text);
}
.textarea { min-height: 130px; resize: vertical; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  padding: 13px 16px;
  border-radius: 16px;
  background: var(--accent);
  color: #111827;
  font-weight: 700;
}
.btn.secondary {
  background: rgba(255,255,255,.05);
  color: var(--text);
  border: 1px solid var(--line);
}
.output {
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 14px;
  color: #e7edf6;
}
.notice {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  background: rgba(9,17,31,.92);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 10px;
  z-index: 10;
}
.nav-btn {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}
.nav-btn.active { background: rgba(198,169,106,.16); color: #f1dfb3; }
.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}
.two-col { display: grid; gap: 14px; }
.footer-space { height: 6px; }
.install-callout {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.small { font-size: 12px; }
@media (min-width: 760px) {
  .grid.stats { grid-template-columns: repeat(4, 1fr); }
  .two-col { grid-template-columns: 1.15fr .85fr; }
}
