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

/* ========= VARIABLES ========= */
:root {
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-50: #eff6ff;
    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-500: #ef4444;
    --red-700: #b91c1c;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 150ms ease;
}

[data-theme="dark"] {
    --white: #0f172a;
    --gray-50: #1e293b;
    --gray-100: #334155;
    --gray-200: #475569;
    --gray-300: #64748b;
    --gray-400: #94a3b8;
    --gray-500: #cbd5e1;
    --gray-600: #e2e8f0;
    --gray-700: #f1f5f9;
    --gray-800: #f8fafc;
    --gray-900: #ffffff;
    --blue-50: #1e3a5f;
    --blue-500: #3b82f6;
    --blue-600: #60a5fa;
    --blue-700: #93c5fd;
    --blue-800: #bfdbfe;
    --red-50: #450a0a;
    --red-100: #7f1d1d;
    --red-500: #f87171;
    --red-700: #fca5a5;
    --green-500: #34d399;
    --green-600: #6ee7b7;
}

[data-theme="dark"] .login-brand-panel {
    background: linear-gradient(175deg, #6d28d9, #451a03);
}

[data-theme="dark"] .login-form-panel {
    background: #0b1120;
}

[data-theme="dark"] .login-form-wrapper {
    background: linear-gradient(145deg, #141e30, #1a2540);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-top: 5px solid #7c3aed;
    box-shadow:
        0 0 0 1px rgba(139, 92, 246, 0.05),
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(139, 92, 246, 0.04);
}

[data-theme="dark"] .login-form-header h1 {
    color: #f1f5f9;
}

[data-theme="dark"] .login-form-header p {
    color: #94a3b8;
}

[data-theme="dark"] .form-top-icon {
    color: #60a5fa;
}

[data-theme="dark"] .form-field label {
    color: #cbd5e1;
}

[data-theme="dark"] .field-input i {
    color: #475569;
}

[data-theme="dark"] .field-input input {
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid #334155;
    color: #f1f5f9;
}

[data-theme="dark"] .field-input input::placeholder {
    color: #64748b;
}



[data-theme="dark"] .field-input input:focus {
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .field-input:focus-within i {
    color: #60a5fa;
}

[data-theme="dark"] .btn-submit {
    background: #8b5cf6;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

[data-theme="dark"] .btn-submit:hover {
    background: #7c3aed;
    box-shadow: 0 6px 28px rgba(139, 92, 246, 0.45);
}

[data-theme="dark"] .box-footer {
    border-top-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .secure-badge i {
    color: #34d399;
}

[data-theme="dark"] .secure-text {
    color: #94a3b8;
}

[data-theme="dark"] .control-btn {
    background: rgba(30, 41, 59, 0.8);
    border-color: #334155;
    color: #94a3b8;
}



[data-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .dropdown-item {
    color: #cbd5e1;
}

[data-theme="dark"] .dropdown-item:hover {
    background: #334155;
    color: #ffffff;
}

/* ========= TOP CONTROLS ========= */
.top-right-controls {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
}

.control-btn {
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    height: 40px;
    padding: 0 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.control-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-900);
}

.lang-pill {
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
}

[data-theme="dark"] .lang-pill {
    color: #e2e8f0;
}

.control-btn i {
    font-size: 16px;
}

/* Custom Select Dropdown */
.custom-select {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 8px;
    min-width: 140px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
}

.custom-select.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background var(--transition);
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gray-900);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========= LAYOUT ========= */
.login-page {
    display: flex;
    min-height: 100vh;
}

/* ========= LEFT PANEL — BRANDING ========= */
.login-brand-panel {
    width: 480px;
    flex-shrink: 0;
    background: linear-gradient(160deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.12);
}

.login-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.08);
}

.brand-content {
    position: relative;
    z-index: 1;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.brand-logo-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.brand-logo-icon.small {
    width: 36px;
    height: 36px;
    font-size: 16px;
    background: var(--blue-600);
    color: white;
}

.brand-logo-titles {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-logo-main {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.brand-logo-sub {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
}

.brand-headline {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.brand-desc {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.brand-feature i {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.flag-inline {
    font-size: 14px;
    border-radius: 2px;
    vertical-align: middle;
    margin-left: 2px;
}

.brand-footer {
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-footer .heart {
    font-style: normal;
}

.brand-footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
}

.brand-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ========= RIGHT PANEL — FORM ========= */
.login-form-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px;
    background: linear-gradient(135deg, #f4f7fb 0%, #e2eaf4 100%);
}

.login-form-wrapper {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(139, 92, 246, 0.1);
    border-top: 5px solid #7c3aed;
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 10px 40px -10px rgba(139, 92, 246, 0.1), 0 1px 3px rgba(0, 0, 0, 0.03);
}

.mobile-logo {
    display: none;
    margin-bottom: 24px;
}

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

.form-top-icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px auto;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35);
}

.form-top-icon {
    font-size: 28px;
    color: var(--white);
    margin-bottom: 0;
}

.login-form-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.login-form-header p {
    font-size: 13px;
    color: var(--gray-500);
}

/* ========= ALERT ========= */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
}

.alert-error {
    background: var(--red-50);
    border: 1px solid var(--red-100);
    color: var(--red-700);
}

.alert-error i {
    color: var(--red-500);
    font-size: 16px;
    flex-shrink: 0;
}

/* ========= FORM ========= */
.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.field-input {
    position: relative;
}

.field-input i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--gray-400);
    pointer-events: none;
    transition: color var(--transition);
}

.field-input input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    font-size: 14px;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--white);
    border: 1.5px solid rgba(139, 92, 246, 0.18);
    border-radius: 12px;
    outline: none;
    transition: all var(--transition);
}

.field-input input::placeholder {
    color: var(--gray-400);
}

.field-input input:focus {
    background: var(--white);
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.field-input:focus-within i {
    color: #8b5cf6;
}

/* ========= BUTTON ========= */
.btn-submit {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: var(--white);
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition);
    margin-top: 12px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
    transform: translateY(-2px);
}

.btn-submit:active {
    transform: translateY(0) scale(0.99);
}

/* ========= BOX FOOTER ========= */
.box-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.secure-badge i {
    color: #22c55e;
    font-size: 14px;
}

.secure-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-400);
    letter-spacing: 0.2px;
}

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

    .login-form-panel {
        padding: 24px;
    }

    .mobile-logo {
        display: block;
    }
}

@media (max-width: 480px) {
    .login-form-wrapper {
        max-width: 100%;
        padding: 28px;
    }

    .login-form-header h1 {
        font-size: 22px;
    }

    .login-badges {
        flex-wrap: wrap;
        gap: 8px;
    }
}