/* ==========================================================================
   Csabazár - Ultrakönnyű, Villámgyors Natív Android Stílus
   Nulla külső framework, 0ms betöltési idő, azonnali megjelenítés
   ========================================================================== */

:root {
  --csb-primary: #f2592f;
  --csb-primary-dark: #d84315;
  --csb-primary-light: #ffede8;
  --csb-green: #2e7d32;
  --csb-green-bg: #e8f5e9;
  
  --bg-app: #f4f6f8;
  --surface: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  
  --safe-bottom: env(safe-area-inset-bottom, 14px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  user-select: none;
}

/* 1. Android Top Bar */
.android-top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.brand-wrap {
  display: flex;
  align-items: center;
}

.brand-logo-img {
  height: 38px;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

/* Android Státusz Jelvény */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 16px;
  background: var(--csb-green-bg);
  color: var(--csb-green);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(46, 125, 50, 0.2);
}

.status-badge.offline {
  background: #fff3e0;
  color: #e65100;
  border-color: rgba(230, 81, 0, 0.2);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* 2. Nézetek */
.main-viewport {
  flex: 1;
  padding: 14px;
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

/* 3. Natív Android Kártya */
.card-android {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 16px;
}

.card-header-banner {
  background: linear-gradient(135deg, var(--csb-primary), var(--csb-primary-dark));
  color: #ffffff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header-banner h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.card-header-banner span {
  font-size: 11px;
  opacity: 0.9;
}

.tier-badge {
  background: #ffffff;
  color: var(--csb-primary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.card-body-content {
  padding: 20px 16px 16px;
  text-align: center;
}

.qr-box {
  background: #ffffff;
  padding: 10px;
  border-radius: 12px;
  border: 2px dashed #cbd5e1;
  display: inline-block;
  margin-bottom: 14px;
}

.qr-box canvas {
  display: block;
}

/* Folyamatsáv */
.progress-bar-wrap {
  max-width: 220px;
  height: 6px;
  background: var(--csb-primary-light);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto 8px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--csb-primary);
  width: 100%;
  transition: width 1s linear;
}

.countdown-label {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.countdown-label strong {
  color: var(--csb-primary);
}

/* Ügyfélsáv */
.user-meta-strip {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  border: 1px solid #edf2f7;
}

.user-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.user-id {
  font-size: 12px;
  font-family: monospace;
  color: var(--text-secondary);
  margin-top: 2px;
}

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

.points-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--csb-green);
}

.points-lbl {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 700;
}

/* 4. Bejelentkezés Doboz */
.login-card {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.login-card-head {
  background: var(--csb-primary);
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-card-body {
  padding: 18px 16px;
}

.form-row {
  margin-bottom: 14px;
}

.form-row label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 5px;
}

.form-row input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  outline: none;
}

.form-row input:focus {
  border-color: var(--csb-primary);
  box-shadow: 0 0 0 2px var(--csb-primary-light);
}

.btn-primary-action {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  background: var(--csb-primary);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
}

.btn-biometric-action {
  width: 100%;
  padding: 11px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--text-primary);
  border: 1px solid #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.btn-register-action {
  width: 100%;
  padding: 11px;
  border-radius: 8px;
  background: var(--csb-green);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
}

/* 5. Blokktallózó */
.receipt-entry {
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.receipt-store-title {
  font-size: 14px;
  font-weight: 700;
}

.receipt-date-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.receipt-amount-badge {
  font-size: 15px;
  font-weight: 800;
  color: var(--csb-primary);
}

.offline-alert {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  margin-bottom: 12px;
}

.offline-alert h3 {
  color: #e65100;
  font-size: 14px;
  margin-bottom: 4px;
}

.offline-alert p {
  font-size: 12px;
  color: #5d4037;
}

/* 6. Android Bottom Navigation */
.android-nav-bar {
  position: sticky;
  bottom: 0;
  z-index: 100;
  background: var(--surface);
  border-top: 1px solid var(--border);
  height: 60px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 16px var(--safe-bottom);
}

.nav-tab-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 20px;
}

.nav-tab-pill {
  width: 50px;
  height: 26px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.nav-tab-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--text-secondary);
}

.nav-tab-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.nav-tab-btn.active .nav-tab-pill {
  background-color: var(--csb-primary-light);
}

.nav-tab-btn.active svg {
  fill: var(--csb-primary);
}

.nav-tab-btn.active .nav-tab-text {
  color: var(--csb-primary);
  font-weight: 700;
}
