@import url(normalize.css);

/* =========================================================
   APPOINTMENTS LOGIN
   Layout moderno e responsivo
   Substitui completamente o main.css antigo.
   ========================================================= */

:root {
    --primary: #4aaaa5;
    --primary-dark: #378985;
    --primary-light: #65c0bb;
    --primary-ring: rgba(74, 170, 165, 0.15);

    --ink: #1d3341;
    --text: #566d7a;
    --muted: #8fa1ab;

    --border: #dce6ea;
    --border-soft: #e9eff2;
    --surface: #ffffff;
    --surface-soft: #f7fafb;

    --shadow:
        0 30px 80px rgba(18, 44, 61, 0.20),
        0 10px 28px rgba(18, 44, 61, 0.08);
}

/* =========================================================
   BASE
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    margin: 0 !important;
    overflow-x: hidden;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    font-size: 14px;
    color: var(--ink);

    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: cover !important;
    background-attachment: fixed !important;
}

/* Somente uma camada do tamanho exato da viewport.
   Não existem mais pseudo-elementos de 9999px. */
body.page-background::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;

    background:
        linear-gradient(
            135deg,
            rgba(35, 58, 78, 0.64),
            rgba(74, 170, 165, 0.48)
        );

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* =========================================================
   PAGE / CARD
   ========================================================= */

.page {
    position: relative;
    z-index: 1;

    width: 100%;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 42px 24px 72px;
}

.container-small {
    position: relative;

    width: min(1080px, 100%);
    min-height: 650px;

    display: grid;
    grid-template-columns: minmax(0, 58%) minmax(390px, 42%);

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 26px;

    background: var(--surface);
    box-shadow: var(--shadow);
}

/* =========================================================
   HERO
   ========================================================= */

.container-small .background {
    position: relative;
    min-width: 0;
    min-height: 650px;

    display: flex;
    align-items: center;

    padding: 48px;

    overflow: hidden;

    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: cover !important;
}

.container-small .background::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;

    background:
        linear-gradient(
            180deg,
            rgba(11, 29, 41, 0.08) 0%,
            rgba(11, 29, 41, 0.28) 42%,
            rgba(11, 29, 41, 0.84) 100%
        ),
        linear-gradient(
            120deg,
            rgba(74, 170, 165, 0.20),
            transparent 58%
        );
}

.container-small .content {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 540px;

    padding: 0 !important;
}

.container-small .content h1 {
    margin: 0 0 18px;

    color: #fff;

    font-size: clamp(38px, 4vw, 58px);
    line-height: 1.03;
    letter-spacing: -1.6px;
    font-weight: 800;

    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.28);
}

.container-small .content p {
    margin: 0;

    max-width: 520px;

    color: rgba(255, 255, 255, 0.92);

    font-size: 16px;
    line-height: 1.68;

    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

/* =========================================================
   FORM
   ========================================================= */

.container-small .form {
    width: 100%;
    min-width: 0;
    min-height: 650px;

    margin: 0;
    padding: 38px 36px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(74, 170, 165, 0.07),
            transparent 32%
        ),
        #fff;
}

.form h2 {
    margin: 0 0 24px;

    color: var(--ink);

    font-size: 31px;
    line-height: 1.1;
    letter-spacing: -0.8px;
    font-weight: 800;
}

/* =========================================================
   CAMPOS
   ========================================================= */

.form > .control {
    margin-bottom: 15px;
}

.form > .control .label {
    display: block;

    margin-bottom: 8px;

    color: #314957;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.42px;
    text-transform: uppercase;
}

.form > .control .input,
#id_sc_field_login,
#id_sc_field_pswd,
#id_sc_field_language {
    display: block;

    width: 100% !important;
    max-width: 100% !important;
    min-height: 50px !important;

    padding: 0 15px !important;

    border: 1px solid var(--border) !important;
    border-radius: 13px !important;

    background: #fff !important;
    color: var(--ink) !important;

    font-family: inherit !important;
    font-size: 14px !important;

    outline: none !important;
    box-shadow: none !important;

    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background-color .18s ease !important;
}

.form > .control .input::placeholder,
#id_sc_field_login::placeholder,
#id_sc_field_pswd::placeholder {
    color: #99a9b3 !important;
}

.form > .control .input:hover,
#id_sc_field_login:hover,
#id_sc_field_pswd:hover {
    border-color: #c5d5db !important;
}

.form > .control .input:focus,
#id_sc_field_login:focus,
#id_sc_field_pswd:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--primary-ring) !important;
}

/* Ícone de visualizar senha do Scriptcase */
span.sc-ui-pwd-toggle-icon {
    position: relative !important;
    z-index: 5 !important;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    float: right !important;

    right: .8rem !important;
    bottom: 1.95rem !important;

    width: 22px;
    height: 22px;

    cursor: pointer;
}

/* =========================================================
   BOTÃO
   ========================================================= */

.form > .submit {
    width: 100%;
    margin: 5px 0 0;
}

.form > .submit .button,
.form input[type="button"].button,
.form input[type="submit"].button {
    width: 100% !important;
    min-height: 50px !important;

    margin: 0 !important;
    padding: 0 18px !important;

    border: 0 !important;
    border-radius: 13px !important;

    background:
        linear-gradient(
            135deg,
            var(--primary-light),
            var(--primary) 52%,
            var(--primary-dark)
        ) !important;

    color: #fff !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: .3px !important;

    cursor: pointer !important;

    box-shadow:
        0 11px 24px rgba(74, 170, 165, 0.23) !important;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease !important;
}

.form > .submit .button:hover,
.form input[type="button"].button:hover,
.form input[type="submit"].button:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);

    box-shadow:
        0 15px 28px rgba(74, 170, 165, 0.30) !important;
}

/* =========================================================
   IDIOMAS
   ========================================================= */

.flag-lang {
    position: static !important;

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 6px;

    margin: 13px 0 0 !important;

    float: none !important;
    top: auto !important;
    transform: none !important;
}

.flag-lang .flags {
    width: 34px;
    height: 31px;

    padding: 5px !important;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    border: 1px solid transparent;
    border-radius: 9px;

    background: var(--surface-soft);

    text-decoration: none;

    transition:
        transform .18s ease,
        border-color .18s ease,
        background-color .18s ease,
        box-shadow .18s ease;
}

.flag-lang .flags img {
    display: block;

    width: 20px;
    height: auto;

    opacity: .72;

    transition: opacity .18s ease;
}

.flag-lang .flags:hover {
    transform: translateY(-1px);

    border-color: #d8e5e9;
    background: #fff;

    box-shadow:
        0 6px 14px rgba(35, 61, 78, 0.08);
}

.flag-lang .flags:hover img {
    opacity: 1;
}

/* =========================================================
   ACESSOS DE DEMONSTRAÇÃO
   ========================================================= */

.demo-login-divider {
    width: 100%;

    margin: 15px 0 12px !important;

    border: 0;
    border-top: 1px solid var(--border-soft);
}

.demo-login-panel {
    width: 100%;
}

.demo-login-options {
    display: grid;
    gap: 8px;
}

.demo-login-option {
    width: 100%;
    min-height: 58px;

    margin: 0;
    padding: 8px 10px;

    display: flex;
    align-items: center;

    gap: 10px;

    border: 1px solid #dfe8ec;
    border-radius: 13px;

    background: #fff;
    color: var(--ink);

    font: inherit;
    text-align: left;

    outline: none;
    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        background-color .18s ease;
}

.demo-login-option:hover {
    transform: translateY(-1px);

    border-color: #91cfcb;
    background: #fbfefe;

    box-shadow:
        0 8px 18px rgba(74, 170, 165, 0.08);
}

.demo-login-option:focus-visible,
.demo-login-option.is-selected {
    border-color: var(--primary);
    background: #f5fbfb;

    box-shadow:
        0 0 0 3px var(--primary-ring),
        0 8px 18px rgba(74, 170, 165, 0.08);
}

.demo-login-icon {
    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;
}

.demo-login-icon svg {
    width: 18px;
    height: 18px;

    display: block;
    fill: currentColor;
}

.demo-admin {
    color: #2563eb;
    background: #eaf1ff;
}

.demo-staff {
    color: #b45309;
    background: #fff3dc;
}

.demo-customer {
    color: #7c3aed;
    background: #f1eafe;
}

.demo-login-copy {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 4px;
}

.demo-login-copy > strong {
    overflow: hidden;

    color: #263d4b;

    font-size: 11px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .18px;
    text-transform: uppercase;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-login-copy small {
    display: flex;
    flex-wrap: wrap;

    gap: 2px 10px;

    color: #81939e;

    font-size: 10px;
    line-height: 1.35;
}

.demo-login-copy small b {
    color: #38515f;
    font-weight: 800;
}

/* =========================================================
   ERROS SCRIPTCASE
   ========================================================= */

#id_error_display_fixed {
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;

    width: 100% !important;
    height: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 20px;

    background: rgba(14, 31, 43, .58) !important;

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

table.scFormErrorTable {
    position: relative !important;

    left: auto !important;
    top: auto !important;
    transform: none !important;

    width: min(390px, 100%) !important;
    height: auto !important;
    min-height: 150px !important;

    padding: 24px !important;

    border: 1px solid #e3ebee !important;
    border-radius: 18px !important;

    background: #fff !important;

    box-shadow:
        0 28px 60px rgba(14, 31, 43, 0.22) !important;
}

td.scFormErrorMessage {
    padding: 34px 8px 8px !important;

    color: #445966 !important;

    font-family: inherit !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

td.scFormErrorTitleFont {
    position: relative;
    color: transparent !important;
}

td.scFormErrorTitleFont img {
    position: absolute;

    left: 50%;
    top: 0;

    margin: 0 !important;

    transform: translateX(-50%);
}

a.scButton_default {
    position: absolute !important;

    right: 12px !important;
    top: 12px !important;

    padding: 5px 8px !important;

    border: 1px solid #d8e3e8 !important;
    border-radius: 8px !important;

    background: #f8fafb !important;
    color: #536875 !important;

    font-size: 10px !important;
    text-decoration: none !important;
}

/* =========================================================
   COPYRIGHT
   ========================================================= */

.copyright {
    position: fixed;

    left: 0;
    bottom: 0;
    z-index: 10;

    width: 100%;

    display: flex;
    justify-content: center;

    padding: 8px 16px;

    pointer-events: none;
}

.copyright p {
    margin: 0;
    padding: 6px 12px;

    border-radius: 999px;

    background: rgba(23, 44, 58, .42);
    color: rgba(255, 255, 255, .86);

    font-size: 10px;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.copyright p a {
    color: inherit;
    pointer-events: auto;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 920px) {
    body {
        background-attachment: scroll !important;
    }

    .page {
        align-items: flex-start;

        padding: 24px 16px 28px;
    }

    .container-small {
        width: min(720px, 100%);
        min-height: auto;

        grid-template-columns: 1fr;

        border-radius: 21px;
    }

    .container-small .background {
        min-height: 300px;

        padding: 34px 30px;
    }

    .container-small .content h1 {
        margin-bottom: 12px;

        font-size: 38px;
    }

    .container-small .content p {
        font-size: 14px;
        line-height: 1.55;
    }

    .container-small .form {
        min-height: auto;

        padding: 32px 30px 36px;
    }

    .form h2 {
        font-size: 28px;
    }

    .copyright {
        position: relative;
        z-index: 2;

        padding: 0 16px 12px;
    }

    .copyright p {
        background: rgba(255, 255, 255, .68);
        color: #647783;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 560px) {
    .page {
        padding: 10px 9px 18px;
    }

    .container-small {
        border-radius: 17px;
    }

    .container-small .background {
        min-height: 220px;

        padding: 24px 20px;
    }

    .container-small .content h1 {
        margin-bottom: 10px;

        font-size: 30px;
        letter-spacing: -.8px;
    }

    .container-small .content p {
        display: -webkit-box;
        overflow: hidden;

        font-size: 13px;
        line-height: 1.5;

        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .container-small .form {
        padding: 26px 18px 30px;
    }

    .form h2 {
        font-size: 26px;
    }

    .flag-lang {
        justify-content: center;
    }

    .demo-login-option {
        min-height: 56px;
    }

    .demo-login-copy small {
        font-size: 9px;
        gap: 2px 8px;
    }
}

/* =========================================================
   DESKTOP COM POUCA ALTURA
   ========================================================= */

@media (max-height: 760px) and (min-width: 921px) {
    .page {
        align-items: flex-start;

        padding-top: 18px;
        padding-bottom: 44px;
    }

    .container-small,
    .container-small .background,
    .container-small .form {
        min-height: 590px;
    }

    .container-small .form {
        padding-top: 26px;
        padding-bottom: 26px;
    }

    .form h2 {
        margin-bottom: 18px;
    }

    .form > .control {
        margin-bottom: 12px;
    }

    .flag-lang {
        margin-top: 10px !important;
    }

    .demo-login-divider {
        margin-top: 11px !important;
        margin-bottom: 10px !important;
    }

    .demo-login-option {
        min-height: 52px;
    }

    .demo-login-icon {
        width: 33px;
        height: 33px;
        flex-basis: 33px;
    }
}

@supports (appearance: base-select) {

    /* =====================================
       SELECT PERSONALIZÁVEL
    ===================================== */

    #id_sc_field_language,
    #id_sc_field_language::picker(select) {
        appearance: base-select;
    }


    /* =====================================
       CAMPO FECHADO
    ===================================== */

     #id_sc_field_language {
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        font-family: inherit !important;
        font-weight: 400 !important;
        line-height: normal !important;
        color: #244456 !important;
        background: #ffffff !important;
        border: 1px solid #d5e2e9 !important;
        border-radius: 14px !important;
        box-shadow: none;
        cursor: pointer;
        outline: none;
    }


    /* =====================================
       CONTEÚDO SELECIONADO
    ===================================== */

    #id_sc_field_language selectedcontent {
        display: flex !important;
        align-items: center !important;

        height: 100% !important;
        min-height: 0 !important;
    }

    /* Evita que o estilo das opções
       aumente a altura do campo */

    #id_sc_field_language selectedcontent option {
        display: block !important;

        height: auto !important;
        min-height: 0 !important;

        padding: 0 !important;
        margin: 0 !important;

        border: 0 !important;
        border-radius: 0 !important;

        background: transparent !important;
        color: inherit !important;

        font: inherit !important;
    }


    /* =====================================
       ÍCONE DA SETA
    ===================================== */

    #id_sc_field_language::picker-icon {
        color: #244456;
        margin-left: auto;
        align-self: center;
    }


    /* =====================================
       ESTADO DE FOCO
    ===================================== */

    #id_sc_field_language:hover {
        border-color: #83cfc7 !important;
    }

    #id_sc_field_language:focus-visible {
        outline: none;
        border-color: #48bcb2 !important;
        box-shadow: 0 0 0 4px rgba(72, 188, 178, .12);
    }


    /* =====================================
       DROPDOWN ABERTO
    ===================================== */

    #id_sc_field_language::picker(select) {
        background: #ffffff;

        border: 1px solid #d5e2e9;
        border-radius: 18px;

        padding: 8px;
        margin-top: 8px;

        box-shadow: 0 12px 30px rgba(25, 55, 70, .15);

        max-height: 320px;
        overflow-y: auto;
    }


    /* =====================================
       OPÇÕES
    ===================================== */

    #id_sc_field_language option {
        display: flex;
        align-items: center;

        box-sizing: border-box;

        min-height: 50px;

        padding: 12px 14px;
        margin: 2px 0;

        font: inherit;
        font-weight: 400;

        color: #244456;
        background: #ffffff;

        border-radius: 10px;
        cursor: pointer;
    }


    /* HOVER */

    #id_sc_field_language option:hover {
        background: #f0f8f6;
    }


    /* OPÇÃO SELECIONADA */

    #id_sc_field_language option:checked {
        background: #e2f5f1;
        color: #168177;
        font-weight: 600;
    }


    /* MARCADOR DE SELEÇÃO */

    #id_sc_field_language option::checkmark {
        color: #168177;
    }


    /* =====================================
       RESPONSIVIDADE
    ===================================== */

	/* Ajuste do texto do idioma em telas pequenas */
	@media (max-width: 600px) {

		#id_sc_field_language {
			min-width: 0 !important;
		}

		/* Conteúdo selecionado */
		#id_sc_field_language selectedcontent {
			flex: 1 1 0% !important;
			min-width: 0 !important;
			max-width: 100% !important;

			overflow: hidden !important;
			white-space: nowrap !important;
			text-overflow: ellipsis !important;
		}

		/* Texto da opção selecionada */
		#id_sc_field_language selectedcontent option {
			display: block !important;

			width: 100% !important;
			max-width: 100% !important;
			min-width: 0 !important;

			overflow: hidden !important;
			white-space: nowrap !important;
			text-overflow: ellipsis !important;

			padding: 0 !important;
			margin: 0 !important;
		}

		/* Mantém a seta visível */
		#id_sc_field_language::picker-icon {
			flex-shrink: 0;
			
		}

	}


}