@import url("somos-um-design-system.css?v=20260622-5");

:root {
    --family-ink: #1c1b24;
    --family-muted: #6f6d77;
    --family-line: #dedde2;
    --family-soft: #f7f7f9;
    --family-accent: #f58a07;
    --family-accent-dark: #d96f00;
    --family-success: #1e7b4d;
}

* { box-sizing: border-box; }

body.family-page {
    margin: 0;
    background: var(--su-bg);
    color: var(--family-ink);
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

.family-header {
    background: #fff;
    border-bottom: 1px solid var(--family-line);
    min-height: 96px;
    display: flex;
    align-items: center;
}

.family-header-inner {
    width: min(100% - 32px, 820px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.family-logo {
    width: min(260px, 70vw);
    height: auto;
    display: block;
}

.family-lock {
    color: var(--family-muted);
    font-size: .875rem;
    white-space: nowrap;
}

.family-main {
    width: min(100% - 32px, 780px);
    margin: 0 auto;
    padding: 36px 0 56px;
}

.family-title {
    font-size: 2.15rem;
    line-height: 1.15;
    font-weight: 800;
    margin: 0 0 8px;
}

.family-subtitle {
    color: var(--family-muted);
    margin-bottom: 18px;
}

.family-progress {
    height: 7px;
    background: #e9e8ec;
    border-radius: 6px;
    overflow: hidden;
}

.family-progress-bar {
    height: 100%;
    width: 25%;
    background: var(--family-accent);
    border-radius: inherit;
}

.family-section {
    padding: 28px 0;
    border-top: 1px solid var(--family-line);
}

.family-section:first-of-type { margin-top: 28px; }

.family-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 22px;
}

.family-section-title i { color: var(--family-accent); }

.family-page .form-label {
    font-weight: 700;
    margin-bottom: 7px;
}

.family-page .form-control,
.family-page .form-select {
    min-height: 48px;
    border-color: #c9c7ce;
    border-radius: 7px;
}

.family-page .form-control:focus,
.family-page .form-select:focus,
.family-page .form-check-input:focus {
    border-color: var(--family-accent);
    box-shadow: 0 0 0 .2rem rgba(245, 138, 7, .16);
}

.family-page .form-check-input:checked {
    background-color: var(--family-ink);
    border-color: var(--family-ink);
}

.photo-upload {
    width: 156px;
    min-width: 156px;
}

.photo-frame {
    position: relative;
    width: 156px;
    aspect-ratio: 1;
    border: 1px dashed #aaa7b0;
    border-radius: 8px;
    background: var(--family-soft);
    overflow: hidden;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--family-muted);
    text-align: center;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.photo-frame.has-image img { display: block; }
.photo-frame.has-image .photo-placeholder { display: none; }

.photo-action {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--family-ink);
    display: grid;
    place-items: center;
    box-shadow: 0 3px 12px rgba(0,0,0,.18);
}

.required-mark { color: var(--family-accent-dark); }

.family-divider-list {
    border-top: 1px solid var(--family-line);
}

.child-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--family-line);
}

.child-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f0ece7;
    color: var(--family-ink);
    display: grid;
    place-items: center;
    font-weight: 800;
}

.child-actions { display: flex; gap: 4px; }

.icon-button {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--family-ink);
    border-radius: 6px;
}

.icon-button:hover { background: var(--family-soft); }

.btn-family-primary {
    min-height: 52px;
    border: 1px solid var(--su-primary);
    background: var(--su-primary);
    color: #fff;
    border-radius: 7px;
    font-weight: 800;
    padding: 12px 22px;
}

.btn-family-primary:hover,
.btn-family-primary:focus {
    background: var(--su-primary-strong);
    border-color: var(--su-primary-strong);
    color: #fff;
}

.btn-family-outline {
    border: 1px dashed #aaa7b0;
    background: #fff;
    color: var(--family-accent-dark);
    min-height: 48px;
    border-radius: 7px;
    font-weight: 700;
}

.family-invite-note {
    border-left: 4px solid var(--family-accent);
    background: #fff8ef;
    padding: 14px 16px;
    margin: 22px 0 0;
}

.family-success {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    background: #eaf6ef;
    color: var(--family-success);
    font-size: 1.8rem;
}

.invite-box {
    margin-top: 28px;
    padding: 22px;
    border: 1px solid var(--family-line);
    border-radius: 8px;
    text-align: left;
}

.family-role-section {
    padding: 22px 0 28px;
}

.family-role-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
}

.role-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.role-option {
    position: relative;
    margin: 0;
}

.role-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-option span {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #c9c7ce;
    border-radius: 7px;
    background: #fff;
    color: var(--family-ink);
    cursor: pointer;
}

.role-option input:checked + span {
    border-color: var(--family-accent);
    box-shadow: 0 0 0 2px rgba(245, 138, 7, .16);
    color: var(--family-accent-dark);
}

.role-option input:focus-visible + span {
    outline: 3px solid rgba(245, 138, 7, .25);
    outline-offset: 2px;
}

.was-validated .role-option input:invalid + span {
    border-color: #dc3545;
    background-color: #fffafb;
}

.was-validated input[type="file"]:invalid ~ .photo-frame {
    border-color: #dc3545;
    background-color: #fffafb;
}

.role-option input:disabled + span {
    opacity: .45;
    cursor: not-allowed;
    background: var(--family-soft);
}

.readonly-family-list {
    border-top: 1px solid var(--family-line);
}

.readonly-family-list > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid var(--family-line);
}

.readonly-family-list span {
    color: var(--family-muted);
}
.family-auth-shell {
    width: min(100%, 460px);
    margin: 0 auto;
    padding: 24px 0;
}

.auth-links {
    display: grid;
    gap: 10px;
    margin-top: 24px;
    text-align: center;
}

.auth-links a {
    color: var(--family-accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.auth-links a:hover { text-decoration: underline; }

.profile-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 28px;
}

.profile-summary img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--family-accent);
}

.header-icon-button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid #c9c7ce;
    border-radius: 7px;
    color: var(--family-ink);
    background: transparent;
    font-size: 1.2rem;
}

.header-icon-button:hover { background: var(--family-soft); }
.family-bottom-spacer { height: 88px; }

.family-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 56px;
    padding: 0 8px calc(env(safe-area-inset-bottom));
    background: #1c1b18;
    border-top: 1px solid rgba(255,255,255,.08);
}

.family-bottom-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-decoration: none;
    color: #ff8f00;
    font-family: 'Work Sans', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: opacity .15s ease;
    opacity: 0.8;
    padding: 0 8px;
}

.family-bottom-link i { display: none; }
.family-bottom-link:hover { color: #ff8f00; opacity: 1; }
.family-bottom-link.active { color: #ff8f00; font-weight: 700; opacity: 1; }

.survey-list {
    border-top: 1px solid var(--family-line);
}

.survey-list-item {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--family-line);
}

.survey-list-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #fff6e9;
    color: var(--family-accent-dark);
    font-size: 1.3rem;
}
@media (max-width: 575.98px) {
    .family-header { min-height: 78px; }
    .family-lock span { display: none; }
    .family-main { padding-top: 26px; }
    .profile-layout { flex-direction: column; }
    .photo-upload { width: 128px; min-width: 128px; }
    .photo-frame { width: 128px; }
    .family-section { padding: 24px 0; }
}
/* Auth, registration and feedback surfaces */
body.family-auth-page,
body.family-registration-page {
    min-height: 100vh;
    background: var(--su-bg);
    padding: 24px 0 40px;
}

.family-auth-page .family-header,
.family-registration-page .family-header {
    width: min(calc(100% - 32px), 820px);
    margin: 0 auto;
    border: 1px solid #dcdde3;
    border-bottom: 0;
    box-shadow: 0 16px 42px rgba(28,27,36,.09);
}

.family-auth-page .family-header { width: min(calc(100% - 32px), 560px); }

.family-auth-page .family-header-inner,
.family-registration-page .family-header-inner {
    width: 100%;
    padding: 0 22px;
}

.family-auth-page .family-main,
.family-registration-page .family-main {
    background: #fff;
    margin-top: 0;
    border: 1px solid #dcdde3;
    box-shadow: 0 18px 42px rgba(28,27,36,.09);
}

.family-auth-page .family-main {
    width: min(calc(100% - 32px), 560px);
    padding: 42px 48px 46px;
}

.family-registration-page .family-main {
    width: min(calc(100% - 32px), 820px);
    padding: 40px 48px 52px;
}

.family-auth-shell { width: 100%; padding: 0; }
.auth-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--family-accent-dark);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.auth-input-icon {
    width: 48px;
    justify-content: center;
    color: var(--family-muted);
    background: var(--family-soft);
    border-color: #c9c7ce;
}
.family-page .input-group > .auth-input-icon + .form-control { border-left: 0; }
.family-page .input-group:focus-within .auth-input-icon {
    border-color: var(--family-accent);
    color: var(--family-accent-dark);
}
.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    color: var(--family-muted);
    font-size: .78rem;
    margin: 24px 0 18px;
}
.auth-divider::before,
.auth-divider::after { content: ''; height: 1px; background: var(--family-line); }
.role-option span { min-height: 72px; font-size: 1.02rem; }
.role-option span i { font-size: 1.35rem; color: var(--family-muted); }
.role-option input:checked + span i { color: var(--family-accent-dark); }
.family-progress-bar { box-shadow: 0 0 0 1px rgba(217,111,0,.06); }

.family-feedback-dialog {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: min(calc(100vw - 32px), 410px);
    max-width: 410px;
    border: 0;
    border-radius: var(--su-radius, 8px);
    padding: 30px 24px 26px;
    text-align: center;
    color: var(--family-ink);
    box-shadow: 0 24px 70px rgba(19,18,25,.3);
    z-index: 2050;
    box-sizing: border-box;
}
.family-feedback-dialog::backdrop {
    background: rgba(20,20,27,.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.family-feedback-dialog[open] { animation: family-dialog-in .2s cubic-bezier(0.16, 1, 0.3, 1); }
.family-feedback-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    font-size: 1.5rem;
}
.family-feedback-dialog h2 { font-size: 1.3rem; font-weight: 800; margin: 0 0 9px; }
.family-feedback-dialog p { color: var(--family-muted); margin: 0 0 22px; line-height: 1.55; }
.family-feedback-dialog .btn { min-width: 132px; }
.family-feedback-success .family-feedback-icon { color: #18734a; background: #e8f6ee; }
.family-feedback-warning .family-feedback-icon { color: #9a5a00; background: #fff3dc; }
.family-feedback-error .family-feedback-icon { color: #b42318; background: #feeceb; }
@keyframes family-dialog-in {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 575.98px) {
    body.family-auth-page,
    body.family-registration-page { padding: 0; background: var(--su-bg); }
    .family-auth-page .family-header,
    .family-registration-page .family-header,
    .family-auth-page .family-main,
    .family-registration-page .family-main {
        width: 100%;
        margin: 0;
        border-left: 0;
        border-right: 0;
        box-shadow: none;
    }
    .family-auth-page .family-main,
    .family-registration-page .family-main { padding: 30px 24px 42px; }
    .family-auth-page .family-header-inner,
    .family-registration-page .family-header-inner { padding: 0 24px; }
    .role-option span { min-height: 66px; }
}
.auth-inline-link {
    color: var(--family-accent-dark);
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 7px;
}
.auth-inline-link:hover { color: var(--family-ink); text-decoration: underline; }

/* --- NOVA PALETA DE CORES VIBRANTE --- */
:root {
    /* Fundo mais limpo (cinza bem claro) em vez do tom pêssego pálido */
    --su-bg: #f8f9fa;
    --su-surface: #ffffff;
    --su-surface-soft: #fff4e6;
    --su-surface-muted: #f1f3f5;
    
    /* Textos mais escuros e nítidos em vez de marrom */
    --su-ink: #212529;
    --su-muted: #6c757d;
    
    /* Linhas mais neutras */
    --su-line: #dee2e6;
    
    /* Usando o Laranja Vivo da marca para ações */
    --su-primary: #f58a07;
    --su-primary-strong: #d96f00;
}
