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

:root {
    --primary: #0f172a;       /* Slate 900 */
    --secondary: #1e293b;     /* Slate 800 */
    --accent: #d4af37;        /* Gold */
    --accent-hover: #b8860b;  /* Dark Goldenrod */
    --text-main: #f8fafc;     /* Slate 50 */
    --text-muted: #94a3b8;    /* Slate 400 */
    --glass: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --danger: #ef4444;
    --info: #3b82f6;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('assets/img/login_bg_v4.png') no-repeat center center / cover fixed;
    position: relative;
}

/* Background Overlay */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(3px);
    z-index: 0;
}

.login-wrapper {
    position: relative;
    display: flex;
    width: 90%;
    max-width: 1000px;
    height: 600px;
    background: var(--glass);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 1;
    animation: fadeInScale 0.8s ease-out;
}

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

/* Left Section: Branding & Features */
.company-info {
    flex: 1;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), transparent);
    border-right: 1px solid var(--glass-border);
}

.brand-section {
    margin-bottom: 40px;
}

.logo-container {
    width: 240px;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.logo-container img {
    width: 100%;
    height: auto;
}

.brand-section h1 {
    color: var(--text-main);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
}

.brand-section p {
    color: var(--accent);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-main);
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 400;
    transition: var(--transition);
}

.features-list li:hover {
    transform: translateX(8px);
    color: var(--accent);
}

.features-list i {
    width: 36px;
    height: 36px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
}

.features-list li:hover i {
    background: var(--accent);
    color: var(--primary);
    box-shadow: 0 0 15px var(--accent);
}

/* Right Section: Login Form */
.login-form-section {
    flex: 1;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
}

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

.form-header h2 {
    color: var(--text-main);
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

.form-input:focus + .input-icon {
    color: var(--accent);
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.password-toggle-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Alert Styling */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    animation: slideInDown 0.4s ease-out;
}

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

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* Login Button */
.login-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: var(--primary);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    box-shadow: 0 10px 20px -10px var(--accent);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px var(--accent);
    filter: brightness(1.1);
}

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

.login-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Shake Animation for Error */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.btn-error {
    animation: shake 0.4s ease-in-out;
    background: var(--danger) !important;
    color: white !important;
    box-shadow: 0 10px 20px -10px var(--danger) !important;
}

.login-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.login-footer a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 850px) {
    .login-wrapper {
        flex-direction: column;
        height: auto;
        max-height: 95vh;
        width: 450px;
        max-width: 95%;
    }
    
    .company-info {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding: 32px;
    }
    
    .features-list {
        display: none; /* Hide features on mobile to save vertical space */
    }
    
    .login-form-section {
        padding: 32px;
    }
    
    .brand-section {
        margin-bottom: 0;
        text-align: center;
    }
    
    .logo-container {
        margin: 0 auto 16px;
        width: 80px;
    }
}

@media (max-width: 480px) {
    .login-wrapper {
        border-radius: 0;
        height: 100vh;
        max-height: none;
        width: 100%;
    }
    
    body {
        align-items: flex-start;
    }
}