:root {
  --bg: #0A0A0A;
  --surface: #000000;
  --ink: #FAFAFA;
  --text-sec: #A1A1AA;
  --line: #27272A;
  --line-focus: #52525B;
  --primary: #EDEDED;
  --primary-ink: #0A0A0A;
  --active: #FAFAFA;
  
  --success: #4ADE80; 
  --pending: #FBBF24; 
  --error: #F87171;
  
  --radius-sm: 4px;
  --radius-lg: 6px;
  --radius-full: 9999px;
  
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  
  --status-height: 28px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Geist', sans-serif;
  background-color: #000;
  color: var(--ink);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#app {
  width: 100%;
  max-width: 420px;
  background-color: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.status-bar {
  height: var(--status-height);
  background-color: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Geist Mono', monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-sec);
  gap: 6px;
  position: sticky;
  top: 0;
  z-index: 50;
  cursor: pointer;
}
.status-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
}
.status-dot.success { background-color: var(--success); box-shadow: 0 0 4px var(--success); }
.status-dot.pending { background-color: var(--pending); box-shadow: 0 0 4px var(--pending); }

.view {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px;
}
.view.active { display: block; }
.view-content { padding: var(--space-4) var(--space-3); }

h1 { font-family: 'Geist Mono', monospace; font-size: 1.25rem; font-weight: 500; text-transform: uppercase; letter-spacing: -0.02em; margin-bottom: var(--space-1); }
h2 { font-family: 'Geist Mono', monospace; font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-3); margin-top: var(--space-5); color: var(--text-sec); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
p.subtitle { color: var(--text-sec); font-size: 0.875rem; line-height: 1.5; margin-bottom: var(--space-4); }

.input-group { margin-bottom: var(--space-3); }
.input-group label { display: block; font-family: 'Geist Mono', monospace; font-size: 0.75rem; text-transform: uppercase; color: var(--text-sec); margin-bottom: 6px; }
.input-group input { width: 100%; background: transparent; border: 1px solid var(--line); padding: 12px; border-radius: var(--radius-sm); font-family: 'Geist Mono', monospace; font-size: 1rem; color: var(--ink); outline: none; transition: border-color 0.2s; }
.input-group input:focus { border-color: var(--active); }

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%;
  background: var(--primary); color: var(--primary-ink); border: 1px solid var(--primary);
  padding: 14px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; font-family: 'Geist Mono', monospace; text-transform: uppercase;
  cursor: pointer; min-height: 48px; transition: all 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-outline:active { background: var(--line); }
.btn-ghost { background: transparent; border: 1px dashed var(--line); color: var(--text-sec); }

.product-row { display: flex; align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); gap: var(--space-3); }
.product-row:last-child { border-bottom: none; }

.chip {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line);
  font-size: 0.875rem; font-weight: 600; font-family: 'Geist Mono', monospace;
  color: var(--text-sec); flex-shrink: 0;
  overflow: hidden;
}
.chip img { width: 100%; height: 100%; object-fit: cover; }
.product-info { flex: 1; min-width: 0; }
.product-name { font-size: 0.9375rem; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.product-sub { font-family: 'Geist Mono', monospace; font-size: 0.6875rem; color: var(--text-sec); margin-top: 4px; text-transform: uppercase; }

.stepper {
  display: flex; align-items: center; background: transparent;
  border: 1px solid var(--line); border-radius: var(--radius-sm); height: 44px;
}
.stepper button {
  width: 44px; height: 100%; border: none; background: transparent;
  font-size: 1.25rem; color: var(--text-sec); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.stepper button:active { color: var(--ink); background: var(--line); }
.stepper span { font-family: 'Geist Mono', monospace; font-size: 1rem; width: 42px; text-align: center; color: var(--ink); font-variant-numeric: tabular-nums; }
.stepper.empty { border: 1px dashed var(--line); }
.stepper.empty span { color: var(--text-sec); }

.progress-container { margin-bottom: var(--space-4); margin-top: var(--space-3); }
.progress-text { font-size: 0.75rem; font-family: 'Geist Mono', monospace; margin-bottom: var(--space-2); display: flex; justify-content: space-between; color: var(--text-sec); text-transform: uppercase; }
.progress-text strong { color: var(--ink); }
.progress-bar { height: 2px; background: var(--line); width: 100%; }
.progress-fill { height: 100%; background: var(--active); width: 0%; transition: width 0.3s; }

.sticky-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 10px 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-4);
}

.group-ruler { display: flex; gap: var(--space-1); margin-top: 10px; }
.group-ruler-item {
  flex: 1; height: 28px; background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  font-family: 'Geist Mono', monospace; font-size: 0.6875rem; color: var(--text-sec); cursor: pointer;
}
.group-ruler-item.active { background: var(--ink); color: var(--primary-ink); border-color: var(--ink); font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-3); margin-bottom: var(--space-3); }
.card-title { font-family: 'Geist Mono', monospace; font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; color: var(--text-sec); margin-bottom: var(--space-3); padding-bottom: 6px; border-bottom: 1px solid var(--line); }

.checkbox-item { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) 0; border-bottom: 1px dashed var(--line); }
.checkbox-item:last-child { border-bottom: none; }
.checkbox-item input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--ink); background: transparent; border: 1px solid var(--line); }
.checkbox-item label { flex: 1; font-size: 0.875rem; color: var(--ink); }

.bottom-action {
  position: absolute; bottom: 0; left: 0; right: 0; padding: var(--space-3);
  background: #000; border-top: 1px solid var(--line);
}

.skeleton { background: var(--line); border-radius: 2px; animation: pulse 1.5s infinite ease-in-out; }
@keyframes pulse { 0% { opacity: 0.3; } 50% { opacity: 0.8; } 100% { opacity: 0.3; } }
