/* =====================================================
   🎨 ARDABIL PREMIUM LOGIN - Modern Glassmorphism Design
   ===================================================== */

:root {
    /* Primary Gradient Colors */
    --gradient-start: #0f0c29;
    --gradient-mid: #302b63;
    --gradient-end: #24243e;
    
 /* Accent Colors */
 --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-glow: rgba(99, 102, 241, 0.4);
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* Form Colors */
    --input-bg: rgba(255, 255, 255, 0.06);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: rgba(99, 102, 241, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

/* =====================================================
   🌌 ANIMATED BACKGROUND
   ===================================================== */
body {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
    animation: bgPulse 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Floating Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
 pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 20s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 25s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 20s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 28s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 22s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 24s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 26s; }
.particle:nth-child(7) { left: 70%; animation-delay: 0.5s; animation-duration: 21s; }
.particle:nth-child(8) { left: 80%; animation-delay: 2.5s; animation-duration: 23s; }
.particle:nth-child(9) { left: 90%; animation-delay: 4.5s; animation-duration: 27s; }

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
      transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* =====================================================
   📦 LOGIN WRAPPER & CONTAINER
   ===================================================== */
.login-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-container {
    width: 100%;
    max-width: 440px;
  background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    animation: containerEntry 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.login-container::before {
 content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(50%); }
}

@keyframes containerEntry {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =====================================================
   🎯 LOGIN HEADER
   ===================================================== */
.login-header {
    padding: 48px 40px 32px;
  text-align: center;
    position: relative;
}

.login-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 20px;
    box-shadow: 0 8px 32px var(--accent-glow);
    animation: logoFloat 3s ease-in-out infinite;
    position: relative;
}

.login-logo::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0.5;
    filter: blur(12px);
    z-index: -1;
}

.login-logo svg {
    width: 36px;
    height: 36px;
    stroke: white;
    stroke-width: 1.5;
    fill: none;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, rgba(255,255,255,0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* =====================================================
   📝 LOGIN CONTENT & FORM
   ===================================================== */
.login-content {
  padding: 8px 40px 40px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.form-group:focus-within .form-label {
    color: var(--accent-primary);
}

.input-wrapper {
    position: relative;
}

.input-icon {
position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: color 0.3s ease;
    pointer-events: none;
}

.form-group:focus-within .input-icon {
    color: var(--accent-primary);
}

.form-control {
    width: 100%;
    padding: 16px 16px 16px 48px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
  border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--input-focus);
}

.form-control:hover:not(:focus) {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
  cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
}

/* =====================================================
   ☑️ CHECKBOX STYLING
   ===================================================== */
.form-check {
  display: flex;
    align-items: center;
    margin-bottom: 28px;
    cursor: pointer;
}

.form-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--input-bg);
  border: 1.5px solid var(--input-border);
    border-radius: 6px;
    margin-right: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
 position: relative;
    flex-shrink: 0;
}

.form-check-input:checked {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: transparent;
}

.form-check-input:checked::after {
    content: '';
    position: absolute;
 left: 6px;
    top: 3px;
  width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-check-input:hover {
    border-color: var(--accent-primary);
}

.form-check-label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

/* =====================================================
   🔘 LOGIN BUTTON
   ===================================================== */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
 color: white;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
  border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
 background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--accent-glow);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-login:disabled::before {
    display: none;
}

/* Button Loading State */
.btn-login.loading {
  pointer-events: none;
}

.btn-login .btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease;
}

.btn-login.loading .btn-text {
    opacity: 0;
}

.btn-login .spinner-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-login.loading .spinner-wrapper {
    opacity: 1;
}

/* =====================================================
   ⚠️ ALERTS & VALIDATION
   ===================================================== */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 13px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: alertEntry 0.4s ease;
}

@keyframes alertEntry {
    from {
        opacity: 0;
        transform: translateY(-10px);
  }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-icon {
width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-danger .alert-icon {
  color: #ef4444;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.field-validation-error {
    display: block;
    color: #fca5a5;
    font-size: 12px;
    margin-top: 8px;
    font-weight: 500;
    padding-left: 4px;
}

/* =====================================================
   📎 FOOTER & DIVIDER
   ===================================================== */
.divider {
    text-align: center;
    margin: 24px 0;
    font-size: 13px;
    color: var(--text-muted);
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 80px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.login-footer {
    text-align: center;
 font-size: 14px;
    color: var(--text-secondary);
}

.login-footer p {
    margin: 0;
}

.login-footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.login-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
}

.login-footer a:hover::after {
    width: 100%;
}

.login-footer a:hover {
  color: var(--accent-secondary);
}

/* =====================================================
   🔒 SECURITY BADGE
   ===================================================== */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
  gap: 8px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
    font-size: 12px;
    color: var(--text-muted);
}

.security-badge svg {
    width: 16px;
    height: 16px;
    color: #22c55e;
}

/* =====================================================
   🔄 SPINNER
 ===================================================== */
.spinner {
    width: 20px;
    height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   📱 RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 16px;
    }
    
    .login-container {
        border-radius: 20px;
    }
    
    .login-header {
  padding: 40px 24px 28px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-content {
        padding: 8px 24px 32px;
    }
    
    .form-control {
 padding: 14px 14px 14px 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-login {
   padding: 14px 20px;
    }
}

/* =====================================================
   🎭 DARK MODE ENHANCEMENTS (Auto)
   ===================================================== */
@media (prefers-color-scheme: light) {
  :root {
        --gradient-start: #667eea;
   --gradient-mid: #764ba2;
        --gradient-end: #6366f1;
    }
}

/* =====================================================
   ✨ ACCESSIBILITY
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
*::before,
    *::after {
 animation-duration: 0.01ms !important;
   animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particle {
        display: none;
    }
}

/* Focus Visible for Keyboard Navigation */
.form-control:focus-visible,
.btn-login:focus-visible,
.form-check-input:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* =====================================================
   🎪 EXTRA EFFECTS
   ===================================================== */

/* Glowing orbs background effect */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -100px;
    right: -100px;
    animation: orbFloat1 20s ease-in-out infinite;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: -50px;
    left: -50px;
    animation: orbFloat2 25s ease-in-out infinite;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: #06b6d4;
    top: 50%;
    left: 50%;
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-30px, 30px); }
    66% { transform: translate(20px, -20px); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(40px, -20px); }
    66% { transform: translate(-20px, 40px); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}
