/* ============================================
   Acumen Owner Panel - Login Page Styles
   Split Screen Design with Banner
   ============================================ */

/* ============================================
   CSS Variables & Theme
   ============================================ */
:root {
    /* Brand Colors - Emerald Theme */
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --primary-glow: rgba(16, 185, 129, 0.15);

    /* Light Theme Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* State Colors */
    --error-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;

    /* Borders & Shadows */
    --border-radius: 16px;
    --border-color: rgba(148, 163, 184, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 32px var(--primary-glow);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   Global Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

/* RTL/LTR Font Support */
[dir="rtl"] body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
}

[dir="ltr"] body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================
   Language Toggle
   ============================================ */
.language-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    z-index: 1000;
}

[dir="rtl"] .language-toggle {
    right: auto;
    left: 24px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    color: var(--primary-color);
    background: rgba(16, 185, 129, 0.1);
}

.lang-btn.active {
    color: white;
    background: var(--primary-color);
}

.separator {
    color: var(--text-muted);
    font-size: 14px;
}

/* ============================================
   Split Screen Container
   ============================================ */
.split-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

[dir="rtl"] .split-container {
    flex-direction: row-reverse;
}

/* ============================================
   Left Side - Banner
   ============================================ */
.banner-side {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 60px;
}

.banner-content {
    max-width: 550px;
    color: white;
    position: relative;
    z-index: 2;
}

.banner-logo {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.banner-logo i {
    font-size: 50px;
    color: white;
}

.banner-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.banner-description {
    font-size: 18px;
    margin-bottom: 48px;
    opacity: 0.95;
}

.banner-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 16px;
    opacity: 0.95;
}

.feature-item i {
    font-size: 24px;
    flex-shrink: 0;
}

/* Banner Decoration */
.banner-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    animation: float 20s infinite ease-in-out;
}

.deco-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.deco-2 {
    width: 300px;
    height: 300px;
    bottom: -80px;
    right: -80px;
    animation-delay: 3s;
}

.deco-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: 10%;
    animation-delay: 6s;
}

@keyframes float {

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

    25% {
        transform: translate(30px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    75% {
        transform: translate(40px, 10px) scale(1.05);
    }
}

/* ============================================
   Right Side - Login Form
   ============================================ */
.form-side {
    flex: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    max-width: 600px;
}

.form-container {
    width: 100%;
    max-width: 440px;
}

/* ============================================
   Brand Section
   ============================================ */
.brand-section {
    text-align: center;
    margin-bottom: 40px;
}

.brand-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.brand-subtitle {
    font-size: 15px;
    color: var(--text-muted);
}

/* ============================================
   Alert Messages
   ============================================ */
.alert {
    border-radius: 12px;
    border: none;
    margin-bottom: 24px;
    padding: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left: 4px solid var(--error-color);
}

[dir="rtl"] .alert-danger {
    border-left: none;
    border-right: 4px solid var(--error-color);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-left: 4px solid var(--success-color);
}

[dir="rtl"] .alert-success {
    border-left: none;
    border-right: 4px solid var(--success-color);
}

.alert i {
    font-size: 18px;
}

/* ============================================
   Form Styles
   ============================================ */
.login-form {
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
}

[dir="rtl"] .input-icon {
    left: auto;
    right: 16px;
}

.form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: #f8fafc;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all var(--transition-fast);
}

[dir="rtl"] .form-control {
    padding: 14px 48px 14px 16px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.is-invalid {
    border-color: var(--error-color);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.invalid-feedback {
    display: none;
    font-size: 13px;
    color: #dc2626;
    margin-top: 6px;
}

.form-control.is-invalid~.invalid-feedback {
    display: block;
}

/* Toggle Password Button */
.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

[dir="rtl"] .toggle-password {
    right: auto;
    left: 16px;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* ============================================
   Form Options (Remember Me & Forgot)
   ============================================ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    margin-left: 0;
    border: 2px solid #cbd5e1;
    background: white;
    cursor: pointer;
}

[dir="rtl"] .form-check-input {
    margin-right: 0;
    margin-left: 8px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-check-label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

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

/* ============================================
   Login Button
   ============================================ */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 16px var(--primary-glow);
    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.2), transparent);
    transition: left 0.5s;
}

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

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

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

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

.btn-text,
.btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ============================================
   Footer
   ============================================ */
.login-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
    .split-container {
        flex-direction: column;
    }

    [dir="rtl"] .split-container {
        flex-direction: column;
    }

    .banner-side {
        min-height: 300px;
        padding: 40px 24px;
    }

    .banner-content {
        max-width: 100%;
    }

    .banner-title {
        font-size: 32px;
    }

    .banner-features {
        display: none;
    }

    .form-side {
        max-width: 100%;
        padding: 40px 24px;
    }
}

@media (max-width: 576px) {
    .language-toggle {
        top: 16px;
        right: 16px;
    }

    [dir="rtl"] .language-toggle {
        right: auto;
        left: 16px;
    }

    .banner-side {
        min-height: 250px;
        padding: 32px 20px;
    }

    .banner-logo {
        width: 70px;
        height: 70px;
        margin-bottom: 24px;
    }

    .banner-logo i {
        font-size: 36px;
    }

    .banner-title {
        font-size: 26px;
    }

    .banner-description {
        font-size: 16px;
        margin-bottom: 0;
    }

    .form-side {
        padding: 32px 20px;
    }

    .brand-title {
        font-size: 24px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {

    .language-toggle,
    .banner-side {
        display: none;
    }

    .form-side {
        max-width: 100%;
    }
}