:root {
  --purple: #6C4CE0;
  --purple-dark: #4A2FB5;
  --purple-light: #EDE7FB;
  --green: #1DB954;
  --green-light: #E3F8EA;
  --red: #E63946;
  --red-light: #FCE8E9;
  --gold: #FFB300;
  --text: #1A1A2E;
  --text2: #7A8699;
  --text-hint: #A6AFBD;
  --bg: #F5F6FA;
  --card: #FFFFFF;
  --border: #E6E9F0;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--text);
}
#app {
  max-width: 480px; margin: 0 auto; height: 100vh; height: 100dvh;
  background: var(--bg); display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,.08);
}
.screen { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.scroll-area { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px; }
.toolbar {
  display: flex; align-items: center; padding: 14px 16px; background: #fff;
  border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 10px;
}
.toolbar .back-btn { font-size: 20px; cursor: pointer; width: 28px; }
.toolbar .title { font-size: 17px; font-weight: 800; flex: 1; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
.btn {
  display: block; width: 100%; padding: 14px; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; cursor: pointer; text-align: center;
  transition: opacity .15s;
}
.btn:active { opacity: .8; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:disabled { background: #C9BFF2; cursor: not-allowed; }
.btn-outline { background: #fff; border: 1.5px solid var(--purple); color: var(--purple); }
.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 9px 14px; font-size: 13px; width: auto; display: inline-block; }
input, textarea, select {
  width: 100%; padding: 13px 14px; border: none; border-radius: 12px;
  background: var(--bg); font-size: 15px; font-family: inherit; color: var(--text);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--purple); }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px; margin-bottom: 12px;
}
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-green { background: var(--green-light); color: var(--green); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-purple { background: var(--purple-light); color: var(--purple-dark); }
.badge-gold { background: #FFF6DE; color: #B87E00; }
.badge-grey { background: #EFEFF4; color: var(--text2); }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; }
.text-sm { font-size: 12px; } .text-xs { font-size: 11px; }
.text-secondary { color: var(--text2); } .text-hint { color: var(--text-hint); }
.font-bold { font-weight: 700; } .font-black { font-weight: 900; }
.mt-4 {margin-top:4px;} .mt-6 {margin-top:6px;} .mt-8 {margin-top:8px;} .mt-10{margin-top:10px;}
.mt-12{margin-top:12px;} .mt-16{margin-top:16px;} .mt-20{margin-top:20px;} .mt-24{margin-top:24px;}
.mb-8{margin-bottom:8px;} .mb-12{margin-bottom:12px;} .mb-16{margin-bottom:16px;}
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.bottom-nav {
  display: flex; background: #fff; border-top: 1px solid var(--border);
  flex-shrink: 0; padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav .nav-item {
  flex: 1; text-align: center; padding: 10px 0 8px; cursor: pointer;
  color: var(--text2); font-size: 10px; font-weight: 700;
}
.bottom-nav .nav-item.active { color: var(--purple); }
.bottom-nav .nav-icon { font-size: 20px; display: block; margin-bottom: 2px; }
.gradient-hero {
  background: linear-gradient(135deg, #D7FCEB, #69ABF5);
  border-radius: 16px; height: 150px; display: flex; align-items: center;
  justify-content: center; font-size: 48px;
}
.quick-tile { flex: 1; text-align: center; cursor: pointer; }
.quick-circle {
  width: 52px; height: 52px; border-radius: 50%; background: var(--purple-light);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  margin: 0 auto 6px;
}
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--purple-light);
  border-top-color: var(--purple-dark); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.center-col { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; padding: 24px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text2); font-size: 13px; }
.cab-option {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  border-radius: 12px; border: 1.5px solid var(--border); margin-bottom: 10px; cursor: pointer;
}
.cab-option.selected { background: var(--purple-light); border-color: var(--purple); }
.avatar-circle {
  width: 56px; height: 56px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 22px; color: var(--purple-dark);
}
.alert-banner { padding: 12px 14px; border-radius: 10px; font-size: 12.5px; margin-bottom: 12px; }
.toast {
  position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: 24px;
  font-size: 13px; z-index: 999; opacity: 0; transition: opacity .3s; pointer-events: none;
}
.toast.show { opacity: 1; }
.menu-tile {
  display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 13px 14px; margin-bottom: 8px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.menu-tile .chev { margin-left: auto; color: var(--text-hint); }
