:root {
    --navy: #373437;
    --navy-deep: #262328;
    --teal: #47439d;
    --teal-dark: #302e76;
    --teal-soft: #eeedf9;
    --gold: #ff812d;
    --gold-soft: #fff0e5;
    --blue-soft: #efeffa;
    --surface: #ffffff;
    --canvas: #f7f5f2;
    --border: #e3dfdc;
    --text: #373437;
    --muted: #777177;
    --danger: #a84040;
    --shadow: 0 10px 32px rgba(19, 44, 55, .07);
    --radius: 16px;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; color: var(--text); font-family: Inter, "Segoe UI", Arial, sans-serif; background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Estrutura */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 284px minmax(0, 1fr); transition: grid-template-columns .22s ease; }
.app-shell.sidebar-collapsed { grid-template-columns: 82px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 20px 20px; display: flex; flex-direction: column; overflow: hidden; background: var(--navy-deep); color: #fff; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar-collapse { width: 33px; height: 33px; display: grid; place-items: center; flex: 0 0 33px; padding: 0; color: #91a8b1; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 9px; cursor: pointer; transition: .18s; }
.sidebar-collapse:hover { color: #fff; background: rgba(255,255,255,.1); }
.sidebar-collapse svg { width: 18px; height: 18px; transition: transform .22s; }
.sidebar-collapsed .sidebar-collapse svg { transform: rotate(180deg); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border-radius: 13px; color: #fff; background: var(--teal); font-weight: 800; letter-spacing: -.04em; box-shadow: 0 6px 18px rgba(4, 19, 26, .2); }
.brand-mark.brand-logo { overflow: hidden; padding: 3px; background: #fff; border-radius: 50%; }
.brand-mark.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-mark.light { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.24); }
.brand strong { display: block; font-size: 17px; letter-spacing: .08em; }
.brand small { display: block; margin-top: 3px; color: #9cb2bb; font-size: 11px; letter-spacing: .04em; }
.brand-copy { min-width: 0; white-space: nowrap; }
.app-menu { min-height: 0; margin-top: 34px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.menu-direct, .menu-group > summary { min-height: 45px; display: flex; align-items: center; gap: 13px; padding: 0 13px; color: #b9c9ce; border-radius: 10px; font-size: 13px; font-weight: 700; list-style: none; cursor: pointer; transition: color .18s, background .18s; }
.menu-group > summary::-webkit-details-marker { display: none; }
.menu-direct svg, .menu-group > summary svg { width: 20px; height: 20px; flex: 0 0 20px; }
.menu-direct:hover, .menu-direct.active, .menu-group > summary:hover, .menu-group[open] > summary { color: #fff; background: rgba(255,255,255,.08); }
.menu-direct.active, .menu-group:has(.menu-children a.active) > summary { box-shadow: inset 3px 0 var(--gold); }
.nav-label { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-chevron { color: #728990; font-size: 15px; font-weight: 400; transition: transform .18s; }
.menu-group[open] .nav-chevron { transform: rotate(180deg); }
.menu-children { margin: 3px 0 8px 26px; padding-left: 17px; border-left: 1px solid rgba(255,255,255,.11); }
.menu-children a { position: relative; display: block; padding: 9px 10px; color: #8fa4ac; border-radius: 8px; font-size: 11px; font-weight: 650; line-height: 1.3; }
.menu-children a::before { content: ""; position: absolute; left: -21px; top: 50%; width: 7px; height: 1px; background: rgba(255,255,255,.18); }
.menu-children a:hover, .menu-children a.active { color: #fff; background: rgba(255,255,255,.07); }
.menu-children a.active::before { height: 7px; margin-top: -3px; background: var(--gold); border-radius: 50%; }
.sidebar-collapsed .sidebar { padding-inline: 14px; }
.sidebar-collapsed .sidebar-head { justify-content: center; }
.sidebar-collapsed .brand-copy, .sidebar-collapsed .nav-label, .sidebar-collapsed .nav-chevron, .sidebar-collapsed .menu-children, .sidebar-collapsed .sidebar-note, .sidebar-collapsed .sidebar-user-copy { display: none; }
.sidebar-collapsed .sidebar-head .brand { display: none; }
.sidebar-collapsed .sidebar-collapse { width: 43px; height: 43px; flex-basis: 43px; }
.sidebar-collapsed .app-menu { overflow: visible; }
.sidebar-collapsed .menu-direct, .sidebar-collapsed .menu-group > summary { justify-content: center; padding-inline: 0; }
.sidebar-collapsed .sidebar-user { justify-content: center; gap: 5px; }
.sidebar-collapsed .sidebar-user form { display: none; }
.sidebar-nav { margin-top: 46px; }
.nav-item { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 11px; color: #b9c9ce; font-size: 14px; font-weight: 600; transition: .2s; }
.nav-item svg { width: 20px; height: 20px; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.09); }
.nav-item.active { box-shadow: inset 3px 0 var(--teal); }
.sidebar-note { display: flex; gap: 11px; margin-top: auto; margin-bottom: 22px; padding: 15px; border-radius: 13px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.sidebar-note-icon { color: #e8c985; }
.sidebar-note strong { font-size: 12px; }
.sidebar-note p { margin: 5px 0 0; color: #94abb4; font-size: 10px; line-height: 1.5; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-user-copy { min-width: 0; flex: 1; }
.sidebar-user-copy strong, .sidebar-user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-copy strong { font-size: 12px; }
.sidebar-user-copy small { margin-top: 3px; color: #91a8b1; font-size: 10px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #9eb2b9; cursor: pointer; }
.icon-button:hover { color: #fff; background: rgba(255,255,255,.08); }
.icon-button svg { width: 18px; height: 18px; }
.main-content { min-width: 0; }
.content-wrap { width: min(1420px, 100%); margin: 0 auto; padding: 46px 48px 64px; }
.mobile-header { display: none; }
.mobile-nav { position: relative; }
.mobile-nav > summary { min-height: 38px; display: grid; place-items: center; padding: 0 12px; list-style: none; color: var(--teal); background: #fff; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; font-weight: 800; cursor: pointer; }
.mobile-nav[open] > summary { color: #fff; background: var(--teal); border-color: var(--teal); }
.mobile-nav > summary:focus-visible { outline: 3px solid var(--teal-soft); outline-offset: 2px; }
.mobile-nav > summary::-webkit-details-marker { display: none; }
.mobile-nav-panel { position: absolute; z-index: 30; top: 46px; right: 0; width: min(280px, calc(100vw - 30px)); padding: 8px; background: #fff; border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow); }
.mobile-nav-panel a, .mobile-nav-panel button { width: 100%; display: block; padding: 11px 12px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-size: 12px; font-weight: 700; text-align: left; cursor: pointer; }
.mobile-nav-panel a:hover, .mobile-nav-panel a.active, .mobile-nav-panel button:hover { color: var(--teal); background: var(--teal-soft); }
.mobile-nav-panel .app-menu { margin: 0; overflow: visible; }
.mobile-nav-panel .menu-direct, .mobile-nav-panel .menu-group > summary { width: 100%; min-height: 41px; padding: 0 11px; color: var(--muted); border-radius: 8px; font-size: 11px; }
.mobile-nav-panel .menu-direct svg, .mobile-nav-panel .menu-group > summary svg { color: var(--teal); }
.mobile-nav-panel .menu-group[open] > summary { color: var(--teal); background: var(--teal-soft); }
.mobile-nav-panel .menu-children { margin: 2px 0 6px 20px; padding-left: 10px; border-color: var(--border); }
.mobile-nav-panel .menu-children a { padding: 8px 9px; color: var(--muted); }
.mobile-nav-panel .menu-children a::before { display: none; }
.mobile-nav-panel .nav-chevron { color: var(--teal); }

/* Elementos */
.eyebrow { display: block; margin-bottom: 9px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.light-text { color: #a5d4cb; }
.page-heading { margin-bottom: 28px; }
.page-heading h1 { margin: 0; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 4vw, 46px); font-weight: 500; letter-spacing: -.035em; }
.page-heading p { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.heading-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .72; transform: none; }
.button-primary { color: #fff; background: var(--teal); box-shadow: 0 8px 18px rgba(22, 115, 100, .2); }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { color: var(--navy); background: #fff; border-color: var(--border); }
.button-secondary:hover { border-color: #b9c8c5; box-shadow: 0 5px 14px rgba(30, 55, 64, .07); }
.button-ghost { color: var(--muted); background: transparent; }
.button-block { width: 100%; min-height: 49px; }
.button-plus { font-size: 20px; line-height: 1; font-weight: 400; }
.back-link { display: inline-block; color: var(--muted); font-size: 12px; font-weight: 600; }
.back-link:hover { color: var(--teal); }
.panel, .form-card, .detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.alert { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; padding: 13px 16px; border-radius: 11px; font-size: 13px; }
.alert span:first-child { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; font-weight: 800; }
.alert p { margin: 3px 0 0; }
.alert-success { color: #125e4f; background: #e4f3ee; border: 1px solid #c6e5db; }
.alert-success span:first-child { color: #fff; background: var(--teal); }
.alert-error { color: #863737; background: #fff1f0; border: 1px solid #f0cecb; }
.alert-error span:first-child { color: #fff; background: var(--danger); }
.toast-region { position: fixed; z-index: 100; top: 22px; right: 24px; width: min(390px, calc(100vw - 32px)); pointer-events: none; }
.app-toast { display: grid; grid-template-columns: 34px minmax(0,1fr) 30px; gap: 12px; align-items: center; padding: 14px; border: 1px solid #bcded4; border-radius: 14px; color: #164f45; background: rgba(246,253,251,.98); box-shadow: 0 18px 48px rgba(17,52,57,.2); pointer-events: auto; animation: toast-in .24s ease-out both; backdrop-filter: blur(12px); }
.app-toast.is-leaving { animation: toast-out .2s ease-in both; }
.toast-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--teal); font-size: 17px; font-weight: 900; }
.toast-copy { min-width: 0; }
.toast-copy strong { display: block; margin-bottom: 2px; color: #154e44; font-size: 12px; }
.toast-copy p { margin: 0; font-size: 11px; line-height: 1.45; }
.toast-close { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; color: #54706b; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; }
.toast-close:hover, .toast-close:focus-visible { color: #174f46; background: #e3f1ed; outline: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-9px) scale(.98); } }
.muted { color: #9aa5a9; font-size: 12px; }

/* Indicadores */
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 22px; }
.stats-grid.stats-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats-five .stat-card { gap: 11px; padding: 16px; }
.stats-five .stat-icon { width: 37px; height: 37px; flex: 0 0 37px; }
.stats-five .stat-card strong { font-size: 21px; }
.stat-card { display: flex; align-items: center; gap: 15px; padding: 18px 20px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.stat-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; font-size: 18px; }
.stat-icon.teal { color: var(--teal); background: var(--teal-soft); }
.stat-icon.gold { color: #a77a2c; background: var(--gold-soft); }
.stat-icon.blue { color: #477799; background: var(--blue-soft); }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.stat-card strong { color: var(--navy); font-size: 23px; letter-spacing: -.03em; }

/* Lista */
.people-panel { overflow: hidden; }
.publication-panel { overflow: hidden; }
.publication-list { display: grid; }
.publication-row { display: grid; grid-template-columns: 145px minmax(0, 1fr) 90px 20px; align-items: center; gap: 18px; min-height: 78px; padding: 13px 18px; border-bottom: 1px solid #edf1f0; transition: background .15s; }
.publication-row:last-child { border-bottom: 0; }
.publication-row:hover { background: #faf9fc; }
.publication-type { min-height: 27px; display: grid; place-items: center; padding: 0 8px; border-radius: 999px; color: var(--teal); background: var(--teal-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.publication-type.notice { color: #a94f17; background: var(--gold-soft); }
.publication-type.study { color: var(--navy); background: #ece9e6; }
.publication-type.sermon { color: #7d4d20; background: #fff0df; }
.publication-type.devotional { color: #256556; background: #e3f1ed; }
.publication-row-main { min-width: 0; }
.publication-row-main strong, .publication-row-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.publication-row-main strong { color: var(--navy); font-size: 13px; }
.publication-row-main small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.publication-status { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.publication-status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #aaa4a8; }
.publication-status.online { color: var(--teal); }
.publication-status.online::before { background: var(--teal); }
.publication-row > b { color: var(--teal); font-size: 21px; }
.filter-bar { display: flex; align-items: center; gap: 10px; padding: 17px; border-bottom: 1px solid var(--border); }
.filter-bar.is-loading { opacity: .58; pointer-events: none; }
.search-box { position: relative; flex: 1; min-width: 240px; }
.search-box svg { position: absolute; top: 50%; left: 13px; width: 17px; height: 17px; color: #8b9a9f; transform: translateY(-50%); }
.search-box input { width: 100%; padding-left: 40px; }
.filter-bar input, .filter-bar select { height: 40px; padding: 0 12px; color: var(--text); background: #f9fbfa; border: 1px solid var(--border); border-radius: 9px; outline: none; font-size: 12px; }
.filter-bar .search-box input { padding-left: 40px; }
.filter-bar .search-box svg { z-index: 1; pointer-events: none; }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,115,100,.1); }
.clear-filter { color: var(--teal); font-size: 11px; font-weight: 700; }
.per-page-select { min-width: 108px; }
.table-wrap { overflow-x: auto; }
.people-table { width: 100%; border-collapse: collapse; }
.people-table th { padding: 12px 16px; color: #829095; background: #fbfcfc; border-bottom: 1px solid var(--border); font-size: 9px; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.people-table td { padding: 13px 16px; border-bottom: 1px solid #edf1f0; color: #44545a; font-size: 12px; vertical-align: middle; }
.people-table tr:last-child td { border-bottom: 0; }
.people-table tbody tr { transition: background .15s; }
.people-table tbody tr:hover { background: #fafcfb; }
.person-cell { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.person-cell strong, .person-cell small, .table-main, .people-table td > small { display: block; }
.person-cell strong { color: var(--navy); font-size: 13px; }
.person-cell small, .people-table td > small { margin-top: 4px; color: #8a979b; font-size: 10px; }
.mobile-category { display: none; }
.table-main { color: #3c4c52; font-weight: 600; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; color: #1b675c; background: #ddede9; font-size: 12px; font-weight: 800; }
.photo-avatar { overflow: hidden; padding: 0; background: #fff; }
.photo-avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-small { width: 34px; height: 34px; flex-basis: 34px; border-radius: 9px; color: #fff; background: #275469; }
.avatar-xl { width: 78px; height: 78px; flex-basis: 78px; border-radius: 23px; font-size: 22px; }
.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 0 9px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .02em; }
.badge-member, .badge-active { color: #176457; background: #e2f1ed; }
.badge-neutral { color: #68777d; background: #eef1f1; }
.badge-inactive { color: #944848; background: #fae8e7; }
.category-badge { --category-color: #68777d; color: var(--navy); background: color-mix(in srgb, var(--category-color) 16%, #fff); border: 1px solid color-mix(in srgb, var(--category-color) 38%, #fff); }
.category-badge::before { width: 7px; height: 7px; margin-right: 6px; flex: 0 0 7px; border-radius: 50%; background: var(--category-color); content: ""; }
.category-color-label { display: inline-flex; align-items: center; gap: 8px; color: #536269; font-size: 10px; font-weight: 750; }
.category-color-label i { width: 25px; height: 25px; border: 4px solid color-mix(in srgb, var(--category-color) 18%, #fff); border-radius: 8px; background: var(--category-color); }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; }
.status-dot.active { background: #35a58d; box-shadow: 0 0 0 3px #e4f4ef; }
.status-dot.inactive { background: #c26b66; }
.row-action { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--teal); font-size: 22px; }
.row-action:hover { background: var(--teal-soft); }
.people-table .actions-heading { text-align: right; }
.people-table th:last-child, .people-table td:last-child { width: 126px; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.table-actions form { margin: 0; }
.table-action { width: 31px; height: 31px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; font-family: inherit; font-size: 14px; line-height: 1; cursor: pointer; }
.table-action svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.table-action.action-view { color: #2d6679; background: #e8f1f4; }
.table-action.action-edit { color: var(--teal); background: var(--teal-soft); }
.table-action.action-delete { color: #a7443d; background: #fae9e8; }
.table-action:hover { filter: brightness(.95); transform: translateY(-1px); }
.empty-state { padding: 55px 20px; text-align: center; }
.empty-state span { display: block; color: #9eb0b4; font-size: 30px; }
.empty-state strong { display: block; margin-top: 9px; color: var(--navy); }
.empty-state p { color: var(--muted); }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 17px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.pagination-bar > div { display: flex; align-items: center; gap: 8px; }
.page-link, .page-current { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.page-link:hover { color: var(--teal); border-color: #abc9c2; }
.page-link.disabled { opacity: .45; }
.page-current { color: var(--navy); background: #f4f8f7; font-weight: 700; }
.general-panel { overflow: hidden; }
.general-table td:first-child { min-width: 210px; }
.general-table th:last-child, .general-table td:last-child { width: 126px; }
.general-form { max-width: 920px; }
.general-usage-card { max-width: 360px; margin-bottom: 18px; padding: 24px; }
.general-usage-card > strong, .general-usage-card > span { display: block; }
.general-usage-card > strong { color: var(--navy); font-size: 28px; }
.general-usage-card > span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.uppercase-input { text-transform: uppercase; }
.color-field > div { display: flex; align-items: center; gap: 10px; }
.color-field input[type="color"] { width: 58px; padding: 4px; cursor: pointer; }
.color-field output { color: var(--muted); font-size: 11px; font-weight: 750; }

/* Formulários */
.form-heading { max-width: 760px; }
.form-heading .back-link { margin-bottom: 28px; }
.person-form { max-width: 1120px; }
.form-tabs { position: sticky; z-index: 10; top: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; padding: 8px; background: rgba(247,245,242,.94); border: 1px solid var(--border); border-radius: 14px; backdrop-filter: blur(12px); box-shadow: 0 7px 22px rgba(19,44,55,.045); }
.form-tabs button { min-height: 50px; display: flex; align-items: center; gap: 11px; padding: 0 16px; color: var(--muted); background: transparent; border: 0; border-radius: 10px; font-size: 12px; font-weight: 800; cursor: pointer; transition: .18s ease; }
.form-tabs button span { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 27px; color: var(--teal); background: var(--teal-soft); border-radius: 8px; font-size: 8px; }
.form-tabs button:hover { color: var(--navy); background: #fff; }
.form-tabs button[aria-selected="true"] { color: #fff; background: var(--teal); box-shadow: 0 8px 18px rgba(71,67,157,.18); }
.form-tabs button[aria-selected="true"] span { color: var(--teal); background: #fff; }
.publication-form-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.revision-history { margin-top: 26px; padding: 20px; background: #f7f9f8; border: 1px solid var(--border); border-radius: 12px; }
.revision-history > strong { display: block; margin-bottom: 13px; color: var(--navy); font-family: Georgia, serif; font-size: 18px; font-weight: 500; }
.revision-history > div { display: grid; grid-template-columns: 110px 170px minmax(0, 1fr); gap: 14px; padding: 10px 0; border-top: 1px solid #e7ecea; color: var(--muted); font-size: 10px; }
.revision-history b { color: var(--navy); }
.revision-history small { font-size: inherit; }
.form-tab-panel[hidden] { display: none; }
.form-card { margin-bottom: 18px; padding: 26px 28px 30px; }
.form-card-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 25px; padding-bottom: 18px; border-bottom: 1px solid #e9eeec; }
.section-number { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; color: var(--teal); background: var(--teal-soft); font-size: 10px; font-weight: 800; }
.form-card h2, .detail-card h2 { margin: 0; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 500; }
.form-card-heading p, .detail-card-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px 15px; }
.span-2 { grid-column: span 2; }.span-3 { grid-column: span 3; }.span-4 { grid-column: span 4; }.span-6 { grid-column: span 6; }.span-8 { grid-column: span 8; }.span-12 { grid-column: span 12; }
.field label:not(.toggle-row) { display: block; margin-bottom: 7px; color: #536269; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.field label b { color: var(--danger); }
.field input, .field select, .field textarea { width: 100%; color: var(--text); background: #fbfcfc; border: 1px solid #dce4e2; border-radius: 9px; outline: none; transition: .15s; }
.field input, .field select { height: 41px; padding: 0 11px; }
.field textarea { padding: 11px; line-height: 1.5; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,115,100,.09); }
.html-editor { overflow: hidden; background: #fff; border: 1px solid #dce4e2; border-radius: 11px; transition: border-color .15s, box-shadow .15s; }
.html-editor:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,115,100,.09); }
.html-editor-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 8px; background: #f5f7f6; border-bottom: 1px solid #dce4e2; }
.html-editor-toolbar select { width: auto; min-width: 125px; height: 33px; padding: 0 29px 0 9px; background-color: #fff; border-radius: 7px; font-size: 10px; }
.html-image-size-control { display: flex; align-items: center; gap: 7px; min-height: 33px; padding: 0 7px; color: var(--teal-dark); background: #fff; border: 1px solid rgba(22,115,100,.35); border-radius: 7px; font-size: 9px; font-weight: 800; }
.html-image-size-control[hidden] { display: none; }
.html-image-size-control input[type="range"] { width: 110px; height: auto; padding: 0; accent-color: var(--teal); cursor: ew-resize; box-shadow: none; }
.html-image-size-control output { min-width: 32px; color: var(--teal-dark); text-align: center; }
.html-editor-toolbar .html-image-size-control button { min-width: auto; height: 25px; padding: 0 7px; font-size: 9px; }
.html-editor-toolbar button { min-width: 33px; height: 33px; padding: 0 9px; color: #4a595e; background: #fff; border: 1px solid #dce4e2; border-radius: 7px; font-size: 10px; cursor: pointer; transition: .15s; }
.html-editor-toolbar button:hover, .html-editor-toolbar button.active { color: #fff; background: var(--teal); border-color: var(--teal); }
.html-editor-toolbar button:disabled { opacity: .55; cursor: wait; }
.html-editor-toolbar button.is-loading { color: var(--teal); background: var(--teal-soft); }
.html-editor-toolbar .html-align-button { display: inline-grid; place-items: center; }
.html-align-button > span { width: 15px; display: flex; flex-direction: column; gap: 2px; }
.html-align-button i { display: block; width: 100%; height: 1.5px; background: currentColor; border-radius: 2px; }
.html-align-button:not(.align-justify) i:nth-child(even) { width: 68%; }
.html-align-button.align-left i { align-self: flex-start; }
.html-align-button.align-center i { align-self: center; }
.html-align-button.align-right i { align-self: flex-end; }
.html-editor-divider { width: 1px; height: 23px; margin: 0 2px; background: #d6dfdd; }
.html-source-button { margin-left: auto; font-family: Consolas, "Courier New", monospace; font-weight: 700; }
.html-editor-visual, .html-editor-source { width: 100%; min-height: 390px; padding: 22px 24px; color: #343b3e; background: #fff; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: none; font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.7; resize: vertical; }
.html-editor.compact .html-editor-visual, .html-editor.compact .html-editor-source { min-height: 190px; }
.html-editor-visual { text-align: justify; }
.html-editor-visual h2, .html-editor-visual h3, .html-editor-visual h4 { text-align: left; }
.html-editor-source { display: block; font-family: Consolas, "Courier New", monospace; font-size: 12px; line-height: 1.6; }
.html-editor-visual[hidden], .html-editor-source[hidden] { display: none; }
.html-editor-visual p, .html-editor-visual ul, .html-editor-visual ol, .html-editor-visual blockquote, .html-editor-visual table { margin: 0 0 1em; }
.html-editor-visual h2, .html-editor-visual h3, .html-editor-visual h4 { margin: 1.35em 0 .55em; color: var(--navy); line-height: 1.2; }
.html-editor-visual h2 { font-size: 27px; }.html-editor-visual h3 { font-size: 22px; }.html-editor-visual h4 { font-size: 18px; }
.html-editor-visual ul, .html-editor-visual ol { padding-left: 28px; }
.html-editor-visual blockquote { padding: 4px 0 4px 18px; color: #687276; border-left: 4px solid var(--gold); font-style: italic; }
.html-editor-visual a { color: var(--teal); text-decoration: underline; }
.html-editor-visual img { max-width: 100%; height: auto; margin: 16px auto; border-radius: 8px; cursor: pointer; transition: outline .12s, box-shadow .12s; }
.html-editor-visual img.is-selected { outline: 3px solid var(--gold); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(245,130,32,.12); }
.html-editor-visual table { width: 100%; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 12px; }
.html-editor-visual th, .html-editor-visual td { padding: 8px; border: 1px solid #dce4e2; }
.html-editor-visual th { background: #f5f7f6; }
.html-image-upload-status { padding: 9px 13px; color: #536269; background: #f5f7f6; border-top: 1px solid #dce4e2; font-size: 10px; font-weight: 700; }
.html-image-upload-status.success { color: #176457; background: #e2f1ed; }
.html-image-upload-status.error { color: var(--danger); background: #fff0ef; }
.field.has-error .html-editor { border-color: var(--danger); background: #fff8f7; box-shadow: 0 0 0 3px rgba(185,57,45,.08); }
.field-error { display: block; margin-top: 5px; color: var(--danger); font-size: 10px; }
.field.has-error input:not([type="hidden"]), .field.has-error select, .field.has-error textarea, .field [aria-invalid="true"] { border-color: var(--danger); background: #fff8f7; box-shadow: 0 0 0 3px rgba(185,57,45,.08); }
.field.has-error label:not(.toggle-row) { color: var(--danger); }
.person-photo-editor.has-error { border-color: var(--danger); background: #fff8f7; }
.searchable-select-native { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; opacity: 0 !important; pointer-events: none !important; }
.searchable-select { position: relative; width: 100%; }
.searchable-select::after { position: absolute; top: 12px; right: 12px; color: #879398; content: '⌕'; font-size: 16px; line-height: 1; pointer-events: none; }
.searchable-select-input { padding-right: 36px !important; }
.searchable-select-input::-webkit-search-cancel-button { cursor: pointer; }
.searchable-select.is-open .searchable-select-input { background: #fff; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,115,100,.09); }
.searchable-select.is-disabled { opacity: .62; }
.searchable-select-dropdown { position: absolute; z-index: 80; top: calc(100% + 5px); right: 0; left: 0; max-height: 245px; padding: 6px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 16px 34px rgba(28,43,48,.16); }
.searchable-select-option { width: 100%; min-height: 36px; display: block; padding: 8px 10px; color: #425156; background: transparent; border: 0; border-radius: 7px; font-size: 11px; line-height: 1.35; text-align: left; cursor: pointer; }
.searchable-select-option:hover, .searchable-select-option.is-active { color: var(--navy); background: var(--teal-soft); }
.searchable-select-option[aria-selected="true"] { color: var(--teal-dark); background: #e2f1ed; font-weight: 800; }
.searchable-select-option.is-clear { color: var(--muted); border-bottom: 1px solid var(--border); border-radius: 7px 7px 0 0; font-style: italic; }
.searchable-select-empty, .searchable-select-hint { margin: 0; padding: 10px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.searchable-select-hint { border-top: 1px solid var(--border); }
.family-links-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.family-link-card { padding: 17px; background: #fafcfc; border: 1px solid var(--border); border-radius: 13px; }
.family-link-heading { display: flex; align-items: flex-start; gap: 10px; min-height: 64px; margin-bottom: 14px; }
.family-link-heading > span { display: grid; place-items: center; flex: 0 0 28px; height: 28px; color: var(--teal); background: var(--teal-soft); border-radius: 8px; font-size: 9px; font-weight: 900; }
.family-link-heading h3 { margin: 1px 0 3px; font-size: 15px; }
.family-link-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.family-choice { display: flex; align-items: center; gap: 8px; margin: 10px 0; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.family-choice::before, .family-choice::after { height: 1px; flex: 1; content: ''; background: var(--border); }
.family-links-note { margin: 16px 0 0; padding: 12px 14px; color: #536269; background: var(--teal-soft); border-radius: 10px; font-size: 11px; line-height: 1.5; }
.other-family-section { margin-top: 22px; padding-top: 21px; border-top: 1px solid var(--border); }
.other-family-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.other-family-section-heading h3 { margin: 0 0 4px; color: var(--navy); font-size: 17px; }
.other-family-section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.other-family-list { display: grid; gap: 12px; }
.other-family-row { padding: 15px; background: #fafcfc; border: 1px solid var(--border); border-radius: 13px; }
.other-family-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.other-family-row-heading > div { display: flex; align-items: center; gap: 9px; color: var(--navy); }
.other-family-row-heading [data-other-family-number] { display: grid; place-items: center; width: 27px; height: 27px; color: var(--teal); background: var(--teal-soft); border-radius: 8px; font-size: 9px; font-weight: 900; }
.other-family-fields { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(210px, 1.4fr) auto minmax(210px, 1.4fr) minmax(190px, 1fr); align-items: end; gap: 12px; }
.other-family-fields .family-choice { min-width: 24px; margin: 0 0 13px; }
.other-family-fields .family-choice::before, .other-family-fields .family-choice::after { display: none; }
.other-family-parent-role[hidden] { display: none; }
.other-family-empty { padding: 18px; color: var(--muted); background: #fafcfc; border: 1px dashed var(--border); border-radius: 12px; font-size: 11px; text-align: center; }
.button-small { min-height: 30px; padding: 6px 10px; font-size: 9px; }
.person-photo-editor { display: flex; align-items: center; gap: 22px; margin-bottom: 4px; padding: 18px; background: #faf9fc; border: 1px solid var(--border); border-radius: 13px; }
.person-photo-preview { width: 104px; height: 104px; display: grid; place-items: center; flex: 0 0 104px; overflow: hidden; color: var(--teal); background: var(--teal-soft); border: 3px solid #fff; border-radius: 26px; box-shadow: 0 6px 18px rgba(38,35,40,.1); }
.person-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.person-photo-preview span { font-size: 32px; }
.person-photo-copy { min-width: 0; }
.person-photo-copy > label:first-child { display: block; color: var(--navy); font-size: 12px; font-weight: 800; }
.person-photo-copy p { margin: 6px 0 12px; color: var(--muted); font-size: 10px; }
.person-photo-copy small { display: inline-block; max-width: 300px; margin-left: 10px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.photo-picker { min-height: 36px; padding-inline: 13px; }
.photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.label-hint { color: #9a7a43; font-weight: 600; }
.toggle-row { height: 41px; display: flex; align-items: center; gap: 9px; color: #536269; font-size: 11px; font-weight: 700; cursor: pointer; }
.toggle-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle { position: relative; width: 36px; height: 21px; border-radius: 99px; background: #cfd8d6; transition: .2s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.15); transition: .2s; }
.toggle-row input:checked + .toggle { background: var(--teal); }
.toggle-row input:checked + .toggle::after { transform: translateX(15px); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 8px 2px; }

/* Aniversariantes */
.birthday-panel { overflow: hidden; }
.birthday-filters { display: grid; grid-template-columns: auto minmax(150px, .55fr) minmax(210px, .8fr); align-items: end; gap: 14px; padding: 19px; border-bottom: 1px solid var(--border); transition: opacity .15s; }
.birthday-filters.is-loading { opacity: .58; pointer-events: none; }
.birthday-filters .field label { display: block; margin-bottom: 7px; color: #536269; font-size: 10px; font-weight: 800; }
.birthday-filters select { width: 100%; height: 42px; padding: 0 11px; color: var(--text); background: #fbfcfc; border: 1px solid var(--border); border-radius: 9px; outline: none; }
.birthday-filters select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(71,67,157,.09); }
.birthday-filters select:disabled { color: #aaa3a7; background: #f1efed; }
.period-options { min-height: 42px; display: flex; padding: 4px; background: #f1efed; border-radius: 10px; }
.period-options label { cursor: pointer; }
.period-options input { position: absolute; opacity: 0; pointer-events: none; }
.period-options span { min-height: 34px; display: grid; place-items: center; padding: 0 13px; color: var(--muted); border-radius: 8px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.period-options input:checked + span { color: #fff; background: var(--teal); box-shadow: 0 5px 12px rgba(71,67,157,.18); }
.birthday-list { display: grid; }
.birthday-row { display: grid; grid-template-columns: 57px 42px minmax(190px, 1fr) minmax(110px, auto) 95px 20px; align-items: center; gap: 15px; min-height: 82px; padding: 12px 18px; border-bottom: 1px solid #edf1f0; transition: background .15s; }
.birthday-row:last-child { border-bottom: 0; }
.birthday-row:hover { background: #faf9fc; }
.birthday-date { width: 52px; height: 54px; display: grid; place-items: center; align-content: center; color: #fff; background: var(--navy-deep); border-radius: 12px; line-height: 1; }
.birthday-date strong { font-family: Georgia, serif; font-size: 21px; font-weight: 500; }
.birthday-date small { margin-top: 4px; color: #ffab70; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.birthday-person { min-width: 0; }
.birthday-person strong, .birthday-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.birthday-person strong { color: var(--navy); font-size: 13px; }
.birthday-person small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.birthday-age { color: var(--navy); font-size: 15px; font-weight: 800; text-align: right; }
.birthday-age small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 600; }
.birthday-row > b { color: var(--teal); font-size: 21px; }

/* Perfil */
.profile-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.profile-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; padding: 25px 28px; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, var(--navy-deep), var(--teal-dark)); box-shadow: 0 14px 34px rgba(38, 35, 40, .18); }
.profile-title { flex: 1; min-width: 0; }
.profile-badges { display: flex; gap: 7px; margin-bottom: 9px; }
.profile-title h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 32px; font-weight: 500; }
.profile-title p { margin: 6px 0 0; color: #acc0c7; font-size: 12px; }
.profile-quick { min-width: 285px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-left: 25px; border-left: 1px solid rgba(255,255,255,.14); }
.profile-quick small, .profile-quick strong { display: block; }
.profile-quick small { margin-bottom: 6px; color: #91adb7; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.profile-quick strong { overflow: hidden; color: #f4f8f9; font-size: 11px; text-overflow: ellipsis; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.detail-card { padding: 22px 24px; box-shadow: 0 7px 22px rgba(19,44,55,.045); }
.detail-card.span-two { grid-column: span 2; }
.detail-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 19px; padding-bottom: 15px; border-bottom: 1px solid #e9eeec; }
.detail-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 10px; color: var(--teal); background: var(--teal-soft); font-weight: 800; }
.detail-list { display: grid; gap: 15px; margin: 0; }
.detail-list.columns-two { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 30px; }
.detail-list div { min-width: 0; }
.detail-list dt { margin-bottom: 4px; color: #8a979b; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.detail-list dd { margin: 0; color: #3e4c52; font-size: 12px; line-height: 1.55; }
.relation-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid #edf1f0; font-size: 11px; }
.relation-row:last-child { border: 0; }
.relation-row span { color: var(--muted); }
.relation-row strong { color: var(--navy); text-align: right; }
.empty-copy { margin: 0; color: #94a0a4; font-size: 11px; }
.notes-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.notes-grid > div { padding: 14px; border-radius: 10px; background: #f7f9f8; }
.notes-grid .internal-note { background: #fff7e9; }
.notes-grid strong { color: var(--navy); font-size: 11px; }
.notes-grid p { margin: 7px 0 0; color: #536269; font-size: 11px; line-height: 1.6; white-space: pre-line; }

/* Login */
.login-body { min-height: 100vh; background: #f3f0ec; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, .92fr) 1.08fr; }
.login-story { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 45px 55px; color: #fff; background: linear-gradient(145deg, #262328, #302e76 72%, #47439d); }
.login-story::before { content: ""; position: absolute; width: 430px; height: 430px; right: -190px; top: -170px; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018); }
.login-brand { position: relative; display: flex; align-items: center; gap: 12px; font-size: 16px; letter-spacing: .09em; }
.story-copy { position: relative; max-width: 510px; margin: auto 0; padding: 90px 0; }
.story-copy h1 { max-width: 470px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 5vw, 66px); font-weight: 400; line-height: 1.02; letter-spacing: -.045em; }
.story-copy p { max-width: 440px; margin: 22px 0 0; color: #b8cdd3; font-size: 14px; line-height: 1.8; }
.story-verse { position: relative; padding-top: 21px; border-top: 1px solid rgba(255,255,255,.14); }
.story-verse span, .story-verse small { display: block; }
.story-verse span { color: #d9e5e7; font-family: Georgia, serif; font-size: 13px; font-style: italic; }
.story-verse small { margin-top: 8px; color: #85a9b1; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.login-panel { display: grid; place-items: center; padding: 50px; }
.login-card { width: min(410px, 100%); }
.login-card-heading { margin-bottom: 30px; }
.login-card h2 { margin: 0; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: 38px; font-weight: 500; letter-spacing: -.03em; }
.login-card-heading p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.stack-form { display: grid; gap: 19px; }
.input-with-icon { position: relative; }
.input-with-icon svg { position: absolute; top: 50%; left: 13px; width: 17px; height: 17px; color: #819095; transform: translateY(-50%); }
.input-with-icon input { padding-left: 42px; }
.check-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; cursor: pointer; }
.check-label input { accent-color: var(--teal); }
.login-help { margin: 25px 0 0; color: #89979b; font-size: 10px; text-align: center; }
.login-back { display: block; margin-top: 17px; color: var(--teal); font-size: 11px; font-weight: 700; text-align: center; }
.login-back:hover { color: var(--teal-dark); }
.text-button { border: 0; background: transparent; color: var(--teal); font-size: 12px; font-weight: 700; }
.button-danger { color: #fff; background: var(--danger); }
.button-danger:hover { background: #8e3030; }

/* Painel e controle de acesso */
.dashboard-heading strong { color: var(--teal); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dashboard-card { position: relative; min-height: 240px; display: flex; flex-direction: column; padding: 34px; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--navy-deep), var(--teal-dark)); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.dashboard-card::after { content: ""; position: absolute; right: -65px; bottom: -85px; width: 190px; height: 190px; border: 35px solid rgba(255,255,255,.035); border-radius: 50%; }
.dashboard-card.orange { background: linear-gradient(135deg, #cc5d18, var(--gold)); }
.dashboard-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(38,35,40,.16); }
.dashboard-card > span { color: #ffb27e; font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.dashboard-card.orange > span { color: rgba(38,35,40,.62); }
.dashboard-card h2 { margin: 43px 0 10px; font-family: Georgia, serif; font-size: 30px; font-weight: 400; }
.dashboard-card p { max-width: 390px; margin: 0; color: rgba(255,255,255,.67); font-size: 12px; line-height: 1.7; }
.dashboard-card b { position: relative; z-index: 1; margin-top: auto; padding-top: 25px; font-size: 11px; }
.module-coming-soon { max-width: 820px; padding: 60px; }
.module-coming-soon > span { color: var(--gold); font-size: 9px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.module-coming-soon h2 { max-width: 620px; margin: 30px 0 14px; color: var(--navy); font-family: Georgia, serif; font-size: 38px; font-weight: 400; }
.module-coming-soon p { max-width: 650px; margin: 0 0 28px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.responsive-table { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 13px 18px; color: #879398; background: #fafbfb; border-bottom: 1px solid var(--border); font-size: 9px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 15px 18px; border-bottom: 1px solid #edf0ef; color: #4d585c; font-size: 12px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td strong, .data-table td small { display: block; }
.data-table td strong { color: var(--navy); font-size: 12px; }
.data-table td small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.status-pill { display: inline-block; padding: 5px 8px; color: #8d5656; background: #fae9e8; border-radius: 999px; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.status-pill.active { color: #256556; background: #e3f1ed; }
.row-action { width: 32px; height: 32px; display: grid; place-items: center; color: var(--teal); background: var(--teal-soft); border-radius: 8px; font-size: 20px; }
.profile-auto-note { display: flex; align-items: end; }
.profile-auto-note p { margin: 0; padding: 11px 13px; color: #6f645c; background: var(--gold-soft); border-radius: 9px; font-size: 10px; line-height: 1.55; }
.field-help { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }
.field-help.is-success { color: var(--teal); font-weight: 700; }
.field-help.is-error { color: var(--danger); font-weight: 700; }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.role-card { padding: 28px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.role-card.administrator { border-top: 4px solid var(--gold); }
.role-card header { display: flex; align-items: center; gap: 15px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.role-card header > span { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 39px; color: #fff; background: var(--teal); border-radius: 11px; font-size: 9px; font-weight: 900; }
.role-card h2 { margin: 0; color: var(--navy); font-family: Georgia, serif; font-size: 23px; font-weight: 400; }
.role-card header small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.role-card > p { min-height: 42px; margin: 19px 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.permission-list { display: grid; gap: 8px; }
.permission-list span { color: #536269; font-size: 10px; line-height: 1.4; }
.security-guidance { display: flex; gap: 13px; margin-top: 22px; padding: 18px 20px; color: #635c70; background: var(--teal-soft); border-radius: 12px; }
.security-guidance > span { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 24px; color: #fff; background: var(--teal); border-radius: 50%; font-size: 11px; font-weight: 900; }
.security-guidance p { margin: 2px 0 0; font-size: 11px; line-height: 1.6; }

@media (max-width: 1100px) {
    .app-shell { grid-template-columns: 238px minmax(0,1fr); }
    .app-shell.sidebar-collapsed { grid-template-columns: 82px minmax(0,1fr); }
    .content-wrap { padding: 38px 28px 55px; }
    .filter-bar { flex-wrap: wrap; }
    .search-box { flex-basis: 100%; }
    .profile-quick { display: none; }
    .login-story { padding: 38px; }
    .login-panel { padding: 40px; }
    .birthday-filters { grid-template-columns: 1fr 1fr; }
    .period-options { grid-column: span 2; width: max-content; }
    .birthday-row { grid-template-columns: 57px 42px minmax(150px,1fr) auto 20px; }
    .birthday-age { display: none; }
    .stats-grid.stats-five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .family-links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .other-family-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .other-family-fields .family-choice { display: none; }
}

@media (max-width: 760px) {
    .toast-region { top: 76px; right: 16px; left: 16px; width: auto; }
    .app-shell { display: block; }
    .sidebar { display: none; }
    .mobile-header { position: sticky; z-index: 25; top: 0; height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--border); }
    .brand.compact { gap: 9px; color: var(--navy); font-size: 13px; letter-spacing: .06em; }
    .brand.compact .brand-mark { width: 34px; height: 34px; flex-basis: 34px; border-radius: 9px; font-size: 11px; }
    .content-wrap { padding: 28px 17px 50px; }
    .dashboard-grid, .role-grid { grid-template-columns: 1fr; }
    .dashboard-card { min-height: 220px; padding: 28px; }
    .module-coming-soon { padding: 35px 25px; }
    .module-coming-soon h2 { font-size: 31px; }
    .users-table th:nth-child(3), .users-table td:nth-child(3), .users-table th:nth-child(4), .users-table td:nth-child(4) { display: none; }
    .heading-row { align-items: flex-start; flex-direction: column; }
    .heading-row .button, .heading-actions { width: 100%; }
    .heading-actions { align-items: stretch; flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr; }
    .stats-grid.stats-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-five .stat-card:last-child { grid-column: span 2; }
    .filter-bar { display: grid; grid-template-columns: 1fr 1fr; }
    .search-box { grid-column: span 2; min-width: 0; }
    .filter-bar .button { width: 100%; }
    .people-table { table-layout: fixed; }
    .publication-row { grid-template-columns: 65px minmax(0,1fr) 18px; gap: 11px; padding-inline: 12px; }
    .publication-type { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
    .publication-status { display: none; }
    .people-table th:nth-child(2), .people-table th:nth-child(3), .people-table th:nth-child(4), .people-table th:nth-child(5),
    .people-table td:nth-child(2), .people-table td:nth-child(3), .people-table td:nth-child(4), .people-table td:nth-child(5) { display: none; }
    .people-table th, .people-table td { padding: 11px 10px; }
    .people-table th:last-child, .people-table td:last-child { width: 116px; }
    .person-cell { min-width: 0; }
    .person-cell > span:last-child { min-width: 0; }
    .person-cell strong, .person-cell small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-category { display: flex; width: max-content; max-width: 100%; margin-top: 6px; padding: 3px 7px; overflow: hidden; border-radius: 999px; font-size: 8px; font-style: normal; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
    .general-table th:last-child, .general-table td:last-child { display: table-cell; }
    .pagination-bar { align-items: flex-start; flex-direction: column; }
    .form-card { padding: 22px 17px; }
    .person-photo-editor { align-items: flex-start; gap: 15px; padding: 14px; }
    .person-photo-preview { width: 78px; height: 78px; flex-basis: 78px; border-radius: 20px; }
    .person-photo-copy small { display: block; max-width: 180px; margin: 8px 0 0; }
    .form-tabs { top: 76px; gap: 4px; margin-inline: -2px; padding: 5px; }
    .form-tabs button { min-height: 46px; justify-content: center; padding: 0 8px; font-size: 9px; }
    .form-tabs button span { display: none; }
    .family-links-grid { grid-template-columns: 1fr; }
    .other-family-section-heading { align-items: stretch; flex-direction: column; }
    .other-family-fields { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr 1fr; }
    .span-2, .span-3, .span-4, .span-6, .span-8, .span-12 { grid-column: span 2; }
    .form-actions { position: sticky; bottom: 0; margin: 0 -17px -50px; padding: 13px 17px; background: rgba(255,255,255,.94); border-top: 1px solid var(--border); backdrop-filter: blur(10px); }
    .profile-hero { align-items: flex-start; padding: 22px; }
    .profile-title h1 { font-size: 25px; }
    .avatar-xl { width: 55px; height: 55px; flex-basis: 55px; border-radius: 16px; }
    .profile-grid { grid-template-columns: 1fr; }
    .detail-card.span-two { grid-column: span 1; }
    .detail-list.columns-two, .notes-grid { grid-template-columns: 1fr; }
    .revision-history > div { grid-template-columns: 1fr; gap: 4px; }
    .html-editor-toolbar { align-items: stretch; }
    .html-editor-toolbar select { width: 100%; }
    .html-editor-divider { display: none; }
    .html-source-button { margin-left: 0; }
    .html-editor-visual, .html-editor-source { min-height: 330px; padding: 17px; }
    .login-shell { display: block; }
    .login-story { min-height: 275px; padding: 28px 24px; }
    .story-copy { padding: 55px 0 25px; }
    .story-copy h1 { font-size: 38px; }
    .story-copy p, .story-verse { display: none; }
    .login-panel { padding: 42px 24px; }
    .birthday-filters { grid-template-columns: 1fr; padding: 15px; }
    .period-options { grid-column: span 1; width: 100%; }
    .period-options label { flex: 1; }
    .birthday-row { grid-template-columns: 48px 36px minmax(0,1fr) 16px; gap: 10px; padding: 11px 12px; }
    .birthday-date { width: 46px; height: 49px; }
    .birthday-row .avatar { width: 36px; height: 36px; flex-basis: 36px; }
    .birthday-row .badge, .birthday-age { display: none; }
}
