/* ==========================================================================
   LINGOFY — OFFICIAL AUTHENTICATION STYLES (LOGIN & REGISTER)
   Aligned with Lingofy Design System: Clean Slate, Crisp Indigo & Emerald
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f8fafc;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #6366f1;
  --primary-glow: rgba(79, 70, 229, 0.16);
  
  --accent-green: #10b981;
  --accent-green-hover: #059669;
  --accent-gold: #f59e0b;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;
  
  --text-dark: #0f172a;
  --text-body: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-light: #e2e8f0;
  --border-subtle: rgba(226, 232, 240, 0.8);
  --border-focus: #4f46e5;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 45px -12px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 20px 40px -15px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 10px 30px -5px rgba(79, 70, 229, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(79, 70, 229, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(16, 185, 129, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 55%);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   AUTH PAGE WRAPPER & CARD
   ========================================================================== */
.auth-page-wrapper {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
}

.auth-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease;
}

.auth-card-box:hover {
  box-shadow: 0 24px 50px -10px rgba(15, 23, 42, 0.1);
}

/* ==========================================================================
   BRAND LOGO & HEADER
   ========================================================================== */
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 8px;
}

.logo-icon-wrap {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.3rem;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.28);
  flex-shrink: 0;
}

.brand-text-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-name {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-dark);
}

.logo-badge {
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid rgba(79, 70, 229, 0.18);
  letter-spacing: 0.2px;
}

.auth-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* ==========================================================================
   IP BLOCKED ALERT BANNER
   ========================================================================== */
.ip-blocked-banner {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--danger-text);
  font-size: 0.84rem;
  margin-bottom: 22px;
  line-height: 1.45;
}

.ip-blocked-banner i {
  font-size: 1.4rem;
  color: var(--danger);
  flex-shrink: 0;
  margin-top: 1px;
}

.ip-blocked-banner strong {
  display: block;
  font-size: 0.92rem;
  color: #7f1d1d;
  margin-bottom: 3px;
  font-weight: 700;
}

.ip-blocked-banner p {
  margin: 0;
}

/* ==========================================================================
   SEGMENTED TABS (KIRISH & RO'YXATDAN O'TISH)
   ========================================================================== */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 5px;
  background: var(--bg-subtle);
  border-radius: 14px;
  border: 1px solid var(--border-light);
  margin-bottom: 26px;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.auth-tab-btn:hover:not(.active) {
  color: var(--text-dark);
}

.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.auth-tab-btn.active i {
  color: var(--primary);
}

/* ==========================================================================
   SARIQ IQTIBOS: 1 QURILMA = 1 AKKOUNT CHEKLOVI
   ========================================================================== */
.device-account-quote-box {
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-left: 5px solid #f59e0b;
  border-radius: 14px;
  padding: 22px 20px;
  margin-bottom: 22px;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.08);
  animation: formFadeIn 0.3s ease-out;
}

.device-account-quote-box .quote-top-bar {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.device-account-quote-box .quote-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.2);
  color: #d97706;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.device-account-quote-box .quote-content-wrapper {
  position: relative;
  padding-left: 4px;
}

.device-account-quote-box .quote-icon {
  font-size: 1.5rem;
  color: rgba(245, 158, 11, 0.45);
  margin-bottom: 8px;
  display: block;
}

.device-account-quote-box .yellow-quote-text {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.55;
  color: #b45309;
  margin: 0 0 12px 0;
  font-style: italic;
  font-family: inherit;
}

.device-account-quote-box .quote-info-note {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #92400e;
  margin: 0 0 18px 0;
}

.device-account-quote-box .btn-quote-login {
  width: 100%;
  background: #f59e0b;
  color: #ffffff;
  border: none;
  border-radius: 11px;
  padding: 13px 18px;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
  transition: all 0.2s ease;
  font-family: inherit;
}

.device-account-quote-box .btn-quote-login:hover {
  background: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.auth-form.active {
  display: flex;
  animation: formFadeIn 0.25s ease-out;
}

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

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -0.1px;
}

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

.input-wrapper i.fa-user,
.input-wrapper i.fa-lock,
.input-wrapper i.fa-id-card,
.input-wrapper i.fa-at,
.input-wrapper i.fa-envelope {
  position: absolute;
  left: 14px;
  color: var(--text-light);
  font-size: 0.95rem;
  transition: color 0.2s ease;
  pointer-events: none;
}

.input-wrapper:focus-within i.fa-user,
.input-wrapper:focus-within i.fa-lock,
.input-wrapper:focus-within i.fa-id-card,
.input-wrapper:focus-within i.fa-at,
.input-wrapper:focus-within i.fa-envelope {
  color: var(--primary);
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-dark);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper input::placeholder {
  color: var(--text-light);
  font-size: 0.88rem;
}

.input-wrapper input:hover {
  border-color: #cbd5e1;
}

.input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  background: #ffffff;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.password-toggle:hover {
  color: var(--text-dark);
}

/* ==========================================================================
   FORM OPTIONS & CHECKBOXES
   ========================================================================== */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.terms-row {
  margin-top: 4px;
  margin-bottom: 6px;
}

/* Modern Checkbox */
.custom-check-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 0.85rem;
  color: var(--text-body);
  line-height: 1.4;
  position: relative;
}

.custom-check-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-check-box {
  width: 19px;
  height: 19px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.custom-check-box i {
  font-size: 10px;
  color: #ffffff;
  opacity: 0;
  transform: scale(0.3);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-check-wrap:hover .custom-check-box {
  border-color: var(--primary-light);
}

.custom-check-wrap input[type="checkbox"]:checked + .custom-check-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.custom-check-wrap input[type="checkbox"]:checked + .custom-check-box i {
  opacity: 1;
  transform: scale(1);
}

.custom-check-wrap .terms-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.custom-check-wrap .terms-link:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

.forgot-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

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

/* ==========================================================================
   PRIMARY SUBMIT BUTTON
   ========================================================================== */
.btn-auth-submit {
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.96rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.38);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 8px;
  letter-spacing: -0.1px;
}

.btn-auth-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -4px rgba(79, 70, 229, 0.48);
  filter: brightness(1.05);
}

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

.btn-auth-submit:disabled {
  background: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 0.8;
}

/* ==========================================================================
   FOOTER NAVIGATION / GUEST MODE
   ========================================================================== */
.auth-footer-nav {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.guest-link {
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.guest-link:hover {
  color: var(--primary);
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.auth-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
  pointer-events: none;
}

.auth-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.auth-toast.error {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.auth-toast.success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

/* ==========================================================================
   FLOATING SUPPORT BUTTON (LINGOFY 24/7 ASSISTANT)
   ========================================================================== */
.support-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.support-float-btn:hover {
  transform: translateY(-2px);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5);
}

.support-avatar-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-hover) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.95rem;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  position: relative;
}

.pulse-indicator::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-green);
  animation: supportPulse 1.8s infinite;
}

@keyframes supportPulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ==========================================================================
   SUPPORT CHAT MODAL (LINGOFY 24/7 LIVE SUPPORT WIDGET)
   ========================================================================== */
.support-chat-modal {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 1000;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 110px);
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatFadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.support-chat-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
}

.support-agent-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.agent-avatar-wrap {
  position: relative;
}

.agent-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.15rem;
}

.agent-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  background: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.agent-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.agent-status {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.agent-status i {
  color: #a7f3d0;
}

.support-minimize-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.support-minimize-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Security Callout Banner */
.support-security-banner {
  background: #fefce8;
  border-bottom: 1px solid #fef08a;
  padding: 10px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.76rem;
  color: #854d0e;
  line-height: 1.4;
}

.support-security-banner i {
  color: var(--accent-gold);
  margin-top: 2px;
  flex-shrink: 0;
}

.support-security-banner strong {
  color: #713f12;
}

/* Quick Action Chips */
.support-quick-chips {
  padding: 10px 14px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  scrollbar-width: none;
}

.support-quick-chips::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-body);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
}

.chip-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: var(--primary);
}

/* Chat Body */
.support-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
}

.chat-msg.bot-msg {
  align-self: flex-start;
}

.chat-msg.user-msg {
  align-self: flex-end;
}

.msg-bubble {
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  position: relative;
}

.bot-msg .msg-bubble {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.user-msg .msg-bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.bot-name {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.msg-time {
  display: block;
  font-size: 0.65rem;
  color: var(--text-light);
  text-align: right;
  margin-top: 4px;
}

.user-msg .msg-time {
  color: rgba(255, 255, 255, 0.8);
}

/* Chat Input Bar */
.support-chat-input-bar {
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  align-items: center;
}

.support-chat-input-bar input {
  flex: 1;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--text-dark);
  font-size: 0.86rem;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.support-chat-input-bar input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.support-send-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
}

.support-send-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.04);
}

/* ==========================================================================
   FORGOT PASSWORD / EMAIL RESET MODAL STYLES
   ========================================================================== */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  animation: fadeInModal 0.25s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.auth-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 470px;
  box-shadow: 0 25px 65px -10px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
}

.auth-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-modal-title i {
  font-size: 1.3rem;
  color: var(--primary);
}

.auth-modal-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.auth-modal-close {
  background: var(--bg-subtle);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.auth-modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
}

.auth-modal-body {
  padding: 24px;
  background: #ffffff;
}

.forgot-info-alert {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  color: #3730a3;
  font-size: 0.84rem;
  line-height: 1.45;
}

.forgot-info-alert i {
  font-size: 1.3rem;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.forgot-info-alert strong {
  color: #1e1b4b;
  display: block;
  margin-bottom: 3px;
  font-weight: 700;
}

.forgot-info-alert p {
  margin: 0;
  color: #3730a3;
}

.forgot-submit-wrap {
  margin-top: 20px;
}

.forgot-sent-card {
  text-align: center;
  padding: 10px 0;
  animation: fadeInModal 0.3s ease;
}

.sent-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #ecfdf5;
  border: 2px solid var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-green);
  font-size: 2rem;
}

.forgot-sent-card h4 {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-weight: 700;
}

.forgot-sent-card p {
  color: var(--text-body);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.expiry-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-text);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.expiry-timer-badge strong {
  color: #b91c1c;
  font-weight: 800;
}

.email-check-notice {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-body);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: left;
  margin-top: 8px;
  margin-bottom: 6px;
}

.email-check-notice i {
  font-size: 1.3rem;
  color: var(--primary);
  flex-shrink: 0;
}

.email-check-notice p {
  margin: 0;
}

.btn-auth-outline {
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--border-light);
  color: var(--text-body);
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-auth-outline:hover {
  background: var(--bg-subtle);
  color: var(--text-dark);
  border-color: #cbd5e1;
}

/* ==========================================================================
   RESPONSIVE (MOBILE & TABLET OPTIMIZATION)
   ========================================================================== */
@media (max-width: 480px) {
  body {
    padding: 16px 12px;
  }
  
  .auth-card-box {
    padding: 28px 20px;
    border-radius: 20px;
  }
  
  .brand-name {
    font-size: 1.45rem;
  }
  
  .logo-icon-wrap {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }
  
  .auth-tabs {
    margin-bottom: 20px;
  }
  
  .auth-tab-btn {
    padding: 9px 10px;
    font-size: 0.82rem;
  }
  
  .input-group label {
    font-size: 0.78rem;
  }
  
  .input-wrapper input {
    padding: 11px 12px 11px 38px;
    font-size: 0.88rem;
  }
  
  .btn-auth-submit {
    padding: 12px 16px;
    font-size: 0.92rem;
    margin-top: 6px;
  }
  
  .custom-check-wrap {
    font-size: 0.8rem;
    gap: 8px;
  }
  
  .custom-check-box {
    width: 18px;
    height: 18px;
  }
  
  .forgot-link {
    font-size: 0.8rem;
  }
  
  .support-chat-modal {
    right: 8px;
    bottom: 74px;
    width: calc(100vw - 16px);
    height: 480px;
    border-radius: 18px;
  }
  
  .support-float-btn {
    right: 12px;
    bottom: 14px;
    padding: 8px 14px 8px 10px;
    font-size: 0.82rem;
  }
}

/* ══════════════════════════════════════════════════════════════
   iOS QATLAMI (qo'shimcha) — asl CSS ustiga
   1) iOS shrift tizimi
   2) input ikonlari (faqat ro'yxatdagilar emas — hammasi)
   3) Captcha (asl CSS da umuman yo'q edi)
   4) Mobil: safe-area, touch target, zoom
   ══════════════════════════════════════════════════════════════ */

body, input, button, textarea, select{
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",
              Roboto,Helvetica,Arial,sans-serif;
}

/* ── 2) Input ichidagi IKONKALAR ──────────────────────────
   Asl CSS faqat 5 ta ikonni joylashtirgan edi (fa-user, fa-lock,
   fa-id-card, fa-at, fa-envelope). fa-shield-halved va boshqalar
   joylashmasdi — shuning uchun placeholder ikona ustiga tushardi. */
.input-wrapper > i{
  position:absolute !important;
  left:15px !important;
  color:var(--text-light,#8e8e93) !important;
  font-size:0.95rem !important;
  pointer-events:none !important;
  transition:color .2s ease;
  z-index:2;
}
.input-wrapper:focus-within > i{color:var(--accent,#6366f1) !important}

/* Input chapdan ikon uchun joy (barcha maydonlar uchun) */
.input-wrapper input{
  padding-left:44px !important;
  font-size:1rem !important;   /* 16px — iOS zoom oldini oladi */
  min-height:52px;
}

/* ── 3) CAPTCHA ─────────────────────────────────────────
   Asl CSS da .captcha-row / .captcha-img / .captcha-refresh
   qoidalari yo'q edi — rasm butun kenglikda, refresh tugmasi
   pastda yalang'och qolardi. */
.captcha-group{gap:9px !important}
.captcha-row{
  display:flex !important;
  gap:10px !important;
  align-items:stretch !important;
}
.captcha-img{
  flex:1 1 auto !important;
  min-width:0 !important;
  height:54px !important;
  border-radius:var(--radius-md,14px) !important;
  overflow:hidden !important;
  background:#f5f5f7 !important;
  border:1.5px solid var(--border-light,#e5e5ea) !important;
  display:flex !important;align-items:center !important;justify-content:center !important;
  cursor:pointer;
}
.captcha-img img{
  max-width:100% !important;
  max-height:100% !important;
  object-fit:cover !important;
  display:block !important;
}
.captcha-refresh{
  flex:0 0 54px !important;
  width:54px !important;height:54px !important;
  border-radius:var(--radius-md,14px) !important;
  border:1.5px solid var(--border-light,#e5e5ea) !important;
  background:#f5f5f7 !important;
  color:var(--text-dark,#1d1d1f) !important;
  font-size:1.05rem !important;
  cursor:pointer;
  display:flex !important;align-items:center !important;justify-content:center !important;
  transition:background .18s ease,transform .12s ease;
}
.captcha-refresh:hover{background:#ebebf0 !important}
.captcha-refresh:active{transform:scale(.92)}

/* ── Tugmalar va maydonlar: iOS hajm ─────────────────────── */
.btn-auth-submit{min-height:54px !important;font-size:1.02rem !important}
.auth-tab-btn{min-height:40px !important}
.custom-check-box{width:22px !important;height:22px !important;flex:0 0 22px !important}
.password-toggle{
  width:40px !important;height:40px !important;
  right:4px !important;min-height:40px;
}
.chip-btn{min-height:40px !important;display:inline-flex !important;align-items:center !important}
.forgot-link{min-height:38px !important;display:inline-flex !important;align-items:center !important}

/* ── 4) MOBIL ───────────────────────────────────────────── */
@media (max-width:640px){
  /* iOS boshqaruv paneli ostida qolmasin */
  .auth-page-wrapper{
    padding-bottom:calc(30px + env(safe-area-inset-bottom)) !important;
    padding-top:calc(20px + env(safe-area-inset-top)) !important;
  }
  .auth-card-box{
    border-radius:22px !important;
    box-shadow:0 1px 2px rgba(0,0,0,.04),0 8px 26px rgba(0,0,0,.07) !important;
  }
  /* Kattaroq joy — barmoq bilan qulay */
  .input-wrapper input{min-height:54px !important}
  .input-wrapper > i{left:16px !important}
  .input-wrapper input{padding-left:46px !important}
  .btn-auth-submit{min-height:56px !important}
  .password-toggle{width:44px !important;height:44px !important;right:5px !important}

  /* Captcha mobilda ham bir qator */
  .captcha-img{height:56px !important}
  .captcha-refresh{flex:0 0 56px !important;width:56px !important;height:56px !important}

  /* Modal — pastdan chiqadigan sheet */
  .auth-modal-overlay{align-items:flex-end !important;padding:0 !important}
  .auth-modal-card{
    max-width:100% !important;
    max-height:92vh !important;
    border-radius:24px 24px 0 0 !important;
    padding-bottom:env(safe-area-inset-bottom);
  }
  .auth-toast{
    left:14px !important;right:14px !important;
    max-width:none !important;
  }
}

/* Zoom — iOS inputga teginanda kattalashtirmasin */
@media (max-width:640px){
  input, select, textarea{font-size:16px !important}
}

/* Juda kichik ekran */
@media (max-width:360px){
  .auth-page-wrapper{padding-left:11px !important;padding-right:11px !important}
  .input-wrapper input{padding-left:44px !important;font-size:16px !important}
  .captcha-refresh{flex:0 0 50px !important;width:50px !important;height:54px !important}
}

/* Harakat kamaytirish */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    transition-duration:.01ms !important;
  }
}

/* ==========================================================================
   GOOGLE SIGN-IN — iOS uslubidagi tugma (Apple HIG: 44pt+ touch target,
   yumshoq burchak, nozik chegara, sekin bosish animatsiyasi)
   ========================================================================== */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--text-muted, #94a3b8);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.45), transparent);
}

.btn-google {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  background: #ffffff;
  color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 6px 18px -6px rgba(0, 0, 0, 0.12);
  transition: transform 0.18s cubic-bezier(0.34, 1.3, 0.64, 1),
              box-shadow 0.18s ease,
              background 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-google:hover:not(:disabled) {
  background: #fbfbfd;
  transform: translateY(-1px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.05),
    0 12px 26px -8px rgba(0, 0, 0, 0.16);
}
.btn-google:active:not(:disabled) {
  transform: scale(0.985);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.btn-google:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.35);
}
.btn-google:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn-google .g-logo {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: block;
}
.btn-google .g-label {
  white-space: nowrap;
}

/* Tungi rejim — iOS dark: qorong'i sirt, oq matn */
body.dark-mode .btn-google,
.dark-mode .btn-google {
  background: #1c1c1e;
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 8px 22px -8px rgba(0, 0, 0, 0.6);
}
body.dark-mode .btn-google:hover:not(:disabled),
.dark-mode .btn-google:hover:not(:disabled) {
  background: #2c2c2e;
}

/* Google tugmasi yashirilgan bo'lsa (Client ID yo'q) — bo'lim ham yashiriladi */
.google-auth-block[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .btn-google { transition: none; }
}

/* ── Google tugmasi: iOS dizayn + shaffof GSI qatlami ──
   Haqiqiy Google tugmasi (iframe) ustki shaffof qatlamda turadi,
   shuning uchun bosish ishonchli ishlaydi va bizning iOS dizaynimiz
   ko'rinadi. */
.btn-google-wrap {
  position: relative;
  width: 100%;
}
.gsi-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: 14px;
  opacity: 0.001;          /* ko'rinmas, lekin bosiladi */
  cursor: pointer;
}
.gsi-overlay > div,
.gsi-overlay iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 52px !important;
}
