/* Reset */
*:focus {
    box-shadow: none !important;
}

html {
    height: 100%;
}

body {
    margin: 0px !important;
    padding: 0px !important;
    width: 100vw;
    height: 100%;
    min-height: 100vh;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    background-color: #f5f5f5;
}

/* Layout */
.body-render-auth, .body-render-noauth {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

/* Topbar */
.topbar {
    width: 100%;
    height: 80px;
    padding: 15px 40px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #292A2C;
    -webkit-box-shadow: 0px 10px 10px -4px rgba(0,0,0,0.4);
    -moz-box-shadow: 0px 10px 10px -4px rgba(0,0,0,0.4);
    box-shadow: 0px 10px 10px -4px rgba(0,0,0,0.4);
}

.topbar .logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
}

.topbar a {
    padding: 10px;
    margin-left: 5px;
    font-size: 20px;
    color: white;
    text-decoration: none;
}

.topbar a:hover {
    color: #ccc;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    overflow: auto;
}

/* Login Page */
.login-page {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Nascondi external login per brand specifici */
.brand-gabetti .external-login,
.brand-grimaldi .external-login,
.brand-professionecasa .external-login {
    display: none;
}

/* Brand non-gabetti/grimaldi/professionecasa: header scuro, no slide, logo nascosto */
.login-page:not(.brand-gabetti):not(.brand-grimaldi):not(.brand-professionecasa) .login-header {
    background: #292A2C;
}

.login-page:not(.brand-gabetti):not(.brand-grimaldi):not(.brand-professionecasa) .login-form-logo {
    visibility: hidden;
}

.login-page:not(.brand-gabetti):not(.brand-grimaldi):not(.brand-professionecasa) .login-media > * {
    display: none;
}

.login-page:not(.brand-gabetti):not(.brand-grimaldi):not(.brand-professionecasa) .login-media {
    background-image: url('../images/porte.jpeg');
    background-size: cover;
    background-position: center;
}

.login-header {
    width: 100%;
    height: 50px;
    min-height: 50px;
    padding: 5px;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #B41831 0%, #295086 100%);
    z-index: 10;
}

.login-header-logo {
    height: 40px;
    margin-left: 10px;
}

.login-header-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-left: 12px;
}

.login-content {
    height: calc(100% - 50px);
    display: flex;
    flex-direction: row;
}

.login-form {
    height: 100%;
    width: 35%;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f7f8f8;
    overflow-y: auto;
    -webkit-box-shadow: inset -15px 0px 15px -15px rgba(0,0,0,.5);
    -moz-box-shadow: inset -15px 0px 15px -15px rgba(0,0,0,.5);
    box-shadow: inset -15px 0px 15px -15px rgba(0,0,0,.5);
}

.login-form > *:first-child {
    margin-top: auto;
}

.login-form > *:last-child {
    margin-bottom: auto;
}

.login-form-logo {
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
}

.login-form .internal {
    width: 100%;
}

.login-media {
    width: 65%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
}

.login-slideshow {
    display: flex;
    height: 100%;
    animation: login-slideshow 18s infinite;
}

.login-slide {
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

@keyframes login-slideshow {
    0%, 27.78%     { transform: translateX(0); }
    33.33%, 61.11% { transform: translateX(-25%); }
    66.67%, 94.44% { transform: translateX(-50%); }
    100%           { transform: translateX(-75%); }
}

/* External Login Buttons */
.external-login {
    width: 100%;
    max-width: 350px;
}

.btn-microsoft {
    background-color: #2F2F2F;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.btn-microsoft:hover {
    background-color: #404040;
    color: white;
}

.btn-microsoft i {
    color: #00a4ef;
}

/* Forgot Password Link */
.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    text-align: center;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .input-group {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.login-form .input-group-prepend {
    display: flex;
}

.login-form .input-group-text {
    background-color: #f8f9fa;
    border: none;
    padding: 12px 15px;
    color: #666;
}

.login-form .form-control {
    border: none;
    padding: 12px 15px;
    font-size: 1rem;
}

.login-form .form-control:focus {
    outline: none;
}

.login-form .btn-primary {
    background-color: #667eea;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.login-form .btn-primary:hover {
    background-color: #5a6fd6;
}

.login-form .forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.login-form .forgot-password:hover {
    text-decoration: underline;
}

/* Remember Me Toggle */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logout Page */
.logout-page {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.logout-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.logout-card {
    background: white;
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 450px;
    width: 90%;
}

.logout-icon {
    margin-bottom: 10px;
}

.logout-card h2 {
    color: #333;
    font-weight: 600;
}

.logout-card p {
    color: #666;
    font-size: 1.1rem;
}

.logout-card .btn-primary {
    background-color: #667eea;
    border: none;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.logout-card .btn-primary:hover {
    background-color: #5a6fd6;
}

.logout-card .btn-outline-secondary {
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.logout-icon.success {
    color: #28a745;
}

/* Alert styles for logout page */
.logout-card .alert {
    border-radius: 8px;
}

.logout-card .alert-link {
    font-weight: 600;
}
    padding: 12px 40px;
    font-size: 1rem;
/* Lockout Page */
.lockout-page {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.lockout-container {
    background: white;
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
}

.lockout-container .warning-icon {
    font-size: 4rem;
    color: #ff9800;
    margin-bottom: 20px;
}

/* Access Denied */
.access-denied-page {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.access-denied-container {
    background: white;
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
}

.access-denied-container .denied-icon {
    font-size: 4rem;
    color: #f44336;
    margin-bottom: 20px;
}

/* Shared Container Styles */
.logout-container h2,
.logged-out-container h2,
.lockout-container h2,
.access-denied-container h2 {
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.logout-container p,
.logged-out-container p,
.lockout-container p,
.access-denied-container p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1rem;
}

.logout-container .text-muted,
.lockout-container .text-muted,
.access-denied-container .text-muted {
    color: #999 !important;
    font-size: 0.9rem;
}

/* Logout Buttons */
.logout-buttons,
.lockout-buttons,
.access-denied-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.logged-out-container .redirect-notice {
    background-color: #e3f2fd;
    border-radius: 8px;
    padding: 10px;
    color: #1565c0;
    font-size: 0.9rem;
}

/* Forgot Password Page */
.forgot-password-page {
    width: 100%;
    height: 100%;
    display: flex;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.forgot-password-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.forgot-password-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    width: 100%;
    max-width: 400px;
    -webkit-box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    -moz-box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.forgot-password-icon {
    margin-bottom: 10px;
}

.forgot-password-card h2 {
    color: #333;
    font-weight: 600;
    font-size: 1.5rem;
}

.forgot-password-card .form-control {
    border-radius: 0 8px 8px 0;
}

.forgot-password-card .input-group-text {
    background-color: #f5f5f5;
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.forgot-password-card .form-control:focus {
    border-color: #667eea;
}

.forgot-password-card .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
}

.forgot-password-card .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.forgot-password-card .btn-outline-secondary {
    border-radius: 8px;
}

/* Validation */
.validation-summary-errors {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #c62828;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 20px;
}

.field-validation-error {
    color: #c62828;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Brand Preview Selector */
.brand-preview-selector {
    position: fixed;
    top: 60px;
    right: 10px;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.brand-preview-selector select {
    min-width: 160px;
}

/* Media Query */
@media (max-width: 1024px) {
    .login-form {
        width: 100%;
        padding: 40px 70px;
    }
    .login-media {
        display: none;
    }
}
/* @media (max-width: 1179px) {
    .login-form {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        width: 80vw;
        max-width: 450px;
        background-color: rgba(251, 251, 252, .95);
        -webkit-box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        -moz-box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        border-radius: 16px;
    }

    .login-media {
        width: 100%;
    }
} */

/* @media (max-width: 575px) {
    .login-form {
        width: 95vw;
        padding: 30px 20px;
    }
    
    .logout-container,
    .logged-out-container {
        padding: 30px 20px;
    }
} */
