/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: #0b0f1a;
  color: #fff;
  font-family: 'Montserrat', system-ui, sans-serif;
}

/* === TYPOGRAPHY === */
.title { font-family: 'Tomorrow', sans-serif; font-size: 26px; font-weight: 700; }
h2.title { font-size: 32px; }
.label { font-family: 'Tomorrow', sans-serif; font-size: 22px; font-weight: 600; color: #94a3b8; }
.subtitle { font-size: 16px; color: #64748b; }
.mono { font-family: 'Fira Code', monospace; }
.small { font-size: 13px; color: #475569; }
.upper { text-transform: uppercase; letter-spacing: 1px; font-size: 10px; color: #64748b; }
.bold { font-weight: 700; }
.teal { color: #008E6D; }
.muted { color: #64748b; font-size: 14px; }
.error { color: #ef4444; font-size: 14px; margin-top: 8px; }

/* === LAYOUT === */
#app { position: relative; width: 100%; height: 100%; overflow: hidden; }
.screen { display: none; position: absolute; inset: 0; padding: 50px 28px 28px 28px; }
.screen.active { display: flex; }
.screen-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; width: 100%; height: 100%; position: relative; z-index: 2; }
.screen-left { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; max-width: 70%; position: relative; z-index: 2; padding-left: 20px; }
.screen-left.wide { max-width: 92%; }
.stack { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.row { display: flex; gap: 14px; width: 100%; align-items: center; }

/* === BRAND BAR === */
.brand-bar { position: fixed; top: 10px; right: 16px; z-index: 10; }
.brand-bar img { height: 32px; opacity: 0.55; }

/* === DECORATIVE: ASCII RAIN === */
.ascii-rain { position: fixed; top: 0; right: 0; width: 25%; height: 100%; overflow: hidden; pointer-events: none; z-index: 0; mask-image: linear-gradient(to left, rgba(0,0,0,0.3), transparent); -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.3), transparent); }
.ascii-col { position: absolute; top: 0; font-family: 'Fira Code', monospace; font-size: 10px; line-height: 14px; color: #008E6D; opacity: 0; animation: ascii-fall linear infinite; white-space: pre; text-shadow: 0 0 4px rgba(0,142,109,0.2); }
.ascii-col.yellow { color: #F3E600; }
@keyframes ascii-fall { 0% { transform: translateY(-100%); opacity: 0; } 5% { opacity: 0.5; } 85% { opacity: 0.15; } 100% { transform: translateY(100vh); opacity: 0; } }

/* === DECORATIVE: SCANLINES === */
.scanlines { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,142,109,0.008) 2px, rgba(0,142,109,0.008) 4px); }

/* === DECORATIVE: LEMONMAN === */
.lemonman { position: fixed; right: 8px; bottom: 8px; height: 140px; opacity: 0.18; pointer-events: none; z-index: 0; animation: lemon-float 8s ease-in-out infinite; }
@keyframes lemon-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* === QR CODE === */
.qr-box { width: 300px; height: 300px; background: rgba(30,41,59,0.92); border: 3px solid #008E6D; border-radius: 6px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 30px rgba(0,142,109,0.2); }
.qr-box img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.qr-placeholder { color: #475569; font-family: 'Fira Code', monospace; font-size: 14px; }

/* === SEARCH INPUT === */
.search-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.search-input { flex: 1; padding: 16px 18px; font-size: 20px; font-family: 'Montserrat', sans-serif; background: rgba(30,41,59,0.95); border: 2px solid #334155; border-radius: 12px; color: #fff; outline: none; }
.search-input:focus { border-color: #008E6D; box-shadow: 0 0 20px rgba(0,142,109,0.2); }
.search-input::placeholder { color: #475569; }
.btn-search { width: 56px; height: 56px; border-radius: 12px; background: #008E6D; border: none; color: #fff; font-size: 24px; cursor: pointer; flex-shrink: 0; }
.btn-search:active { background: #006B53; }

/* === MIC BUTTON === */
.mic-btn { width: 260px; height: 260px; border-radius: 50%; background: linear-gradient(135deg, rgba(30,41,59,0.95), rgba(15,25,35,0.98)); border: 5px solid #008E6D; color: #008E6D; font-family: 'Fira Code', monospace; font-size: 96px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 0 40px rgba(0,142,109,0.25); transition: border-color 0.2s, box-shadow 0.2s; }
.mic-btn:active, .mic-btn.listening { border-color: #F3E600; box-shadow: 0 0 60px rgba(243,230,0,0.3); color: #F3E600; }
.mic-btn-small { width: 56px; height: 56px; border-radius: 50%; background: rgba(30,41,59,0.95); border: 2px solid #008E6D; color: #008E6D; font-family: 'Fira Code', monospace; font-size: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.mic-btn-small:active, .mic-btn-small.listening { border-color: #F3E600; color: #F3E600; }

/* === BUTTONS === */
.btn-primary { background: #008E6D; color: #fff; border: none; border-radius: 6px; padding: 28px 32px; min-height: 90px; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 28px; cursor: pointer; text-align: center; transition: background 0.2s; }
.btn-primary:hover { background: #F3E600; color: #1E1C3D; }
.send-btn { font-family: 'Fira Code', monospace; letter-spacing: 3px; flex: 1; box-shadow: 0 0 30px rgba(0,142,109,0.3); }
.btn-secondary { background: rgba(30,41,59,0.92); color: #fff; border: 2px solid #334155; border-radius: 6px; padding: 22px 24px; min-height: 80px; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 22px; cursor: pointer; width: 100%; text-align: left; transition: background 0.2s; display: flex; align-items: center; }
.btn-secondary:hover { background: rgba(39,53,73,0.95); border-color: #008E6D; }
.btn-secondary .ico { font-family: 'Fira Code', monospace; color: #008E6D; margin-right: 14px; font-size: 20px; width: 32px; text-align: center; flex-shrink: 0; }
.btn-secondary.freetext { border-color: #F3E600; color: #F3E600; background: rgba(243,230,0,0.04); }
.btn-secondary.freetext .ico { color: #F3E600; }
.btn-back { background: transparent; border: 2px solid #334155; color: #64748b; border-radius: 6px; padding: 16px 22px; min-height: 56px; font-family: 'Montserrat', sans-serif; font-size: 16px; cursor: pointer; flex-shrink: 0; }

/* === CUSTOMER CARD === */
.customer-card { background: #008E6D; border-radius: 6px; padding: 18px 24px; width: 100%; }
.customer-card .clabel { font-size: 10px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 1px; }
.customer-card .name { font-size: 24px; font-weight: 700; margin-top: 2px; }
.customer-card .email { font-size: 16px; color: rgba(255,255,255,0.8); margin-top: 4px; }

/* === TEMPLATE GRID === */
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.tpl-grid .full-width { grid-column: 1 / -1; }

/* === PREVIEW === */
.preview-card { background: rgba(30,41,59,0.92); border: 2px solid #334155; border-radius: 6px; padding: 20px; width: 100%; }
.preview-card hr { border: none; border-top: 1px solid #334155; margin: 12px 0; }
.preview-card p { font-size: 16px; color: #cbd5e1; line-height: 1.7; }

/* === CONFIRM === */
.confirm-circle { width: 220px; height: 220px; border-radius: 50%; background: #008E6D; display: flex; align-items: center; justify-content: center; font-family: 'Fira Code', monospace; color: #fff; font-size: 56px; font-weight: 700; box-shadow: 0 0 60px rgba(0,142,109,0.5); }
