:root {
    --sysco-primary: #6C2BFF;
    --sysco-primary-dark: #4b11d8;
    --sysco-text: #111827;
    --sysco-muted: #6b7280;
    --sysco-bg: #f4f7fb;
    --sysco-border: #dbe2ea;
}

/* Reset */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body.o_web_login {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--sysco-bg) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif !important;
    overflow-x: hidden;
    color: var(--sysco-text);
}

/* Hide Odoo default layout */
header,
footer,
#top_menu_container,
.o_frontend_footer {
    display: none !important;
}

#wrapwrap,
main,
#wrap {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

/* Main wrapper */
.sysco-auth-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Left side */
.sysco-auth-left {
    width: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 50px;
    overflow: hidden;
    background: linear-gradient(135deg, #2f0b73 0%, #6C2BFF 50%, #8c52ff 100%);
}

.sysco-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 40%);
}

.sysco-brand {
    position: relative;
    z-index: 2;
}

.sysco-brand img {
    height: 56px;
    width: auto;
}

.sysco-content {
    position: relative;
    z-index: 2;
    max-width: 560px;
    margin-bottom: 80px;
}

.sysco-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 28px;
}

.sysco-content h1 {
    margin: 0 0 24px 0;
    color: white;
    font-size: 72px;
    font-weight: 800;
    line-height: 1.05;
}

.sysco-content p {
    margin: 0;
    max-width: 500px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.8;
}

/* Right side */
.sysco-auth-right {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

/* Login card */
.sysco-login-card {
    width: 100%;
    max-width: 470px;
    padding: 50px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.sysco-login-card h2 {
    margin: 0 0 10px 0;
    color: var(--sysco-text);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
}

.sysco-subtitle {
    margin: 0 0 38px 0;
    color: var(--sysco-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* Password header - FIXED ALIGNMENT */
.sysco-password-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 12px !important;
}

.sysco-label {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--sysco-text) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

.sysco-reset-link {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--sysco-primary) !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    transition: all 0.2s ease;
}

.sysco-reset-link:hover {
    color: var(--sysco-primary-dark) !important;
    text-decoration: underline !important;
}

/* Form fields and injected content */
.sysco-form-container label,
.sysco-form-container .col-form-label {
    margin-bottom: 10px !important;
    color: var(--sysco-text) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: block !important;
}

.sysco-form-container .form-control,
.sysco-form-container input[type="text"],
.sysco-form-container input[type="email"],
.sysco-form-container input[type="password"] {
    width: 100% !important;
    height: 58px !important;
    border-radius: 16px !important;
    border: 1px solid var(--sysco-border) !important;
    background: #f8fafc !important;
    padding: 0 18px !important;
    font-size: 15px !important;
    color: var(--sysco-text) !important;
    box-shadow: none !important;
    transition: all 0.2s ease;
}

.sysco-form-container .form-control:focus,
.sysco-form-container input:focus {
    background: white !important;
    border-color: var(--sysco-primary) !important;
    box-shadow: 0 0 0 4px rgba(108, 43, 255, 0.12) !important;
    outline: none !important;
}

/* Style for Buttons */
.sysco-form-container .btn-primary,
.sysco-form-container .oe_login_buttons > button {
    width: 100% !important;
    height: 58px !important;
    border: none !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, var(--sysco-primary), #8b5cf6) !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    margin-top: 10px !important;
}

.sysco-form-container .btn-primary:hover,
.sysco-form-container .oe_login_buttons > button:hover {
    transform: translateY(-2px) !important;
    background: linear-gradient(135deg, var(--sysco-primary-dark), #7c3aed) !important;
    box-shadow: 0 14px 30px rgba(108, 43, 255, 0.28) !important;
}

/* Fix for Forgot Password Link position in standard Odoo form */
.sysco-form-container .field-password {
    position: relative;
}

.sysco-form-container .field-password a[href*="reset_password"] {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--sysco-primary);
    text-decoration: none;
}

/* Password wrapper for CSS-only toggle */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .form-control {
    padding-right: 58px !important;
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 0;
    height: 58px;
    width: 58px;
    background: #f8fafc;
    border: 1px solid var(--sysco-border);
    border-left: none;
    border-radius: 0 16px 16px 0;
    cursor: pointer;
    color: var(--sysco-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    background: #f0f2f5;
    color: var(--sysco-primary);
}

.password-toggle i {
    font-size: 18px;
}

/* Focus state for password wrapper */
.password-wrapper:focus-within .form-control {
    border-color: var(--sysco-primary);
}

.password-wrapper:focus-within .password-toggle {
    border-color: var(--sysco-primary);
    border-left: none;
}

/* Login button */
.sysco-login-btn {
    width: 100%;
    height: 58px;
    border: none !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, var(--sysco-primary), #8b5cf6) !important;
    color: white !important;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sysco-login-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--sysco-primary-dark), #7c3aed) !important;
    box-shadow: 0 14px 30px rgba(108, 43, 255, 0.28);
}

/* Error messages */
.alert-danger {
    background: #fee2e2 !important;
    border: 1px solid #fecaca !important;
    color: #dc2626 !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-size: 13px !important;
    margin-bottom: 20px !important;
}

/* Placeholder */
::placeholder {
    color: #9ca3af !important;
    font-size: 14px;
}

/* Logo inside login card — only visible on mobile */
.sysco-login-logo {
    display: none;
    text-align: center;
    margin-bottom: 16px;
}

.sysco-login-logo img {
    height: 64px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Responsive */
@media (max-width: 992px) {
    .sysco-auth-wrapper {
        flex-direction: column;
    }

    .sysco-auth-left {
        display: none !important;
    }

    .sysco-auth-right {
        width: 100% !important;
        min-height: 100vh;
        padding: 20px !important;
    }

    .sysco-login-card {
        width: 100%;
        max-width: 100%;
        padding: 32px 20px;
    }

    .sysco-login-logo {
        display: block;
    }

    .sysco-login-logo img {
        height: 48px;
    }

    .sysco-login-card h2 {
        font-size: 26px;
    }

    .form-control,
    input[type="email"],
    input[type="password"] {
        height: 54px !important;
    }

    .password-toggle {
        height: 54px;
    }

    .sysco-login-btn {
        height: 54px;
    }
}

@media (max-width: 480px) {
    .sysco-auth-right {
        padding: 16px !important;
    }

    .sysco-login-card {
        padding: 28px 18px;
    }

    .sysco-login-card h2 {
        font-size: 28px;
    }

    .sysco-subtitle {
        font-size: 13px;
        margin-bottom: 28px;
    }

    .sysco-label {
        font-size: 13px !important;
    }

    .sysco-reset-link {
        font-size: 11px !important;
    }

    .form-control,
    input[type="email"],
    input[type="password"] {
        height: 48px !important;
        font-size: 14px !important;
    }

    .password-toggle {
        height: 48px;
        width: 48px;
    }

    .password-toggle i {
        font-size: 14px;
    }

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