/* ==========================================================================
   TURKMENISTAN / TURKIC WORLD THEME LOGIN STYLES
   ========================================================================== */

:root {
    /* Turkic World / Turquoise Brand Colors */
    --primary-color: #00acc9;
    --primary-hover: #008fa7;
    --primary-active: #00768a;

    /* Opacity variations & highlights */
    --primary-rgb: 0, 172, 201;
    --primary-light-rgba-08: rgba(var(--primary-rgb), 0.08);
    --primary-light-rgba-06: rgba(var(--primary-rgb), 0.06);
    --primary-light-rgba-05: rgba(var(--primary-rgb), 0.05);
    --primary-light-rgba-04: rgba(var(--primary-rgb), 0.04);
    --primary-light-rgba-02: rgba(var(--primary-rgb), 0.02);

    /* Backgrounds & borders */
    --primary-light-bg: #f0fbfc;
    --primary-border-light: #cceff4;

    /* Shadows */
    --primary-shadow-25: rgba(var(--primary-rgb), 0.25);
    --primary-shadow-30: rgba(var(--primary-rgb), 0.3);
    --primary-shadow-35: rgba(var(--primary-rgb), 0.35);

    /* Gradients */
    --left-panel-gradient: linear-gradient(160deg, #f0fbfc 0%, #e6f7fa 30%, #d9f3f7 60%, #cceff4 100%);
    --header-icon-gradient: linear-gradient(135deg, #00acc9 0%, #008fa7 100%);
    --button-gradient: linear-gradient(135deg, #00acc9 0%, #008fa7 100%);
    --button-gradient-hover: linear-gradient(135deg, #009cb7 0%, #00768a 100%);
}

/* ============================
   RESET & BASE
============================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    background: #f8f9fb;
    display: flex;
    overflow: hidden;
}

/* ============================
   SPLIT LAYOUT
============================ */
.login-split {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ============================
   LEFT PANEL — Decorative
============================ */
.login-left {
    flex: 0 0 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--left-panel-gradient);
}

/* Organic blob shapes */
.login-left::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-light-rgba-06) 0%, transparent 70%);
    animation: floatBlob 12s ease-in-out infinite;
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -60px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-light-rgba-04) 0%, transparent 70%);
    animation: floatBlob 10s ease-in-out infinite reverse;
}

@keyframes floatBlob {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(20px, -15px) scale(1.05);
    }

    66% {
        transform: translate(-10px, 10px) scale(0.97);
    }
}

/* Decorative wave line */
.wave-decoration {
    position: absolute;
    top: 0;
    right: -2px;
    width: 120px;
    height: 100%;
    z-index: 1;
}

.wave-decoration svg {
    height: 100%;
    width: 100%;
}

/* Decorative circles */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--primary-light-rgba-08);
}

.deco-circle-1 {
    width: 200px;
    height: 200px;
    top: 60px;
    left: 40px;
}

.deco-circle-2 {
    width: 120px;
    height: 120px;
    bottom: 100px;
    right: 140px;
}

.deco-circle-3 {
    width: 70px;
    height: 70px;
    top: 35%;
    right: 180px;
    border-color: var(--primary-light-rgba-05);
    background: var(--primary-light-rgba-02);
}

.left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.left-logo {
    width: 400px;
    max-width: 90%;
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.06));
    animation: fadeInUp 0.8s ease-out;
}

.left-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

.left-subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   RIGHT PANEL — Form
============================ */
.login-right {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fb;
    padding: 2rem;
    position: relative;
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
    animation: fadeInUp 0.7s ease-out 0.2s both;
}

.form-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem 2.25rem;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 6px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--header-icon-gradient);
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 14px var(--primary-shadow-25);
}

.form-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.35rem;
}

.form-description {
    font-size: 0.875rem;
    color: #9ca3af;
    font-weight: 400;
}

/* Input Group */
.input-group-custom {
    margin-bottom: 1.25rem;
}

.input-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    font-size: 0.95rem;
    z-index: 1;
    transition: color 0.2s ease;
}

.input-field {
    width: 100%;
    padding: 0.85rem 0.85rem 0.85rem 2.75rem;
    font-size: 0.925rem;
    font-family: inherit;
    color: #1f2937;
    background: #fafbfc;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: all 0.25s ease;
}

.input-field::placeholder {
    color: #c4c9d2;
    font-weight: 400;
}

.input-field:focus {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3.5px var(--primary-light-rgba-08);
}

.input-field:focus~.input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
    z-index: 1;
}

.password-toggle:hover {
    color: #6b7280;
}

/* Remember & Forgot */
.form-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.825rem;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.forgot-link {
    font-size: 0.825rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* Submit Button */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background: var(--button-gradient);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 14px var(--primary-shadow-30);
    position: relative;
    overflow: hidden;
}

.btn-login::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 ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-shadow-35);
    background: var(--button-gradient-hover);
}

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

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--primary-shadow-30);
}

.btn-login .btn-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-login.loading .btn-text {
    display: none;
}

.btn-login.loading .btn-spinner {
    display: inline-block;
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.85;
}

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

/* Divider */
.form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 1.75rem 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.form-divider span {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
}

/* Back Link */
.back-link-row {
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 1.5px solid #e5e7eb;
    background: #ffffff;
}

.back-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-border-light);
    background: var(--primary-light-bg);
    text-decoration: none;
}

.back-link i {
    font-size: 0.8rem;
}

/* Alert Messages */
.alert-custom {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger-custom {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success-custom {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 2rem;
}

.login-footer p {
    font-size: 0.75rem;
    color: #b0b7c3;
    line-height: 1.5;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

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

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 991px) {
    .login-left {
        display: none;
    }

    .login-right {
        flex: 1;
    }

    .login-form-wrapper {
        max-width: 440px;
    }

    .form-card {
        padding: 2rem 1.75rem;
    }
}

@media (max-width: 575px) {
    body {
        overflow: auto;
    }

    .login-right {
        padding: 1.25rem;
        align-items: flex-start;
        padding-top: 3rem;
    }

    .form-card {
        padding: 1.75rem 1.25rem;
        border-radius: 16px;
    }

    .form-header-icon {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
        border-radius: 12px;
    }

    .form-title {
        font-size: 1.2rem;
    }

    .input-field {
        padding: 0.8rem 0.8rem 0.8rem 2.5rem;
        font-size: 0.875rem;
    }
}
