/* ==========================================================================
   ApexPOS - Authentication Styles (Login & Register)
   Clean, modern, simple, and professional UI
   ========================================================================== */

/* Full Viewport Shell with Modern Grid Backdrop */
.auth-page {
  min-height: 100vh;
  background-color: var(--pos-surface-body);
  background-image: 
    radial-gradient(#e2e8f0 0.85px, transparent 0.85px),
    radial-gradient(#e2e8f0 0.85px, var(--pos-surface-body) 0.85px);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  position: relative;
  overflow-x: hidden;
}

/* Subtle ambient decorative glow rings */
.auth-ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.6;
  z-index: 0;
}

.auth-glow-1 {
  top: 5%;
  left: 10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(238, 99, 0, 0.15) 0%, transparent 70%);
}

.auth-glow-2 {
  bottom: 5%;
  right: 10%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
}

/* --------------------------------------------------------------------------
   Simple & Professional Centered Auth Card
   -------------------------------------------------------------------------- */
.auth-card {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border: 1px solid var(--pos-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 1px 3px 0 rgba(15, 23, 42, 0.04);
  padding: 2.5rem 2.25rem;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Card Header & Brand Identity */
.auth-card-header {
  margin-bottom: 1.5rem;
}

.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  margin-bottom: 0.85rem;
}

.auth-brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--pos-primary), #f97316);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(238, 99, 0, 0.35);
}

.auth-brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--pos-text-main);
  letter-spacing: -0.02em;
}

.auth-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.65rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-size: 0.72rem;
  font-weight: 600;
}

.auth-badge-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.auth-card-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pos-text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.auth-card-subtitle {
  font-size: 0.875rem;
  color: var(--pos-text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Google Sign In Button
   -------------------------------------------------------------------------- */
.btn-google-login {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid var(--pos-border);
  border-radius: var(--radius-md);
  color: var(--pos-text-main);
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-google-login:hover {
  background: var(--pos-surface-body);
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.btn-google-login:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.btn-google-login:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.btn-google-login svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Hairline Divider
   -------------------------------------------------------------------------- */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.35rem 0;
  color: var(--pos-text-light);
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--pos-border);
}

.auth-divider span {
  padding: 0 0.85rem;
}

/* --------------------------------------------------------------------------
   Form Fields & Controls
   -------------------------------------------------------------------------- */
.auth-field-group {
  margin-bottom: 1.25rem;
}

.auth-field-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--pos-text-main);
  margin-bottom: 0.4rem;
}

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

.auth-input-icon {
  position: absolute;
  left: 1rem;
  color: var(--pos-text-light);
  font-size: 1.05rem;
  pointer-events: none;
  transition: color 0.15s ease;
}

.auth-input {
  width: 100%;
  height: 48px;
  padding: 0.68rem 1rem 0.68rem 2.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--pos-border);
  background: var(--pos-surface-body);
  font-size: 0.925rem;
  color: var(--pos-text-main);
  transition: all 0.15s ease;
}

.auth-input:focus {
  background: #ffffff;
  border-color: var(--pos-primary);
  box-shadow: 0 0 0 3px rgba(238, 99, 0, 0.12);
  outline: none;
}

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

.auth-password-toggle {
  position: absolute;
  right: 0.85rem;
  background: none;
  border: none;
  color: var(--pos-text-muted);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.auth-password-toggle:hover {
  color: var(--pos-text-main);
}

.auth-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.35rem;
  font-size: 0.825rem;
}

.auth-meta-link {
  color: var(--pos-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-meta-link:hover {
  text-decoration: underline;
}

/* Primary Action Submit Button */
.btn-auth-submit {
  width: 100%;
  height: 48px;
  padding: 0.75rem 1.25rem;
  background: var(--pos-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(238, 99, 0, 0.28);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-auth-submit:hover {
  background: var(--pos-primary-hover);
  box-shadow: 0 6px 16px rgba(238, 99, 0, 0.38);
  transform: translateY(-1px);
}

.btn-auth-submit:active {
  transform: translateY(0);
}

.btn-auth-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

/* Secondary Text Button / Link */
.btn-text-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--pos-text-muted);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s ease;
}

.btn-text-link:hover {
  color: var(--pos-primary);
  text-decoration: underline;
}

/* Step transition fade-in */
.auth-step-pane {
  animation: authStepIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* --------------------------------------------------------------------------
   6-Digit OTP Verification Screen Components
   -------------------------------------------------------------------------- */
.otp-verification-header {
  margin-bottom: 1.25rem;
}

.otp-icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  margin: 0 auto 0.75rem;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

.otp-view-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--pos-text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.otp-view-desc {
  font-size: 0.825rem;
  color: var(--pos-text-muted);
  margin-bottom: 0.5rem;
}

.otp-email-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--pos-surface-body);
  border: 1px solid var(--pos-border);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.825rem;
  color: var(--pos-text-main);
  font-weight: 600;
}

.btn-change-email {
  background: none;
  border: none;
  color: var(--pos-primary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0 0 0 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.btn-change-email:hover {
  text-decoration: underline;
}

/* OTP Digit Inputs Row */
.otp-inputs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 1.25rem 0 1rem;
}

.otp-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-family: var(--pos-font-mono);
  font-weight: 700;
  color: var(--pos-text-main);
  background: var(--pos-surface-body);
  border: 1.5px solid var(--pos-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.16s ease;
  caret-color: var(--pos-primary);
}

.otp-digit:focus {
  background: #ffffff;
  border-color: var(--pos-primary);
  box-shadow: 0 0 0 3px rgba(238, 99, 0, 0.14);
  transform: translateY(-2px);
}

.otp-digit.has-value {
  background: #ffffff;
  border-color: #94a3b8;
}

.otp-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.825rem;
}

.btn-resend-otp {
  background: none;
  border: none;
  padding: 0;
  color: var(--pos-primary);
  font-weight: 700;
  font-size: 0.825rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.btn-resend-otp:disabled {
  color: var(--pos-text-light);
  cursor: not-allowed;
  font-weight: 500;
}

.btn-resend-otp:not(:disabled):hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Quick Demo Credentials Panel
   -------------------------------------------------------------------------- */
.demo-accounts-box {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--pos-border);
}

.demo-accounts-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pos-text-muted);
  margin-bottom: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.demo-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-demo-pill {
  padding: 0.35rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
  background: var(--pos-surface-body);
  border: 1px solid var(--pos-border);
  border-radius: 9999px;
  color: var(--pos-text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.btn-demo-pill:hover {
  background: var(--pos-primary-subtle);
  border-color: var(--pos-primary-border);
  color: var(--pos-primary);
  transform: translateY(-1px);
}

.btn-demo-pill:active {
  transform: translateY(0);
}

.btn-demo-pill i {
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Footer Prompts & Security Metadata
   -------------------------------------------------------------------------- */
.auth-footer-prompt {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--pos-text-muted);
}

.auth-footer-prompt a {
  color: var(--pos-primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-footer-prompt a:hover {
  text-decoration: underline;
}

.auth-security-note {
  margin-top: 0.85rem;
  font-size: 0.72rem;
  color: var(--pos-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* --------------------------------------------------------------------------
   Register & Create Store Page Specific Components
   -------------------------------------------------------------------------- */
.register-card {
  max-width: 760px;
}

.create-store-card {
  max-width: 520px;
}

/* Mobile Top Bar (Hidden on desktop) */
.mobile-app-top-nav {
  display: none;
}

.mobile-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--pos-text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-back-btn:active {
  background: #e2e8f0;
  transform: scale(0.92);
}

.mobile-nav-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pos-text-main);
  letter-spacing: -0.01em;
}

.mobile-nav-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff7ed;
  color: var(--pos-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 1px solid rgba(238, 99, 0, 0.15);
}

.store-category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.store-category-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  background: var(--pos-surface-body);
  border: 1.5px solid var(--pos-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pos-text-main);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  position: relative;
}

.store-category-chip:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}

.store-category-chip.active {
  background: #fff7ed;
  border-color: var(--pos-primary);
  color: var(--pos-primary);
  box-shadow: 0 0 0 1px var(--pos-primary);
}

.store-chip-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.store-category-chip:hover .store-chip-icon-box {
  transform: scale(1.05);
}

.store-chip-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.store-chip-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.store-chip-desc {
  font-size: 0.72rem;
  color: var(--pos-text-muted);
  line-height: 1.2;
  margin-top: 0.15rem;
}

.store-chip-check {
  font-size: 1.1rem;
  color: var(--pos-primary);
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.store-category-chip.active .store-chip-check {
  opacity: 1;
  transform: scale(1);
}

/* Mobile Toggle Card for Checkbox */
.mobile-toggle-card {
  background: var(--pos-surface-body);
  border: 1.5px solid var(--pos-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  transition: all 0.15s ease;
}

.mobile-toggle-card:hover {
  border-color: #cbd5e1;
}

.mobile-toggle-card:active {
  background: #f1f5f9;
}

.mobile-toggle-card .form-check-input {
  width: 1.25em !important;
  height: 1.25em !important;
  margin-top: 0;
  cursor: pointer;
}

.mobile-toggle-card .mobile-check-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pos-text-main);
}

/* Select2 in Auth Input Wrapper */
.auth-input-wrapper .select2-container {
  width: 100% !important;
  flex: 1;
}

.auth-input-wrapper .select2-container .select2-selection--single {
  height: 48px;
  padding-left: 2.75rem;
  display: flex;
  align-items: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--pos-border);
  background: var(--pos-surface-body);
  transition: all 0.15s ease;
}

.auth-input-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 0;
  font-size: 0.925rem;
  color: var(--pos-text-main);
  line-height: normal;
}

.auth-input-wrapper .select2-container--default.select2-container--focus .select2-selection--single,
.auth-input-wrapper .select2-container--default.select2-container--open .select2-selection--single {
  background: #ffffff;
  border-color: var(--pos-primary);
  box-shadow: 0 0 0 3px rgba(238, 99, 0, 0.12);
}

.auth-input-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 48px;
  right: 0.75rem;
  display: flex;
  align-items: center;
}

.register-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--pos-primary-subtle);
  color: var(--pos-primary);
  margin-bottom: 0.5rem;
}

.form-section-card {
  background: var(--pos-surface-body);
  border: 1px solid var(--pos-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.15s ease;
}

.form-section-card:focus-within {
  border-color: #cbd5e1;
}

.form-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pos-text-main);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--pos-border);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.auth-input.form-select {
  padding-left: 2.75rem;
  padding-right: 2rem;
  background-position: right 0.75rem center;
  cursor: pointer;
}

.password-strength-box {
  margin-top: 0.45rem;
}

.strength-bar-track {
  height: 4px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  display: flex;
  gap: 3px;
}

.strength-bar-step {
  flex: 1;
  height: 100%;
  background: transparent;
  transition: background-color 0.2s ease;
}

.strength-bar-step.active-weak {
  background: var(--pos-danger);
}

.strength-bar-step.active-medium {
  background: var(--pos-warning);
}

.strength-bar-step.active-strong {
  background: var(--pos-success);
}

.strength-text {
  font-size: 0.72rem;
  color: var(--pos-text-muted);
  margin-top: 0.25rem;
  display: flex;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   Native Mobile App Shell Experience (< 768px)
   Transforms the web login into an authentic, edge-to-edge native mobile app UI
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  html, body {
    height: 100%;
    min-height: 100%;
    background-color: #ffffff;
    -webkit-overflow-scrolling: touch;
  }

  .auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(1.25rem, env(safe-area-inset-top, 16px)) 1.25rem max(1.5rem, env(safe-area-inset-bottom, 20px)) !important;
    background-color: #ffffff !important;
    background-image: none !important; /* Eliminate web dot pattern on mobile */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Soft modern ambient background gradient on mobile app */
  .auth-ambient-glow {
    display: block;
    opacity: 0.35;
  }
  .auth-glow-1 {
    top: -60px;
    left: -60px;
    width: 240px;
    height: 240px;
  }
  .auth-glow-2 {
    bottom: -60px;
    right: -60px;
    width: 260px;
    height: 260px;
  }

  /* Seamless edge-to-edge native app container */
  .auth-card {
    max-width: 100% !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0.5rem 0 1rem !important;
    margin: auto 0;
  }

  /* App Icon & Header */
  .auth-card-header {
    margin-bottom: 1.5rem !important;
  }

  .auth-brand-badge {
    margin-bottom: 0.75rem !important;
    gap: 0.65rem !important;
  }

  .auth-brand-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.4rem !important;
    border-radius: 14px !important; /* iOS squircle icon feel */
    box-shadow: 0 8px 20px -4px rgba(238, 99, 0, 0.45) !important;
  }

  .auth-brand-name {
    font-size: 1.45rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
  }

  .auth-badge-status {
    font-size: 0.74rem !important;
    padding: 0.28rem 0.75rem !important;
    margin-bottom: 0.5rem !important;
  }

  .auth-card-title {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 0.35rem !important;
  }

  .auth-card-subtitle {
    font-size: 0.88rem !important;
    color: var(--pos-text-muted) !important;
    max-width: 320px;
    margin: 0 auto !important;
    line-height: 1.45 !important;
  }

  /* Touch-optimized Google OAuth button */
  .btn-google-login {
    height: 50px !important;
    border-radius: 12px !important;
    font-size: 0.925rem !important;
    font-weight: 600 !important;
    border: 1.5px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05) !important;
  }

  .btn-google-login:active {
    transform: scale(0.98) !important;
    background: #f8fafc !important;
  }

  /* Clean divider */
  .auth-divider {
    margin: 1.25rem 0 !important;
  }

  .auth-divider span {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    letter-spacing: 0.03em !important;
  }

  /* Touch-friendly inputs */
  .auth-field-group {
    margin-bottom: 1.15rem !important;
  }

  .auth-field-label {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.45rem !important;
    color: var(--pos-text-main) !important;
  }

  .auth-input-wrapper {
    position: relative;
  }

  .auth-input {
    height: 52px !important;
    padding: 0.75rem 1rem 0.75rem 2.85rem !important;
    border-radius: 12px !important;
    font-size: 16px !important; /* 16px strictly stops iOS Safari automatic zoom */
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    transition: all 0.18s ease !important;
  }

  .auth-input:focus {
    background: #ffffff !important;
    border-color: var(--pos-primary) !important;
    box-shadow: 0 0 0 4px rgba(238, 99, 0, 0.12) !important;
  }

  .auth-input-icon {
    left: 1rem !important;
    font-size: 1.15rem !important;
  }

  .auth-password-toggle {
    right: 0.5rem !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.15rem !important;
    color: #94a3b8 !important;
  }

  .auth-password-toggle:active {
    color: var(--pos-primary) !important;
  }

  /* Remember me & hints */
  .auth-meta-row {
    margin-bottom: 1.35rem !important;
    font-size: 0.825rem !important;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .form-check-input {
    width: 1.15em !important;
    height: 1.15em !important;
    cursor: pointer;
  }

  /* Primary native mobile submit button */
  .btn-auth-submit {
    height: 52px !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 6px 18px rgba(238, 99, 0, 0.35) !important;
    background: linear-gradient(135deg, var(--pos-primary), #ea580c) !important;
  }

  .btn-auth-submit:active {
    transform: scale(0.98) !important;
    box-shadow: 0 3px 10px rgba(238, 99, 0, 0.3) !important;
  }

  /* Footer */
  .auth-footer-prompt {
    margin-top: 1.5rem !important;
  }

  .auth-security-note {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    margin-top: 0.85rem !important;
  }

  .otp-digit {
    width: 44px;
    height: 52px;
    font-size: 1.35rem;
    border-radius: 10px;
  }

  .otp-inputs-row {
    gap: 0.4rem;
  }

  /* Native Mobile Top Navigation Bar */
  .mobile-app-top-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 0 1rem !important;
    margin-bottom: 0.85rem !important;
    border-bottom: 1px solid #f1f5f9;
    width: 100%;
  }

  .mobile-back-btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    color: var(--pos-text-main) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.15rem !important;
    transition: all 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .mobile-back-btn:active {
    background: #e2e8f0 !important;
    transform: scale(0.92) !important;
  }

  .mobile-nav-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--pos-text-main) !important;
  }

  .mobile-nav-badge {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: #fff7ed !important;
    color: var(--pos-primary) !important;
    border: 1.5px solid rgba(238, 99, 0, 0.2) !important;
  }

  /* Create Store Card Mobile Refinements */
  .create-store-card {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 0 1.5rem !important;
  }

  .create-store-card .auth-card-header {
    margin-bottom: 1.25rem !important;
  }

  .create-store-card .auth-card-title {
    font-size: 1.45rem !important;
  }

  .create-store-card .auth-card-subtitle {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
  }

  /* Mobile Category Chips Grid */
  .store-category-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
    margin-bottom: 1.15rem !important;
  }

  .store-category-chip {
    padding: 0.75rem 0.65rem !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    min-height: 56px !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.6rem !important;
  }

  .store-category-chip:active {
    transform: scale(0.96) !important;
  }

  .store-category-chip.active {
    background: #fff7ed !important;
    border-color: var(--pos-primary) !important;
    box-shadow: 0 4px 14px rgba(238, 99, 0, 0.15) !important;
  }

  .store-chip-icon-box {
    width: 34px !important;
    height: 34px !important;
    font-size: 1.05rem !important;
  }

  .store-chip-title {
    font-size: 0.825rem !important;
    font-weight: 600 !important;
  }

  .store-chip-check {
    font-size: 1rem !important;
  }

  /* Mobile Toggle Card */
  .mobile-toggle-card {
    padding: 0.85rem 0.95rem !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
  }

  .mobile-toggle-card:active {
    background: #f1f5f9 !important;
  }

  .mobile-toggle-card .form-check-input {
    width: 1.35em !important;
    height: 1.35em !important;
  }

  /* Select2 Mobile Polish */
  .auth-input-wrapper .select2-container .select2-selection--single {
    height: 52px !important;
    padding-left: 2.85rem !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    font-size: 16px !important;
  }

  .auth-input-wrapper .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 52px !important;
    right: 0.85rem !important;
  }
}

/* Extra small devices (< 380px, e.g. iPhone SE / mini) */
@media (max-width: 379.98px) {
  .auth-page {
    padding: max(0.75rem, env(safe-area-inset-top, 12px)) 1rem max(1rem, env(safe-area-inset-bottom, 16px)) !important;
  }

  .auth-card-title {
    font-size: 1.4rem !important;
  }

  .auth-brand-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.2rem !important;
  }

  .auth-input {
    height: 48px !important;
  }

  .btn-auth-submit {
    height: 48px !important;
    font-size: 0.95rem !important;
  }

  .otp-digit {
    width: 38px;
    height: 48px;
    font-size: 1.2rem;
  }

  .otp-inputs-row {
    gap: 0.25rem;
  }

  .store-category-grid {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .store-category-chip {
    min-height: 48px !important;
    padding: 0.6rem 0.75rem !important;
  }
}
