/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #0a0a0a;
  --primary-hover: #2d2d2d;
  --primary-light: #f6f6f4;
  --accent: #c9a96e;
  --accent-hover: #b8944f;
  --accent-light: rgba(201,169,110,0.1);
  --bg: #fafaf8;
  --bg-card: #ffffff;
  --text: #0f0f0f;
  --text-muted: #6b7280;
  --border: #e5e5e2;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --warning: #c9a96e;
  --warning-light: #fdf8ef;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.04), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.03), 0 10px 24px rgba(0,0,0,0.07);
  --shadow-xl: 0 8px 16px rgba(0,0,0,0.06), 0 20px 40px rgba(0,0,0,0.1);
  --transition: 0.2s ease;
  --transition-slow: 0.35s cubic-bezier(0.4,0,0.2,1);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --gradient-hero: linear-gradient(135deg, #fafaf8 0%, #f0ede6 50%, #fafaf8 100%);
  --gradient-accent: linear-gradient(135deg, #c9a96e 0%, #e2c992 100%);
  --gradient-primary: linear-gradient(135deg, #0a0a0a 0%, #2d2d2d 100%);
  --glass-bg: rgba(255,255,255,0.7);
  --glass-border: rgba(255,255,255,0.3);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --primary: #f5f5f5;
  --primary-hover: #e0e0e0;
  --primary-light: #1e1e1e;
  --accent: #d4b87a;
  --accent-hover: #e2c992;
  --accent-light: rgba(212,184,122,0.12);
  --bg: #0f0f0f;
  --bg-card: #1a1a1a;
  --text: #f0f0f0;
  --text-muted: #9ca3af;
  --border: #2a2a2a;
  --success: #22c55e;
  --success-light: #052e16;
  --danger: #ef4444;
  --danger-light: #450a0a;
  --warning: #d4b87a;
  --warning-light: #1c1608;
  --shadow: 0 1px 2px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.15);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.2), 0 4px 8px rgba(0,0,0,0.2);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.15), 0 10px 24px rgba(0,0,0,0.25);
  --shadow-xl: 0 8px 16px rgba(0,0,0,0.2), 0 20px 40px rgba(0,0,0,0.35);
  --gradient-hero: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
  --gradient-accent: linear-gradient(135deg, #d4b87a 0%, #b8944f 100%);
  --gradient-primary: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  --glass-bg: rgba(26,26,26,0.75);
  --glass-border: rgba(255,255,255,0.06);
}

/* ===== SELECTION & SCROLLBAR ===== */
::selection {
  background: var(--accent);
  color: #fff;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  animation: fadeIn 0.4s ease-out;
}

a { color: var(--text); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

/* ===== NAVBAR ===== */
.navbar {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 3rem;
  display: flex;
  align-items: center;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow var(--transition-slow), background var(--transition);
}

.navbar--scrolled {
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06);
  background: var(--bg-card);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 3rem;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand-icon { display: none; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-link:hover {
  color: var(--text);
  background: var(--primary-light);
  text-decoration: none;
}

.nav-link.active {
  color: var(--text);
  background: var(--primary-light);
  font-weight: 600;
}

.nav-link svg { display: none; }

/* Mobile hamburger menu */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

#nav-username {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* ===== CONTAINER ===== */
.container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 2rem;
  flex: 1;
  animation: fadeIn 0.5s ease;
}

/* ===== HERO ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 3rem 3rem;
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(201,169,110,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(26,26,26,0.04) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(201,169,110,0.04) 0%, transparent 30%);
  pointer-events: none;
  animation: subtleFloat 20s ease-in-out infinite;
}

@keyframes subtleFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-10px, -5px) scale(1.02); }
}

.hero-content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--warning-light);
  border: 1px solid rgba(201,169,110,0.2);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 16px rgba(201,169,110,0.15);
  animation: slideUp 0.5s ease-out;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.12;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 0 2rem;
  line-height: 1.7;
}

.hero-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-link {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.55rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: var(--transition);
  letter-spacing: 0.02em;
}

.hero-link:hover {
  color: var(--text);
  border-color: var(--text);
  background: var(--primary-light);
}

.hero-illustration {
  flex-shrink: 0;
  width: 340px;
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s ease-out 0.1s both;
}

.hero-illustration svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 32px rgba(0,0,0,0.1));
  transition: transform var(--transition-slow);
}

.hero-illustration:hover svg {
  transform: translateY(-4px);
}

/* ===== ABOUT SECTION ===== */
.about-section {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-heading {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text);
}

.about-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.about-stats {
  display: flex;
  gap: 2rem;
}

.about-stat {
  display: flex;
  flex-direction: column;
}

.about-stat-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.about-stat-label {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.about-code-block {
  background: #1e293b;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  background: #162031;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-dot--red { background: #ef4444; }
.code-dot--yellow { background: #eab308; }
.code-dot--green { background: #22c55e; }

.code-filename {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  margin-left: 0.5rem;
}

.code-body {
  padding: 1.25rem;
  margin: 0;
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #e2e8f0;
}

.code-body code {
  font-family: inherit;
}

.code-kw { color: #c084fc; }
.code-str { color: #86efac; }
.code-fn { color: #60a5fa; }

/* ===== FEATURES SECTION ===== */
.features-section {
  padding: 4.5rem 0;
  background: var(--bg);
}

.features-heading {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.features-subheading {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition-slow), transform var(--transition-slow);
}

.feature-card:hover {
  border-color: rgba(201,169,110,0.3);
  box-shadow: 0 4px 6px rgba(0,0,0,0.03), 0 12px 28px rgba(0,0,0,0.06);
  transform: translateY(-3px);
  color: var(--text);
  text-decoration: none;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon--form { background: #ede9fe; color: #7c3aed; }
.feature-icon--todos { background: #d1fae5; color: #059669; }
.feature-icon--dogs { background: #fef3c7; color: #d97706; }
.feature-icon--login { background: #dbeafe; color: #2563eb; }

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.feature-link-text {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.01em;
}

.feature-card:hover .feature-link-text {
  color: var(--accent-hover);
}

/* ===== COUNTER CARD ===== */
.counter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
  box-shadow: var(--shadow);
}

/* ===== PAGE BANNER ===== */
.page-banner {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 3rem 2rem;
}

.page-banner .page-header {
  max-width: 900px;
  margin: 0 auto;
}

.page-banner .page-header h1 {
  font-size: 1.75rem;
}

.page-banner .page-desc {
  max-width: 560px;
}

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.02em;
}

.page-header h1 svg { color: var(--accent); width: 24px; height: 24px; }

.page-desc {
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-size: 0.95rem;
}

/* ===== SECTION ===== */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.35rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: var(--font-ui);
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

/* Ripple effect uses --ripple-x / --ripple-y set via JS on click; defaults to center */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.3) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.btn:active::after {
  opacity: 1;
  transition: opacity 0s;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.btn-primary:hover { 
  background: var(--primary-hover); 
  text-decoration: none; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--text); }

.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

.btn-full { width: 100%; justify-content: center; padding: 0.7rem; }

.btn-icon {
  padding: 0.5rem;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover { background: var(--primary); color: white; border-color: var(--primary); }
.btn-icon svg { width: 16px; height: 16px; }

.btn-danger-icon {
  background: var(--danger-light);
  color: var(--danger);
  border-color: transparent;
}
.btn-danger-icon:hover { background: var(--danger); color: white; }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== CARDS ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: rgba(0,0,0,0.08);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--text);
}

.card-icon svg { width: 20px; height: 20px; }

.card h3 { font-family: var(--font-heading); font-size: 1rem; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }

/* ===== INPUT ===== */
.input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-body);
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--bg-card);
  color: var(--text);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

.input-with-icon { padding-left: 2.5rem; }

.input-icon-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.select { cursor: pointer; }

.textarea { resize: vertical; }

.range-input {
  width: 100%;
  accent-color: var(--text);
}

/* ===== FORM ===== */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 600px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.required { color: var(--danger); }

.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

.radio-group, .checkbox-group {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400 !important;
  cursor: pointer;
}

.char-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
  display: block;
  margin-top: 0.25rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Toggle switch */
.switch-label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

.switch {
  position: relative;
  width: 48px;
  height: 26px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 26px;
  transition: var(--transition);
}

.switch-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
}

.switch input:checked + .switch-slider { background: var(--text); }
.switch input:checked + .switch-slider::before { transform: translateX(22px); }

/* Password toggle */
.btn-toggle-pw {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
}
.btn-toggle-pw:hover { color: var(--text); }
.btn-toggle-pw svg { width: 18px; height: 18px; }

/* Success message */
.success-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
  color: var(--success);
}

.success-message svg { width: 48px; height: 48px; }
.success-message h3 { color: var(--text); font-size: 1.25rem; }
.success-message p { color: var(--text-muted); }

.submitted-data {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
  max-width: 650px;
}

.submitted-data h3 { margin-bottom: 0.75rem; }

.submitted-data pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.85rem;
}

/* ===== COUNTER ===== */
.counter-section {
  text-align: center;
  padding: 2rem 0;
}

.counter-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0 1rem;
}

.counter-value {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  min-width: 80px;
  color: var(--text);
  letter-spacing: -0.03em;
}

/* ===== JOKE ===== */
.joke-section {
  text-align: center;
  padding: 2rem 0 3rem;
}

.joke-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin: 1rem auto;
  max-width: 550px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.joke-text {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
}

.joke-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

/* ===== TODO ===== */
.todo-input-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.todo-input-row .input { flex: 1; }

.todo-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn-filter {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-ui);
}

.btn-filter:hover { border-color: var(--text); color: var(--text); }
.btn-filter.active { background: var(--text); color: white; border-color: var(--text); }

.todo-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding: 0 0.25rem;
}

.todo-list {
  list-style: none;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.todo-item:hover { border-color: var(--text-muted); }

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.todo-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  cursor: pointer;
}

.todo-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--text);
}

.todo-text { font-size: 0.9rem; }

/* Loading */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem;
  color: var(--text-muted);
}

.empty-state svg { width: 48px; height: 48px; }

/* Error state */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem;
  color: var(--danger);
}

.error-state svg { width: 48px; height: 48px; }

/* ===== DOG GALLERY ===== */
.dog-controls {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.dog-controls label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.select-wrapper { flex: 1; min-width: 150px; }
.count-wrapper { width: 100px; }

.dog-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.dog-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  aspect-ratio: 1;
}

.dog-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.dog-card:hover img { transform: scale(1.05); }

.dog-card-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 0.75rem;
}

.btn-fav {
  background: rgba(255,255,255,0.9) !important;
  color: var(--text-muted) !important;
  backdrop-filter: blur(4px);
}

.btn-fav:hover, .btn-fav.active {
  color: var(--danger) !important;
  background: rgba(255,255,255,0.95) !important;
}

/* ===== AUTH ===== */
.auth-section {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-icon {
  width: 48px;
  height: 48px;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.auth-header h1 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.auth-header p { color: var(--text-muted); font-size: 0.9rem; }

.login-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--danger-light);
  color: var(--danger);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.login-error svg { width: 16px; height: 16px; flex-shrink: 0; }

.auth-hint {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== DASHBOARD ===== */
.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dash-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-card-icon svg { width: 22px; height: 22px; }

.dash-card-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  display: block;
  letter-spacing: -0.02em;
}

.dash-card-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.session-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.session-info h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.session-info h3 svg { width: 18px; height: 18px; color: var(--text); }

.info-grid {
  display: grid;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.info-label {
  font-weight: 600;
  min-width: 180px;
  color: var(--text-muted);
}

.info-value {
  word-break: break-all;
}

/* ===== SPINNER ===== */
.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== FOOTER ===== */
.footer {
  padding: 2rem 3rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
  background: var(--bg-card);
  font-family: var(--font-ui);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text);
}

/* ===== TRANSACTIONS ===== */
.transaction-input-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.transaction-input-row .input { flex: 1; }
.transaction-input-row .txn-amount-input { width: 140px; flex: none; }
.transaction-input-row .txn-type-select { width: 130px; flex: none; }
.transaction-input-row .txn-category-select { width: 160px; flex: none; }

.txn-amount {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 0.75rem;
  white-space: nowrap;
}

.txn-amount-positive { color: var(--success); }
.txn-amount-negative { color: var(--danger); }
.txn-net-balance { font-weight: 600; }

/* ===== MARKET RATES ===== */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.rate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition);
}

.rate-card:hover {
  border-color: rgba(201,169,110,0.3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.rate-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.rate-currency-code {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rate-currency-name {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.rate-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.rate-change {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.rate-change svg { width: 14px; height: 14px; }

.rate-change-up {
  color: var(--success);
  background: var(--success-light);
}

.rate-change-down {
  color: var(--danger);
  background: var(--danger-light);
}

.rate-bookmark.active {
  color: var(--accent) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar { padding: 0 1.25rem; }
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: var(--shadow-lg);
    z-index: 99;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-link { padding: 0.65rem 0.85rem; font-size: 0.88rem; border-radius: var(--radius-sm); }
  .container { padding: 1.25rem; }
  .hero {
    flex-direction: column;
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
  }
  .hero h1 { font-size: 1.85rem; }
  .hero-subtitle { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-links { justify-content: center; gap: 0.5rem; }
  .hero-illustration { width: 260px; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-stats { gap: 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .dog-controls { flex-direction: column; align-items: stretch; }
  .count-wrapper { width: 100%; }
  .transaction-input-row { flex-direction: column; }
  .transaction-input-row .txn-amount-input,
  .transaction-input-row .txn-type-select,
  .transaction-input-row .txn-category-select { width: 100%; }
  .market-grid { grid-template-columns: 1fr; }
  .page-banner { padding: 2rem 1.25rem 1.5rem; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .cart-summary .cart-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ===== CART SUMMARY ===== */
.cart-summary {
  background: var(--warning-light);
  border: 1px solid rgba(201,169,110,0.3);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
}

.cart-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cart-inner span {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ===== RECEIPT ===== */
.receipt-content {
  background: var(--primary-light);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  font-size: 0.9rem;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--border);
}

.receipt-row:last-child {
  border-bottom: none;
}

.receipt-pin {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  margin: 0.5rem 0;
}

.voucher-pin {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
}

/* ===== QUICK AMOUNTS ===== */
.quick-amounts .btn {
  min-width: 55px;
  justify-content: center;
}

/* ================================================================
   NEW COMPONENTS — Deep Rebuild (db.js integration)
   ================================================================ */

/* ===== WALLET BAR ===== */
.wallet-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.wallet-bar i { width: 16px; height: 16px; }
.wallet-bar strong { color: var(--accent); }
.wallet-bar-sep { opacity: 0.3; }

/* ===== PRODUCT CARDS (Image-based) ===== */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition);
  animation: slideUp 0.4s ease both;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0,0,0,0.08);
}
.product-card.out-of-stock {
  opacity: 0.55;
  pointer-events: none;
}
.product-card-img {
  position: relative;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-bottom: 1px solid var(--border);
}
.product-card-img img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
}
.product-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  text-transform: capitalize;
}
.product-card-body {
  padding: 0.9rem 1rem 1rem;
}
.product-card-name {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}
.product-card-provider {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
  margin-bottom: 0.6rem;
}
.product-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.7rem;
}
.product-card-price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.product-card-stock {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--success);
  font-weight: 500;
}
.product-card-stock.low-stock {
  color: var(--danger);
}
.product-card-actions {
  display: flex;
  gap: 0.5rem;
}

/* Quantity control in product card */
.qty-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.35rem;
}
.qty-value {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.88rem;
  min-width: 24px;
  text-align: center;
}

/* ===== CART DRAWER ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  backdrop-filter: blur(2px);
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
}
.cart-drawer.open {
  right: 0;
}
.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.cart-drawer-header h2 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}
.cart-drawer-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
}
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  gap: 0.5rem;
}
.cart-empty i { width: 40px; height: 40px; opacity: 0.3; }

/* Cart items */
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.35rem 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info strong {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  display: block;
}
.cart-item-price {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
}
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  grid-row: 1 / 3;
  grid-column: 2;
}
.cart-item-qty {
  font-family: var(--font-ui);
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  font-size: 0.85rem;
}
.cart-item-line-total {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent);
}
.btn-xs {
  padding: 0.2rem;
  font-size: 0.7rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-xs i { width: 12px; height: 12px; }

/* Cart totals */
.cart-totals {
  margin-bottom: 0.75rem;
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
.cart-total-main {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
}

/* ===== FLOATING ACTION BUTTON (Cart) ===== */
.fab-cart {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 150;
  transition: transform var(--transition), background var(--transition);
}
.fab-cart:hover {
  transform: scale(1.08);
  background: var(--primary-hover);
}
.fab-cart i { width: 24px; height: 24px; }
.fab-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: var(--primary);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ===== CHECKOUT MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  padding: 1rem;
}
.modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.15);
  animation: slideUp 0.3s cubic-bezier(0.4,0,0.2,1);
}
.modal-card h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.checkout-items-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 1rem;
}
.checkout-line {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  border-bottom: 1px dotted var(--border);
}
.checkout-line:last-child { border-bottom: none; }
.checkout-summary {
  background: var(--primary-light);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}
.checkout-remaining-ok { color: var(--success); font-weight: 600; }
.checkout-remaining-bad { color: var(--danger); font-weight: 600; }
.checkout-warning {
  background: var(--danger-light);
  color: var(--danger);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
}
.checkout-success-icon {
  text-align: center;
  margin-bottom: 0.5rem;
}
.checkout-success-icon i {
  width: 56px;
  height: 56px;
  color: var(--success);
}
.checkout-success-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.checkout-receipt-block {
  background: var(--primary-light);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.88rem;
}
.receipt-divider {
  border-top: 1px dashed var(--border);
  margin: 0.6rem 0;
}

/* ===== TRANSACTION STATS BANNER ===== */
.txn-stats-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.txn-stat-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.txn-stat-card i {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}
.txn-stat-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.txn-stat-value {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}
.stat-positive { color: var(--success); }
.stat-negative { color: var(--danger); }

/* ===== TRANSACTION ADD SECTION ===== */
.txn-add-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.txn-add-section h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

/* ===== TRANSACTION TOOLBAR ===== */
.txn-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.txn-toolbar .input {
  max-width: 240px;
}
.txn-toolbar .select {
  max-width: 180px;
}

/* ===== TRANSACTION TEXT BLOCK ===== */
.txn-text-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.txn-meta {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.txn-tag {
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font-ui);
  margin-right: 0.5rem;
  white-space: nowrap;
}

/* ===== SALE PREVIEW ===== */
.sale-preview {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.sale-preview h4 {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}
.sale-preview-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  padding: 0.25rem 0;
}

/* ===== RECENT SALES ===== */
.recent-sales {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.recent-sales h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.recent-sales-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.recent-sale-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
.recent-sale-desc { flex: 1; }
.recent-sale-amount { font-weight: 600; }
.recent-sale-time { color: var(--text-muted); font-size: 0.75rem; }

/* ===== DASHBOARD RECENT ACTIVITY ===== */
.dash-recent {
  margin-bottom: 2rem;
}
.dash-recent h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.dash-recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.dash-recent-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  border: 1px solid var(--border);
}
.dash-recent-desc { flex: 1; }
.dash-recent-amount { font-weight: 600; }
.dash-recent-time { color: var(--text-muted); font-size: 0.75rem; }

/* ===== BTN DANGER OUTLINE ===== */
.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

/* ===== BTN SUCCESS FLASH ===== */
.btn-success-flash {
  background: var(--success) !important;
  border-color: var(--success) !important;
  color: #fff !important;
}

/* ===== QUICK LINKS SECTION ===== */
.quick-links-section {
  margin-bottom: 2rem;
}
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition);
}
.quick-link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent);
  color: var(--text);
}
.quick-link-card i {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.quick-link-card h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}
.quick-link-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ===== TEXT MUTED HELPER ===== */
.text-muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== RESPONSIVE OVERRIDES ===== */
@media (max-width: 768px) {
  .cart-drawer { width: 100vw; right: -100vw; }
  .txn-stats-banner { grid-template-columns: 1fr 1fr; }
  .txn-toolbar { flex-direction: column; align-items: stretch; }
  .txn-toolbar .input,
  .txn-toolbar .select { max-width: 100%; }
  .quick-links-grid { grid-template-columns: 1fr 1fr; }
  .wallet-bar { font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .txn-stats-banner { grid-template-columns: 1fr; }
  .quick-links-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 1.25rem; }
}

/* ================================================================
   ANALYTICS PAGE
   ================================================================ */

/* KPI Grid */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.kpi-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.kpi-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.kpi-icon i { width: 22px; height: 22px; }
.kpi-body { flex: 1; }
.kpi-value { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 1.35rem; }
.kpi-label { display: block; font-family: var(--font-ui); font-size: 0.78rem; color: var(--text-muted); }
.kpi-trend {
  font-family: var(--font-ui); font-size: 0.75rem; display: flex; align-items: center; gap: 0.2rem;
  padding: 0.2rem 0.5rem; border-radius: 100px; background: var(--primary-light);
}
.kpi-trend i { width: 14px; height: 14px; }
.kpi-trend-up { background: var(--success-light); color: var(--success); }
.kpi-trend-down { background: var(--danger-light); color: var(--danger); }

/* Chart Cards */
.analytics-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.chart-card-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem;
}
.chart-card-header h3 {
  font-family: var(--font-heading); font-size: 1rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.chart-card-header h3 i { width: 18px; height: 18px; color: var(--accent); }
.chart-period-selector { display: flex; gap: 0.35rem; }
.chart-canvas-wrap { position: relative; height: 280px; }
.chart-canvas-square { height: 260px; }
.chart-card-lg { }
.chart-card-sm { }

/* Data Table */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 0.88rem; }
.data-table th {
  text-align: left; padding: 0.75rem 1rem; border-bottom: 2px solid var(--border);
  font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted);
}
.data-table td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: var(--primary-light); }
.text-right { text-align: right; }
.empty-table { display: flex; flex-direction: column; align-items: center; padding: 2rem; color: var(--text-muted); gap: 0.5rem; }
.empty-table i { width: 40px; height: 40px; opacity: 0.3; }

/* Share Bar */
.share-bar { display: flex; align-items: center; gap: 0.5rem; }
.share-bar-fill { height: 8px; background: var(--accent); border-radius: 4px; min-width: 4px; transition: width 0.3s ease; }
.share-bar span { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }

/* Live Rates Grid */
.rates-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem;
}
.rate-tile {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--primary-light); border-radius: var(--radius); padding: 1rem 1.25rem;
  border: 1px solid var(--border); transition: transform var(--transition);
}
.rate-tile:hover { transform: translateY(-1px); }
.rate-flag { font-size: 1.5rem; }
.rate-info { flex: 1; }
.rate-code { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem; }
.rate-name { display: block; font-family: var(--font-ui); font-size: 0.75rem; color: var(--text-muted); }
.rate-value { font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; color: var(--accent); }
.rate-loading-placeholder { min-height: 60px; }
.rate-shimmer {
  width: 100%; height: 20px; border-radius: 4px;
  background: linear-gradient(90deg, var(--border) 25%, var(--primary-light) 50%, var(--border) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ================================================================
   CUSTOMERS PAGE
   ================================================================ */

.customer-toolbar {
  display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.5rem;
}
.customer-toolbar .input { max-width: 300px; flex: 1; }
.customer-toolbar .select { max-width: 200px; }

.cust-form-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; margin-bottom: 1.5rem;
}
.cust-form-card h3 {
  font-family: var(--font-heading); font-size: 1rem; display: flex; align-items: center; gap: 0.4rem; margin-bottom: 1rem;
}
.cust-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}

.customer-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; margin-bottom: 2rem;
}
.customer-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform var(--transition), box-shadow var(--transition);
}
.customer-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.customer-card-top {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem 1rem 0.75rem; background: linear-gradient(135deg, var(--primary) 0%, #333 100%);
}
.customer-avatar {
  width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--accent);
  object-fit: cover; background: var(--primary-light);
}
.customer-tier {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--font-ui); font-size: 0.68rem; font-weight: 700;
  padding: 0.15rem 0.6rem; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.05em;
}
.tier-gold { background: #fef3c7; color: #92400e; }
.tier-silver { background: #f1f5f9; color: #475569; }
.tier-bronze { background: #fef2f2; color: #991b1b; }

.customer-card-body { padding: 1rem 1.25rem 0.75rem; }
.customer-name { font-family: var(--font-heading); font-size: 1.05rem; font-weight: 600; margin-bottom: 0.4rem; }
.customer-contact {
  display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 0.75rem;
  font-family: var(--font-ui); font-size: 0.82rem; color: var(--text-muted);
}
.customer-contact i { width: 14px; height: 14px; margin-right: 0.3rem; }
.customer-stats-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem;
  padding: 0.75rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.customer-stat { text-align: center; }
.customer-stat-val { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 0.88rem; }
.customer-stat-lbl { display: block; font-family: var(--font-ui); font-size: 0.68rem; color: var(--text-muted); }
.customer-notes {
  margin-top: 0.6rem; font-family: var(--font-ui); font-size: 0.8rem; color: var(--text-muted);
  display: flex; align-items: flex-start; gap: 0.3rem;
}
.customer-notes i { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }
.customer-card-actions {
  display: flex; gap: 0.5rem; padding: 0.75rem 1.25rem; border-top: 1px solid var(--border);
}

/* Customer Detail Modal */
.modal-card-lg { max-width: 640px; }
.cust-detail-header {
  display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem;
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--border);
}
.cust-detail-avatar {
  width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--accent); object-fit: cover;
}
.cust-detail-info h2 {
  font-family: var(--font-heading); font-size: 1.25rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem;
}
.cust-detail-info p { font-family: var(--font-ui); font-size: 0.88rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.35rem; }
.cust-detail-info p i { width: 14px; height: 14px; }
.cust-detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.cust-detail-stat {
  text-align: center; padding: 1rem; background: var(--primary-light); border-radius: var(--radius);
}
.cust-detail-stat-val { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; }
.cust-detail-stat-lbl { display: block; font-family: var(--font-ui); font-size: 0.72rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ================================================================
   RECEIPTS PAGE
   ================================================================ */

.receipt-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; }
.receipt-card {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1rem 1.5rem; transition: transform var(--transition), box-shadow var(--transition);
  flex-wrap: wrap;
}
.receipt-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.receipt-card-left { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; }
.receipt-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius);
  background: var(--primary-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.receipt-card-icon i { width: 20px; height: 20px; color: var(--accent); }
.receipt-card-info { min-width: 0; }
.receipt-ref { display: block; font-family: var(--font-heading); font-size: 0.92rem; }
.receipt-date { display: block; font-family: var(--font-ui); font-size: 0.78rem; color: var(--text-muted); }
.receipt-items-summary { display: block; font-family: var(--font-ui); font-size: 0.8rem; color: var(--text-muted); }
.receipt-customer { display: flex; align-items: center; gap: 0.25rem; font-family: var(--font-ui); font-size: 0.78rem; color: var(--text-muted); }
.receipt-customer i { width: 12px; height: 12px; }
.receipt-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.receipt-total { font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; }
.receipt-commission { font-family: var(--font-ui); font-size: 0.75rem; color: var(--success); }

/* ================================================================
   WALLET PAGE
   ================================================================ */

.wallet-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem;
}
.wallet-hero-card {
  background: linear-gradient(135deg, var(--primary) 0%, #2a2a2a 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 2rem;
  display: flex; flex-direction: column; justify-content: center;
}
.wallet-hero-label { font-family: var(--font-ui); font-size: 0.82rem; opacity: 0.7; margin-bottom: 0.35rem; }
.wallet-hero-amount { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--accent); }
.wallet-hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-accent {
  background: var(--accent); color: var(--primary); border: none; cursor: pointer;
  padding: 0.55rem 1.25rem; border-radius: var(--radius-sm); font-family: var(--font-ui);
  font-weight: 600; font-size: 0.85rem; display: flex; align-items: center; gap: 0.4rem;
  transition: background var(--transition);
}
.btn-accent:hover { background: var(--accent-hover); color: var(--primary); }
.btn-accent i { width: 16px; height: 16px; }
.btn-outline-light {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); cursor: pointer;
  padding: 0.55rem 1.25rem; border-radius: var(--radius-sm); font-family: var(--font-ui);
  font-weight: 500; font-size: 0.85rem; display: flex; align-items: center; gap: 0.4rem;
  transition: background var(--transition), border-color var(--transition);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); color: #fff; }
.btn-outline-light i { width: 16px; height: 16px; }
.btn-wallet-action { white-space: nowrap; }

.wallet-hero-chart {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1rem; display: flex; align-items: center;
}
.wallet-hero-chart canvas { width: 100% !important; height: 200px !important; }

/* Wallet Panels */
.wallet-panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  margin-bottom: 1.5rem; overflow: hidden;
}
.wallet-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--primary-light);
}
.wallet-panel-header h3 {
  font-family: var(--font-heading); font-size: 1rem; display: flex; align-items: center; gap: 0.4rem;
}
.wallet-panel-body { padding: 1.5rem; }
.wallet-panel-body label {
  display: block; font-family: var(--font-ui); font-size: 0.85rem; font-weight: 600;
  margin-bottom: 0.5rem; margin-top: 1rem;
}
.wallet-panel-body label:first-child { margin-top: 0; }

.wallet-amount-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
}

.wallet-method-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem;
}
.wallet-method-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 1rem 0.5rem; border: 2px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: border-color var(--transition), background var(--transition);
  font-family: var(--font-ui); font-size: 0.78rem; text-align: center;
}
.wallet-method-card:hover { border-color: var(--accent); }
.wallet-method-card input { display: none; }
.wallet-method-card:has(input:checked) { border-color: var(--accent); background: var(--primary-light); }
.wallet-method-card i { width: 24px; height: 24px; color: var(--accent); }

.wallet-panel-result {
  padding: 0.75rem; border-radius: var(--radius-sm); font-family: var(--font-ui); font-size: 0.88rem; margin-top: 1rem;
}
.result-success { background: var(--success-light); color: var(--success); }
.result-error { background: var(--danger-light); color: var(--danger); }

/* Wallet Activity */
.wallet-activity-list { }
.wallet-activity-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.wallet-activity-item:hover { background: var(--primary-light); }
.wallet-activity-item:last-child { border-bottom: none; }
.wallet-activity-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wallet-activity-icon i { width: 16px; height: 16px; }
.wallet-activity-in .wallet-activity-icon { background: var(--success-light); color: var(--success); }
.wallet-activity-out .wallet-activity-icon { background: var(--danger-light); color: var(--danger); }
.wallet-activity-info { flex: 1; min-width: 0; }
.wallet-activity-desc { display: block; font-family: var(--font-ui); font-size: 0.88rem; font-weight: 500; }
.wallet-activity-time { display: block; font-family: var(--font-ui); font-size: 0.75rem; color: var(--text-muted); }
.wallet-activity-amount { font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.wallet-activity-in.wallet-activity-amount,
.wallet-activity-item.wallet-activity-in .wallet-activity-amount { color: var(--success); }
.wallet-activity-item.wallet-activity-out .wallet-activity-amount { color: var(--danger); }

/* ================================================================
   SETTINGS PAGE
   ================================================================ */

.settings-tabs {
  display: flex; gap: 0.25rem; margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border); padding-bottom: 0;
  overflow-x: auto;
}
.settings-tab {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.75rem 1.25rem; border: none; cursor: pointer;
  font-family: var(--font-ui); font-size: 0.88rem; font-weight: 500;
  color: var(--text-muted); background: transparent;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.settings-tab:hover { color: var(--text); }
.settings-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.settings-tab i { width: 16px; height: 16px; }

.settings-panel { margin-bottom: 2rem; }
.settings-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; margin-bottom: 1.25rem;
}
.settings-card-danger { border-color: var(--danger); border-style: dashed; }
.settings-card-title {
  font-family: var(--font-heading); font-size: 1rem;
  display: flex; align-items: center; gap: 0.4rem; margin-bottom: 1rem;
}
.settings-card-title i { width: 18px; height: 18px; color: var(--accent); }
.settings-card-danger .settings-card-title i { color: var(--danger); }

.settings-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.form-group-full { grid-column: 1 / -1; }

.settings-save-bar {
  display: flex; align-items: center; gap: 1rem;
}
.settings-save-msg {
  font-family: var(--font-ui); font-size: 0.88rem; font-weight: 600;
}

/* Toggle Switch */
.settings-toggle-list { display: flex; flex-direction: column; gap: 0; }
.settings-toggle-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1rem 0; border-bottom: 1px solid var(--border);
}
.settings-toggle-item:last-child { border-bottom: none; }
.settings-toggle-item strong { font-family: var(--font-heading); font-size: 0.92rem; display: block; margin-bottom: 0.15rem; }
.settings-toggle-item p { font-size: 0.8rem; }

.toggle-switch {
  position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border); border-radius: 26px; transition: 0.3s;
}
.toggle-slider::before {
  content: ''; position: absolute; height: 20px; width: 20px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
  transition: 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

/* Theme Selector */
.theme-selector { display: flex; gap: 1rem; }
.theme-option {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  cursor: pointer; font-family: var(--font-ui); font-size: 0.85rem;
}
.theme-option input { display: none; }
.theme-preview {
  width: 120px; height: 80px; border-radius: var(--radius);
  border: 2px solid var(--border); overflow: hidden; transition: border-color var(--transition);
}
.theme-option:has(input:checked) .theme-preview { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.theme-preview-nav { height: 16px; }
.theme-preview-body { padding: 6px; display: flex; gap: 4px; }
.theme-preview-card { flex: 1; height: 40px; border-radius: 3px; }

.theme-preview-light { background: #fafaf8; }
.theme-preview-light .theme-preview-nav { background: #fff; border-bottom: 1px solid #e8e6e1; }
.theme-preview-light .theme-preview-card { background: #fff; border: 1px solid #e8e6e1; }

.theme-preview-dark { background: #1a1a1a; }
.theme-preview-dark .theme-preview-nav { background: #2a2a2a; border-bottom: 1px solid #333; }
.theme-preview-dark .theme-preview-card { background: #2a2a2a; border: 1px solid #333; }

.theme-preview-system { background: linear-gradient(135deg, #fafaf8 50%, #1a1a1a 50%); }
.theme-preview-system .theme-preview-nav { background: linear-gradient(90deg, #fff 50%, #2a2a2a 50%); }
.theme-preview-system .theme-preview-card { background: linear-gradient(90deg, #fff 50%, #2a2a2a 50%); }

/* Font Size Control */
.font-size-control {
  display: flex; align-items: center; gap: 1rem;
}
.font-size-control span {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; min-width: 50px; text-align: center;
}

/* Session List */
.session-list { }
.session-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.5rem;
}
.session-current { border-color: var(--success); background: var(--success-light); }
.session-item-info strong { font-family: var(--font-heading); font-size: 0.92rem; }
.session-badge {
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 600;
  padding: 0.2rem 0.6rem; border-radius: 100px;
  background: var(--success); color: #fff;
}

/* Storage */
.storage-stats { margin-bottom: 1rem; }
.storage-bar-container {
  height: 12px; background: var(--primary-light); border-radius: 6px; overflow: hidden; margin-bottom: 0.5rem;
}
.storage-bar {
  height: 100%; background: var(--accent); border-radius: 6px; transition: width 0.5s ease;
}
.storage-text { font-family: var(--font-ui); font-size: 0.82rem; color: var(--text-muted); }
.storage-breakdown { }
.storage-row {
  display: flex; justify-content: space-between; padding: 0.4rem 0;
  font-family: var(--font-ui); font-size: 0.85rem; border-bottom: 1px solid var(--border);
}
.storage-row:last-child { border-bottom: none; }
.storage-key { text-transform: capitalize; }
.storage-size { color: var(--text-muted); }

/* ================================================================
   DASHBOARD IMPROVEMENTS
   ================================================================ */

.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.dash-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.dash-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.dash-card-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.dash-card-icon i { width: 22px; height: 22px; }
.dash-card-info { flex: 1; }
.dash-card-value { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 1.3rem; }
.dash-card-label { display: block; font-family: var(--font-ui); font-size: 0.78rem; color: var(--text-muted); }

.session-info {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; margin-top: 2rem;
}
.session-info h3 {
  font-family: var(--font-heading); font-size: 1rem;
  display: flex; align-items: center; gap: 0.4rem; margin-bottom: 1rem;
}
.info-grid { display: flex; flex-direction: column; gap: 0.5rem; }
.info-item {
  display: flex; gap: 0.75rem; font-family: var(--font-ui); font-size: 0.88rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
}
.info-item:last-child { border-bottom: none; }
.info-label { font-weight: 600; min-width: 180px; color: var(--text-muted); }
.info-value { word-break: break-all; }

/* ================================================================
   NAVBAR OVERFLOW (many links)
   ================================================================ */

.nav-links {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  -webkit-overflow-scrolling: touch;
}
.nav-links::-webkit-scrollbar { height: 3px; }
.nav-links::-webkit-scrollbar-track { background: transparent; }
.nav-links::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ================================================================
   RESPONSIVE — New Pages
   ================================================================ */

@media (max-width: 1024px) {
  .analytics-charts-row { grid-template-columns: 1fr; }
  .wallet-hero { grid-template-columns: 1fr; }
  .cust-detail-stats { grid-template-columns: repeat(2, 1fr); }
  .wallet-method-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-form-grid { grid-template-columns: 1fr; }
  .theme-selector { flex-wrap: wrap; }
  .dash-main-row { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
  .customer-grid { grid-template-columns: 1fr; }
  .cust-form-grid { grid-template-columns: 1fr; }
  .analytics-kpi-grid { grid-template-columns: 1fr 1fr; }
  .wallet-hero-card { padding: 1.5rem; }
  .wallet-hero-amount { font-size: 2rem; }
  .settings-tabs { gap: 0; }
  .settings-tab { padding: 0.6rem 0.85rem; font-size: 0.82rem; }
  .receipt-card { flex-direction: column; align-items: flex-start; }
  .receipt-card-right { align-items: flex-start; flex-direction: row; gap: 1rem; }
  .cust-detail-header { flex-direction: column; text-align: center; }
  .navbar { padding: 0 1rem; }
}

@media (max-width: 480px) {
  .analytics-kpi-grid { grid-template-columns: 1fr; }
  .wallet-amount-grid { grid-template-columns: repeat(2, 1fr); }
  .wallet-method-grid { grid-template-columns: 1fr 1fr; }
  .cust-detail-stats { grid-template-columns: 1fr 1fr; }
  .customer-stats-row { grid-template-columns: 1fr; }
  .rates-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   KEYFRAME ANIMATIONS
   ================================================================ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  pointer-events: auto;
  animation: toastEnter 0.35s cubic-bezier(0.4,0,0.2,1);
  backdrop-filter: blur(8px);
}

.toast-success {
  border-left: 3px solid var(--success);
  color: var(--success);
}

.toast-error {
  border-left: 3px solid var(--danger);
  color: var(--danger);
}

.toast-info {
  border-left: 3px solid var(--accent);
  color: var(--accent);
}

.toast-enter {
  animation: toastEnter 0.35s cubic-bezier(0.4,0,0.2,1);
}

.toast-exit {
  animation: toastExit 0.25s ease-in forwards;
}

@keyframes toastEnter {
  from { opacity: 0; transform: translateX(100%) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastExit {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(100%) scale(0.95); }
}

/* ================================================================
   UTILITY CLASSES — FINTECH POLISH
   ================================================================ */

/* Glassmorphism card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Gradient text */
.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Badge with glow effect */
.badge-glow {
  position: relative;
  box-shadow: 0 0 12px rgba(201,169,110,0.25), 0 0 4px rgba(201,169,110,0.15);
}

.badge-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient-accent);
  opacity: 0.15;
  z-index: -1;
  filter: blur(6px);
}

/* Skeleton loading shimmer */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--primary-light) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Pulse loading state */
.loading-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

/* ================================================================
   DARK MODE — COMPONENT OVERRIDES
   ================================================================ */

[data-theme="dark"] .navbar {
  background: rgba(15,15,15,0.8);
  border-bottom-color: #252525;
}

[data-theme="dark"] .navbar--scrolled {
  background: rgba(26,26,26,0.95);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
}

[data-theme="dark"] .about-code-block {
  background: #0f172a;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

[data-theme="dark"] .code-header {
  background: #0b1120;
}

[data-theme="dark"] .submitted-data pre {
  background: #0f172a;
}

[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
  color: #0a0a0a;
}

[data-theme="dark"] .btn-primary:hover {
  background: #e0e0e0;
  color: #0a0a0a;
}

[data-theme="dark"] .btn-icon {
  background: #252525;
  border-color: #333;
  color: #f0f0f0;
}

[data-theme="dark"] .btn-icon:hover {
  background: #f5f5f5;
  color: #0a0a0a;
}

[data-theme="dark"] .feature-card:hover {
  border-color: rgba(212,184,122,0.25);
  box-shadow: 0 4px 6px rgba(0,0,0,0.15), 0 12px 28px rgba(0,0,0,0.2);
}

[data-theme="dark"] .card:hover {
  border-color: #333;
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .modal-overlay {
  background: rgba(0,0,0,0.7);
}

[data-theme="dark"] .modal-card {
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

[data-theme="dark"] .cart-overlay {
  background: rgba(0,0,0,0.6);
}

[data-theme="dark"] .cart-drawer {
  box-shadow: -4px 0 24px rgba(0,0,0,0.3);
}

[data-theme="dark"] .btn-fav {
  background: rgba(26,26,26,0.9) !important;
  color: #9ca3af !important;
}

[data-theme="dark"] .btn-fav:hover, [data-theme="dark"] .btn-fav.active {
  background: rgba(26,26,26,0.95) !important;
}

[data-theme="dark"] .customer-card-top {
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
}

[data-theme="dark"] .wallet-hero-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
}

[data-theme="dark"] .toast {
  background: #1a1a1a;
  border-color: #333;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3), 0 20px 40px rgba(0,0,0,0.25);
}

[data-theme="dark"] .glass-card {
  background: rgba(26,26,26,0.75);
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .fab-cart {
  background: #f5f5f5;
  color: #0a0a0a;
}

[data-theme="dark"] .fab-cart:hover {
  background: #e0e0e0;
}

[data-theme="dark"] .switch input:checked + .switch-slider { background: var(--accent); }

[data-theme="dark"] .theme-preview-light .theme-preview-nav { border-bottom-color: #e8e6e1; }

[data-theme="dark"] ::selection {
  background: var(--accent);
  color: #0a0a0a;
}

[data-theme="dark"] ::-webkit-scrollbar-track { background: #0f0f0f; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #333; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #555; }

/* ===== PARTNERS SECTION ===== */
.partners-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.partners-label {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.partners-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.partner-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.5;
  transition: opacity 0.3s, transform 0.3s;
  filter: grayscale(100%);
}

.partner-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.08);
}

.partner-logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

.partner-logo span {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ===== HERO CREDIT CARD VISUAL ===== */
.hero-card-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-credit-card {
  width: 320px;
  height: 200px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1a1a1a 0%, #333 50%, #c9a96e 100%);
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.15);
  color: #fff;
  font-family: var(--font-ui);
  transform: perspective(800px) rotateY(-5deg) rotateX(5deg);
  transition: transform 0.4s ease;
  overflow: hidden;
}

.hero-credit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  border-radius: 16px;
  pointer-events: none;
}

.hero-credit-card:hover {
  transform: perspective(800px) rotateY(0deg) rotateX(0deg);
}

.hero-card-chip {
  width: 36px;
  height: 28px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f0d78c, #c9a96e);
  margin-bottom: 1.5rem;
}

.hero-card-number {
  font-size: 1.15rem;
  letter-spacing: 0.15em;
  font-weight: 500;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero-card-details {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.hero-card-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.hero-card-expiry {
  font-size: 0.75rem;
  opacity: 0.8;
}

.hero-card-logo {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  opacity: 0.6;
}

.hero-floating-stat {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  animation: subtleFloat 3s ease-in-out infinite;
}

.hero-floating-stat-1 {
  top: -10px;
  right: -20px;
  color: var(--success);
}

.hero-floating-stat-2 {
  bottom: -10px;
  left: -20px;
  color: var(--accent);
  animation-delay: 1.5s;
}

/* ===== FEATURES HIGHLIGHT ===== */
.features-highlight {
  padding: 1rem 0 0;
}

.features-highlight .section-title {
  margin-bottom: 1.5rem;
}

.features-highlight .features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.features-highlight .feature-card {
  text-align: center;
  padding: 1.75rem 1.25rem;
}

.features-highlight .feature-card h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.features-highlight .feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.features-highlight .feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: #fff;
}

.features-highlight .feature-icon i,
.features-highlight .feature-icon svg {
  width: 22px;
  height: 22px;
}

/* ===== IMPROVED FOOTER ===== */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
}

.footer-links-grid {
  display: flex;
  gap: 3rem;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-col ul li a {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ===== RESPONSIVE: Partners, Features, Footer ===== */
@media (max-width: 768px) {
  .partners-logos {
    gap: 1.5rem;
  }
  .partner-logo img {
    width: 32px;
    height: 32px;
  }
  .features-highlight .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-credit-card {
    width: 260px;
    height: 165px;
    padding: 1.2rem;
  }
  .hero-card-number {
    font-size: 0.95rem;
  }
  .hero-floating-stat {
    display: none;
  }
  .footer-links-grid {
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .features-highlight .features-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  .footer-links-grid {
    flex-direction: column;
    gap: 1.25rem;
  }
}

/* ===== DARK MODE: New elements ===== */
[data-theme="dark"] .partners-section {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .partner-logo {
  filter: grayscale(100%) brightness(1.5);
}

[data-theme="dark"] .partner-logo:hover {
  filter: grayscale(0%) brightness(1);
}

[data-theme="dark"] .hero-floating-stat {
  background: #1a1a1a;
  border-color: #333;
}

[data-theme="dark"] .footer-col h4 {
  color: var(--text);
}

[data-theme="dark"] .footer-bottom {
  border-color: var(--border);
}
