@font-face {
    font-family: selawik;
    src: url("../fonts/selawkl-s.p.95d97f82.woff") format("woff");
    font-display: swap;
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: selawik;
    src: url("../fonts/selawk-s.p.96a3a9ec.woff") format("woff");
    font-display: swap;
    font-weight: 350;
    font-style: normal;
}
@font-face {
    font-family: selawik;
    src: url("../fonts/selawksb-s.p.ce1338ca.woff") format("woff");
    font-display: swap;
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: selawik;
    src: url("../fonts/selawkb-s.p.89f65c7e.woff") format("woff");
    font-display: swap;
    font-weight: 700;
    font-style: normal;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f4f7fa;
    --foreground: #15191c;
    --muted: rgba(21, 25, 28, 0.62);
    --border: rgba(21, 25, 28, 0.16);
    --primary: #009dd5;
    --danger: #dc2626;
    --ok: #16a34a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body.auth-page {
    font-family: selawik, Arial, Helvetica, sans-serif;
    color: var(--foreground);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
}

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(to bottom, rgba(0, 157, 213, 0.28), #f4f7fa 55%, #ffffff);
}

.auth-shell {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid rgba(21, 25, 28, 0.08);
    border-radius: 0.75rem;
    box-shadow: 0 12px 36px rgba(21, 25, 28, 0.1);
}

.auth-card {
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.auth-title { text-align: center; }
.auth-title h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #15191c;
    margin-bottom: 0.25rem;
}
.auth-title p {
    font-size: 0.875rem;
    color: var(--muted);
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.field label {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
    color: #15191c;
}
.field input,
.field select {
    width: 100%;
    height: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0 0.75rem;
    background: #ffffff;
    color: #15191c;
    font: inherit;
    outline: none;
}
.field input::placeholder {
    color: rgba(21, 25, 28, 0.4);
}
.field input:focus,
.field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 157, 213, 0.18);
}

.phone-row {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 0.5rem;
}

.password-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .password-row { grid-template-columns: 1fr 1fr; }
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 2.5rem; width: 100%; }

.eye-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0.5rem;
    display: flex;
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
}
.eye-btn:hover { color: #15191c; }

.helper-link {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
}
.helper-link:hover { text-decoration: underline; }

.msg-erro {
    min-height: 1.1rem;
    font-size: 0.875rem;
    color: var(--danger);
}
.msg-ok {
    min-height: 1.1rem;
    font-size: 0.875rem;
    color: var(--ok);
}

.btn-primary {
    display: inline-flex;
    width: 100%;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.375rem;
    background: var(--primary);
    color: #ffffff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-primary:hover { opacity: 0.92; }

.terms {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.4;
}
.terms a {
    color: var(--primary);
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}
.divider .line {
    flex: 1;
    height: 2px;
    background: var(--border);
}
.divider span {
    font-size: 0.875rem;
    color: var(--muted);
}

.auth-switch {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #15191c;
}
.auth-switch a {
    color: var(--primary);
    text-decoration: underline;
}
