:root {
    --primary: #32325a;
    --secondary: #8f92b0;
    --tertiary: #eeeef3;
    --accent: #52ffb8;
}

body {
    background-color: var(--tertiary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* Center content for login pages only */
body:has(.login-container) {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

/******************************/
/* TEXT */
/******************************/

.text-sm {
    font-size: 1rem;
}

.text-md {
    font-size: 1.1rem;
}

.text-lg {
    font-size: 1.2rem;
}

.text-center {
    text-align: center;
}

/******************************/
/* CONTAINER */
/******************************/

.login-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 1000px;
    max-width: 95%;
}

/******************************/
/* CAROUSEL */
/******************************/

.carousel-section {
    background-color: var(--primary);
    padding: 0;
    height: 100%;
}

.carousel-item img {
    height: 700px;
    object-fit: cover;
}

.carousel-indicators button {
    background-color: white !important;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
    opacity: 0.5;
}

.carousel-indicators .active {
    opacity: 1;
}

.carousel-caption {
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    text-align: center;
    z-index: 2;
}

.carousel-caption-title {
    color: white;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    margin-bottom: 0.5em;
}

.carousel-caption-subtitle {
    color: white;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/******************************/
/* FORM */
/******************************/

.form-section {
    padding: 25px 30px 10px 30px;
    display: flex;
    flex-direction: column;
    justify-content: start;
    background-color: #ffffff;
}

.subtitle {
    margin-top: 10px;
    margin-bottom: 0px;
    text-align: center;
    font-size: 1.2rem;
}

.form-wrapper {
    height: 100%;
}

.form-align {
    height: 100%;
}

.form-control {
    border: 1px solid var(--tertiary);
    padding: 12px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 105, 180, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
    background-image: none;
}

.form-label {
    color: var(--secondary);
    font-weight: 500;
}

.large-checkbox {
    width: 1.2em;
    height: 1.2em;
    background-color: var(--tertiary);
    border-color: var(--secondary);
}

.checkbox-label {
    line-height: 1.5em;
    margin-bottom: 0;
    vertical-align: middle;
}

.qrcode {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    float: none;
}

.input-password {
    padding-right: 40px;
}

.password-policy-popover {
    max-width: 350px !important;
}

/******************************/
/* SUBMIT BUTTON */
/******************************/

.submit-button {
    background-color: var(--primary);
    border: none;
    padding: 12px;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: var(--primary);
    filter: brightness(1.30);
    color: white;
}

.submit-button:disabled {
    background-color: var(--primary);
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
}

/******************************/
/* FORM LINK */
/******************************/

.form-links {
    margin-top: 30px;
    text-align: center;
}

.form-links a {
    color: var(--secondary);
    filter: brightness(0.50);
    text-decoration: none;
    font-size: 1rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.form-links a:hover {
    color: var(--secondary);
    filter: brightness(1);
}

/******************************/
/* PASSWORD REVEAL */
/******************************/

.input-group-text {
    background-color: var(--tertiary);
    border: 1px solid var(--tertiary);
    color: var(--secondary);
    display: flex;
    align-items: center;
    padding: 0.75rem;
}

.input-group-text img {
    width: 20px;
    height: 20px;
}

.input-group-eye {
    position: absolute;
    cursor: pointer;
    top: 25%;
    z-index: 5;
}

.eye-noinfo-align {
    left: 94%;
}

.eye-info-align {
    left: 84%;
}

.input-group-eye img {
    width: 16px;
    height: 16px;
    transition: fill 0.2s;
    display: none;
}

.input-group-eye .eye {
    display: inline;
}

.input-group-eye.visible .eye {
    display: none;
}

.input-group-eye .eye-slash {
    display: none;
}

.input-group-eye.visible .eye-slash {
    display: inline;
}

/******************************/
/* LOGO */
/******************************/

.brand-logo {
    text-align: center;
}

.brand-logo svg {
    max-width: 300px;
    height: auto;
}

/******************************/
/* LANGUAGE */
/******************************/

.language-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Absolute positioning for login pages */
body:has(.login-container) .language-selector {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
}

.language-selector a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 5px;
    margin-right: 5px;
    transition: color 0.2s ease;
    text-transform: uppercase;
}

.language-selector a:hover,
.language-selector a.active {
    color: var(--primary);
    font-weight: 600;
}

.language-selector .separator {
    color: var(--secondary);
    margin: 0 2px;
}

/******************************/
/* MESSAGE BOX */
/******************************/

.message-box-wrapper {
    min-height: 55px;
    height: 55px;
}

.message-box {
    position: relative;
    padding: 5px 30px 5px 10px;
    border-radius: 5px;
    width: 100%;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.message-box.info {
    background-color: #e8f5e9;
    border: 1px solid #a5d6a7;
}

.message-box.error {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
}

.message-box .message-box-close-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: inherit;
    padding: 0 5px;
}

/******************************/
/* RESPONSIVE */
/******************************/

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .carousel-section {
        height: 250px;
    }

    .carousel-item img {
        height: 250px;
    }

    .form-section {
        padding: 20px;
    }

    .brand-logo svg {
        max-width: 150px;
    }
}

/******************************/
/* OTHER */
/******************************/

/* Hide password eye icon from browser autofill */
::-ms-reveal {
    display: none
}

/* Remove number input spinners for Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Remove number input spinners for Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.hidden {
    display: none;
}
