/* style.css — ReportFlow */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #1a73e8;
  --brand-light: #e8f0fe;
  --text: #1f1f1f;
  --text-muted: #6b6b6b;
  --text-hint: #aaa;
  --bg: #ffffff;
  --bg2: #f8f9fa;
  --border: rgba(0,0,0,0.10);
  --border-md: rgba(0,0,0,0.18);
  --radius: 8px;
  --radius-lg: 12px;
  --green: #34a853;
  --red: #ea4335;
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); line-height: 1.5; }

/* ── Nav shared ── */
nav { display: flex; align-items: center; gap: 12px; padding: 0 24px; height: 54px; border-bottom: 1px solid var(--border); background: #fff; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--text); }
.logo-icon { width: 30px; height: 30px; background: var(--brand); border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── Landing ── */
body.landing { background: var(--bg2); }
.btn-google { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 8px 18px; border: 1px solid var(--border-md); border-radius: var(--radius); background: #fff; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; text-decoration: none; transition: background 0.15s; }
.btn-google:hover { background: var(--bg2); }

.hero { max-width: 1000px; margin: 0 auto; padding: 80px 24px 60px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.badge-pill { display: inline-block; background: var(--brand-light); color: var(--brand); font-size: 12px; font-weight: 500; padding: 4px 12px; border-radius: 20px; margin-bottom: 16px; }
h1 { font-size: 42px; font-weight: 700; line-height: 1.15; margin-bottom: 16px; }
.hero-sub { font-size: 16px; color: var(--text-muted); line-height: 1.7; margin-bottom: 28px; }
.btn-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: #fff; padding: 12px 24px; border-radius: var(--radius); font-size: 15px; font-weight: 500; text-decoration: none; transition: opacity 0.15s; }
.btn-cta:hover { opacity: 0.88; }
.hero-note { font-size: 12px; color: var(--text-hint); margin-top: 10px; }

.report-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.report-card-header { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; margin-bottom: 16px; }
.report-dot { width: 10px; height: 10px; border-radius: 50%; }
.report-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rm { background: var(--bg2); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.rm-label { font-size: 11px; color: var(--text-hint); }
.rm-value { font-size: 20px; font-weight: 600; }
.rm-delta { font-size: 11px; font-weight: 500; }
.rm-delta.up { color: var(--green); }
.rm-delta.dn { color: var(--red); }

.steps { max-width: 800px; margin: 0 auto 60px; padding: 0 24px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.step { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 20px; flex: 1; }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-light); color: var(--brand); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-body { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.step-body strong { font-weight: 600; }
.step-body span { color: var(--text-muted); font-size: 12px; }
.step-arrow { color: var(--text-hint); font-size: 18px; }

/* ── App shell ── */
body.app-shell { background: var(--bg2); min-height: 100vh; }
.app-nav { position: sticky; top: 0; z-index: 10; background: #fff; }
.nav-links { display: flex; gap: 2px; margin-left: 16px; }
.nav-btn { background: none; border: none; padding: 6px 14px; border-radius: 20px; font-size: 13px; color: var(--text-muted); cursor: pointer; font-family: inherit; transition: all 0.15s; }
.nav-btn:hover { background: var(--bg2); color: var(--text); }
.nav-btn.active { background: var(--bg2); color: var(--text); font-weight: 500; }
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-light); color: var(--brand); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.nav-email { font-size: 12px; color: var(--text-muted); }

.app-main { max-width: 680px; margin: 0 auto; padding: 28px 20px 60px; }
.page { display: none; }
.page.active { display: block; }
.page-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.page-header h2 { font-size: 20px; font-weight: 600; }
.page-header p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ── Forms ── */
.form-section { margin-bottom: 20px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.client-radio-list { display: flex; flex-direction: column; gap: 8px; }
.client-radio { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; background: #fff; transition: border-color 0.15s; }
.client-radio.selected { border-color: var(--brand); background: var(--brand-light); }
.client-radio input { width: auto; }
.client-radio-info { display: flex; flex-direction: column; gap: 2px; }
.client-radio-name { font-size: 14px; font-weight: 500; }
.client-radio-url  { font-size: 12px; color: var(--text-muted); }

.month-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.month-chip { padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 13px; cursor: pointer; background: #fff; color: var(--text); transition: all 0.15s; }
.month-chip:hover { border-color: var(--brand); }
.month-chip.selected { background: var(--brand); color: #fff; border-color: var(--brand); }

.checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); cursor: default; }
.checklist input { width: auto; }

.quota-bar { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; padding: 8px 12px; background: var(--bg2); border-radius: var(--radius); }

/* ── Buttons ── */
.btn-primary { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; border: none; padding: 9px 20px; border-radius: var(--radius); font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; text-decoration: none; transition: opacity 0.15s; }
.btn-primary:hover { opacity: 0.88; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--text); border: 1px solid var(--border-md); padding: 9px 20px; border-radius: var(--radius); font-size: 13px; cursor: pointer; font-family: inherit; transition: background 0.15s; }
.btn-secondary:hover { background: var(--bg2); }
.btn-danger { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--red); border: 1px solid var(--red); padding: 9px 20px; border-radius: var(--radius); font-size: 13px; cursor: pointer; font-family: inherit; transition: background 0.15s; }
.btn-danger:hover { background: #fff2f1; }
.btn-generate { width: 100%; padding: 13px; font-size: 15px; justify-content: center; }
.link-btn { background: none; border: none; color: var(--brand); font-size: inherit; cursor: pointer; text-decoration: underline; }

/* ── Progress ── */
.progress-card { background: var(--bg2); border-radius: var(--radius-lg); padding: 20px; text-align: center; }
.progress-label { font-size: 14px; font-weight: 500; margin-bottom: 14px; }
.progress-track { background: var(--border); border-radius: 4px; height: 6px; overflow: hidden; }
.progress-fill { background: var(--brand); height: 100%; border-radius: 4px; width: 0; transition: width 0.4s ease; }
.progress-pct { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* ── Done card ── */
.done-card { display: flex; align-items: center; gap: 14px; background: #f0faf3; border: 1px solid #34a853; border-radius: var(--radius-lg); padding: 16px 20px; }
.done-icon { flex-shrink: 0; }
.done-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.done-info strong { font-size: 14px; }
.done-info span { font-size: 12px; color: var(--text-muted); }

/* ── Client cards ── */
.client-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 18px; margin-bottom: 10px; }
.client-avatar { width: 38px; height: 38px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; flex-shrink: 0; }
.client-info { flex: 1; }
.client-name { font-size: 14px; font-weight: 500; }
.client-meta { font-size: 12px; color: var(--text-muted); }

/* ── Color palette ── */
.color-palette { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0; }
.color-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform 0.1s, border-color 0.1s; flex-shrink: 0; }
.color-swatch:hover { transform: scale(1.18); }
.color-swatch.selected { border-color: #fff; box-shadow: 0 0 0 2px currentColor, 0 0 0 3px rgba(0,0,0,0.25); }

/* ── Add client form ── */
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-top: 16px; }
.form-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.field input { border: 1px solid var(--border-md); border-radius: var(--radius); padding: 8px 12px; font-size: 13px; font-family: inherit; color: var(--text); }
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,115,232,0.15); }
.field small { font-size: 11px; color: var(--text-hint); }
.input-prefix-wrap { display: flex; align-items: center; border: 1px solid var(--border-md); border-radius: var(--radius); overflow: hidden; }
.input-prefix-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26,115,232,0.15); }
.input-prefix { padding: 8px 8px 8px 12px; font-size: 13px; color: var(--text-muted); background: var(--bg2); white-space: nowrap; border-right: 1px solid var(--border-md); }
.input-prefix-wrap input { border: none; border-radius: 0; box-shadow: none; flex: 1; min-width: 0; }
.input-prefix-wrap input:focus { outline: none; box-shadow: none; border-color: transparent; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* ── Report history ── */
.report-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px 18px; margin-bottom: 8px; }
.report-icon { width: 34px; height: 34px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.report-info { flex: 1; }
.report-name { font-size: 13px; font-weight: 500; }
.report-meta { font-size: 11px; color: var(--text-muted); }

/* ── Misc ── */
.empty-hint { font-size: 14px; color: var(--text-muted); padding: 20px 0; }
.error-msg { color: var(--red); font-size: 13px; margin-top: 10px; }

@media (max-width: 600px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 40px 20px; }
  .hero-visual { display: none; }
  h1 { font-size: 30px; }
  .steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
  .field-row { grid-template-columns: 1fr; }
}
