/**
 * Customer Portal CSS - The Clean Lab
 * "Titanium Command" Industrial/Tactical Design System
 *
 * Based on: design-guidelines-the-clean-labs
 * Version: 1.0.0
 *
 * CRITICAL RULES:
 * 1. NO rounded corners (border-radius) - use chamfer ONLY
 * 2. Colors: Tech Blue #0055FF, Success #00CC66, Error #FF3333
 * 3. Fonts: Inter (UI) + JetBrains Mono (prices/technical)
 * 4. 4px spacing base unit
 */

/* ========================================
   DESIGN TOKENS - Foundation Layer
   ======================================== */

:root {
  /* === NEUTRALS === */
  --color-white: #ffffff;
  --color-gray-50: #f8fafc;
  --color-gray-100: #f0f2f5;
  --color-gray-200: #e2e8f0;
  --color-gray-300: #cbd5e1;
  --color-gray-400: #94a3b8;
  --color-gray-500: #64748b;
  --color-gray-900: #0f172a;
  --color-black: #111111;

  /* === BRAND COLORS === */
  --color-blue-500: #0055ff;
  --color-blue-600: #0044cc;
  --color-orange-500: #ff4800;
  --color-orange-600: #e04000;

  /* === STATUS COLORS === */
  --color-green-500: #00cc66;
  --color-red-500: #ff3333;
  --color-amber-500: #ffaa00;

  /* === SEMANTIC COLORS === */
  --bg-primary: var(--color-gray-100);
  --bg-secondary: var(--color-white);
  --bg-elevated: var(--color-white);
  --bg-inverse: var(--color-black);
  --bg-subtle: var(--color-gray-50);

  --text-primary: var(--color-black);
  --text-secondary: var(--color-gray-900);
  --text-muted: var(--color-gray-400);
  --text-inverse: var(--color-white);

  --border-subtle: var(--color-gray-200);
  --border-default: var(--color-gray-300);
  --border-strong: var(--color-black);

  --accent-primary: var(--color-blue-500);
  --accent-primary-hover: var(--color-blue-600);
  --accent-wash: var(--color-blue-500);
  --accent-dry: var(--color-orange-500);

  --status-success: var(--color-green-500);
  --status-error: var(--color-red-500);
  --status-warning: var(--color-amber-500);

  /* === TYPOGRAPHY === */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;
  --weight-black: 900;

  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;

  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-widest: 0.1em;

  /* Typography Presets */
  --heading-1: var(--weight-black) var(--text-4xl)/var(--leading-tight) var(--font-display);
  --heading-2: var(--weight-black) var(--text-3xl)/var(--leading-tight) var(--font-display);
  --heading-3: var(--weight-bold) var(--text-2xl)/var(--leading-snug) var(--font-display);
  --heading-4: var(--weight-bold) var(--text-xl)/var(--leading-snug) var(--font-display);
  --body-base: var(--weight-regular) var(--text-base)/var(--leading-normal) var(--font-display);
  --body-sm: var(--weight-regular) var(--text-sm)/var(--leading-normal) var(--font-display);
  --tech-price: var(--weight-bold) var(--text-2xl)/var(--leading-tight) var(--font-mono);
  --tech-price-lg: var(--weight-bold) var(--text-4xl)/var(--leading-tight) var(--font-mono);
  --tech-label: var(--weight-medium) var(--text-sm)/var(--leading-tight) var(--font-mono);

  /* === SPACING (4px base) === */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* === CHAMFER SHAPES (NO border-radius!) === */
  --shape-chamfer-sm: polygon(
    8px 0, 100% 0, 100% calc(100% - 8px),
    calc(100% - 8px) 100%, 0 100%, 0 8px
  );
  --shape-chamfer-md: polygon(
    12px 0, 100% 0, 100% calc(100% - 12px),
    calc(100% - 12px) 100%, 0 100%, 0 12px
  );
  --shape-chamfer-lg: polygon(
    20px 0, 100% 0, 100% calc(100% - 20px),
    calc(100% - 20px) 100%, 0 100%, 0 20px
  );
  --shape-chamfer-xl: polygon(
    30px 0, 100% 0, 100% calc(100% - 30px),
    calc(100% - 30px) 100%, 0 100%, 0 30px
  );

  /* === SHADOWS === */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --glow-blue: 0 0 20px rgba(0, 85, 255, 0.3);

  /* === BORDERS === */
  --border-width-sm: 1px;
  --border-width-md: 2px;

  /* === TOUCH TARGETS === */
  --touch-mobile: 44px;
  --touch-default: 48px;
}

/* ========================================
   BASE STYLES
   ======================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-display);
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TECH GRID BACKGROUNDS
   ======================================== */

/* Tech Grid - 20px pattern */
.tech-grid {
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: -1px -1px;
}

/* Fine Grid - 10px pattern */
.tech-grid-fine {
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 10px 10px;
  background-position: -1px -1px;
}

/* Body with subtle grid */
body.with-grid {
  background-image:
    linear-gradient(rgba(0, 85, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 85, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: -1px -1px;
}

/* ========================================
   TACTICAL/HUD EFFECTS
   ======================================== */

/* Scan-line effect overlay */
.scan-lines {
  position: relative;
}

.scan-lines::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.02) 0px,
    transparent 1px,
    transparent 2px,
    rgba(0, 0, 0, 0.02) 3px
  );
  pointer-events: none;
  z-index: 1;
}

/* Hazard stripe pattern */
.hazard-stripes {
  background: repeating-linear-gradient(
    45deg,
    var(--status-warning),
    var(--status-warning) 10px,
    var(--color-black) 10px,
    var(--color-black) 20px
  );
}

/* Glow effects */
.glow-blue {
  box-shadow: 0 0 20px rgba(0, 85, 255, 0.3);
}

.glow-orange {
  box-shadow: 0 0 20px rgba(255, 72, 0, 0.3);
}

.glow-success {
  box-shadow: 0 0 20px rgba(0, 204, 102, 0.3);
}

/* Glow pulse animation */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 85, 255, 0.3); }
  50% { box-shadow: 0 0 30px rgba(0, 85, 255, 0.5); }
}

.glow-pulse {
  animation: glow-pulse 2s ease-in-out infinite;
}

/* Corner brackets decoration */
.corner-brackets {
  position: relative;
}

.corner-brackets::before,
.corner-brackets::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent-primary);
}

.corner-brackets::before {
  top: -4px;
  left: -4px;
  border-right: none;
  border-bottom: none;
}

.corner-brackets::after {
  bottom: -4px;
  right: -4px;
  border-left: none;
  border-top: none;
}

/* ========================================
   SCAN EFFECT - Animated Sweep Line
   ======================================== */

@keyframes scanline {
  0% {
    top: -10%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 110%;
    opacity: 0;
  }
}

.scan-effect {
  position: relative;
  overflow: hidden;
}

.scan-effect::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-primary),
    transparent
  );
  box-shadow: 0 0 8px var(--accent-primary);
  animation: scanline 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 10;
}

/* ========================================
   PROCESSING BAR
   ======================================== */

@keyframes processing {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.processing-bar {
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-gray-200) 0%,
    var(--accent-primary) 50%,
    var(--color-gray-200) 100%
  );
  background-size: 200% 100%;
  animation: processing 1.5s linear infinite;
}

/* ========================================
   SKELETON SHIMMER
   ======================================== */

@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 100% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-gray-200) 25%,
    var(--color-gray-100) 50%,
    var(--color-gray-200) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .scan-effect::after,
  .processing-bar,
  .skeleton,
  .glow-pulse {
    animation: none;
  }
}

/* ========================================
   CHAMFER UTILITY CLASSES
   ======================================== */

.chamfer-sm { clip-path: var(--shape-chamfer-sm); }
.chamfer-md { clip-path: var(--shape-chamfer-md); }
.chamfer-lg { clip-path: var(--shape-chamfer-lg); }
.chamfer-xl { clip-path: var(--shape-chamfer-xl); }

/* ========================================
   LAYOUT
   ======================================== */

.customer-container {
  max-width: 480px;
  margin: 0 auto;
  padding: var(--space-4);
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
  min-height: 100vh;
  box-sizing: border-box;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  min-height: var(--touch-default);
  min-width: 120px;
  background: var(--accent-primary);
  color: var(--text-inverse);
  border: var(--border-width-md) solid var(--color-black);
  clip-path: var(--shape-chamfer-sm);
  box-shadow: var(--shadow-md);
  font: var(--body-base);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
  user-select: none;
}

.btn:hover {
  background: var(--accent-primary-hover);
}

.btn:active {
  transform: scale(0.96);
}

.btn:disabled {
  background: var(--color-gray-300);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-inverse);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: var(--border-width-md) solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--color-gray-100);
  border-color: var(--accent-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: var(--border-width-md) solid transparent;
  box-shadow: none;
  min-width: auto;
}

.btn-ghost:hover {
  background: var(--color-gray-100);
  border-color: var(--border-subtle);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  min-height: 36px;
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  min-height: 56px;
  font-size: var(--text-lg);
}

.btn-block {
  width: 100%;
}

/* Loading state */
.btn.is-loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: var(--space-2);
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   CARDS
   ======================================== */

.card {
  display: block;
  padding: var(--space-6);
  background: var(--bg-secondary);
  border: var(--border-width-md) solid var(--border-default);
  clip-path: var(--shape-chamfer-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card-sm {
  padding: var(--space-4);
  clip-path: var(--shape-chamfer-sm);
}

.card-elevated {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.card-selectable {
  cursor: pointer;
  position: relative;
  transition: transform 0.1s ease, border-color 0.15s ease;
}

.card-selectable::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  transition: background 0.15s ease;
}

.card-selectable:hover {
  border-color: var(--accent-primary);
}

.card-selectable:active {
  transform: scale(0.98);
}

.card-selectable.is-selected {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border-color: var(--accent-primary);
}

.card-selectable.is-selected::before {
  background: var(--accent-primary);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: var(--border-width-sm) solid var(--border-subtle);
}

.card-title {
  font: var(--heading-4);
  margin: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: var(--border-width-sm) solid var(--border-subtle);
}

/* ========================================
   MEMBER CARD (Points Display)
   ======================================== */

.member-card {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  padding: var(--space-6);
  clip-path: var(--shape-chamfer-lg);
  position: relative;
  overflow: hidden;
}

.member-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0, 85, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.member-card .tech-label {
  font: var(--tech-label);
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  margin-bottom: var(--space-2);
}

.member-card .points-value {
  font: var(--tech-price-lg);
  color: var(--accent-primary);
  line-height: 1;
}

.member-card .points-label {
  font: var(--tech-label);
  color: var(--color-gray-400);
  margin-left: var(--space-2);
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: var(--accent-primary);
  color: var(--text-inverse);
  font: var(--tech-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  clip-path: var(--shape-chamfer-sm);
}

/* ========================================
   QUICK ACTIONS GRID
   ======================================== */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.action-item {
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
}

.action-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: var(--border-width-md) solid var(--border-default);
  clip-path: var(--shape-chamfer-sm);
  color: var(--accent-primary);
  font-size: 1.25rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.action-item:hover .action-icon {
  border-color: var(--accent-primary);
  background: var(--color-gray-50);
}

.action-label {
  font: var(--tech-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--text-secondary);
}

/* ========================================
   VOUCHER CARD
   ======================================== */

.voucher-card {
  display: flex;
  align-items: stretch;
  background: var(--bg-secondary);
  border: var(--border-width-md) solid var(--border-default);
  clip-path: var(--shape-chamfer-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.voucher-card:hover {
  border-color: var(--accent-primary);
}

.voucher-left {
  flex-shrink: 0;
  width: 80px;
  background: var(--bg-inverse);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  color: var(--text-inverse);
  position: relative;
}

.voucher-left::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: var(--bg-secondary);
  clip-path: circle(50%);
}

.voucher-value {
  font: var(--tech-price);
  color: var(--accent-primary);
}

.voucher-type {
  font: var(--tech-label);
  color: var(--color-gray-400);
  text-transform: uppercase;
}

.voucher-right {
  flex: 1;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.voucher-title {
  font: var(--heading-4);
  margin-bottom: var(--space-1);
}

.voucher-expiry {
  font: var(--body-sm);
  color: var(--text-muted);
}

.voucher-action {
  margin-left: auto;
  padding: var(--space-4);
  display: flex;
  align-items: center;
}

/* ========================================
   FORMS
   ======================================== */

.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  min-height: var(--touch-default);
  background: var(--bg-secondary);
  border: var(--border-width-md) solid var(--border-default);
  clip-path: var(--shape-chamfer-sm);
  font: var(--body-base);
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder {
  color: var(--text-muted);
}

.input:hover {
  border-color: var(--border-strong);
}

.input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.15);
}

.input:disabled {
  background: var(--color-gray-100);
  color: var(--text-muted);
  cursor: not-allowed;
}

.input-error {
  border-color: var(--status-error);
}

.input-error:focus {
  box-shadow: 0 0 0 3px rgba(255, 51, 51, 0.15);
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.form-help {
  display: block;
  font: var(--body-sm);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

.form-error-msg {
  display: block;
  font: var(--body-sm);
  color: var(--status-error);
  margin-top: var(--space-2);
}

/* Input Group */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .input {
  flex: 1;
  clip-path: none;
}

.input-group-prepend {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-subtle);
  border: var(--border-width-md) solid var(--border-default);
  border-right: none;
  font: var(--body-base);
  color: var(--text-muted);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}

.input-group-append {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-subtle);
  border: var(--border-width-md) solid var(--border-default);
  border-left: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

/* ========================================
   STATUS / BADGES
   ======================================== */

.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font: var(--tech-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  clip-path: var(--shape-chamfer-sm);
}

.status-success {
  background: rgba(0, 204, 102, 0.15);
  color: var(--status-success);
}

.status-error {
  background: rgba(255, 51, 51, 0.15);
  color: var(--status-error);
}

.status-warning {
  background: rgba(255, 170, 0, 0.15);
  color: var(--status-warning);
}

.status-info {
  background: rgba(0, 85, 255, 0.15);
  color: var(--accent-primary);
}

/* ========================================
   TRANSACTION LIST
   ======================================== */

.tx-list {
  background: var(--bg-secondary);
  border: var(--border-width-md) solid var(--border-default);
  clip-path: var(--shape-chamfer-md);
}

.tx-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: var(--border-width-sm) solid var(--border-subtle);
}

.tx-item:last-child {
  border-bottom: none;
}

.tx-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: var(--shape-chamfer-sm);
}

.tx-icon.earn {
  background: rgba(0, 204, 102, 0.15);
  color: var(--status-success);
}

.tx-icon.spend {
  background: rgba(255, 51, 51, 0.15);
  color: var(--status-error);
}

.tx-info {
  flex: 1;
  min-width: 0;
}

.tx-description {
  font-weight: var(--weight-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-date {
  font: var(--body-sm);
  color: var(--text-muted);
}

.tx-amount {
  font: var(--tech-price);
  text-align: right;
}

.tx-amount.positive {
  color: var(--status-success);
}

.tx-amount.negative {
  color: var(--status-error);
}

/* ========================================
   REDEEM OPTIONS
   ======================================== */

.redeem-option {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-secondary);
  border: var(--border-width-md) solid var(--border-default);
  clip-path: var(--shape-chamfer-md);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.redeem-option:hover {
  border-color: var(--accent-primary);
  transform: translateX(4px);
}

.redeem-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.redeem-option.disabled:hover {
  border-color: var(--border-default);
}

.redeem-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-inverse);
  color: var(--accent-primary);
  clip-path: var(--shape-chamfer-sm);
  font-size: 1.25rem;
}

.redeem-info {
  flex: 1;
}

.redeem-value {
  font: var(--heading-4);
}

.redeem-points {
  font: var(--tech-label);
  color: var(--accent-primary);
}

.redeem-action {
  color: var(--text-muted);
}

/* ========================================
   BOTTOM NAVIGATION
   ======================================== */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-inverse);
  border-top: var(--border-width-md) solid var(--border-strong);
  padding: var(--space-2) 0;
  padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
  z-index: 1000;
}

.bottom-nav-container {
  display: flex;
  justify-content: space-around;
  max-width: 480px;
  margin: 0 auto;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2);
  color: var(--color-gray-400);
  text-decoration: none;
  font: var(--tech-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  transition: color 0.15s ease;
}

.nav-item i {
  font-size: 1.5rem;
}

.nav-item.active,
.nav-item:hover {
  color: var(--accent-primary);
}

.nav-item-scan {
  position: relative;
  top: -12px;
}

.nav-item-scan .nav-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  color: var(--text-inverse);
  clip-path: var(--shape-chamfer-md);
  box-shadow: var(--glow-blue);
  font-size: 1.5rem;
}

/* ========================================
   HEADER
   ======================================== */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.page-title {
  font: var(--heading-3);
}

.page-subtitle {
  font: var(--body-sm);
  color: var(--text-muted);
}

.header-action {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: var(--border-width-md) solid var(--border-default);
  clip-path: var(--shape-chamfer-sm);
  color: var(--text-primary);
  transition: border-color 0.15s ease;
}

.header-action:hover {
  border-color: var(--accent-primary);
}

/* ========================================
   PROFILE
   ======================================== */

.profile-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-inverse);
  color: var(--accent-primary);
  font: var(--heading-2);
  clip-path: var(--shape-chamfer-md);
}

.profile-name {
  font: var(--heading-3);
  margin-bottom: var(--space-1);
}

.profile-phone {
  font: var(--tech-label);
  color: var(--text-muted);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.stat-card {
  background: var(--bg-secondary);
  border: var(--border-width-md) solid var(--border-default);
  clip-path: var(--shape-chamfer-sm);
  padding: var(--space-4);
  text-align: center;
}

.stat-value {
  font: var(--tech-price);
  color: var(--text-primary);
}

.stat-label {
  font: var(--tech-label);
  color: var(--text-muted);
  text-transform: uppercase;
}

.profile-menu {
  background: var(--bg-secondary);
  border: var(--border-width-md) solid var(--border-default);
  clip-path: var(--shape-chamfer-md);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: var(--border-width-sm) solid var(--border-subtle);
  transition: background 0.15s ease;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:hover {
  background: var(--bg-subtle);
}

.menu-item i {
  width: 24px;
  text-align: center;
  color: var(--accent-primary);
}

.menu-item .bi-chevron-right {
  margin-left: auto;
  color: var(--text-muted);
}

/* ========================================
   SCANNER
   ======================================== */

.scanner-container {
  background: var(--bg-inverse);
  border: var(--border-width-md) solid var(--border-strong);
  clip-path: var(--shape-chamfer-lg);
  padding: var(--space-4);
}

.scanner-header {
  text-align: center;
  margin-bottom: var(--space-4);
}

.scanner-header .tech-label {
  font: var(--tech-label);
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
}

.scanner-viewport {
  position: relative;
  aspect-ratio: 1;
  background: #000;
  border: 2px solid var(--accent-primary);
  overflow: hidden;
}

.scanner-viewport video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-overlay {
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent-primary);
  box-shadow: inset 0 0 40px rgba(0, 85, 255, 0.2);
  pointer-events: none;
}

.scanner-actions {
  margin-top: var(--space-4);
}

/* ========================================
   MODALS
   ======================================== */

.modal-content {
  background: var(--bg-secondary);
  border: var(--border-width-md) solid var(--border-strong);
  clip-path: var(--shape-chamfer-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: var(--border-width-sm) solid var(--border-subtle);
}

.modal-title {
  font: var(--heading-4);
  margin: 0;
}

.modal-body {
  padding: var(--space-6);
}

.modal-footer {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: var(--border-width-sm) solid var(--border-subtle);
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state-title {
  font: var(--heading-4);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.empty-state-text {
  font: var(--body-base);
  margin-bottom: var(--space-6);
}

/* ========================================
   RESULT STATES (Success/Error)
   ======================================== */

.result-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

.result-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  clip-path: var(--shape-chamfer-md);
}

.result-icon.success {
  background: var(--status-success);
  color: var(--text-inverse);
}

.result-icon.error {
  background: var(--status-error);
  color: var(--text-inverse);
}

.result-title {
  font: var(--heading-3);
  margin-bottom: var(--space-2);
}

.result-message {
  font: var(--body-base);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 85, 255, 0.2);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-gray-200) 25%,
    var(--color-gray-100) 50%,
    var(--color-gray-200) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

.toast-container {
  position: fixed;
  top: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: calc(100% - var(--space-8));
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  margin-bottom: var(--space-2);
  background: var(--bg-inverse);
  color: var(--text-inverse);
  border: var(--border-width-md) solid var(--border-strong);
  clip-path: var(--shape-chamfer-sm);
  box-shadow: var(--shadow-lg);
  animation: toast-slide-in 0.3s ease;
}

@keyframes toast-slide-in {
  from {
    opacity: 0;
    transform: translateY(-1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-success {
  border-left: 4px solid var(--status-success);
}

.toast-error {
  border-left: 4px solid var(--status-error);
}

.toast-warning {
  border-left: 4px solid var(--status-warning);
}

/* ========================================
   UTILITIES
   ======================================== */

.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-inverse { color: var(--text-inverse) !important; }
.text-success { color: var(--status-success) !important; }
.text-error { color: var(--status-error) !important; }
.text-accent { color: var(--accent-primary) !important; }

.text-mono { font-family: var(--font-mono) !important; }
.text-caps {
  text-transform: uppercase !important;
  letter-spacing: var(--tracking-widest) !important;
}

.bg-primary { background: var(--bg-primary) !important; }
.bg-secondary { background: var(--bg-secondary) !important; }
.bg-inverse { background: var(--bg-inverse) !important; }

.divider {
  height: var(--border-width-sm);
  background: var(--border-subtle);
  margin: var(--space-4) 0;
}

/* ========================================
   RESPONSIVE - iOS Safe Area
   ======================================== */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
  }

  .customer-container {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
}

/* ========================================
   RESPONSIVE - Tablet/Desktop
   ======================================== */

@media (min-width: 768px) {
  .customer-container {
    padding: var(--space-8);
  }

  .quick-actions {
    gap: var(--space-4);
  }
}
