/* =====================================================
   NEXRON SOLUTIONS - CLIENT DASHBOARD LOGIN
   Light Theme - Matching Main Website
   ===================================================== */

:root {
    /* Brand Colors - Matching Main Website */
    --orange: #F7941D;
    --orange-light: #FFF4E6;
    --orange-dark: #E07D0A;
    --orange-glow: rgba(247, 148, 29, 0.4);

    /* Light Theme */
    --bg-white: #FFFFFF;
    --bg-off-white: #F7F8FC;
    --bg-light-gray: #F1F5F9;

    /* Text Colors */
    --dark: #1A1A2E;
    --dark-gray: #2D3748;
    --medium-gray: #4A5568;
    --light-gray: #E2E8F0;

    /* Typography */
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.12);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   RESET & BASE STYLES
   ===================================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-white);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--orange);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--orange-dark);
}

/* =====================================================
   LOGIN CONTAINER - SPLIT LAYOUT
   ===================================================== */

.login-container {
    display: flex;
    min-height: 100vh;
}

/* =====================================================
   LEFT SIDE - BRANDING PANEL
   ===================================================== */

.login-branding {
    flex: 1;
    background: linear-gradient(135deg, var(--dark) 0%, #2A2A4A 100%);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Subtle background glow */
.login-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(247, 148, 29, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    margin-bottom: 64px;
}

.logo-img {
    height: 120px;
    width: auto;
}

/* Branding Title */
.branding-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    letter-spacing: -1px;
    color: var(--bg-white);
}

.branding-title .highlight {
    color: var(--orange);
}

.branding-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 480px;
    margin-bottom: 48px;
    line-height: 1.7;
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(247, 148, 29, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Branding Footer */
.branding-footer {
    position: relative;
    z-index: 1;
}

.branding-footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* =====================================================
   RIGHT SIDE - LOGIN FORM
   ===================================================== */

.login-form-container {
    flex: 1;
    background: var(--bg-off-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
    background: var(--bg-white);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Mobile Logo (hidden on desktop) */
.mobile-logo {
    display: none;
    align-items: center;
    margin-bottom: 32px;
    justify-content: center;
}

.logo-img-mobile {
    height: 70px;
    width: auto;
}

/* Form Header */
.form-header {
    margin-bottom: 32px;
}

.form-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    color: var(--dark);
}

.form-header p {
    color: var(--medium-gray);
    font-size: 16px;
}

/* =====================================================
   FORM STYLES
   ===================================================== */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot-link {
    font-size: 14px;
    font-weight: 500;
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--medium-gray);
    pointer-events: none;
    transition: var(--transition);
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--bg-off-white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    color: var(--dark);
    font-size: 16px;
    font-family: var(--font-family);
    transition: var(--transition);
}

.input-wrapper input::placeholder {
    color: var(--medium-gray);
}

.input-wrapper input:hover {
    border-color: #CBD5E0;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--orange);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px var(--orange-light);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--orange);
}

/* Password Toggle */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.toggle-password .hidden {
    display: none;
}

/* Checkbox Styles */
.checkbox-group {
    flex-direction: row;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--medium-gray);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--light-gray);
    border-radius: 6px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
    background: var(--bg-white);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--orange);
    border-color: var(--orange);
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity var(--transition);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    opacity: 1;
}

.checkbox-label:hover .checkbox-custom {
    border-color: #CBD5E0;
}

/* Submit Button */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    background: var(--orange);
    color: white;
    border: 2px solid var(--orange);
    border-radius: var(--radius-xl);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.btn-submit:hover {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-submit svg {
    transition: transform 0.2s ease;
}

.btn-submit:hover svg {
    transform: translateX(4px);
}

/* Form Footer */
.form-footer {
    margin-top: 32px;
    text-align: center;
}

.form-footer p {
    color: var(--medium-gray);
    font-size: 14px;
}

.form-footer a {
    font-weight: 600;
}

/* =====================================================
   ERROR STATES
   ===================================================== */

.input-wrapper.error input {
    border-color: #E53E3E;
    background: #FFF5F5;
}

.input-wrapper.error input:focus {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2);
}

.error-message {
    color: #E53E3E;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =====================================================
   LOADING STATE
   ===================================================== */

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

.btn-submit.loading span {
    opacity: 0;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 1024px) {
    .branding-title {
        font-size: 40px;
    }

    .branding-description {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-branding {
        display: none;
    }

    .login-form-container {
        padding: 32px 24px;
        min-height: 100vh;
    }

    .login-form-wrapper {
        padding: 32px 24px;
        box-shadow: none;
        background: var(--bg-white);
    }

    .mobile-logo {
        display: flex;
    }

    .form-header {
        text-align: center;
    }

    .form-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .login-form-container {
        padding: 24px 16px;
    }

    .login-form-wrapper {
        max-width: 100%;
        padding: 24px 20px;
    }

    .input-wrapper input {
        padding: 12px 12px 12px 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn-submit {
        padding: 14px 20px;
    }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

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

.login-form-wrapper {
    animation: fadeIn 0.5s ease-out;
}

.branding-content {
    animation: fadeIn 0.6s ease-out;
}

/* Focus visible for accessibility */
.btn-submit:focus-visible,
.toggle-password:focus-visible,
.forgot-link:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}
