@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --app-bg: #eef1f5;
    --app-shell: #f3f4f7;
    --app-surface: #ffffff;
    --app-surface-alt: #f7f8fb;
    --app-text: #20232b;
    --app-text-muted: #757b86;
    --app-primary: #1488cc;
    --app-primary-deep: #0d78bb;
    --app-primary-soft: #e8f5fb;
    --app-accent: #f2b544;
    --app-success: #35b56d;
    --app-border: rgba(37, 42, 52, 0.08);
    --app-shadow: 0 10px 30px rgba(25, 34, 48, 0.08);
    --app-sidebar-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
    --app-radius-sm: 6px;
    --app-radius-md: 8px;
    --app-radius-lg: 10px;
    --app-sidebar-bg: #2e2f35;
    --app-sidebar-bg-strong: #25262b;
    --app-sidebar-text: rgba(255, 255, 255, 0.82);
}

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

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    color: var(--app-text);
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--app-bg);
}

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

button,
input {
    font: inherit;
}

.backoffice-page {
    height: 100vh;
    padding: 0;
    display: grid;
    place-items: stretch;
    overflow: hidden;
}

.backoffice-shell {
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    background: var(--app-shell);
    border-radius: 0;
    overflow: hidden;
    border: 0;
}

.backoffice-sidebar {
    height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--app-sidebar-bg-strong) 0%, var(--app-sidebar-bg) 100%);
    color: var(--app-sidebar-text);
    box-shadow: var(--app-sidebar-shadow);
    overflow: hidden;
}

.backoffice-sidebar__top {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px 0 8px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.backoffice-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.backoffice-brand strong,
.backoffice-brand span {
    display: block;
}

.backoffice-brand strong {
    font-size: 0.92rem;
    letter-spacing: 0.04em;
}

.backoffice-brand span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
}

.backoffice-brand__mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--app-radius-sm);
    background: transparent;
}

.backoffice-brand__mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.backoffice-sidebar__toggle {
    width: 30px;
    height: 30px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: default;
}

.backoffice-sidebar__toggle span {
    display: block;
    width: 14px;
    height: 2px;
    margin-left: auto;
    background: rgba(255, 255, 255, 0.92);
}

.backoffice-nav {
    display: grid;
    gap: 6px;
    padding: 14px 10px;
}

.backoffice-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.76);
    border: 1px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.backoffice-nav__link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.backoffice-nav__link.is-active {
    background: rgba(31, 151, 221, 0.18);
    border-color: rgba(31, 151, 221, 0.28);
    color: #7fd0ff;
}

.backoffice-nav__link.is-active .backoffice-nav__icon {
    background: rgba(31, 151, 221, 0.22);
    color: #9cdefe;
}

.backoffice-nav__link.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.backoffice-nav__icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--app-radius-sm);
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.68rem;
    font-weight: 700;
}

.backoffice-nav__icon svg {
    width: 17px;
    height: 17px;
    display: block;
}

.backoffice-sidebar__footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.54);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.backoffice-main {
    display: grid;
    grid-template-rows: auto 1fr;
    height: 100vh;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.backoffice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 74px;
    padding: 0 22px;
    background: #ffffff;
    border-bottom: 1px solid var(--app-border);
}

.backoffice-header__title {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.backoffice-header__eyebrow {
    margin: 0;
    color: var(--app-text);
    font-size: 0.86rem;
    font-weight: 700;
}

.backoffice-header h1 {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.1;
    font-weight: 700;
}

.backoffice-header__subtitle {
    color: var(--app-text-muted);
    font-size: 0.82rem;
}

.backoffice-user-menu {
    position: relative;
}

.backoffice-user-menu[open] .backoffice-header__user {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.backoffice-header__user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    list-style: none;
    transition: box-shadow 0.2s ease;
}

.backoffice-header__user::-webkit-details-marker {
    display: none;
}

.backoffice-header__avatar {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #e09b65 0%, #bb6e3d 100%);
    color: #ffffff;
    font-size: 0.84rem;
    font-weight: 800;
    overflow: hidden;
}

.backoffice-header__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.backoffice-user-menu__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    display: grid;
    gap: 4px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--app-border);
    border-radius: 10px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
    z-index: 30;
}

.backoffice-user-menu__header {
    display: grid;
    gap: 2px;
    padding: 4px 12px 10px;
    border-bottom: 1px solid var(--app-border);
    margin-bottom: 4px;
}

.backoffice-user-menu__header strong {
    font-size: 0.86rem;
    font-weight: 700;
}

.backoffice-user-menu__header span {
    color: var(--app-text-muted);
    font-size: 0.78rem;
}

.backoffice-user-menu__link {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    color: var(--app-text);
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.backoffice-user-menu__link:hover {
    background: var(--app-surface-alt);
}

.backoffice-user-menu__link--danger {
    color: #b42318;
}

.backoffice-user-menu__link--danger:hover {
    background: rgba(240, 68, 56, 0.08);
}

.profile-photo-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: var(--app-surface-alt);
    border-radius: var(--app-radius-md);
}

.profile-photo-card__preview {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    overflow: hidden;
    background: linear-gradient(135deg, #e09b65 0%, #bb6e3d 100%);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
    flex-shrink: 0;
}

.profile-photo-card__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-photo-card__content {
    display: grid;
    gap: 4px;
}

.profile-photo-card__content span {
    color: var(--app-text-muted);
    font-size: 0.9rem;
}

.backoffice-content {
    display: grid;
    gap: 20px;
    padding: 22px;
    min-height: 0;
    overflow: auto;
}

.backoffice-content--dashboard {
    overflow: hidden;
}

.flash-stack {
    position: fixed;
    top: 88px;
    right: 24px;
    z-index: 60;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.flash {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--app-radius-md);
    border: 1px solid transparent;
    background: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    pointer-events: auto;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.flash.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

.flash__body {
    display: flex;
    align-items: start;
    gap: 10px;
    min-width: 0;
}

.flash__icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.flash__icon svg,
.flash__close svg {
    width: 100%;
    height: 100%;
    display: block;
}

.flash__message {
    min-width: 0;
}

.flash__close {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.56;
    cursor: pointer;
    flex-shrink: 0;
}

.flash__close:hover {
    opacity: 0.9;
}

.flash--success {
    color: #177245;
    background: #f4fcf7;
    border-color: rgba(50, 185, 119, 0.18);
}

.flash--danger {
    color: #b42318;
    background: #fff7f6;
    border-color: rgba(240, 68, 56, 0.18);
}

.flash--info,
.flash--warning {
    color: #245b84;
    background: #f5faff;
    border-color: rgba(20, 136, 204, 0.16);
}

.panel-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.82fr);
}

.dashboard-screen {
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 18px;
    min-height: 0;
}

.dashboard-grid {
    gap: 18px;
}

.panel-grid--secondary,
.panel-grid--members {
    align-items: start;
}

.hero-panel,
.panel-card {
    background: var(--app-surface);
    border-radius: var(--app-radius-lg);
    border: 1px solid var(--app-border);
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04);
}

.hero-panel {
    min-height: 280px;
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: stretch;
    gap: 12px;
    background:
        linear-gradient(135deg, #fcfdff 0%, #f2f7fb 56%, #ecf3f8 100%);
    color: var(--app-text);
    overflow: hidden;
}

.hero-panel--dashboard {
    min-height: 0;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 420px);
    gap: 20px;
}

.hero-panel__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-panel__eyebrow {
    color: var(--app-primary-deep);
}

.hero-panel h2 {
    margin: 10px 0 12px;
    max-width: 12ch;
    font-size: clamp(2rem, 3vw, 2.85rem);
    line-height: 0.98;
}

.hero-panel p {
    max-width: 46ch;
    margin: 0;
    color: var(--app-text-muted);
    line-height: 1.8;
}

.hero-panel__meta {
    margin-top: 18px;
}

.hero-panel .badge--info {
    background: #edf4f9;
    color: #41647b;
}

.hero-panel__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hero-panel__chart {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    align-content: start;
}

.hero-panel__chart-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
}

.hero-panel__chart-summaries {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-panel__chart-header h3 {
    margin: 8px 0 0;
    font-size: 1.3rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: var(--app-radius-md);
    font-weight: 700;
}

.button--primary {
    background: #ffb547;
    color: #57370d;
}

.button--ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.hero-panel .button--primary {
    background: #dcecf6;
    color: #315973;
}

.hero-panel .button--ghost {
    background: #eef4f8;
    color: #50697d;
}

.button--small {
    padding: 10px 14px;
    background: var(--app-primary-soft);
    color: var(--app-primary-deep);
    font-size: 0.92rem;
}

.button--muted {
    background: #eef1ff;
    color: var(--app-text-muted);
}

.button--danger {
    border: 0;
    background: rgba(240, 68, 56, 0.12);
    color: #b42318;
    cursor: pointer;
}

.button--block {
    width: 100%;
}

.button--table,
.button--table-danger {
    border: 0;
    padding: 9px 12px;
    border-radius: var(--app-radius-sm);
    font-size: 0.88rem;
    cursor: pointer;
}

.button--table {
    background: #eef1ff;
    color: var(--app-primary-deep);
}

.button--table-danger {
    background: rgba(240, 68, 56, 0.12);
    color: #b42318;
}

.hero-panel__art {
    position: relative;
    min-height: 220px;
}

.hero-panel__bubble,
.hero-panel__figure {
    position: absolute;
    border-radius: 999px;
}

.hero-panel__bubble--one {
    inset: 8px 32px auto auto;
    width: 120px;
    height: 120px;
    background: rgba(96, 147, 181, 0.12);
}

.hero-panel__bubble--two {
    inset: auto auto 18px 10px;
    width: 74px;
    height: 74px;
    background: rgba(96, 147, 181, 0.08);
}

.hero-panel__figure--one,
.hero-panel__figure--two {
    bottom: 0;
    width: 92px;
    height: 190px;
    background: linear-gradient(180deg, #bfd8e6 0%, #8db7cc 100%);
    border-radius: 40px 40px 20px 20px;
}

.hero-panel__figure--one {
    right: 86px;
}

.hero-panel__figure--two {
    right: 12px;
    height: 210px;
    background: linear-gradient(180deg, #dbe8ef 0%, #aac5d4 100%);
}

.panel-card {
    padding: 24px;
}

.panel-card--side,
.panel-card--profile {
    background: rgba(255, 255, 255, 0.92);
}

.panel-card--dashboard-side {
    display: grid;
    align-content: start;
}

.panel-card__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-card__header h2 {
    margin: 8px 0 0;
    font-size: 1.5rem;
}

.panel-card__text {
    margin: 0 0 22px;
    color: var(--app-text-muted);
    line-height: 1.8;
}

.panel-card__text--compact {
    margin-bottom: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: var(--app-radius-sm);
    background: #f2f3ff;
    color: var(--app-primary-deep);
    font-size: 0.84rem;
    font-weight: 700;
}

.badge--info {
    background: #ece8ff;
}

.badge--success {
    background: rgba(50, 185, 119, 0.12);
    color: #208f5b;
}

.badge--muted {
    background: rgba(121, 129, 156, 0.12);
    color: #636b85;
}

.stats-stack,
.stats-row {
    display: grid;
    gap: 14px;
}

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

.stats-row--dashboard .stat-card {
    min-height: 104px;
}

.stat-card {
    padding: 18px;
    border-radius: var(--app-radius-lg);
    background: var(--app-surface-alt);
    border: 1px solid rgba(89, 83, 215, 0.08);
}

.stat-card__label {
    display: block;
    margin-bottom: 10px;
    color: var(--app-text-muted);
    font-size: 0.92rem;
}

.stat-card strong {
    font-size: 1.6rem;
}

.member-chart-card {
    display: grid;
    gap: 18px;
}

.member-chart-card--hero {
    grid-template-columns: 1fr;
    gap: 16px;
}

.member-chart-card__canvas-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 18px;
    align-items: center;
}

.member-chart-card__canvas {
    position: relative;
    min-height: 260px;
    padding: 8px;
}

.member-chart-card__canvas--hero {
    min-height: 220px;
    max-height: 220px;
}

.member-chart-card__summary {
    display: grid;
    gap: 6px;
    align-content: center;
    padding: 18px 16px;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-md);
    background: var(--app-surface-alt);
}

.member-chart-card__summary-label,
.member-chart-card__summary-note {
    color: var(--app-text-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.member-chart-card__summary strong {
    font-size: 1.9rem;
    line-height: 1;
}

.member-chart-card__summary--hero {
    min-width: 140px;
    padding: 14px 15px;
}

.member-chart-card__legend {
    display: grid;
    gap: 12px;
}

.member-chart-card--hero .member-chart-card__legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--app-radius-md);
    background: var(--app-surface-alt);
}

.chart-legend-item__dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    flex-shrink: 0;
}

.chart-legend-item__dot--married {
    background: #1488cc;
}

.chart-legend-item__dot--baptised {
    background: #35b56d;
}

.chart-legend-item__dot--ostie {
    background: #f2b544;
}

.chart-legend-item div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.chart-legend-item strong {
    font-size: 1rem;
}

.chart-legend-item span {
    color: var(--app-text-muted);
    font-size: 0.86rem;
}

.panel-card--table {
    padding-bottom: 18px;
}

.dashboard-members-card {
    min-height: 0;
}

.panel-card--form {
    padding-bottom: 28px;
}

.header-actions,
.stack-actions,
.table-actions,
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.form-actions--separate {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(95, 90, 180, 0.08);
}

.header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.inline-filter {
    margin-bottom: 20px;
}

.inline-filter .form-field {
    max-width: 340px;
}

.inline-filter--members {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.inline-filter--members .form-field {
    min-width: 180px;
}

.inline-filter--members .form-field:first-child {
    min-width: 280px;
}

.search-field {
    position: relative;
}

.search-field .form-control {
    padding-right: 42px;
}

.search-field__clear {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--app-text-muted);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
}

.search-field__clear.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.search-field__clear:hover {
    color: var(--app-text);
}

.stack-actions {
    flex-direction: column;
}

.table-actions {
    align-items: center;
    flex-wrap: wrap;
}

.table-actions form {
    margin: 0;
}

.data-table {
    display: grid;
}

.data-table__head,
.data-table__row {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(160px, 1fr) minmax(130px, 0.8fr) minmax(110px, 0.55fr) minmax(120px, 0.7fr) minmax(180px, 0.9fr);
    gap: 16px;
    align-items: center;
}

.data-table--compact .data-table__head,
.data-table--compact .data-table__row {
    grid-template-columns: minmax(240px, 1.3fr) minmax(170px, 1fr) minmax(150px, 0.9fr) minmax(110px, 0.55fr);
}

.data-table__row--five,
.data-table__head + .data-table__row--five {
    grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(110px, 0.65fr) minmax(180px, 1fr);
}

.member-form {
    display: grid;
    gap: 24px;
}

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

.form-field {
    display: grid;
    gap: 8px;
}

.form-field--full {
    grid-column: 1 / -1;
}

.form-field label {
    font-weight: 700;
}

.form-control {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid rgba(90, 83, 215, 0.14);
    border-radius: var(--app-radius-md);
    background: #fbfbff;
    color: var(--app-text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: rgba(89, 83, 215, 0.4);
    box-shadow: 0 0 0 4px rgba(89, 83, 215, 0.12);
}

.form-field ul,
.form-check ul {
    margin: 0;
    padding-left: 18px;
    color: #b42318;
    font-size: 0.9rem;
}

.form-field--checkbox,
.form-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: var(--app-radius-md);
    background: var(--app-surface-alt);
}

.form-check__input {
    width: 18px;
    height: 18px;
}

.form-check__label {
    margin: 0;
    font-weight: 700;
}

.data-table__head {
    padding: 0 8px 14px;
    color: var(--app-text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.data-table__row {
    padding: 16px 8px;
    border-top: 1px solid rgba(95, 90, 180, 0.08);
    font-size: 0.96rem;
}

.member-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.member-cell div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.member-cell strong,
.member-cell span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-cell span {
    color: var(--app-text-muted);
    font-size: 0.86rem;
}

.member-avatar,
.profile-card__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--app-radius-md);
    background: linear-gradient(135deg, #6f69ee 0%, #5a53d7 100%);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(89, 83, 215, 0.16);
}

.member-avatar {
    width: 42px;
    height: 42px;
}

.profile-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(95, 90, 180, 0.08);
}

.profile-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--app-radius-lg);
    font-size: 1.4rem;
}

.profile-card span {
    color: var(--app-text-muted);
}

.info-list {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.info-list__row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(95, 90, 180, 0.08);
}

.info-list__row:last-child {
    border-bottom: 0;
}

.info-list__row span {
    color: var(--app-text-muted);
}

.todo-list {
    margin: 0;
    padding-left: 18px;
    color: var(--app-text-muted);
    line-height: 1.8;
}

.empty-state {
    padding: 28px;
    border-radius: var(--app-radius-lg);
    background: var(--app-surface-alt);
    color: var(--app-text-muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 10px;
    color: var(--app-text);
}

@media (max-width: 1180px) {
    .backoffice-shell {
        grid-template-columns: 1fr;
    }

    .backoffice-sidebar {
        height: auto;
        gap: 18px;
    }

    .backoffice-sidebar__card {
        margin-top: 0;
    }

    .panel-grid,
    .dashboard-grid,
    .panel-grid--secondary,
    .panel-grid--members {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        grid-template-columns: 1fr;
    }

    .hero-panel--dashboard,
    .member-chart-card--hero,
    .member-chart-card__canvas-wrap {
        grid-template-columns: 1fr;
    }

    .member-chart-card--hero .member-chart-card__legend {
        grid-template-columns: 1fr;
    }

    .hero-panel__art {
        min-height: 140px;
    }
}

@media (max-width: 860px) {
    .backoffice-main {
        height: auto;
        min-height: 0;
        padding: 20px;
    }

    .backoffice-header {
        align-items: start;
        flex-direction: column;
    }

    .backoffice-header__user {
        width: 100%;
        justify-content: space-between;
    }

    .data-table {
        gap: 14px;
    }

    .data-table__head {
        display: none;
    }

    .data-table__row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 18px;
        border: 1px solid rgba(95, 90, 180, 0.08);
        border-radius: 18px;
        background: #fbfbff;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .member-chart-card__canvas {
        min-height: 220px;
    }

    .backoffice-content--dashboard {
        overflow: auto;
    }

    .dashboard-screen {
        height: auto;
    }

    .flash-stack {
        top: 78px;
        right: 12px;
        width: min(340px, calc(100vw - 24px));
    }

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

    .form-actions,
    .header-actions,
    .table-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
