/* ============================================================
   PORTKEY APP — Auth, Onboarding Wizard, Dashboard
   ============================================================ */

.minimal-page { min-height: 100vh; display: flex; flex-direction: column; }
.minimal-topbar {
  padding: 24px 32px;
}

/* ── AUTH ── */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 64px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
}
.auth-title { font-family: var(--ff-display); font-size: 28px; margin: 10px 0 6px; }
.auth-subtitle { color: var(--text-dim); font-size: 15px; margin-bottom: 24px; }
.auth-google-btn {
  width: 100%;
  justify-content: center;
  gap: 10px;
  background: var(--bg-card);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-error {
  display: none;
  background: rgba(220,80,80,0.10);
  border: 1px solid rgba(220,80,80,0.25);
  color: #c0392b;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
[data-theme="dark"] .auth-error { color: #ff9d8a; }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-dim); margin-top: 22px; }
.auth-switch a { color: var(--green-light); font-weight: 500; }
.auth-back {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 18px;
}

/* ── ONBOARDING WIZARD ── */
.wizard-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 64px;
}
.wizard-card {
  width: 100%;
  max-width: 560px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 44px 40px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
}
.wizard-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
}
.wizard-progress-dot {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-3);
  overflow: hidden;
}
.wizard-progress-dot::after {
  content: '';
  display: block;
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width 0.4s ease;
}
.wizard-progress-dot.done::after   { width: 100%; }
.wizard-progress-dot.active::after { width: 100%; }

.wizard-step {
  display: none;
  flex: 1;
  flex-direction: column;
}
.wizard-step.active { display: flex; }

.wizard-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 10px;
}
.wizard-question {
  font-family: var(--ff-display);
  font-size: 26px;
  line-height: 1.3;
  margin-bottom: 8px;
}
.wizard-hint { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }

.wizard-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--trans);
  background: var(--bg-card);
  opacity: 0;
  transform: translateY(10px);
  animation: wizardDrip 0.4s ease forwards;
}
.wizard-options .option-card:nth-child(1) { animation-delay: 0.02s; }
.wizard-options .option-card:nth-child(2) { animation-delay: 0.08s; }
.wizard-options .option-card:nth-child(3) { animation-delay: 0.14s; }
.wizard-options .option-card:nth-child(4) { animation-delay: 0.20s; }
.wizard-options .option-card:nth-child(5) { animation-delay: 0.26s; }
.wizard-options .option-card:nth-child(6) { animation-delay: 0.32s; }
@keyframes wizardDrip {
  to { opacity: 1; transform: translateY(0); }
}
.option-card:hover { border-color: var(--border-em); }
.option-card.selected {
  border-color: var(--green);
  background: var(--green-bg);
}
.option-card-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--green-light);
}
.option-card.selected .option-card-icon { background: var(--green); color: #fff; }
.option-card-title { font-weight: 600; font-size: 15px; }
.option-card-body { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.option-card-check {
  margin-left: auto;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  transition: var(--trans);
}
.option-card.selected .option-card-check {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.wizard-yesno { display: flex; gap: 12px; margin-bottom: 20px; }
.wizard-yesno .option-card { flex: 1; justify-content: center; text-align: center; flex-direction: column; gap: 6px; }

.wizard-drip-input {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease;
  margin-bottom: 8px;
}
.wizard-drip-input.open { max-height: 120px; opacity: 1; }

.wizard-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}
.wizard-back {
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--ff-body);
}
.wizard-back:hover { color: var(--text); }
.wizard-required-msg {
  font-size: 13px;
  color: #c0392b;
  margin-bottom: 12px;
  display: none;
}
[data-theme="dark"] .wizard-required-msg { color: #ff9d8a; }

.wizard-final { align-items: center; text-align: center; justify-content: center; }
.wizard-final-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--green-bg);
  color: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.wizard-final-icon .material-symbols-outlined { font-size: 32px; }

/* ── DASHBOARD ── */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
}
.dash-sidebar .nav-logo { margin-bottom: 32px; padding: 0 8px; }
.dash-nav { display: flex; flex-direction: column; gap: 4px; }
.dash-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: var(--trans);
}
.dash-nav a:hover { background: var(--bg-2); color: var(--text); }
.dash-nav a.active { background: var(--green-bg); color: var(--green-light); }
.dash-nav a .material-symbols-outlined { font-size: 20px; }
.dash-sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }

.dash-main { flex: 1; padding: 40px 48px; max-width: 1000px; }
.dash-greeting { font-family: var(--ff-display); font-size: 30px; margin-bottom: 4px; }
.dash-greeting-sub { color: var(--text-dim); margin-bottom: 32px; }

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin-bottom: 24px;
}
.dash-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dash-card-head h3 { font-family: var(--ff-display); font-size: 19px; }
.dash-card-head a { font-size: 13px; color: var(--green-light); font-weight: 500; }

.status-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.status-chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
}
.status-row { font-size: 14px; color: var(--text-dim); margin-top: 8px; }
.status-row strong { color: var(--text); font-weight: 600; }

.checklist { display: flex; flex-direction: column; gap: 10px; }
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-2);
}
.checklist-item .material-symbols-outlined { color: var(--green-light); font-size: 20px; flex-shrink: 0; }

.dash-empty {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 14px;
}
.dash-empty .material-symbols-outlined { font-size: 32px; display: block; margin: 0 auto 10px; color: var(--text-muted); }

.settings-form .form-group { margin-bottom: 18px; }
.settings-checkbox-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.settings-check-pill {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 13px;
  cursor: pointer;
  transition: var(--trans);
  user-select: none;
}
.settings-check-pill.selected { background: var(--green-bg); border-color: var(--green); color: var(--green-light); font-weight: 600; }

@media (max-width: 800px) {
  .dash-layout { flex-direction: column; }
  .dash-sidebar { width: 100%; flex-direction: row; align-items: center; overflow-x: auto; padding: 14px 16px; }
  .dash-sidebar .nav-logo { margin-bottom: 0; }
  .dash-nav { flex-direction: row; }
  .dash-sidebar-footer { display: none; }
  .dash-main { padding: 28px 20px; }
  .wizard-card { padding: 32px 24px; }
}

/* ── HERO DEMO (rotating product mockup, inside a phone frame) ── */
.demo-phone {
  width: 21rem;
  max-width: 100%;
  margin: 0 auto;
  background: var(--bg-card);
  border: 10px solid #14202e;
  border-radius: 2.2rem;
  box-shadow: 0 24px 60px rgba(10,20,35,0.35);
  overflow: hidden;
  position: relative;
}
[data-theme="dark"] .demo-phone { border-color: #05090f; }

.demo-phone-notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 6.5rem; height: 1.15rem;
  background: #14202e;
  border-radius: 0 0 0.9rem 0.9rem;
  z-index: 5;
}
[data-theme="dark"] .demo-phone-notch { background: #05090f; }

.demo-phone-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 4px;
  background: #14202e;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
[data-theme="dark"] .demo-phone-statusbar { background: #05090f; }
.demo-phone-statusicons { display: flex; align-items: center; gap: 4px; }
.demo-phone-statusicons .material-symbols-outlined { font-size: 14px; }

.demo-frame-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 14px;
  background: #14202e;
}
[data-theme="dark"] .demo-frame-head { background: #05090f; }
.demo-frame-title {
  font-family: var(--ff-display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

.demo-body {
  position: relative;
  min-height: 300px;
  padding: 26px 24px;
}
.demo-scene {
  position: absolute;
  inset: 0;
  padding: 26px 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
.demo-scene.active { opacity: 1; transform: translateY(0); pointer-events: auto; }

.demo-scene-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 18px;
  color: var(--text);
}
.demo-scene-title .material-symbols-outlined { color: var(--green-light); font-size: 20px; }

/* checklist scene */
.demo-checklist { display: flex; flex-direction: column; gap: 10px; }
.demo-check-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-2);
  font-size: 14px;
  font-weight: 500;
}
.demo-check-item.done { color: var(--text-dim); }
.demo-check-item.done .material-symbols-outlined { color: var(--green-light); }
.demo-check-item.next { background: var(--green-bg); border: 1px dashed var(--border-em); color: var(--text); }
.demo-check-item.next .material-symbols-outlined { color: var(--green); }

/* upload scene */
.demo-upload-drop {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 22px;
  border: 1.5px dashed var(--border-em);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  margin-bottom: 14px;
}
.demo-upload-drop .material-symbols-outlined { font-size: 26px; color: var(--green-light); }
.demo-upload-file {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg-2);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}
.demo-upload-file .material-symbols-outlined:first-child { color: var(--green-light); }
.demo-upload-name { flex: 1; }
.demo-upload-check { color: var(--border); font-size: 18px; transition: color 0.3s ease 2.1s; }
.demo-scene.active .demo-upload-check { color: var(--green); }
.demo-upload-bar { height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; margin-bottom: 10px; }
.demo-upload-bar-fill { height: 100%; width: 0%; background: var(--green); transition: width 1.8s ease 0.3s; }
.demo-scene.active .demo-upload-bar-fill { width: 100%; }
.demo-upload-done {
  font-size: 12px; font-weight: 600; color: var(--green-light);
  opacity: 0; transition: opacity 0.4s ease 2.2s;
}
.demo-scene.active .demo-upload-done { opacity: 1; }

/* chat scene */
.demo-chat { display: flex; flex-direction: column; gap: 10px; }
.demo-chat-msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
}
.demo-chat-msg.bot { align-self: flex-start; background: var(--bg-2); color: var(--text); border-bottom-left-radius: 4px; }
.demo-chat-msg.user { align-self: flex-end; background: var(--green); color: #fff; font-weight: 500; border-bottom-right-radius: 4px; }

/* reminders scene */
.demo-reminders { display: flex; flex-direction: column; gap: 10px; }
.demo-reminder {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--gold-bg);
  border: 1px solid var(--border-gold);
  font-size: 13.5px;
  font-weight: 500;
}
.demo-reminder .material-symbols-outlined { color: var(--gold); }

.demo-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  border-top: 1px solid var(--border);
}
.demo-nav-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-em);
  transition: var(--trans);
  cursor: pointer;
}
.demo-nav-dot.active { width: 18px; border-radius: 3px; background: var(--green); }

@media (max-width: 900px) {
  .demo-phone { width: 24rem; max-width: 100%; margin-top: 12px; }
  .demo-body { min-height: 260px; }
}

@media (max-width: 480px) {
  .demo-body { min-height: 300px; padding: 22px 20px; }
  .demo-scene { padding: 22px 20px; }
  .demo-scene-title { font-size: 16px; margin-bottom: 20px; }
  .demo-check-item, .demo-reminder { font-size: 15px; padding: 14px 16px; }
  .demo-chat-msg { font-size: 14.5px; padding: 12px 15px; }
  .demo-upload-drop { font-size: 14px; padding: 26px; }
  .demo-upload-file { font-size: 14px; }
}
