:root {
    --forest: #164b78;
    --green: #337ab7;
    --mint: #e7f4f9;
    --cream: #f1f7fb;
    --orange: #65bbe0;
    --ink: #17324a;
    --muted: #6f8191;
    --white: #fff
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink)
}

body {
    background: var(--cream);
    min-height: 100vh;
    padding: 20px
}

.shell {
    min-height: calc(100vh - 40px);
    display: grid;
    grid-template-columns: minmax(380px, .9fr) minmax(500px, 1.1fr);
    max-width: 1500px;
    margin: auto;
    background: #fff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(41, 62, 53, .12)
}

.login {
    padding: 44px clamp(34px, 5vw, 78px);
    display: flex;
    flex-direction: column
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
    font-size: 20px;
    color: var(--forest)
}

.mark {
    width: 39px;
    height: 39px;
    border-radius: 50% 50% 50% 12px;
    background: var(--green);
    display: grid;
    place-items: center;
    color: #fff
}

.brand span span {
    color: var(--orange)
}

.login-inner {
    width: min(100%, 440px);
    margin: auto
}

.overline {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--green);
    font-weight: 800
}

.login h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 44px;
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -1.7px;
    margin: 13px 0 13px
}

.intro {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.65;
    margin: 0 0 27px
}

.switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #eef5fa;
    border-radius: 13px;
    padding: 4px;
    margin-bottom: 25px
}

.switch button {
    height: 42px;
    border: 0;
    background: transparent;
    border-radius: 10px;
    color: #6b7d76;
    font-weight: 750;
    cursor: pointer
}

.switch button.active {
    background: #fff;
    color: var(--forest);
    box-shadow: 0 3px 10px rgba(31, 52, 46, .09)
}

.field {
    margin-bottom: 16px
}

.field label {
    font-size: 12px;
    font-weight: 750;
    display: flex;
    justify-content: space-between;
    margin: 0 0 8px
}

.field label a {
    color: var(--green);
    text-decoration: none
}

.box {
    height: 54px;
    border: 1px solid #dce4df;
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 15px
}

.box:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(37, 122, 93, .09)
}

.box input {
    border: 0;
    outline: 0;
    width: 100%;
    height: 100%;
    font: inherit;
    color: var(--ink);
    padding-left: 10px
}

.box input::placeholder {
    color: #a3aea9
}

.eye {
    border: 0;
    background: none;
    color: var(--green);
    font-weight: 800;
    cursor: pointer
}

.check {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    margin: 3px 0 22px
}

.check input {
    accent-color: var(--green)
}

.enter {
    height: 54px;
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: var(--forest);
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 11px 23px rgba(23, 63, 53, .18)
}

.enter:hover {
    background: #24649b
}

.signup {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin: 22px 0 0
}

.signup a {
    color: var(--green);
    font-weight: 750;
    text-decoration: none
}

.foot {
    font-size: 11px;
    color: #87958f;
    display: flex;
    gap: 17px
}

.foot a {
    color: inherit;
    text-decoration: none
}

.message {
    display: none;
    background: #e9f7ef;
    color: #176b4b;
    padding: 11px;
    border-radius: 10px;
    text-align: center;
    font-size: 12px;
    margin-top: 12px
}

.message.on {
    display: block
}

.story {
    position: relative;
    overflow: hidden;
    background: var(--mint);
    padding: 50px clamp(38px, 5vw, 78px);
    display: flex;
    flex-direction: column;
    justify-content: space-between
}

.story:before {
    content: "";
    position: absolute;
    width: 390px;
    height: 390px;
    border-radius: 50%;
    background: #d5ebf6;
    right: -120px;
    top: -100px
}

.top-note {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 9px;
    color: var(--green);
    font-size: 11px;
    font-weight: 750
}

.dot {
    width: 7px;
    height: 7px;
    background: #4ab2f7;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(74, 178, 247, .13)
}

.visual {
    position: relative;
    margin: auto;
    min-height: 530px;
    width: min(100%, 600px);
    display: grid;
    place-items: center
}

.blob {
    position: absolute;
    width: 385px;
    height: 385px;
    background: #f8fbfd;
    border-radius: 45% 55% 58% 42%/52% 42% 58% 48%;
    transform: rotate(-8deg)
}

.phone {
    z-index: 2;
    width: 235px;
    height: 430px;
    background: #fff;
    border: 8px solid var(--forest);
    border-radius: 35px;
    padding: 24px 18px;
    box-shadow: 0 30px 55px rgba(23, 63, 53, .2);
    transform: rotate(4deg)
}

.phone:before {
    content: "";
    display: block;
    width: 52px;
    height: 5px;
    background: var(--forest);
    border-radius: 5px;
    margin: -11px auto 26px
}

.hello {
    font-family: Georgia, serif;
    font-size: 21px
}

.phone p {
    font-size: 10px;
    color: var(--muted)
}

.rx {
    background: #f2f8fc;
    border-radius: 14px;
    padding: 14px;
    margin-top: 16px
}

.rx-head {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--muted)
}

.pill {
    height: 38px;
    width: 38px;
    border-radius: 12px;
    background: #f7d9cb;
    display: grid;
    place-items: center;
    color: var(--orange);
    font-size: 20px;
    margin: 13px 0
}

.rx strong {
    font-size: 12px;
    display: block
}

.status {
    display: inline-block;
    color: var(--green);
    font-size: 8px;
    background: #e7f4f9;
    padding: 5px 8px;
    border-radius: 10px;
    margin-top: 9px
}

.float-card {
    position: absolute;
    z-index: 3;
    background: #fff;
    padding: 14px 17px;
    border-radius: 14px;
    box-shadow: 0 14px 28px rgba(38, 74, 59, .13);
    font-size: 11px
}

.float-card b {
    display: block;
    font-size: 13px;
    margin-bottom: 3px
}

.float-card.one {
    left: 2%;
    top: 27%
}

.float-card.two {
    right: 0;
    bottom: 27%
}

.round-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #f7d9cb;
    color: var(--orange);
    display: grid;
    place-items: center;
    float: left;
    margin-right: 10px
}

.quote {
    position: relative;
    max-width: 560px
}

.quote p {
    font-family: Georgia, serif;
    font-size: 25px;
    line-height: 1.35;
    color: var(--forest);
    margin: 0 0 12px
}

.quote span {
    font-size: 11px;
    color: var(--green);
    font-weight: 750
}

.profile-desc {
    font-weight: 400;
    color: var(--muted);
    font-size: 10px;
    display: block;
    margin-top: 2px
}

.brand img {
    width: 138px;
    height: auto;
    display: block
}

@media(max-width:900px) {
    body {
        padding: 0
    }

    .shell {
        min-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column
    }

    .login {
        padding: 30px 24px 45px
    }

    .brand {
        margin-bottom: 55px
    }

    .login-inner {
        margin: 0 auto
    }

    .foot {
        margin-top: 50px
    }

    .story {
        min-height: 600px
    }

    .visual {
        min-height: 450px
    }

    .quote {
        margin-top: 25px
    }
}

@media(max-width:500px) {
    .login h1 {
        font-size: 37px
    }

    .story {
        display: none
    }

    .shell {
        min-height: 100vh
    }

    .foot {
        justify-content: center
    }

    .brand {
        margin-bottom: 44px
    }
}

/* Cadastro público de farmácia */
.pharmacy-modal {
    --bs-modal-width: 1050px
}

.pharmacy-modal .modal-content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(23, 50, 74, .2)
}

.pharmacy-modal .modal-header {
    align-items: flex-start;
    padding: 25px 30px 21px;
    background: #f4f9fc;
    border-bottom: 1px solid #dceaf2
}

.pharmacy-modal .modal-overline {
    display: block;
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    margin-bottom: 5px
}

.pharmacy-modal .modal-title {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--forest);
    font-size: 29px;
    line-height: 1.2
}

.pharmacy-modal .modal-header p {
    color: var(--muted);
    font-size: 13px;
    margin: 5px 0 0
}

.pharmacy-modal .btn-close {
    margin: 2px 0 0 20px
}

.pharmacy-modal .modal-body {
    padding: 25px 30px 30px
}

.cnpj-search {
    background: #f6fafc;
    border: 1px solid #dce9f0;
    border-radius: 15px;
    padding: 18px
}

.cnpj-search>label,
.modal-field label {
    display: block;
    color: var(--ink);
    font-size: 12px;
    font-weight: 750;
    margin-bottom: 7px
}

.cnpj-search-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px
}

.modal-input {
    position: relative
}

.modal-input i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--green)
}

.modal-input input,
.modal-field input {
    width: 100%;
    height: 46px;
    border: 1px solid #d6e1e7;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    outline: 0;
    padding: 0 13px
}

.modal-input.has-icon input {
    padding-left: 42px
}

.modal-input input:focus,
.modal-field input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(51, 122, 183, .1)
}

.consult-button,
.change-button,
.submit-pharmacy,
.cancel-button {
    height: 46px;
    border-radius: 10px;
    padding: 0 20px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer
}

.consult-button,
.submit-pharmacy {
    border: 0;
    background: var(--forest);
    color: #fff
}

.consult-button:hover,
.submit-pharmacy:hover {
    background: #24649b
}

.consult-button:disabled {
    opacity: .7;
    cursor: wait
}

.consult-button .spinner-border {
    display: none;
    margin-right: 6px
}

.consult-button.loading .spinner-border {
    display: inline-block
}

.change-button,
.cancel-button {
    border: 1px solid #cedbe3;
    background: #fff;
    color: var(--forest)
}

.consult-feedback,
.form-feedback {
    min-height: 18px;
    font-size: 12px;
    margin-top: 9px
}

.consult-feedback.error,
.form-feedback.error {
    color: #b23b3b
}

.consult-feedback.success,
.form-feedback.success {
    color: #1e7756
}

.official-note {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #eaf6f1;
    color: #27684f;
    border-radius: 12px;
    padding: 13px 15px;
    font-size: 12px;
    margin-top: 20px
}

.official-note i {
    font-size: 22px
}

.official-note strong {
    display: block
}

.modal-section {
    margin-top: 24px
}

.modal-section h3 {
    font-size: 13px;
    color: var(--forest);
    font-weight: 800;
    margin: 0 0 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid #e4ebef
}

.modal-section h3 i {
    color: var(--green);
    margin-right: 7px
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px
}

.modal-field.span-2 {
    grid-column: span 2
}

.modal-field label span {
    color: #bd4d4d;
    font-size: 9px;
    text-transform: uppercase;
    margin-left: 4px
}

.modal-field input.api-locked {
    padding-right: 34px;
    background-color: #f2f6f8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23337ab7' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a2 2 0 0 0-2 2v2h4V3a2 2 0 0 0-2-2m3 4V3a3 3 0 0 0-6 0v2a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: not-allowed
}

.modal-field small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-top: 5px
}

.whatsapp-field input {
    border-color: #8acaae
}

.was-validated input:invalid {
    border-color: #c95b5b;
    box-shadow: 0 0 0 3px rgba(201, 91, 91, .08)
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e4ebef
}

.submit-pharmacy i {
    margin-left: 7px
}

@media(max-width:800px) {
    .pharmacy-modal .modal-dialog {
        margin: 0;
        min-height: 100%
    }

    .pharmacy-modal .modal-content {
        min-height: 100vh;
        border-radius: 0
    }

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .cnpj-search-row {
        grid-template-columns: 1fr
    }

    .consult-button,
    .change-button {
        width: 100%
    }
}

@media(max-width:500px) {

    .pharmacy-modal .modal-header,
    .pharmacy-modal .modal-body {
        padding-left: 19px;
        padding-right: 19px
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .modal-field.span-2 {
        grid-column: span 1
    }

    .modal-actions {
        display: grid;
        grid-template-columns: 1fr
    }

    .cancel-button {
        order: 2
    }
}

.contact-field input {
    border-color: #8acaae
}

.api-feedback-modal .modal-content {
    border-color: var(--forest)
}

.api-feedback-modal .modal-header {
    background: var(--forest)
}

.api-feedback-modal .api-feedback-button {
    background: var(--forest);
    border-color: var(--forest);
    color: var(--white)
}

.api-feedback-modal .api-feedback-button:hover,
.api-feedback-modal .api-feedback-button:focus {
    background: #24649b;
    border-color: #24649b;
    color: var(--white)
}

.verification-code {
    max-width: 260px;
    margin: 18px auto 6px;
    letter-spacing: .55em;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--forest)
}

/* Primeiro acesso do paciente */
.patient-modal .modal-content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(23, 50, 74, .22)
}

.patient-modal .modal-header {
    align-items: flex-start;
    padding: 24px 27px 20px;
    background: #f4f9fc;
    border-bottom: 1px solid #dceaf2
}

.patient-modal .modal-overline {
    display: block;
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 5px
}

.patient-modal .modal-title {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--forest);
    font-size: 27px
}

.patient-modal .modal-header p {
    font-size: 12px;
    color: var(--muted);
    margin: 5px 0 0
}

.patient-modal .modal-body {
    padding: 25px 27px 27px
}

.patient-primary {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 11px;
    background: var(--forest);
    color: #fff;
    font-size: 13px;
    font-weight: 800
}

.patient-primary:hover {
    background: #24649b
}

.patient-primary:disabled {
    opacity: .65
}

.patient-link {
    display: block;
    border: 0;
    background: transparent;
    color: var(--green);
    font-size: 12px;
    font-weight: 750;
    margin: 14px auto 0
}

.patient-link:disabled {
    color: #91a2ae;
    cursor: not-allowed
}

.patient-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px
}

.patient-grid .span-2 {
    grid-column: span 2
}

.account-found {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 12px;
    background: #eaf6f1;
    color: #27684f
}

.account-found.new {
    background: #eef6fb;
    color: var(--forest)
}

.account-found i {
    font-size: 22px
}

.account-found strong,
.account-found small {
    display: block
}

.account-found small {
    font-size: 11px;
    margin-top: 2px
}

.patient-password {
    display: flex;
    border: 1px solid #d6e1e7;
    border-radius: 10px;
    overflow: hidden
}

.patient-password input {
    border: 0 !important;
    border-radius: 0 !important
}

.patient-password button {
    border: 0;
    background: #fff;
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    padding: 0 13px
}

.patient-terms {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    color: var(--muted);
    font-size: 11px;
    margin-top: 15px
}

.patient-terms input {
    accent-color: var(--green);
    margin-top: 2px
}

.patient-code-icon {
    display: block;
    color: var(--green);
    font-size: 42px;
    margin-bottom: 8px
}

.patient-step h3 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--forest);
    font-size: 23px
}

.patient-step p {
    color: var(--muted);
    font-size: 12px
}

@media(max-width:500px) {
    .patient-modal .modal-dialog {
        margin: 0;
        min-height: 100%
    }

    .patient-modal .modal-content {
        min-height: 100vh;
        border-radius: 0
    }

    .patient-grid {
        grid-template-columns: 1fr
    }

    .patient-grid .span-2 {
        grid-column: span 1
    }
}
