:root {
    /* Professional ERP Color Palette */
    --primary: #2C5282;
    --primary-dark: #1A365D;
    --primary-light: #3182CE;
    --secondary: #319795;
    --accent: #D97706;
    
    --text-white: #ffffff;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --success: #10b981;
    --error: #ef4444;
    
    /* Light theme variables */
    --light-bg: #ffffff;
    --light-surface: #f8fafc;
    --light-border: #e2e8f0;
    --light-text-primary: #1e293b;
    --light-text-secondary: #64748b;
    --light-text-muted: #94a3b8;
    --light-input-bg: #f1f5f9;
    --light-input-border: #cbd5e1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    height: 100vh;
    overflow: hidden;
    background: var(--primary-dark);
}

.split-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Left Side - Branding (Dark Theme) */
.brand-side {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.brand-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(49, 151, 149, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(217, 119, 6, 0.08) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 500px;
}

.brand-logo {
    width: 180px;
    height: 180px;
    margin: 0 auto 40px;
    background: white;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    padding: 20px;
}

.brand-logo::after {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    border-radius: 30px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(20px);
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo-text {
    font-size: 80px;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.brand-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.brand-tagline {
    font-size: 16px;
    color: var(--text-light);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-features {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    font-size: 14px;
}

.feature-item i {
    color: var(--secondary);
    font-size: 18px;
}

/* Right Side - Auth Form (Light Theme) */
.auth-side {
    flex: 1;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.auth-container {
    width: 100%;
    max-width: 480px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--light-text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 15px;
    color: var(--light-text-secondary);
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.step {
    width: 40px;
    height: 4px;
    background: var(--light-border);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.step.active {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    box-shadow: 0 2px 8px rgba(44, 82, 130, 0.3);
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--light-text-primary);
    margin-bottom: 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 18px;
}

.form-control {
    width: 100%;
    padding: 16px 18px 16px 52px;
    background: var(--light-input-bg);
    border: 2px solid var(--light-input-border);
    border-radius: 12px;
    font-size: 15px;
    color: var(--light-text-primary);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--light-bg);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.form-control::placeholder {
    color: var(--light-text-muted);
}

.nic-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: 10px;
    margin-bottom: 16px;
}

.nic-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--light-text-primary);
    font-weight: 600;
    font-size: 15px;
}

.nic-display i {
    color: var(--primary);
}

.change-nic-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.change-nic-btn:hover {
    background: rgba(44, 82, 130, 0.1);
    color: var(--primary-dark);
}

.otp-section-header {
    margin-bottom: 20px;
}

.phone-mask {
    text-align: center;
    color: var(--light-text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
}

.otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.otp-input {
    width: 48px;
    height: 48px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    background: var(--light-input-bg);
    border: 2px solid var(--light-input-border);
    border-radius: 10px;
    color: var(--light-text-primary);
    transition: all 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--light-bg);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
    transform: scale(1.05);
}

.timer-resend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(49, 151, 149, 0.1);
    border: 1px solid rgba(49, 151, 149, 0.3);
    border-radius: 8px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 13px;
}

.timer.expired {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.resend-link {
    color: var(--light-text-muted);
    font-size: 13px;
    cursor: not-allowed;
    text-decoration: none;
    transition: all 0.2s;
}

.resend-link.active {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}

.resend-link.active:hover {
    color: var(--primary-dark);
}

.btn-login-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-login-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(44, 82, 130, 0.4);
}

.btn-login-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    display: none;
    align-items: center;
    gap: 10px;
}

.alert.show {
    display: flex;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

/* Sample Users Info Section */
.sample-users-info {
    margin-top: 24px;
    padding: 16px;
    background: var(--light-surface);
    border: 2px dashed var(--light-border);
    border-radius: 12px;
}

.sample-users-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--light-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sample-users-header i {
    color: var(--primary);
}

.sample-users-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.sample-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sample-user-item:hover {
    background: var(--light-input-bg);
    transform: translateX(4px);
}

.sample-user-role {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sample-user-role.super-admin {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
}

.sample-user-role.sub-admin {
    background: rgba(217, 119, 6, 0.1);
    color: #B45309;
}

.sample-user-role.accountant {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.sample-user-role.sales-rep {
    background: rgba(44, 82, 130, 0.1);
    color: var(--primary-dark);
}

.sample-user-role.driver {
    background: rgba(49, 151, 149, 0.1);
    color: #2C7A7B;
}

.sample-user-nic {
    font-size: 13px;
    font-weight: 700;
    font-family: 'Space Mono', monospace;
    color: var(--light-text-primary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sample-user-nic:hover {
    background: var(--primary);
    color: white;
}

.sample-users-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(217, 119, 6, 0.1);
    border-radius: 8px;
    font-size: 12px;
    color: #B45309;
    font-weight: 600;
}

.sample-users-note i {
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--light-border);
    color: var(--light-text-muted);
    font-size: 12px;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    color: var(--primary-dark);
}

/* Tablet - Stack Vertically with Compact Design */
@media (max-width: 1024px) {
    .split-container {
        flex-direction: column;
    }

    .brand-side {
        flex: 0 0 auto;
        min-height: 30vh;
        padding: 30px 20px;
    }

    .brand-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

    .brand-logo-text {
        font-size: 50px;
    }

    .brand-title {
        font-size: 28px;
    }

    .brand-tagline {
        font-size: 13px;
        padding: 12px 0;
    }

    .brand-features {
        display: none;
    }

    .auth-side {
        flex: 1;
        padding: 24px 20px;
    }

    .auth-header {
        margin-bottom: 24px;
    }

    .auth-header h2 {
        font-size: 24px;
    }

    .input-wrapper {
        margin-bottom: 16px;
    }
}

/* Mobile - Ultra Compact */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    .split-container {
        min-height: 100vh;
        height: auto;
    }

    .brand-side {
        min-height: 23vh;
        padding: 24px 16px;
    }

    .brand-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 16px;
        border-radius: 20px;
    }

    .brand-logo-text {
        font-size: 40px;
    }

    .brand-title {
        font-size: 24px;
    }

    .brand-tagline {
        font-size: 12px;
        padding: 10px 0;
    }

    .auth-side {
        padding: 20px 16px;
        min-height: auto;
    }

    .auth-container {
        max-width: 100%;
    }

    .auth-header {
        margin-bottom: 20px;
    }

    .auth-header h2 {
        font-size: 22px;
    }

    .auth-header p {
        font-size: 13px;
    }

    .step-indicator {
        margin-bottom: 20px;
    }

    .form-label {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .input-wrapper {
        margin-bottom: 14px;
    }

    .form-control {
        padding: 14px 16px 14px 48px;
        font-size: 14px;
    }

    .input-icon {
        left: 16px;
        font-size: 16px;
    }

    .nic-info {
        padding: 10px 12px;
        margin-bottom: 14px;
    }

    .nic-display {
        font-size: 14px;
        gap: 6px;
    }

    .phone-mask {
        font-size: 12px;
        margin-bottom: 14px;
    }

    .otp-inputs {
        gap: 6px;
        margin-bottom: 14px;
    }

    .otp-input {
        width: 44px;
        height: 44px;
        font-size: 18px;
        border-radius: 8px;
    }

    .timer-resend {
        margin-bottom: 16px;
        gap: 10px;
    }

    .timer {
        padding: 5px 10px;
        font-size: 12px;
        gap: 4px;
    }

    .timer i {
        font-size: 12px;
    }

    .resend-link {
        font-size: 12px;
    }

    .btn-login-primary {
        padding: 12px;
        font-size: 14px;
    }

    .alert {
        padding: 10px 14px;
        font-size: 12px;
        margin-bottom: 14px;
    }

    .auth-footer {
        margin-top: 20px;
        padding-top: 16px;
        font-size: 11px;
    }

    .sample-users-info {
        padding: 12px;
    }

    .sample-user-item {
        padding: 8px 10px;
    }

    .sample-user-role {
        font-size: 10px;
        padding: 3px 8px;
    }

    .sample-user-nic {
        font-size: 11px;
    }
}

/* Small Mobile - Extra Compact */
@media (max-width: 480px) {
    .brand-side {
        min-height: 15vh;
        padding: 20px 12px;
    }

    .brand-logo {
        width: 70px;
        height: 70px;
        margin-bottom: 12px;
    }

    .brand-title {
        font-size: 20px;
    }

    .auth-side {
        padding: 16px 12px;
    }

    .auth-header h2 {
        font-size: 20px;
    }

    .otp-inputs {
        gap: 5px;
    }

    .otp-input {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Landscape Mobile Fix */
@media (max-height: 600px) and (orientation: landscape) {
    .brand-side {
        display: none;
    }

    .auth-side {
        padding: 16px;
    }

    .auth-header {
        margin-bottom: 16px;
    }

    .auth-header h2 {
        font-size: 20px;
    }

    .step-indicator {
        margin-bottom: 16px;
    }
}