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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background:
        radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.25), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(13, 148, 136, 0.25), transparent 45%),
        #0b1120;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 85vh;
    min-height: 600px;
    max-height: 800px;
    background: white;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.left-panel {
    flex: 1;
    background: linear-gradient(160deg, #0b1120 0%, #064e3b 55%, #059669 100%);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.left-panel::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    top: -150px;
    right: -150px;
    animation: rotate 30s linear infinite;
}

.left-panel::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    bottom: -100px;
    left: -100px;
    animation: rotate 25s linear infinite reverse;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    z-index: 1;
}

.logo-icon {
    font-size: 28px;
    margin-right: 15px;
    background: rgba(255, 255, 255, 0.15);
    width: 55px;
    height: 55px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.1);
}

.logo-text {
    font-family: 'Manrope', 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.panel-title {
    font-family: 'Manrope', 'Inter', sans-serif;
    font-size: 32px;
    margin-bottom: 20px;
    z-index: 1;
    line-height: 1.3;
    font-weight: 800;
}

.panel-description {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 30px;
    z-index: 1;
}

.features {
    list-style: none;
    margin-top: 30px;
    z-index: 1;
}

.features li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.features i {
    margin-right: 15px;
    background: rgba(255, 255, 255, 0.2);
    width: 35px;
    height: 35px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.right-panel {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    overflow-y: auto;
}

.login-header {
    margin-bottom: 40px;
    text-align: center;
}

.login-title {
    font-family: 'Manrope', 'Inter', sans-serif;
    font-size: 30px;
    color: #18181b;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #059669, #0d9488);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: #71717a;
    font-size: 15px;
    opacity: 0.9;
    max-width: 350px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    color: #3f3f46;
    font-weight: 600;
    font-size: 14px;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #059669;
    font-size: 18px;
    z-index: 2;
}

.form-control {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: 2px solid #e5e4e0;
    border-radius: 14px;
    font-size: 15px;
    transition: all 0.3s;
    background-color: #faf9f6;
    color: #27272a;
    font-weight: 500;
}

/* Autocomplete o'chirish uchun maxsus stillar */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #faf9f6 inset !important;
    -webkit-text-fill-color: #27272a !important;
    transition: background-color 5000s ease-in-out 0s;
}

.form-control:focus {
    outline: none;
    border-color: #059669;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a1a1aa;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    padding: 5px;
    z-index: 3;
}

.password-toggle:hover {
    color: #059669;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-me input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #059669;
    cursor: pointer;
}

.remember-me label {
    font-weight: 600;
    color: #3f3f46;
}

.forgot-password {
    color: #059669;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    padding: 6px 10px;
    border-radius: 8px;
}

.forgot-password:hover {
    text-decoration: underline;
    color: #047857;
    background: rgba(5, 150, 105, 0.1);
}

.login-button {
    width: 100%;
    padding: 17px;
    background: linear-gradient(135deg, #059669, #0d9488);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
    position: relative;
    overflow: hidden;
}

.login-button::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.7s;
}

.login-button:hover::before {
    left: 100%;
}

.login-button i {
    margin-right: 12px;
    font-size: 18px;
}

.login-button:hover {
    background: linear-gradient(135deg, #047857, #0f766e);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(5, 150, 105, 0.4);
}

.login-button:active {
    transform: translateY(0);
}

/* Loading state for button */
.login-button.loading {
    background: linear-gradient(135deg, #047857, #0f766e);
    pointer-events: none;
}

.login-button.loading i {
    display: none;
}

.login-button.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: button-spin 1s linear infinite;
}

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

.no-account {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e5e4e0;
}

.no-account-text {
    color: #71717a;
    font-size: 14px;
    margin-bottom: 12px;
}

.contact-admin {
    color: #059669;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 10px;
    display: inline-block;
    border: 2px solid #059669;
    background: rgba(5, 150, 105, 0.05);
    font-size: 14px;
}

.contact-admin:hover {
    background: #059669;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(5, 150, 105, 0.3);
}

/* Saqlangan loginlar uchun dropdown */
.saved-logins-container {
    position: relative;
}

.saved-logins-btn {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #059669;
    cursor: pointer;
    font-size: 16px;
    z-index: 4;
    padding: 5px 8px;
    border-radius: 8px;
    transition: all 0.3s;
}

.saved-logins-btn:hover {
    background: rgba(5, 150, 105, 0.1);
}

.saved-logins-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e4e0;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.saved-login-item {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 1px solid #ececea;
}

.saved-login-item:last-child {
    border-bottom: none;
}

.saved-login-item:hover {
    background: #f4f3ef;
}

.saved-login-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.saved-login-username {
    font-weight: 600;
    color: #27272a;
    font-size: 14px;
}

.saved-login-password {
    font-size: 12px;
    color: #71717a;
    letter-spacing: 2px;
    font-family: monospace;
}

.saved-login-remove {
    background: none;
    border: none;
    color: #fb7185;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.3s;
}

.saved-login-remove:hover {
    background: rgba(251, 113, 133, 0.1);
}

.empty-saved-logins {
    padding: 20px;
    text-align: center;
    color: #a1a1aa;
    font-size: 14px;
}

/* Modal oynalari */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-title {
    font-family: 'Manrope', 'Inter', sans-serif;
    font-size: 22px;
    color: #18181b;
    margin-bottom: 8px;
    font-weight: 800;
}

.modal-subtitle {
    color: #71717a;
    font-size: 14px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 20px;
    color: #a1a1aa;
    cursor: pointer;
    transition: color 0.3s;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #059669;
    background: #ececea;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    border-radius: 14px;
    text-decoration: none;
    color: #3f3f46;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #e5e4e0;
    background: #faf9f6;
    cursor: pointer;
}

.contact-option:hover {
    background: #059669;
    color: white;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105,0.3);
}

.contact-option i {
    font-size: 22px;
    width: 50px;
    height: 50px;
    background: rgba(5, 150, 105,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #059669;
}

.contact-option:hover i {
    background: rgba(255,255,255,0.2);
    color: white;
}

.admin-info {
    background: #faf9f6;
    border-radius: 14px;
    padding: 20px;
    margin-top: 20px;
    border: 2px solid #e5e4e0;
}

.admin-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e4e0;
}

.admin-detail:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.detail-label {
    color: #71717a;
    font-weight: 600;
    font-size: 14px;
}

.detail-value {
    color: #18181b;
    font-weight: 700;
    font-size: 14px;
    text-align: right;
}

.call-button {
    width: 100%;
    padding: 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    text-decoration: none;
}

.call-button:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16,185,129,0.3);
}

/* Responsive dizayn */
@media (max-width: 1024px) {
    .container {
        max-width: 900px;
        height: 80vh;
    }
    
    .left-panel, .right-panel {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        max-width: 500px;
        height: auto;
        min-height: auto;
        max-height: none;
    }
    
    .left-panel {
        padding: 30px;
    }
    
    .right-panel {
        padding: 30px;
    }
    
    .panel-title {
        font-size: 26px;
    }
    
    .login-title {
        font-size: 26px;
    }
}

@media (max-height: 700px) {
    .container {
        height: 90vh;
        min-height: 500px;
    }
    
    .left-panel, .right-panel {
        padding: 25px;
    }
    
    .panel-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    
    .login-title {
        font-size: 26px;
        margin-bottom: 8px;
    }
    
    .features li {
        padding: 10px 14px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    .container {
        border-radius: 22px;
    }
    
    .left-panel, .right-panel {
        padding: 25px 20px;
    }
    
    .modal-content {
        padding: 25px 20px;
    }
}


/* Simple session expired message */
.session-expired-alert {
    display: none;
    background: linear-gradient(135deg, #fffbeb 0%, #fde68a 100%);
    border-left: 5px solid #f59e0b;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.15);
    animation: fadeIn 0.5s ease;
}

.session-expired-alert .alert-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.session-expired-alert i {
    color: #f59e0b;
    font-size: 24px;
    margin-top: 2px;
    flex-shrink: 0;
}

.session-expired-alert .alert-text {
    flex: 1;
}

.session-expired-alert .alert-title {
    font-weight: 700;
    color: #b45309;
    margin-bottom: 5px;
    font-size: 16px;
}

.session-expired-alert .alert-subtitle {
    color: #f59e0b;
    font-size: 14px;
    line-height: 1.5;
}

.session-expired-alert .alert-close {
    background: none;
    border: none;
    color: #f59e0b;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    border-radius: 8px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.session-expired-alert .alert-close:hover {
    background: rgba(245, 158, 11, 0.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}