/* Custom Login Page Styles - Imagemaker */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide Odoo default elements */
.o_main_navbar,
.o_footer,
header,
footer {
    display: none !important;
}

/* Main Wrapper */
.custom-login-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 0;
    margin: 0;
}

/* Container */
.custom-login-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: #ffffff;
    overflow: hidden;
}

/* Left Panel - Image */
.custom-login-image-panel {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6D6DEF 0%, #5858DF 100%);
    overflow: hidden;
}

.custom-login-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-login-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.custom-login-brand {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 10;
}

.custom-login-logo {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* Right Panel - Form */
.custom-login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #ffffff;
}

.custom-login-form-container {
    width: 100%;
    max-width: 420px;
}

/* Header */
.custom-login-header {
    text-align: center;
    margin-bottom: 40px;
}

.custom-login-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.custom-login-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* Alert Messages */
.custom-login-alert {
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    border: none;
}

.custom-login-alert.alert-danger {
    background: #fef2f2;
    color: #dc2626;
}

.custom-login-alert.alert-success {
    background: #f0fdf4;
    color: #16a34a;
}

/* Form */
.custom-login-form {
    width: 100%;
}

/* Labels */
.custom-login-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.custom-login-label i {
    color: #6D6DEF;
    font-size: 14px;
}

/* Inputs */
.custom-login-input {
    height: 52px;
    padding: 14px 18px;
    font-size: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.2s ease;
}

.custom-login-input:focus {
    outline: none;
    border-color: #6D6DEF;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(109, 109, 239, 0.1);
}

.custom-login-input::placeholder {
    color: #94a3b8;
}

/* Password Wrapper */
.custom-login-password-wrapper {
    position: relative;
}

.custom-login-password-wrapper .custom-login-input {
    padding-right: 50px;
}

.custom-login-password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.custom-login-password-toggle:hover {
    color: #6D6DEF;
}

/* Checkbox */
.custom-login-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
}

.custom-login-checkbox:checked {
    background-color: #6D6DEF;
    border-color: #6D6DEF;
}

.custom-login-checkbox:focus {
    box-shadow: 0 0 0 3px rgba(109, 109, 239, 0.2);
}

.custom-login-remember {
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
}

/* Forgot Password Link */
.custom-login-forgot {
    font-size: 14px;
    color: #6D6DEF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.custom-login-forgot:hover {
    color: #5858DF;
    text-decoration: underline;
}

/* Submit Button */
.custom-login-btn,
.custom-login-form button[type="submit"],
#loginBtn {
    height: 52px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #6D6DEF 0%, #5858DF 100%) !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
}

.custom-login-btn:hover {
    background: linear-gradient(135deg, #5858DF 0%, #4747CF 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(109, 109, 239, 0.3);
}

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

.custom-login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.custom-login-btn-text,
.custom-login-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Secondary Button */
.custom-login-btn-secondary {
    height: 48px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    color: #64748b;
    background: transparent;
    transition: all 0.2s ease;
}

.custom-login-btn-secondary:hover {
    border-color: #6D6DEF;
    color: #6D6DEF;
    background: rgba(109, 109, 239, 0.05);
}

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

.custom-login-footer-link {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.custom-login-footer-link:hover {
    color: #6D6DEF;
}

/* Responsive Design */
@media (max-width: 992px) {
    .custom-login-container {
        flex-direction: column;
    }

    .custom-login-image-panel {
        min-height: 200px;
        flex: none;
    }

    .custom-login-form-panel {
        flex: 1;
        padding: 40px 24px;
    }

    .custom-login-brand {
        top: 20px;
        left: 20px;
    }

    .custom-login-logo {
        height: 36px;
    }
}

@media (max-width: 576px) {
    .custom-login-image-panel {
        min-height: 150px;
    }

    .custom-login-form-container {
        max-width: 100%;
    }

    .custom-login-title {
        font-size: 26px;
    }

    .custom-login-header {
        margin-bottom: 32px;
    }

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

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

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

.custom-login-form-container {
    animation: fadeIn 0.4s ease-out;
}

/* Loading State */
.custom-login-btn.loading .custom-login-btn-text {
    display: none;
}

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