:root {
    --bg: #080a09;
    --bg-soft: #0d100f;
    --card: rgba(17, 20, 18, 0.84);
    --card-strong: rgba(19, 23, 20, 0.96);

    --text: #f3f5f4;
    --muted: #949b97;
    --muted-2: #707873;

    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.15);

    --green: #235e37;
    --green-2: #2f7749;
    --green-3: #3d8d59;

    --silver: #c7c9c8;

    --danger: #e37676;
    --success: #79c992;

    --shadow: 0 24px 64px rgba(0, 0, 0, 0.45);

    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 11px;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-standard: cubic-bezier(0.2, 0, 0, 1);
}


/* =========================================================
   RESET
   ========================================================= */

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

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;

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

    color: var(--text);

    background:
        radial-gradient(
            circle at 18% 20%,
            rgba(35, 94, 55, 0.13),
            transparent 28%
        ),
        radial-gradient(
            circle at 82% 78%,
            rgba(255, 255, 255, 0.045),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #080a09 0%,
            #0a0d0b 48%,
            #070807 100%
        );

    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.12;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );

    background-size: 42px 42px;

    mask-image:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.8),
            transparent 85%
        );
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   PÁGINA
   ========================================================= */

.page {
    position: relative;

    min-height: 100vh;
    display: grid;
    place-items: center;

    padding: 32px;
}


/* =========================================================
   CONTAINER PRINCIPAL
   ========================================================= */

.shell {
    width: min(1120px, 100%);
    min-height: 680px;

    display: grid;
    grid-template-columns: 1.04fr 0.96fr;

    overflow: hidden;

    border: 1px solid var(--line);
    border-radius: var(--radius-xl);

    background: rgba(10, 12, 11, 0.74);

    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.025) inset,
        var(--shadow);

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


/* =========================================================
   PAINEL DA MARCA
   ========================================================= */

.brand-panel {
    position: relative;
    isolation: isolate;

    min-height: 680px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 48px 50px;

    border-right: 1px solid var(--line);

    background:
        radial-gradient(
            circle at 52% 42%,
            rgba(36, 95, 56, 0.16),
            transparent 26%
        ),
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            rgba(255, 255, 255, 0)
        );
}

.brand-panel::after {
    content: "";

    position: absolute;
    left: 50%;
    top: 43%;

    width: 360px;
    height: 360px;

    transform: translate(-50%, -50%);

    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 50%;

    box-shadow:
        0 0 0 64px rgba(255, 255, 255, 0.012),
        0 0 0 128px rgba(255, 255, 255, 0.008);

    z-index: -1;
}


/* =========================================================
   TOPO DA MARCA
   ========================================================= */

.brand-top {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #c3c8c5;

    font-size: 11px;
    font-weight: 650;
    line-height: 1;

    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.brand-dot {
    width: 7px;
    height: 7px;

    flex: 0 0 auto;

    border-radius: 50%;
    background: var(--green-3);

    box-shadow:
        0 0 18px rgba(61, 141, 89, 0.7);
}


/* =========================================================
   LOGO
   ========================================================= */

.logo-wrap {
    flex: 1;

    display: grid;
    place-items: center;

    padding: 28px 0 24px;
}

.logo {
    display: block;

    width: min(410px, 90%);
    height: auto;

    filter:
        drop-shadow(
            0 18px 32px rgba(0, 0, 0, 0.35)
        );

    mix-blend-mode: screen;
}


/* =========================================================
   TEXTO DA MARCA
   ========================================================= */

.brand-copy {
    max-width: 500px;
}

.brand-copy h1 {
    margin: 0 0 12px;

    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.06;

    letter-spacing: -0.04em;
    font-weight: 650;
}

.brand-copy p {
    max-width: 450px;
    margin: 0;

    color: var(--muted);

    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   PAINEL DO FORMULÁRIO
   ========================================================= */

.form-panel {
    position: relative;

    min-height: 680px;

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

    padding: 46px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.018),
            rgba(255, 255, 255, 0.004)
        ),
        rgba(12, 15, 13, 0.86);
}

.form-wrap {
    width: min(410px, 100%);
}


/* =========================================================
   SELETOR LOGIN / CADASTRO
   ========================================================= */

.switcher {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;

    margin-bottom: 30px;
    padding: 4px;

    border: 1px solid var(--line);
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.035);
}

.switch-btn {
    min-height: 40px;
    padding: 0 14px;

    border-radius: 8px;

    background: transparent;
    color: var(--muted);

    font-size: 13px;
    font-weight: 650;

    cursor: pointer;

    transition:
        color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease,
        transform 120ms ease;
}

.switch-btn:hover {
    color: var(--text);
}

.switch-btn:active {
    transform: scale(0.99);
}

.switch-btn.active {
    color: var(--text);

    background: rgba(255, 255, 255, 0.075);

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.045);
}


/* =========================================================
   VIEWS
   ========================================================= */

.form-view {
    display: none;

    animation:
        enter 360ms var(--ease-out);
}

.form-view.active {
    display: block;
}

@keyframes enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   CABEÇALHO DO FORMULÁRIO
   ========================================================= */

.form-head {
    margin-bottom: 26px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 10px;

    color: #8fa996;

    font-size: 11px;
    font-weight: 700;
    line-height: 1;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";

    width: 16px;
    height: 1px;

    background: var(--green-3);
}

.form-head h2 {
    margin: 0 0 8px;

    font-size: clamp(30px, 3vw, 34px);
    line-height: 1.08;

    letter-spacing: -0.035em;
    font-weight: 650;
}

.form-head p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
    line-height: 1.55;
}


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

.field {
    margin-bottom: 15px;
}

.field label {
    display: block;

    margin-bottom: 7px;

    color: #c8cdca;

    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.input-box {
    position: relative;
}

.input-box input {
    width: 100%;
    min-height: 50px;

    padding: 0 44px 0 14px;

    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    outline: none;

    color: var(--text);

    background: rgba(255, 255, 255, 0.035);

    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.input-box input:hover:not(:focus) {
    border-color: var(--line-strong);
}

.input-box input::placeholder {
    color: #626965;
}

.input-box input:focus {
    border-color: rgba(61, 141, 89, 0.68);

    background: rgba(255, 255, 255, 0.05);

    box-shadow:
        0 0 0 3px rgba(35, 94, 55, 0.13);
}

.input-box input.invalid,
input.invalid {
    border-color: rgba(227, 118, 118, 0.65) !important;

    box-shadow:
        0 0 0 3px rgba(227, 118, 118, 0.08);
}


/* =========================================================
   ÍCONES
   ========================================================= */

.input-icon,
.password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;

    width: 20px;
    height: 20px;

    display: grid;
    place-items: center;

    transform: translateY(-50%);

    color: #717974;
}

.input-icon {
    pointer-events: none;
}

.password-toggle {
    padding: 0;

    background: transparent;

    cursor: pointer;

    transition:
        color 160ms ease,
        transform 160ms ease;
}

.password-toggle:hover {
    color: #b7bdb9;
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.94);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--green-3);
    outline-offset: 3px;
    border-radius: 4px;
}


/* =========================================================
   LINHA AUXILIAR
   ========================================================= */

.helper-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin: 4px 0 20px;

    font-size: 12px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--muted);

    cursor: pointer;
    user-select: none;
}

.checkbox input {
    accent-color: var(--green-2);
    cursor: pointer;
}


/* =========================================================
   LINKS
   ========================================================= */

.link-btn {
    padding: 0;

    color: #8eb99b;
    background: transparent;

    text-decoration: none;

    cursor: pointer;

    transition:
        color 160ms ease,
        opacity 160ms ease;
}

.link-btn:hover {
    color: #b4d0bd;
}

.link-btn:active {
    opacity: 0.8;
}

.link-btn:focus-visible {
    outline: 2px solid var(--green-3);
    outline-offset: 4px;
    border-radius: 4px;
}


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

.primary-btn {
    width: 100%;
    min-height: 50px;

    border-radius: var(--radius-md);

    color: #f3f7f4;

    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.005em;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.08),
            transparent
        ),
        linear-gradient(
            135deg,
            #1c4d2d,
            #2e7045
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        0 10px 24px rgba(23, 73, 42, 0.18);

    cursor: pointer;

    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        filter 160ms ease,
        opacity 160ms ease;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-1px);

    filter: brightness(1.05);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 13px 28px rgba(23, 73, 42, 0.24);
}

.primary-btn:active:not(:disabled) {
    transform: translateY(0);
    filter: brightness(1);
}

.primary-btn:focus-visible {
    outline: 2px solid var(--green-3);
    outline-offset: 3px;
}

.primary-btn.loading,
.primary-btn:disabled {
    opacity: 0.65;
}

.primary-btn.loading {
    pointer-events: none;
}

.primary-btn:disabled {
    cursor: not-allowed;
}


/* =========================================================
   TEXTO SECUNDÁRIO
   ========================================================= */

.secondary-text {
    margin: 18px 0 0;

    text-align: center;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   MENSAGENS
   ========================================================= */

.message {
    display: none;

    margin-bottom: 16px;
    padding: 11px 13px;

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

    font-size: 12px;
    line-height: 1.5;
}

.message.show {
    display: block;

    animation:
        enter 260ms var(--ease-out);
}

.message.error {
    color: #f1b1b1;

    background: rgba(166, 53, 53, 0.10);
    border-color: rgba(227, 118, 118, 0.19);
}

.message.success {
    color: #a8dab8;

    background: rgba(41, 114, 66, 0.12);
    border-color: rgba(121, 201, 146, 0.18);
}


/* =========================================================
   FORÇA DA SENHA
   ========================================================= */

.password-strength {
    margin-top: 8px;

    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.password-strength span {
    height: 3px;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.06);

    transition:
        background 180ms ease;
}

.password-strength[data-level="1"] span:nth-child(-n+1) {
    background: #8e4848;
}

.password-strength[data-level="2"] span:nth-child(-n+2) {
    background: #a9793b;
}

.password-strength[data-level="3"] span:nth-child(-n+3) {
    background: #5f8a60;
}

.password-strength[data-level="4"] span:nth-child(-n+4) {
    background: #4c9d67;
}


/* =========================================================
   NOTA DE RODAPÉ
   ========================================================= */

.footer-note {
    position: absolute;
    right: 24px;
    bottom: 18px;

    color: #5f6662;

    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.05em;
}


/* =========================================================
   MODAL
   ========================================================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;

    display: none;
    place-items: center;

    padding: 22px;

    background: rgba(2, 3, 2, 0.74);

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

.modal.show {
    display: grid;

    animation:
        fade 220ms ease;
}

@keyframes fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* =========================================================
   CARD DO MODAL
   ========================================================= */

.modal-card {
    width: min(420px, 100%);

    padding: 26px;

    border: 1px solid var(--line-strong);
    border-radius: 16px;

    background: #111411;

    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.48);
}

.modal-card h3 {
    margin: 0 0 8px;

    font-size: 21px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.modal-card p {
    margin: 0 0 18px;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.6;
}

.modal-card .input-box {
    margin-bottom: 18px;
}


/* =========================================================
   BOTÕES DO MODAL
   ========================================================= */

.modal-actions {
    display: flex;
    gap: 8px;
}

.modal-actions button {
    min-height: 42px;

    padding: 0 15px;

    border-radius: 8px;

    font-size: 13px;
    font-weight: 650;

    cursor: pointer;

    transition:
        filter 160ms ease,
        transform 160ms ease,
        opacity 160ms ease;
}

.modal-actions button:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.modal-actions button:active:not(:disabled) {
    transform: translateY(0);
}

.modal-actions button:focus-visible {
    outline: 2px solid var(--green-3);
    outline-offset: 3px;
}

.modal-actions button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.modal-actions .close {
    flex: 1;

    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
}

.modal-actions .send {
    flex: 1.45;

    color: white;
    background: var(--green);
}


/* =========================================================
   ACESSIBILIDADE
   ========================================================= */

input:focus-visible {
    outline: none;
}

::selection {
    background: rgba(47, 119, 73, 0.45);
    color: #ffffff;
}


/* =========================================================
   RESPONSIVO - TABLET
   ========================================================= */

@media (max-width: 900px) {
    .page {
        padding: 20px;
    }

    .shell {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .brand-panel {
        min-height: 310px;

        padding: 30px 32px;

        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .brand-top {
        font-size: 10px;
    }

    .logo-wrap {
        padding: 10px 0;
    }

    .logo {
        width: min(340px, 82%);
    }

    .brand-copy h1 {
        font-size: 26px;
    }

    .brand-copy p {
        display: none;
    }

    .form-panel {
        min-height: auto;

        padding: 36px 30px 46px;
    }

    .footer-note {
        display: none;
    }
}


/* =========================================================
   RESPONSIVO - CELULAR
   ========================================================= */

@media (max-width: 520px) {
    .page {
        padding: 0;
        align-items: stretch;
    }

    .shell {
        min-height: 100vh;

        border: none;
        border-radius: 0;

        box-shadow: none;
    }

    .brand-panel {
        min-height: 235px;

        padding: 22px 22px 18px;
    }

    .brand-panel::after {
        width: 240px;
        height: 240px;
    }

    .logo {
        width: min(290px, 88%);
    }

    .brand-copy {
        display: none;
    }

    .form-panel {
        padding: 28px 22px 40px;
    }

    .switcher {
        margin-bottom: 26px;
    }

    .form-head {
        margin-bottom: 24px;
    }

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

    .helper-row {
        align-items: flex-start;
    }
}


/* =========================================================
   TELAS MUITO PEQUENAS
   ========================================================= */

@media (max-width: 380px) {
    .brand-panel {
        padding: 19px 18px;
    }

    .form-panel {
        padding: 25px 18px 34px;
    }

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

    .helper-row {
        gap: 8px;
        font-size: 11px;
    }
}


/* =========================================================
   REDUZIR ANIMAÇÕES
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ===== Data Rise Health V2: seletor de perfil ===== */
.access-profile{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:18px 0 22px;padding:4px;border:1px solid rgba(85,208,139,.18);background:rgba(255,255,255,.02);border-radius:10px}
.access-profile-btn{appearance:none;border:1px solid transparent;background:transparent;color:#8f9a93;padding:11px 12px;border-radius:7px;font:inherit;font-weight:700;cursor:pointer;transition:.18s ease}
.access-profile-btn:hover{color:#dbe7df;background:rgba(255,255,255,.035)}
.access-profile-btn.active{color:#f4fff8;background:linear-gradient(180deg,rgba(47,122,76,.68),rgba(32,93,58,.72));border-color:rgba(85,208,139,.28)}
.access-profile-btn:focus-visible{outline:2px solid #45c979;outline-offset:2px}
@media (max-width:560px){.access-profile{grid-template-columns:1fr}.access-profile-btn{padding:10px}}
