/* ============================================
   TESSERAMI — ANDE Point Loyalty App
   Brand: ANDE (#FFE500 yellow + #010811 dark)
   Font: Nunito Sans
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:opsz,wght@6..12,400;6..12,500;6..12,600;6..12,700;6..12,800;6..12,900&display=swap');

:root {
  --bg: #010811;
  --bg2: #0A1628;
  --bg3: #111E33;
  --card: #0D1A2D;
  --card-border: rgba(255,229,0,0.08);
  --card-hover: #122240;
  --yellow: #FFE500;
  --yellow-dim: #D4BF00;
  --yellow-glow: rgba(255,229,0,0.15);
  --yellow-soft: rgba(255,229,0,0.06);
  --white: #FFFFFF;
  --text: #F0F2F5;
  --text-secondary: #8A95A8;
  --muted: #5A6578;
  --success: #34D399;
  --warning: #FBBF24;
  --danger: #F87171;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-glow: 0 4px 20px rgba(255,229,0,0.2);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --nav-height: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito Sans', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === BACKGROUND DECORATION === */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-decor::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,229,0,0.06) 0%, transparent 70%);
  top: -150px;
  right: -150px;
  animation: floatBlob 20s ease-in-out infinite alternate;
}

.bg-decor::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,229,0,0.03) 0%, transparent 70%);
  bottom: 50px;
  left: -100px;
  animation: floatBlob2 25s ease-in-out infinite alternate;
}

@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 40px) scale(1.15); }
}

@keyframes floatBlob2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20px, -30px) scale(1.1); }
}

/* Subtle grid pattern */
.bg-dots {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  background-image: radial-gradient(circle, rgba(255,229,0,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* === LOGO === */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.logo-img {
  height: 38px;
  width: auto;
  flex-shrink: 0;
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--yellow);
  line-height: 1.1;
}

.logo-sub {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* === TOP BAR === */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(1,8,17,0.88);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(255,229,0,0.06);
  padding: 12px 20px;
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.badge-chain {
  padding: 6px 14px;
  background: var(--yellow);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,229,0,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(255,229,0,0); }
}

.mini-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 6px 14px;
  transition: all 0.25s ease;
  background: transparent;
}

.mini-link:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(255,229,0,0.1);
}

.mini-link.active {
  background: var(--yellow);
  color: var(--bg);
  border-color: var(--yellow);
}

/* === MAIN CONTENT === */
main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 100px;
}

body.has-bottom-nav main {
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 24px);
}

/* === TYPOGRAPHY === */
h1, h2, h3 {
  font-family: 'Nunito Sans', sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.15;
  font-weight: 900;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
}

h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

h3 {
  font-size: 1.1rem;
  font-weight: 800;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  font-size: 0.68rem;
  color: var(--yellow);
  margin-bottom: 6px;
}

.lead {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 600px;
}

.yellow-text {
  color: var(--yellow);
}

/* === CARDS & PANELS === */
.panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.glass-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-dim));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255,229,0,0.15);
}

.glass-card:hover::before {
  opacity: 1;
}

.glass-card h3 {
  color: var(--text);
  margin-bottom: 6px;
}

.glass-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--bg);
  font-weight: 900;
  font-size: 1rem;
  margin-bottom: 12px;
}

/* === HERO LOYALTY CARD === */
.loyalty-card {
  position: relative;
  background: linear-gradient(145deg, #0D1A2D 0%, #1A2944 50%, #0D1A2D 100%);
  border: 2px solid rgba(255,229,0,0.2);
  border-radius: 22px;
  padding: 28px 24px;
  color: white;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(255,229,0,0.08);
  animation: cardEntry 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  max-width: 420px;
  margin: 0 auto;
}

.loyalty-card::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,229,0,0.12) 0%, transparent 70%);
  top: -60px;
  right: -40px;
  border-radius: 50%;
}

.loyalty-card::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,229,0,0.06) 0%, transparent 70%);
}

.loyalty-card .card-logo-img {
  height: 36px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.loyalty-card .card-name {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.loyalty-card .card-email {
  font-size: 0.8rem;
  opacity: 0.5;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.loyalty-card .card-code {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: rgba(255,229,0,0.12);
  border: 1px solid rgba(255,229,0,0.2);
  padding: 8px 14px;
  border-radius: 10px;
  display: inline-block;
  position: relative;
  z-index: 1;
  color: var(--yellow);
}

.loyalty-card .card-tier {
  position: absolute;
  top: 28px;
  right: 24px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--bg);
  z-index: 1;
}

@keyframes cardEntry {
  from {
    opacity: 0;
    transform: translateY(30px) rotateX(10deg) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

/* === STATS GRID === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.metric-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.metric-card:hover::after {
  transform: scaleX(1);
}

.metric-card p {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.metric-card h3 {
  font-size: 1.6rem;
  color: var(--text);
}

.metric-card small {
  color: var(--success);
  font-weight: 700;
  font-size: 0.78rem;
}

.metric-card.accent-yellow { border-left: 4px solid var(--yellow); }
.metric-card.accent-success { border-left: 4px solid var(--success); }
.metric-card.accent-warning { border-left: 4px solid var(--warning); }
.metric-card.accent-muted { border-left: 4px solid var(--text-secondary); }

/* === TIER BADGES === */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.tier-Starter {
  background: rgba(138,149,168,0.15);
  border: 1px solid rgba(138,149,168,0.3);
  color: #8A95A8;
}

.tier-Silver {
  background: rgba(192,206,224,0.12);
  border: 1px solid rgba(192,206,224,0.25);
  color: #C0CEE0;
}

.tier-Gold {
  background: rgba(255,229,0,0.12);
  border: 1px solid rgba(255,229,0,0.3);
  color: var(--yellow);
  box-shadow: 0 0 16px rgba(255,229,0,0.1);
}

.tier-Platinum {
  background: linear-gradient(135deg, rgba(255,229,0,0.2), rgba(255,170,0,0.15));
  border: 1px solid rgba(255,229,0,0.4);
  color: var(--yellow);
  box-shadow: 0 0 20px rgba(255,229,0,0.15);
}

/* === PROGRESS RING === */
.progress-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.progress-ring {
  width: 80px;
  height: 80px;
  position: relative;
}

.progress-ring svg {
  transform: rotate(-90deg);
  width: 80px;
  height: 80px;
}

.progress-ring .ring-bg {
  fill: none;
  stroke: var(--bg3);
  stroke-width: 6;
}

.progress-ring .ring-fill {
  fill: none;
  stroke: url(#progressGrad);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-ring .ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--text);
}

/* === POINTS DISPLAY === */
.points-display {
  text-align: center;
  padding: 20px 0;
}

.points-number {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--yellow);
  line-height: 1;
  animation: countUp 1s ease-out both;
  text-shadow: 0 0 30px rgba(255,229,0,0.2);
}

.points-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === BUTTONS === */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xs);
  padding: 12px 20px;
  color: var(--text);
  text-decoration: none;
  background: var(--bg3);
  cursor: pointer;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--yellow);
  color: var(--yellow);
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn-primary {
  border: none;
  background: var(--yellow);
  color: var(--bg);
  font-weight: 900;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  color: var(--bg);
  box-shadow: 0 6px 25px rgba(255,229,0,0.35);
  transform: translateY(-2px);
  background: #FFF033;
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
  border-radius: 8px;
}

/* === CTA ROW === */
.cta-row {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* === CARD GRID === */
.card-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* === FORMS === */
.form-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

input, select, textarea {
  padding: 13px 16px;
  border-radius: var(--radius-xs);
  border: 1.5px solid rgba(255,255,255,0.08);
  background: var(--bg2);
  color: var(--text);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.92rem;
  transition: all 0.25s ease;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255,229,0,0.08);
  background: var(--bg3);
}

input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--yellow);
  cursor: pointer;
}

.check label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
}

select option {
  background: var(--bg2);
  color: var(--text);
}

/* === FLASH MESSAGES === */
.flash-stack {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 16px;
  position: relative;
  z-index: 90;
}

.flash {
  padding: 14px 18px;
  border-radius: var(--radius-xs);
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  color: var(--success);
  animation: flashIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.flash-error {
  background: rgba(248,113,113,0.1);
  border-color: rgba(248,113,113,0.3);
  color: var(--danger);
}

.flash-info {
  background: rgba(255,229,0,0.08);
  border-color: rgba(255,229,0,0.2);
  color: var(--yellow);
}

@keyframes flashIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === TABLES === */
.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

thead {
  background: var(--bg2);
}

th {
  padding: 12px 14px;
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid rgba(255,229,0,0.1);
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
  color: var(--text);
}

tbody tr {
  transition: background 0.2s ease;
}

tbody tr:hover {
  background: var(--bg2);
}

/* === CHIPS === */
.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.chip-ok {
  background: rgba(52,211,153,0.12);
  color: #34D399;
}

.chip-warn {
  background: rgba(255,229,0,0.1);
  color: var(--yellow);
}

.chip-danger {
  background: rgba(248,113,113,0.12);
  color: #F87171;
}

/* === FILTER ROW === */
.filter-row {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

/* === CHART GRID === */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

/* === COPY LINK === */
.copy-link-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.copy-link {
  min-width: 200px;
  width: 100%;
  font-size: 0.78rem;
  background: var(--bg);
}

/* === CARD PREVIEW === */
.card-preview {
  width: min(100%, 500px);
  border-radius: var(--radius);
  border: 2px solid rgba(255,229,0,0.15);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(255,229,0,0.05);
  margin: 20px auto;
  display: block;
}

.center { text-align: center; }

/* === TRANSACTION LIST (mobile) === */
.txn-list {
  list-style: none;
  padding: 0;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.txn-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.txn-item:hover {
  background: var(--bg3);
}

.txn-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.txn-desc {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}

.txn-date {
  font-size: 0.75rem;
  color: var(--muted);
}

.txn-pts {
  font-weight: 900;
  font-size: 1.1rem;
  white-space: nowrap;
}

.txn-pts.positive { color: var(--success); }
.txn-pts.negative { color: var(--danger); }

/* === BOTTOM NAVIGATION === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  padding-bottom: var(--safe-bottom);
  background: rgba(1,8,17,0.92);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid rgba(255,229,0,0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 6px 16px;
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.bottom-nav a .nav-icon {
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bottom-nav a.active {
  color: var(--yellow);
}

.bottom-nav a.active .nav-icon {
  transform: scale(1.15);
}

.bottom-nav a.active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--yellow);
}

/* === FOOTER === */
.site-footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.6;
}

.site-footer a {
  color: var(--yellow);
  text-decoration: none;
  font-weight: 700;
}

.site-footer a:hover {
  text-decoration: underline;
}

.has-bottom-nav .site-footer {
  padding-bottom: 90px;
}

/* === STORE INFO === */
.store-info-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px;
  margin-top: 12px;
}

.store-info-card h3 {
  color: var(--yellow);
  font-size: 1rem;
  margin-bottom: 12px;
}

.store-detail {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.store-detail-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.store-map-wrap {
  border-radius: 12px;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--card-border);
}

.store-map-wrap iframe {
  width: 100%;
  height: 200px;
  border: 0;
  filter: grayscale(0.8) invert(0.92) contrast(1.1);
}

/* === REVEAL ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(20px);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }

.reveal.in:nth-child(1) { transition-delay: 0s; }
.reveal.in:nth-child(2) { transition-delay: 0.08s; }
.reveal.in:nth-child(3) { transition-delay: 0.16s; }
.reveal.in:nth-child(4) { transition-delay: 0.24s; }
.reveal.in:nth-child(5) { transition-delay: 0.32s; }

/* === SECTION HEADER === */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* === QUICK ACTIONS === */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-sm);
}

.quick-action:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255,229,0,0.2);
}

.quick-action .qa-icon {
  font-size: 1.8rem;
  line-height: 1;
}

/* === HERO WELCOME === */
.hero-welcome {
  text-align: center;
  padding: 40px 20px 20px;
}

.hero-welcome h1 {
  margin-bottom: 10px;
}

.hero-logo {
  height: 60px;
  margin-bottom: 16px;
  animation: heroFloat 3s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 10px 16px;
  }

  .panel {
    padding: 18px 16px;
    border-radius: 16px;
  }

  main {
    padding: 14px 12px 100px;
  }

  .topbar-inner {
    flex-wrap: wrap;
  }

  .top-actions {
    width: 100%;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,229,0,0.08);
  }

  .top-actions .mini-link {
    font-size: 0.68rem;
    padding: 4px 10px;
  }

  .cta-row {
    flex-direction: column;
  }

  .cta-row .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 769px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .bottom-nav {
    display: none;
  }

  body.has-bottom-nav main {
    padding-bottom: 36px;
  }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255,229,0,0.15);
  border-radius: 3px;
}

/* === CONFETTI DOTS === */
.confetti-section {
  position: relative;
  overflow: hidden;
}

.confetti-section::before,
.confetti-section::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  opacity: 0.12;
}

.confetti-section::before {
  top: 20px;
  right: 30px;
  animation: confettiBounce 4s ease-in-out infinite;
}

.confetti-section::after {
  bottom: 20px;
  left: 25px;
  animation: confettiBounce 5s ease-in-out 1s infinite;
}

@keyframes confettiBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.4); }
}

/* === PWA standalone === */
@media (display-mode: standalone) {
  .topbar { padding-top: max(12px, env(safe-area-inset-top)); }
}
