/* ONEPC POS - PREMIUM LOGIN CSS v4.0 (Offline Ready) */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: radial-gradient(ellipse at 30% 40%, #0d0d1a, #05050a);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Dinamik fon */
body::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background-image: 
        repeating-linear-gradient(45deg, rgba(139, 92, 246, 0.02) 0px, rgba(139, 92, 246, 0.02) 2px, transparent 2px, transparent 60px),
        repeating-linear-gradient(135deg, rgba(6, 182, 212, 0.02) 0px, rgba(6, 182, 212, 0.02) 2px, transparent 2px, transparent 60px);
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

/* Neon orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.orb-1 { width: 450px; height: 450px; background: #8b5cf6; top: -200px; left: -150px; opacity: 0.3; animation: float1 14s infinite; }
.orb-2 { width: 400px; height: 400px; background: #06b6d4; bottom: -180px; right: -120px; opacity: 0.25; animation: float2 12s infinite; }
.orb-3 { width: 300px; height: 300px; background: #ec4899; top: 60%; left: 20%; opacity: 0.15; animation: float3 18s infinite; }

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(120px, 80px); }
}
@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-100px, -100px); }
}
@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(80px, -60px) scale(1.2); }
}

/* Container */
.login-wrap {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    animation: fadeInScale 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Login card */
.login-card {
    background: rgba(8, 8, 18, 0.7);
    backdrop-filter: blur(24px);
    border-radius: 56px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 50px 44px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.login-card:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(139, 92, 246, 0.1);
}

/* Logo sohasi — SIZNING RASMINGIZ UCHUN */
.login-logo {
    text-align: center;
    margin-bottom: 42px;
}

/* Aylanadigan logo konteyneri */
.logo-container {
    width: 110px;
    height: 110px;
    margin: 0 auto 20px;
    position: relative;
    cursor: pointer;
}

/* Siz yuklaydigan rasm uchun */
.custom-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4), 0 0 0 3px rgba(139, 92, 246, 0.2);
    /* ✅ Doim aylanib turadi — sekin va chiroyli */
    animation: logoSpin 7s linear infinite;
}

/* Bosganda tezroq aylanadi */
.logo-container.rotating .custom-logo {
    animation: logoSpin 0.5s linear infinite;
}

@keyframes logoSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Glow ring — doim aylanib turadi */
.logo-container::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        #8b5cf6 60deg,
        #c084fc 120deg,
        #06b6d4 180deg,
        #8b5cf6 240deg,
        transparent 360deg
    );
    opacity: 0.7;
    z-index: -1;
    animation: ringRotate 3s linear infinite;
}

/* Ring orqasida qora doira (fon uchun) */
.logo-container::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: #0a0a18;
    z-index: -1;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Siz rasm yuklamaguncha placeholder */
.logo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
}

.login-logo h1 span {
    background: linear-gradient(135deg, #a78bfa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-logo p {
    font-size: 13px;
    color: #8b8ca8;
}

/* Form elementlari — CSS ikonkalar bilan */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #b4b6d4;
    margin-bottom: 8px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.input-wrap {
    position: relative;
}

/* CSS ikonkalar (SVG o'rniga) */
.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* User ikonkasi — CSS bilan */
.icon-user {
    position: relative;
    width: 20px;
    height: 20px;
}

.icon-user::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #a78bfa;
    border-radius: 50%;
}

.icon-user::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 8px;
    background: #a78bfa;
    border-radius: 50% 50% 0 0;
}

/* Lock ikonkasi — CSS bilan */
.icon-lock {
    position: relative;
    width: 18px;
    height: 20px;
}

.icon-lock::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 8px;
    border: 2px solid #a78bfa;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.icon-lock::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 12px;
    background: #a78bfa;
    border-radius: 2px;
}

.form-input {
    width: 100%;
    background: rgba(20, 20, 35, 0.8);
    border: 1.5px solid rgba(139, 92, 246, 0.2);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    padding: 15px 18px 15px 52px;
    border-radius: 24px;
    outline: none;
    transition: all 0.25s;
}

.form-input:focus {
    border-color: #8b5cf6;
    background: rgba(25, 25, 42, 0.95);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

/* Toggle password — CSS ikonka */
.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    width: 22px;
    height: 20px;
    opacity: 0.6;
    transition: all 0.2s;
}

.toggle-password:hover {
    opacity: 1;
}

/* Ko'z ikonkasi CSS */
.eye-icon {
    position: relative;
    width: 22px;
    height: 18px;
}

.eye-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #b4b6d4;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #b4b6d4;
}

.eye-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 40%, transparent 40%, #b4b6d4 45%, transparent 50%);
    mask: radial-gradient(circle at 30% 40%, transparent 40%, black 45%, transparent 50%);
    -webkit-mask: radial-gradient(circle at 30% 40%, transparent 40%, black 45%, transparent 50%);
}

.eye-closed {
    position: relative;
    width: 22px;
    height: 18px;
    overflow: hidden;
}

.eye-closed::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #b4b6d4;
    border-radius: 50%;
}

.eye-closed::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -2px;
    width: 26px;
    height: 2px;
    background: #b4b6d4;
    transform: translateY(-50%) rotate(-15deg);
}

/* Login tugmasi */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border: none;
    border-radius: 32px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -10px rgba(139, 92, 246, 0.6);
}

.login-btn:active {
    transform: translateY(1px);
}

.login-btn:disabled {
    opacity: 0.7;
    transform: none;
}

/* Xatolik */
.error-msg {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 20px;
    padding: 14px 18px;
    margin-bottom: 28px;
    display: none;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #f87171;
    backdrop-filter: blur(4px);
}

/* Back link */
.back-link {
    text-align: center;
    margin-top: 32px;
}

.back-link a {
    color: #8b8ca8;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-link a:hover {
    color: #a78bfa;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 560px) {
    .login-card { padding: 36px 28px; border-radius: 44px; }
    .logo-container { width: 85px; height: 85px; }
    .custom-logo, .logo-placeholder { font-size: 38px; }
    .login-logo h1 { font-size: 24px; }
}

@media (max-width: 480px) {
    .login-card { padding: 28px 22px; }
    .form-input { padding: 13px 16px 13px 48px; font-size: 14px; }
    .login-btn { padding: 14px; }
}