/* ══════════════════════════════════════════════════════════════
   FreshMart Enterprise — Modern Dark Sign In
   ══════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

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

:root {
  --bg: #050505;
  --surface: #121212;
  --surface-2: #1A1A1A;
  --surface-3: #222222;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.14);
  --text: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-muted: #52525B;
  --primary: #FF6B00;
  --primary-hover: #FF8533;
  --primary-glow: rgba(255, 107, 0, 0.18);
  --green: #10B981;
  --green-glow: rgba(16, 185, 129, 0.18);
  --blue: #3B82F6;
  --purple: #8B5CF6;
  --cyan: #06B6D4;
  --red: #EF4444;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.layout {
  display: flex;
  height: 100dvh;
  width: 100%;
}

/* ==================== LEFT PANEL (50%) ==================== */
.left {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 8vw;
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(255, 107, 0, 0.04), transparent 60%);
  border-right: 1px solid var(--border);
}

.mesh-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.mesh-bg::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(255, 107, 0, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  animation: meshMove 20s ease-in-out infinite alternate;
}

@keyframes meshMove {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-3%, 2%) rotate(1deg); }
}

.mesh-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.left-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 650px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 40px;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), #EA580C);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 24px rgba(255, 107, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--primary);
}

.left-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.left-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 107, 0, 0.08);
  border: 1px solid rgba(255, 107, 0, 0.15);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
  backdrop-filter: blur(10px);
}

.left-badge .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.left-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.left-title .gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.left-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 520px;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.pill {
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
}

.pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-light);
  color: var(--text);
  transform: translateY(-2px);
}

.left-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  width: 100%;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
  margin-top: 28px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-divider {
  width: 1px;
  height: 42px;
  background: var(--border);
}

.left-copyright {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

.left-copyright-sub {
  font-size: 0.68rem;
  opacity: 0.75;
}

/* ==================== RIGHT PANEL (50%) ==================== */
.right {
  flex: 1;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 6vw;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

.right::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.04), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.login-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 2;
}

/* Steps Progress */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}

.step {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-workspace {
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.step-workspace:focus {
  outline: none;
}

.step-workspace:hover .step-num.done {
  transform: scale(1.08);
  box-shadow: 0 0 0 7px var(--green-glow);
}

.step-workspace:hover .step-label {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  border: 2px solid var(--border-light);
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--surface);
}

.step-num.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 0 5px var(--primary-glow);
}

.step-num.done {
  background: var(--green);
  border-color: var(--green);
  color: white;
  box-shadow: 0 0 0 5px var(--green-glow);
}

.step-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.3s;
  letter-spacing: 0.3px;
}

.step-label.active {
  color: var(--text);
}

.step-connector {
  width: 56px;
  height: 2px;
  background: var(--border);
  margin: 0 16px;
  transition: background 0.4s;
  border-radius: 2px;
}

.step-connector.active {
  background: var(--green);
}

/* Views */
.view {
  display: none;
  flex-direction: column;
  width: 100%;
}

.view.active {
  display: flex;
  animation: slideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.view.slide-back {
  animation: slideInBack 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInBack {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

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

.form-header {
  text-align: center;
  margin-bottom: 26px;
}

.form-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.6rem;
  position: relative;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.form-icon.orange {
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.18), rgba(255, 107, 0, 0.05));
  border-color: rgba(255, 107, 0, 0.25);
}

.form-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  color: var(--text);
}

.form-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Generous Input Sizing (Matches Previous Robust Feel) ── */
.input-group {
  margin-bottom: 22px;
  position: relative;
}

.input-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  letter-spacing: 0.3px;
  text-align: left;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 18px;
  color: var(--text-muted);
  font-size: 1.3rem;
  transition: color 0.3s;
  pointer-events: none;
}

.input-field {
  width: 100%;
  padding: 16px 20px 16px 54px;
  font-size: 1.35rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: 3px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-transform: uppercase;
  min-height: 58px;
}

.input-field::placeholder {
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 5px var(--primary-glow);
  background: var(--surface-2);
}

.input-field:focus ~ .input-icon {
  color: var(--primary);
}

.input-field.error {
  border-color: var(--red);
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.2);
  animation: shake 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.checkbox-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}

.forgot-link {
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.forgot-link:hover {
  opacity: 0.85;
  text-decoration: underline;
}

/* ── Large Continue / Submit Button ── */
.btn {
  width: 100%;
  padding: 16px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 56px;
  box-shadow: 0 4px 18px rgba(255, 107, 0, 0.28);
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(255, 107, 0, 0.38);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn .arrow {
  transition: transform 0.3s;
  font-size: 1.15rem;
}

.btn:hover .arrow {
  transform: translateX(5px);
}

.btn.loading .btn-content {
  opacity: 0;
}

.btn-spinner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  opacity: 0;
}

.btn.loading .btn-spinner {
  opacity: 1;
}

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

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.secure-badge svg {
  width: 17px;
  height: 17px;
  fill: var(--green);
  flex-shrink: 0;
}

/* ==================== PIN VIEW ==================== */
.store-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 26px;
  transition: border-color 0.3s;
}

.store-card:hover {
  border-color: var(--border-light);
}

.store-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #EA580C);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.store-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.store-name {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.store-code {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  margin-top: 3px;
  letter-spacing: 0.5px;
}

.btn-ghost {
  padding: 8px 16px;
  background: transparent;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--primary);
}

/* ── Generous 48px PIN Indicator Boxes (Matches Previous Version) ── */
.pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.pin-dot {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2.5px solid var(--border-light);
  background: var(--surface);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.pin-dot.active {
  border-color: var(--primary);
  background: rgba(255, 107, 0, 0.08);
  box-shadow: 0 0 0 5px var(--primary-glow);
  transform: scale(1.06);
}

.pin-dot.filled {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(255, 107, 0, 0.4);
  transform: scale(1.06);
}

.pin-dot.success {
  border-color: var(--green);
  background: var(--green);
  color: white;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  transform: scale(1.1);
}

.pin-dot.fp {
  border-color: var(--green);
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
  font-size: 18px;
}

.pin-dot.error {
  border-color: var(--red);
  background: rgba(239, 68, 68, 0.2);
  color: var(--red);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
  animation: dotShake 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dotShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ── Spacious Touch-Friendly Keypad (Matches Previous Version) ── */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 380px;
  width: 100%;
  margin: 0 auto 26px;
}

.key {
  padding: 18px 14px;
  min-height: 66px;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.key:hover {
  background: var(--surface-2);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.key:active {
  transform: translateY(1px) scale(0.96);
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.key.key-press {
  animation: keyPress 0.15s ease-out;
}

@keyframes keyPress {
  50% { transform: scale(0.92); }
}

.key.key-fp {
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.28);
  font-size: 1.5rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.key.key-fp .svg-fingerprint {
  display: block;
  stroke: var(--green);
  transition: transform 0.25s ease, stroke 0.2s ease, filter 0.25s ease;
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.35));
}

.key.key-fp:hover {
  background: var(--green-glow);
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

.key.key-fp:hover .svg-fingerprint {
  transform: scale(1.12);
  stroke: #34d399;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.65));
}

.key.key-fp:active .svg-fingerprint {
  transform: scale(0.95);
}

@keyframes scanLaser {
  0% { transform: translateY(-8px); opacity: 0.2; }
  50% { transform: translateY(8px); opacity: 1; }
  100% { transform: translateY(-8px); opacity: 0.2; }
}

.fp-scanline {
  animation: scanLaser 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform-origin: center;
}

.key.key-del {
  color: var(--text-secondary);
  font-size: 1.35rem;
}

.key.key-del:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--red);
}

/* Fingerprint hint bar */
.fp-hint {
  margin: -6px 0 20px;
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius);
  padding: 10px 16px;
  background: rgba(16, 185, 129, 0.08);
  text-align: center;
}

.fp-hint-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.fp-hint-ico {
  font-size: 1.2rem;
  color: var(--green);
  animation: fpPulse 1.2s ease-in-out infinite;
}

.fp-hint-svg {
  width: 22px;
  height: 22px;
  stroke: var(--green);
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.4));
  animation: fpPulse 1.2s ease-in-out infinite;
}

@keyframes fpPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

#fpHintText {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green);
}

/* Alerts / Error messages */
.error-message {
  text-align: center;
  color: var(--red);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
  display: none;
  animation: fadeUp 0.3s ease;
}

.error-message.show {
  display: block;
}

.server-alert {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  line-height: 1.5;
}

/* Success modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 36px;
  text-align: center;
  animation: modalPop 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  box-shadow: 0 32px 96px rgba(0,0,0,0.6);
  max-width: 380px;
  width: 90%;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9) translateY(24px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: white;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.3);
  animation: checkBounce 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes checkBounce {
  0% { transform: scale(0); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.modal-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Subscription Expired / Suspended Modal */
.sub-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeUp .25s ease;
}

.sub-modal-card {
  background: var(--surface);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  border: 1px solid var(--border-light);
  animation: modalPop .3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  color: var(--text);
}

.sub-modal-header {
  padding: 24px 24px 16px;
  text-align: center;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--border);
}

.sub-modal-header.suspended {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.12) 0%, var(--surface) 100%);
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

.sub-modal-icon-wrap {
  width: 60px;
  height: 60px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: rgba(255, 107, 0, 0.15);
  color: var(--primary);
  box-shadow: 0 0 0 8px rgba(255, 107, 0, 0.08);
}

.sub-modal-icon-wrap.suspended {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.08);
}

.sub-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
}

.sub-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.sub-modal-body {
  padding: 20px 24px;
}

.sub-modal-alert-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.82rem;
  color: #fbbf24;
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  text-align: left;
}

.sub-modal-alert-box.suspended {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-left: 4px solid var(--red);
  color: #fca5a5;
}

.sub-modal-info-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
}

.sub-modal-info-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-modal-info-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.45;
}

.sub-modal-footer {
  padding: 14px 24px 20px;
  display: flex;
  gap: 10px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.btn-sub-admin {
  flex: 2;
  background: linear-gradient(135deg, var(--primary), #EA580C);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .2s ease;
}

.btn-sub-admin:hover {
  background: linear-gradient(135deg, var(--primary-hover), #f97316);
  transform: translateY(-1px);
}

.btn-sub-close {
  flex: 1;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
}

.btn-sub-close:hover {
  background: var(--surface-3);
  color: var(--text);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .layout {
    flex-direction: column;
    overflow-y: auto;
  }
  .left {
    flex: none;
    height: auto;
    min-height: 320px;
    padding: 36px 24px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .left-title {
    font-size: 2.2rem;
    margin-bottom: 16px;
  }
  .left-desc {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }
  .left-bottom {
    gap: 24px;
    padding-top: 24px;
  }
  .stat-value {
    font-size: 1.25rem;
  }
  .right {
    flex: 1;
    padding: 36px 24px;
  }
  .login-wrapper {
    max-width: 420px;
  }
}

@media (max-width: 600px) {
  .left {
    min-height: 240px;
    padding: 24px 16px;
  }
  .left-title {
    font-size: 1.75rem;
    letter-spacing: -1px;
  }
  .left-desc {
    display: none;
  }
  .feature-pills {
    display: none;
  }
  .left-bottom {
    display: none;
  }
  .right {
    padding: 24px 16px;
  }
  .keypad {
    gap: 10px;
    max-width: 320px;
  }
  .key {
    padding: 16px 12px;
    min-height: 58px;
    font-size: 1.35rem;
  }
  .pin-dots {
    gap: 10px;
  }
  .pin-dot {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
}

/* ════ Brand Identity & Logo Headers ════ */
.login-brand-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.login-brand-logo {
  max-height: 44px;
  max-width: 140px;
  object-fit: contain;
  border-radius: 6px;
}
.login-brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), #e65100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
}
.login-brand-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.login-brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.2px;
  line-height: 1.25;
}
.login-brand-tagline {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

.form-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}

/* ════ Store Identity Pill (View 2) ════ */
.store-identity-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: rgba(255, 107, 0, 0.06);
  border: 1px solid rgba(255, 107, 0, 0.2);
  border-radius: 10px;
}
.store-pill-avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--primary);
  overflow: hidden;
  flex-shrink: 0;
}
.store-avatar-img,
.store-pill-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}
.store-pill-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow: hidden;
}
.store-pill-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-pill-code {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--primary);
  margin-top: 1px;
}
