/* ============================================================
   LOGIN / AUTH PAGES — Modern Layout
   ============================================================ */

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

:root {
    --auth-primary: #6F1A07;
    --auth-primary-light: #8B3A1F;
    --auth-primary-dark: #5A1206;
    --auth-primary-subtle: #FDF2F0;
    --auth-bg: linear-gradient(145deg, #FAF6F4 0%, #F2EAE6 50%, #EAE0DB 100%);
    --auth-surface: #FFFFFF;
    --auth-border: #E2D8D4;
    --auth-border-focus: #6F1A07;
    --auth-text: #1C1210;
    --auth-text-secondary: #6B5B54;
    --auth-text-muted: #9C8E87;
    --auth-radius: 16px;
    --auth-radius-sm: 10px;
    --auth-radius-xs: 8px;
    --auth-shadow: 0 20px 60px rgba(111, 26, 7, 0.07), 0 4px 16px rgba(0, 0, 0, 0.04);
    --auth-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --auth-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--auth-bg);
    color: var(--auth-text);
    height: 100vh;
    overflow: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Card ---------- */
.card-login {
    background: var(--auth-surface);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    border: none;
    padding: 48px 80px;
    width: 100%;
    max-width: 560px;
    animation: authFadeIn 0.4s ease-out;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-login-logo-convidado {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.new-logo {
    height: 80px;
    width: 100px;
}

.logo {
    height: 3vh;
}

/* ---------- Typography ---------- */
.card-login h1 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 26px;
    color: var(--auth-text);
    letter-spacing: -0.3px;
}

.card-login h5 {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: var(--auth-text-secondary);
    font-size: 15px;
}

.card-login label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 13.5px;
    color: var(--auth-text-secondary);
    padding-left: 2px;
    margin-bottom: 6px;
}

/* ---------- Form Controls ---------- */
.card-login .form-control,
.form-control {
    font-family: 'Inter', sans-serif;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--auth-text);
    background: var(--auth-surface);
    transition: border-color var(--auth-transition), box-shadow var(--auth-transition);
    height: auto;
}

.card-login .form-control::placeholder,
.form-control::placeholder {
    color: var(--auth-text-muted);
    font-weight: 400;
}

.form-control:focus {
    color: var(--auth-text);
    background-color: var(--auth-surface);
    border-color: var(--auth-border-focus);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(111, 26, 7, 0.12);
}

.card-login .form-select,
.form-select {
    font-family: 'Inter', sans-serif;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--auth-text);
    transition: border-color var(--auth-transition), box-shadow var(--auth-transition);
}

.form-select:focus {
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px rgba(111, 26, 7, 0.12);
}

/* ---------- Input Group (password toggle) ---------- */
.card-login .input-group .form-control {
    border-right: none;
}

.card-login .input-group-text,
.input-group-text {
    background-color: var(--auth-surface);
    border: 1.5px solid var(--auth-border);
    border-left: none;
    border-radius: 0 var(--auth-radius-sm) var(--auth-radius-sm) 0;
    padding: 10px 14px;
    transition: border-color var(--auth-transition);
}

.card-login .input-group .form-control:focus + .input-group-text {
    border-color: var(--auth-border-focus);
}

/* ---------- Buttons ---------- */
.btn-login {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 12px 1rem;
    border-radius: var(--auth-radius-sm);
    width: 100%;
    border: none;
    transition: all var(--auth-transition);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(111, 26, 7, 0.25);
}

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

/* ---------- Checkbox / Switch ---------- */
.form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.form-check-input:focus {
    border-color: rgba(111, 26, 7, 0.4);
    box-shadow: 0 0 0 3px rgba(111, 26, 7, 0.12);
}

.custom-control-input:checked ~ .custom-control-label::before {
    color: #fff;
    border-color: var(--auth-primary);
    background-color: var(--auth-primary);
}

.form-check-label,
.custom-control-label {
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    color: var(--auth-text-secondary);
}

.form-check {
    padding-top: 6px;
}

/* ---------- Alerts ---------- */
.card-login .alert {
    border-radius: var(--auth-radius-xs);
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    border: none;
}

.card-login .alert-danger {
    background-color: #FEF2F2;
    color: #991B1B;
}

.card-login .alert-success {
    background-color: #F0FDF4;
    color: #166534;
}

/* ---------- Links ---------- */
.card-login a {
    font-family: 'Inter', sans-serif;
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--auth-transition);
}

.card-login a:hover {
    color: var(--auth-primary-light);
}

/* ---------- Select2 Overrides ---------- */
.select2-container--default .select2-selection--single {
    border: 1.5px solid var(--auth-border) !important;
    border-radius: var(--auth-radius-sm) !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--auth-text);
    padding-left: 14px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
}

.select2-dropdown {
    border: 1px solid var(--auth-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-radius: var(--auth-radius-xs);
    overflow: hidden;
}

.select2-results__option.select2-results__option--highlighted {
    background-color: var(--auth-primary-subtle) !important;
    color: var(--auth-text) !important;
}

.select2-dropdown .select2-results__option {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    padding: 9px 16px;
    border-radius: 6px;
    margin: 2px 5px;
}

/* ---------- Footer ---------- */
footer {
    font-family: 'Inter', sans-serif;
}

footer p {
    font-size: 12.5px;
    color: var(--auth-text-muted);
}

footer a {
    color: var(--auth-primary) !important;
    text-decoration: none !important;
    font-weight: 500;
}

footer a:hover {
    color: var(--auth-primary-light) !important;
}

/* ---------- Small / Muted Text ---------- */
.card-login small,
.card-login .form-text {
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
}

.card-login .text-muted {
    color: var(--auth-text-muted) !important;
}

/* ---------- Helpers ---------- */
.desativapc {
    display: none;
}

/* ---------- Form Label Group (floating labels) ---------- */
.form-label-group {
    position: relative;
    margin-bottom: 1rem;
}

.form-label-group > input,
.form-label-group > label {
    padding: 0.75rem 1rem;
    height: auto;
    border-radius: var(--auth-radius-sm);
}

.form-label-group > label {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    margin-bottom: 0;
    line-height: 1.5;
    color: var(--auth-text-muted);
    cursor: text;
    border: 1px solid transparent;
    transition: all .1s ease-in-out;
}

.form-label-group input::placeholder {
    color: transparent;
}

.form-label-group input:not(:placeholder-shown) {
    padding-top: calc(0.75rem + 0.75rem * (2 / 3));
    padding-bottom: calc(0.75rem / 3);
}

.form-label-group input:not(:placeholder-shown) ~ label {
    padding-top: calc(0.75rem / 3);
    padding-bottom: calc(0.75rem / 3);
    font-size: 12px;
    color: var(--auth-text-muted);
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 850px) {
    .card-login {
        padding: 32px 24px;
        width: 95%;
        min-height: auto;
        min-width: unset;
        max-width: none;
        margin: 16px;
        border-radius: var(--auth-radius);
    }

    .card-login-logo {
        width: 100%;
        margin-bottom: 10px !important;
    }

    .card-login h1 {
        font-size: 22px !important;
    }

    form {
        width: 100%;
    }

    .new-logo {
        margin-top: 2rem !important;
        margin-bottom: 20px !important;
        width: 10vh;
        height: auto;
    }

    footer {
        padding: 15px !important;
    }

    main {
        width: 100%;
        padding: 11px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #esqueceuSenha {
        width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 700px) {
    .desativamobile {
        display: none;
    }

    .menu {
        position: relative;
        right: 0;
    }

    .boasvindasmobile {
        display: block !important;
    }
}

@media screen and (max-width: 637px) {
    .card-login {
        width: 95%;
    }
}

@media screen and (max-width: 376px) {
    .card-login {
        padding: 24px 20px;
    }
}

@media screen and (max-height: 729px) {
    body {
        height: auto;
        overflow: auto;
    }

    .card-login {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}

/* ---------- Wide Card (registration pages) ---------- */
.card-login-wide {
    max-width: 900px;
    padding: 48px 72px;
}

@media (min-width: 1440px) {
    .card-login-wide {
        max-width: 1000px;
        padding: 48px 96px;
    }
}

@media screen and (max-width: 637px) {
    .card-login-wide {
        width: 97%;
        padding: 32px 24px;
    }
}

@media screen and (max-width: 376px) {
    .card-login-wide {
        padding: 24px 20px;
    }
}

/* UF Select Option Overrides */
#ufSelect option {
    background: #FFF;
    color: var(--auth-text);
}

#ufSelect option[value] {
    padding: 10px;
}

/* Password error styling */
#passwordError {
    display: none;
    color: #dc3545;
    font-size: 12.5px;
    font-family: 'Inter', sans-serif;
    padding-left: 2px;
}

/* Background image variant (legacy support) */
.bg-image {
    background-image: url(../images/login/bg.png);
    background-size: cover;
    background-position: center;
}

.login,
.image {
    min-height: 100vh;
}

.logologin {
    max-width: 50%;
    margin-bottom: 5vh;
}

.login-heading {
    font-weight: 300;
}
