/* ============================================
   DESI CARS Office Portal — Login Page
   Dark theme + Brand Orange (#EB5E1B)
   ============================================ */

:root {
    --bg-primary: #0B0E14;
    --bg-secondary: #111520;
    --bg-card: #151A28;
    --bg-input: #1A2035;
    --border-color: #1E2640;
    --border-focus: #EB5E1B;
    --text-primary: #F0F2F5;
    --text-secondary: #8892A5;
    --text-muted: #5A6478;
    --accent: #EB5E1B;
    --accent-hover: #ec5e1c;
    --accent-light: #FF854D;
    --accent-glow: rgba(235, 94, 27, 0.3);
    --accent-soft: rgba(235, 94, 27, 0.08);
    --danger: #EF4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(235, 94, 27, 0.15);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* ============================================
   Background Effects
   ============================================ */

.bg-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(1);
    }
}

.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.glow-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(235, 94, 27, 0.12) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: orbFloat1 15s ease-in-out infinite;
}

.glow-orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(235, 94, 27, 0.08) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    animation: orbFloat2 18s ease-in-out infinite;
}

.glow-orb-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(235, 94, 27, 0.06) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat3 12s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(-40px, 60px); }
    66% { transform: translate(30px, -40px); }
}

@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(50px, -30px); }
    66% { transform: translate(-30px, 50px); }
}

@keyframes orbFloat3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
}

/* ============================================
   Login Container — Split Layout
   ============================================ */

.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ============================================
   Left Side — Branding
   ============================================ */

.login-branding {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    background:
        linear-gradient(135deg, rgba(235, 94, 27, 0.03) 0%, transparent 50%),
        linear-gradient(225deg, rgba(235, 94, 27, 0.02) 0%, transparent 50%);
}

.login-branding::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border-color), transparent);
}

.branding-content {
    max-width: 420px;
    animation: fadeInUp 0.8s ease-out;
}

/* Logo */
.logo-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 32px;
}

.logo-circle {
    width: 100px;
    height: 100px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border: 1.5px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.logo-circle:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.logo-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-glow {
    position: absolute;
    inset: -10px;
    border-radius: 32px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: 0;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Brand Text */
.brand-name {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--accent-light);
    line-height: 1.1;
}

.brand-tagline {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 6px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.brand-divider {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px;
    margin: 28px 0;
}

.brand-description {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 36px;
}

/* Feature Items */
.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    border: 1px solid rgba(235, 94, 27, 0.1);
    transition: var(--transition);
}

.feature-item:hover {
    background: rgba(235, 94, 27, 0.12);
    border-color: rgba(235, 94, 27, 0.2);
    transform: translateX(4px);
}

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(235, 94, 27, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ============================================
   Right Side — Login Form
   ============================================ */

.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
}

.form-wrapper {
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.8s ease-out 0.15s both;
}

/* Mobile Logo (hidden on desktop) */
.mobile-logo {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-bottom: 36px;
}

.logo-circle-sm {
    width: 72px;
    height: 72px;
    border-radius: 20px;
}

.logo-circle-sm .logo-icon {
    width: 44px;
    height: 44px;
}

.brand-name-sm {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-light);
    margin-top: 16px;
}

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

.form-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 8px;
}

.form-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Input Groups */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

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

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    transition: var(--transition);
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 48px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    font-weight: 400;
    transition: var(--transition);
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper input:hover {
    border-color: #2A3456;
    background: #1D2540;
}

.input-wrapper input:focus {
    border-color: var(--accent);
    background: #1D2540;
    box-shadow: 0 0 0 3px rgba(235, 94, 27, 0.1);
}

.input-wrapper input:focus ~ .input-focus-line {
    transform: scaleX(1);
}

.input-wrapper:has(input:focus) .input-icon {
    color: var(--accent);
}

.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 8px;
    right: 8px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1;
}

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

/* Error Message */
.error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    color: #F87171;
    font-size: 14px;
    font-weight: 500;
    animation: shakeIn 0.4s ease-out;
}

@keyframes shakeIn {
    0% { transform: translateX(-8px); opacity: 0; }
    25% { transform: translateX(6px); }
    50% { transform: translateX(-4px); }
    75% { transform: translateX(2px); }
    100% { transform: translateX(0); opacity: 1; }
}

/* Login Button */
.btn-login {
    width: 100%;
    height: 52px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(235, 94, 27, 0.3);
}

.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-hover), #FF854D);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-login:hover::before {
    opacity: 1;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(235, 94, 27, 0.4);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(235, 94, 27, 0.3);
}

.btn-text,
.btn-arrow {
    position: relative;
    z-index: 1;
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-arrow {
    transform: translateX(4px);
}

/* Spinner */
.btn-loader {
    position: relative;
    z-index: 1;
}

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

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

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

.btn-login.loading .btn-loader {
    display: flex !important;
}

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

.form-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   Animations
   ============================================ */

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

/* ============================================
   Responsive — Tablet
   ============================================ */

@media (max-width: 1024px) {
    .login-branding {
        padding: 40px;
    }

    .login-form-section {
        padding: 40px;
    }

    .branding-content {
        max-width: 360px;
    }

    .brand-name {
        font-size: 34px;
    }
}

/* ============================================
   Responsive — Mobile
   ============================================ */

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

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

    .login-branding {
        display: none;
    }

    .login-form-section {
        flex: 1;
        padding: 32px 24px;
        align-items: flex-start;
        padding-top: 60px;
    }

    .mobile-logo {
        display: flex;
    }

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

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

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

    .form-footer {
        margin-top: 32px;
    }
}

/* ============================================
   Small phones
   ============================================ */

@media (max-width: 380px) {
    .login-form-section {
        padding: 24px 16px;
        padding-top: 48px;
    }

    .input-wrapper input {
        height: 48px;
        font-size: 14px;
    }

    .btn-login {
        height: 48px;
        font-size: 15px;
    }
}
