:root {
  --main: #281e5d;
  --blue: #281e5d;
  --blue-soft: #e7f2ff;
  --pink: #ff1053;
  --ink: #1d1e34;
  --orange: #e68005;
  --surface: #ffffff;
  --canvas: #eef0f4;
  --muted: #6b7180;
  --line: #e2e4e9;
  --success: #b9efc4;
  --success-text: #216137;
  --success-border: #78d98c;
  --white: #ffffff;
  --transparent: transparent;
  --brand-border: #692df5;
  --topbar-shadow: rgba(23, 107, 181, .15);
  --nav-active: rgba(178, 70, 250, .43);
  --avatar-border: #ffc0cf;
  --field-border: #b9d6f3;
  --icon-border: #8f59e6;
  --vital-border: #ab62dc;
  --photo-outline: #c5cbd5;
  --photo-skin: #f0c89a;
  --photo-sky: #a6cee8;
  --photo-water: #86529b;
  --photo-dark: #331954;
  --photo-light: #79a6b5;
  --photo-green: #8bbaa9;
  --photo-face: #e7bc88;
  --photo-shirt: #18202a;
  --panel-border: #90bee7;
  --emergency: #281e5d;
  --emergency-label: #d8ecff;
  --role-bg: #45a3e9;
  --shadow: 0 12px 30px rgba(29, 30, 52, .06);
}

[data-theme="dark"] {
  --main: #3b2d82;
  --blue: #9655a7;
  --pink: #ff3973;
  --orange: #f09a2e;
  --canvas: #121326;
  --surface: #1d1e34;
  --ink: #f7f8fc;
  --muted: #a7adbe;
  --line: #383a54;
  --blue-soft: #263450;
  --success: #315b3b;
  --success-text: #d7f8dd;
  --success-border: #4d9a5b;
  --white: #f7f8fc;
  --brand-border: #65c1ff;
  --topbar-shadow: rgba(0, 0, 0, .28);
  --nav-active: rgba(59, 4, 66, 0.35);
  --avatar-border: #ff759b;
  --field-border: #536a91;
  --icon-border: #65c1ff;
  --vital-border: #65c1ff;
  --photo-outline: #667089;
  --photo-skin: #d79c70;
  --photo-sky: #456b89;
  --photo-water: #294b68;
  --photo-dark: #102b42;
  --photo-light: #47727e;
  --photo-green: #4c766d;
  --photo-face: #c4815d;
  --photo-shirt: #0e141d;
  --panel-border: #638fc1;
  --emergency: #834492;
  --emergency-label: #d6c3f5;
  --role-bg: #337cae;
  --shadow: 0 14px 35px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: 'DM Sans', sans-serif; font-size: 15px; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.brand-rail { position: fixed; z-index: 5; inset: 0 auto 0 0; width: 176px; padding: 24px 22px; }
.brand-mark { width: 116px; min-height: 70px; border: 2px solid var(--brand-border); color: var(--blue); padding: 7px 5px 4px; text-align: center; position: relative; background: var(--surface); }
.brand-mark strong { display: block; font-size: 13px; letter-spacing: .25px; margin-top: 13px; }
.brand-mark small { font-size: 9px; display: block; }
.sail-mark { color: var(--blue); position: absolute; left: 28px; top: 4px; font-size: 25px; transform: scaleX(1.5); }
.rail-note { color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 27px; }
.main-area { flex: 1; min-width: 0; margin-left: 176px; padding: 97px 30px 38px 0; }
.topbar { position: fixed; z-index: 10; top: 24px; left: 176px; right: 30px; height: 51px; max-width: 1080px; margin: 0 auto; background: var(--blue); border-radius: 28px; display: flex; align-items: center; padding: 0 14px 0 38px; color: var(--white); box-shadow: 0 7px 14px var(--topbar-shadow); }
.main-nav { display: flex; gap: 4px; }
.nav-link { color: var(--white); background: var(--transparent); border-radius: 20px; padding: 10px 31px; font-size: 13px; font-weight: 600; text-decoration: none; display: block; }
.nav-link.is-active, .nav-link:hover { background: var(--nav-active); }
.nav-link.is-disabled, .nav-link.is-disabled:hover { opacity: .48; background: var(--transparent); cursor: not-allowed; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.icon-button { color: var(--white); background: var(--transparent); font-size: 20px; line-height: 1; padding: 5px; }
.profile-trigger { display: flex; align-items: center; gap: 8px; background: var(--transparent); color: var(--white); padding: 4px; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; background: var(--pink); border: 2px solid var(--avatar-border); border-radius: 50%; font-size: 10px; font-weight: 700; }
.profile-copy { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.profile-copy b { font-size: 12px; }
.profile-copy small { opacity: .72; font-size: 9px; }
.view-container { max-width: 1080px; margin: 0 auto; }
.filter-panel, .content-panel { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); }
.filter-panel { padding: 15px 17px 17px; margin-bottom: 16px; }
.eyebrow { color: var(--muted); font-size: 11px; margin: 0 0 9px; }
.filter-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1.1fr auto; gap: 9px; font-size: 14px; }
.field, .select-field { border: 1px solid var(--field-border); background: var(--transparent); color: var(--ink); border-radius: 6px; height: 34px; padding: 0 10px; min-width: 0; }
.field::placeholder { color: var(--muted); }
.filter-panel .field::placeholder { font-size: calc(1em - 2px); }
.filter-panel .select-field { font-size: calc(1em - 2px); }
.years-filter { position: relative; display: block; min-width: 0; }
.years-filter .field { width: 100%; padding-right: 43px; }
.years-filter span { position: absolute; top: 50%; right: 10px; color: var(--muted); font-size: 11px; transform: translateY(-50%); pointer-events: none; }
.years-filter .field::placeholder { color: var(--muted); opacity: 1; }
.filter-multi-select { position: relative; min-width: 0; }
.filter-multi-select[open] { z-index: 12; }
.filter-multi-select summary { display: flex; align-items: center; width: 100%; height: 34px; cursor: pointer; list-style: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filter-multi-select summary::-webkit-details-marker { display: none; }
.filter-multi-options { position: absolute; top: calc(100% + 5px); right: 0; z-index: 12; display: grid; gap: 2px; width: max(100%, 205px); max-height: 260px; overflow-y: auto; padding: 7px; border: 1px solid var(--field-border); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
.filter-multi-options label { display: flex; align-items: center; gap: 8px; padding: 8px; color: var(--ink); font-size: 12px; white-space: nowrap; cursor: pointer; }
.filter-multi-options input { accent-color: var(--blue); }
.select-field { appearance: none; background-image: linear-gradient(45deg, var(--transparent) 50%, var(--blue) 50%), linear-gradient(135deg, var(--blue) 50%, var(--transparent) 50%); background-position: calc(100% - 14px) 14px, calc(100% - 10px) 14px; background-size: 4px 4px; background-repeat: no-repeat; padding-right: 24px; }
.primary-button, .outline-button { border-radius: 18px; height: 34px; padding: 0 25px; font-weight: 700; font-size: 11px; }
.primary-button { background: var(--blue); color: var(--white); }
.primary-button:hover { background: var(--main); }
.outline-button { border: 1px solid var(--blue); color: var(--blue); background: var(--transparent); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.section-heading h2 { font: 700 16px 'Space Grotesk', sans-serif; margin: 0; }
.section-heading button { color: var(--blue); background: var(--transparent); font-size: 11px; font-weight: 700; }
.content-panel { padding: 23px 24px; }
.member-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.member-table th { color: var(--muted); font-size: 10px; font-weight: 500; text-align: left; padding: 0 9px 7px; }
.member-table td { border-top: 1px solid var(--line); padding: 8px 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.member-table th:first-child, .member-table td:first-child { width: 38px; }
.member-table th:nth-child(2) { width: 110px; }.member-table th:nth-child(3) { width: 170px; }.member-table th:nth-child(4) { width: 135px; }.member-table th:nth-child(5) { width: 110px; }.member-table th:nth-child(6) { width: 120px; }
.member-row { cursor: pointer; }.member-row:hover td { background: var(--blue-soft); }
.member-icon { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid var(--icon-border); border-radius: 50%; color: var(--blue); font-size: 9px; }
.badge { display: inline-flex; justify-content: center; min-width: 74px; padding: 4px 12px; border-radius: 14px; font-size: 10px; }
.badge.active { background: var(--success); color: var(--success-text); border: 1px solid var(--success-border); }.badge.vital { color: var(--blue); border: 1px solid var(--vital-border); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 15px 0 -3px; color: var(--blue); font-size: 10px; }.pagination .current { padding: 5px 7px; color: var(--white); background: var(--blue); border-radius: 5px; }
.bottom-action { display: flex; justify-content: flex-end; margin-top: 18px; }
.detail-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; }
.back-link { color: var(--ink); font-size: 11px; background: var(--transparent); margin-bottom: 14px; }.back-link span { color: var(--muted); margin-right: 9px; }
.profile-card { position: fixed; z-index: 5; top: 97px; width: 250px; background: var(--surface); border-radius: 7px; box-shadow: var(--shadow); padding: 22px 16px; text-align: center; }
.member-photo { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto 15px; border: 5px solid var(--white); outline: 2px solid var(--photo-outline); background: radial-gradient(circle at 46% 35%, var(--photo-skin) 0 11%, var(--transparent) 12%), linear-gradient(140deg, var(--photo-sky), var(--photo-water) 48%, var(--photo-dark) 49%, var(--photo-light) 60%, var(--photo-green)); position: relative; overflow: hidden; }
.member-photo::before { content: ''; position: absolute; width: 70px; height: 29px; top: 42px; left: 42px; background: var(--photo-face); border-radius: 50% 45% 48% 45%; box-shadow: 7px -15px 0 -2px var(--ink); }.member-photo::after { content: ''; position: absolute; width: 130px; height: 62px; bottom: -22px; left: 10px; border-radius: 50% 50% 0 0; background: var(--photo-shirt); }
.profile-card h2 { font: 700 18px 'Space Grotesk', sans-serif; margin: 0 0 13px; color: var(--blue); }.profile-card .badge { margin-bottom: 17px; }.profile-meta { border-top: 1px solid var(--panel-border); border-bottom: 1px solid var(--panel-border); padding: 11px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }.profile-meta small { display: block; color: var(--muted); font-size: 11px; }.profile-meta b { font-size: 10px; }.profile-menu { text-align: left; margin-top: 13px; }.profile-menu button { display: block; width: 100%; padding: 8px 10px; color: var(--blue); background: var(--transparent); font-size: 13px; text-align: left; font-weight: 600; }.profile-menu button.is-active { background: var(--canvas); }.profile-menu .profile-menu-disabled { color: var(--muted); cursor: not-allowed; opacity: .55; }
.detail-main { min-width: 0; margin-top: 1rem; }.detail-main .content-panel { margin-bottom: 14px; }.panel-title { color: var(--orange); font: 700 15px 'Space Grotesk', sans-serif; border-bottom: 1px solid var(--panel-border); padding-bottom: 10px; margin: 0 0 14px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }.form-grid.two { grid-template-columns: 1fr 1fr; }.contact-grid .contact-phone { grid-column: 1; }.contact-grid .address-field { grid-column: 2 / span 2; }.contact-grid .city-field { grid-column: 1; }.form-label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }.form-label input, .form-label select, .form-label textarea { border: 1px solid var(--line); border-radius: 6px; min-height: 29px; padding: 0 8px; color: var(--ink); background: var(--transparent); }.form-label textarea { padding-top: 9px; min-height: 86px; resize: vertical; }.emergency { background: var(--emergency); border-radius: 5px; padding: 12px; margin-top: 20px; color: var(--white); }.emergency h4 { font-size: 10px; margin: 0 0 8px; }.emergency .form-grid { gap: 7px; }.emergency .form-label { color: var(--emergency-label); }.emergency input { background: var(--white); color: var(--ink); }
.service-list { display: grid; gap: 4px; }.service-item { display: flex; align-items: center; gap: 9px; background: var(--canvas); padding: 9px; font-size: 11px; }.service-item input, .check-cell input { accent-color: var(--blue); }.add-round { display: flex; align-items: center; justify-content: center; margin: 12px auto -3px; width: 25px; height: 25px; padding: 0; border-radius: 50%; color: var(--white); background: var(--blue); font-size: 18px; line-height: 1; }.family-table td, .family-table th { padding: 8px 7px; }.family-table th:first-child, .family-table td:first-child { width: 30px; }.family-table th:last-child { text-align: right; }.family-table td:last-child { text-align: right; }.role-pill { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 120px; border-radius: 15px; padding: 5px 12px; background: var(--role-bg); color: var(--white); text-align: center; font-size: 10px; }.role-chevron { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
.payment-hero { display: grid; place-items: center; min-height: 108px; text-align: center; }.payment-hero h3, .payment-panel h3 { color: var(--blue); font: 700 15px 'Space Grotesk', sans-serif; align-self: start; justify-self: start; margin: 0; }.payment-hero .add-round { margin: 3px 0 0; }.payment-hero p { font-size: 9px; color: var(--blue); margin: -2px 0 0; }.payment-panel { margin-bottom: 15px; }.payment-table { width: 100%; border-collapse: collapse; font-size: 10px; }.payment-table th, .payment-table td { border-bottom: 1px solid var(--line); text-align: left; padding: 7px; }.payment-table th { color: var(--muted); font-size: 9px; font-weight: 500; }.payment-table .amount { text-align: right; font-weight: 700; }.total-row { display: flex; justify-content: flex-end; gap: 26px; padding: 11px 8px; color: var(--blue); font-weight: 700; }.payment-actions { display: flex; justify-content: flex-end; gap: 7px; }.payment-actions .primary-button, .payment-actions .outline-button { height: 27px; font-size: 9px; }.mini-filter { display: flex; gap: 6px; background: var(--canvas); padding: 9px; border-radius: 7px; margin: 11px 0 10px; }.mini-filter .field, .mini-filter .select-field { height: 28px; font-size: 9px; flex: 1; }.mini-filter .primary-button { height: 28px; font-size: 9px; }.subheading { font-weight: 700; margin: 0 0 5px; font-size: 10px; }.export-link { float: right; color: var(--blue); font-size: 9px; font-weight: 700; }.toast { position: fixed; right: 24px; bottom: 22px; background: var(--ink); color: var(--white); padding: 12px 17px; border-radius: 8px; box-shadow: var(--shadow); transform: translateY(90px); opacity: 0; transition: .2s ease; }.toast.is-visible { transform: translateY(0); opacity: 1; }
.mobile-brand { display: none; text-decoration: none; }
@media (max-width: 1000px) { .brand-rail { width: 140px; }.main-area { margin-left: 140px; padding-right: 18px; }.topbar { left: 140px; right: 18px; }.filter-grid { grid-template-columns: repeat(4, 1fr); }.filter-grid .field:first-child { grid-column: span 2; }.detail-layout { grid-template-columns: 210px minmax(0, 1fr); }.profile-card { width: 210px; } }
@media (max-width: 720px) { body { font-size: 14px; }.app-shell { display: block; }.brand-rail { display: none; }.main-area { padding: 78px 12px 12px; }.topbar { top: 12px; left: 12px; right: 12px; height: auto; min-height: 54px; padding: 8px 12px; border-radius: 18px; }.mobile-brand { display: block; background: var(--transparent); color: var(--white); text-align: left; font: 700 11px 'Space Grotesk'; }.mobile-brand span { display: block; font: 400 7px 'DM Sans'; opacity: .7; }.main-nav { margin-left: auto; }.nav-link { padding: 8px 11px; font-size: 13px; }.profile-copy { display: none; }.top-actions { gap: 4px; }.icon-button { font-size: 17px; }.avatar { width: 26px; height: 26px; }.view-container { width: 100%; }.filter-grid { grid-template-columns: 1fr; }.filter-grid .field:first-child, .filter-grid .primary-button { grid-column: auto; }.filter-grid .field, .filter-grid .select-field, .filter-grid .primary-button { width: 100%; font-size: 16px; }.content-panel, .filter-panel { padding: 15px 12px; }.section-heading h2, .payment-panel h3, .panel-title { font-size: 13px; }.content-panel.table-wrap { overflow: hidden; }.member-table { display: block; min-width: 760px; max-height: calc(100vh - 250px); overflow: auto; font-size: 14px; }.member-table thead { position: sticky; top: 0; z-index: 1; background: var(--surface); }.member-table th, .member-table td, .member-row td { font-size: 14px; }.section-heading { position: sticky; top: 0; z-index: 2; background: var(--surface); padding-bottom: 10px; }.detail-layout { display: block; }.profile-card { position: static; width: auto; margin-bottom: 16px; }.detail-main { margin-top: 0; }.detail-main .content-panel { padding: 15px; }.detail-main p { font-size: 15px; }.form-grid, .form-grid.two { grid-template-columns: 1fr 1fr; }.contact-grid .contact-phone, .contact-grid .address-field, .contact-grid .city-field { grid-column: auto; }.contact-grid .address-field { grid-column: span 2; }.form-grid .wide { grid-column: span 2; }.payment-actions { flex-wrap: wrap; }.payment-table { display: block; min-width: 580px; max-height: 300px; overflow: auto; font-size: 13px; }.payment-table thead { position: sticky; top: 0; z-index: 1; background: var(--surface); }.payment-table th, .payment-table td { font-size: 13px; }.payment-panel { overflow: visible; }.payment-panel h3 { position: sticky; top: 0; z-index: 2; min-height: 22px; background: var(--surface); }.export-link { position: sticky; right: 0; float: none; font-size: 13px; background: var(--surface); }.mini-filter { flex-wrap: wrap; }.mini-filter .field, .mini-filter .select-field { min-width: 120px; }.mini-filter .primary-button { flex: 1; }.pagination { position: relative; left: 50%; z-index: 20; transform: translateX(-50%); margin: 12px 0 0; padding: 6px 10px; width: max-content; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; } }

.detail-main .category-description,
.detail-main .service-item,
.detail-main .family-table,
.detail-main .family-table th,
.detail-main .family-table td,
.detail-main .role-pill,
.detail-main .payment-table,
.detail-main .payment-table th,
.detail-main .payment-table td,
.detail-main .payment-hero p,
.detail-main .subheading,
.detail-main .mini-filter .field,
.detail-main .mini-filter .select-field,
.detail-main .export-link { font-size: 13px; }
.detail-main .payment-actions .primary-button,
.detail-main .payment-actions .outline-button { font-size: 11px; }

.movement-filter-grid { display: grid; grid-template-columns: minmax(220px, 1.7fr) minmax(145px, 1fr) minmax(145px, 1fr) minmax(170px, 1.15fr) auto; gap: 10px; align-items: end; }
.movement-search { width: 100%; }
.movement-date-field { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.movement-date-field .field { width: 100%; color: var(--ink); }
.payment-method-picker { position: relative; min-width: 0; }
.payment-method-picker summary { display: flex; align-items: center; width: 100%; height: 34px; padding-right: 30px; color: var(--ink); font-size: 12px; cursor: pointer; list-style: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.payment-method-picker summary::-webkit-details-marker { display: none; }
.payment-method-options { position: absolute; top: calc(100% + 5px); right: 0; z-index: 12; display: grid; gap: 2px; width: max(100%, 205px); padding: 7px; border: 1px solid var(--field-border); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
.payment-method-options label { display: flex; align-items: center; gap: 8px; padding: 8px; color: var(--ink); font-size: 12px; white-space: nowrap; cursor: pointer; }
.payment-method-options input { accent-color: var(--blue); }
.movement-search-button { white-space: nowrap; }
.movement-panel { min-width: 0; }
.movement-heading { min-height: 28px; }
.movement-heading button { white-space: nowrap; }
.movement-table-scroll { width: 100%; max-width: 100%; box-sizing: border-box; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.movement-table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.movement-table th, .movement-table td { padding: 10px 9px; border-top: 1px solid var(--line); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movement-table th { padding-top: 0; padding-bottom: 8px; border-top: 0; color: var(--muted); font-size: 11px; font-weight: 500; }
.movement-table th:nth-child(1) { width: 14%; }
.movement-table th:nth-child(2) { width: 13%; }
.movement-table th:nth-child(3) { width: 16%; }
.movement-table th:nth-child(4) { width: 16%; }
.movement-table th:nth-child(5) { width: 19%; }
.movement-table th:nth-child(6) { width: 15%; }
.movement-table th:last-child { width: 7%; }
.movement-table .movement-amount { text-align: right; font-variant-numeric: tabular-nums; }
.movement-open-cell { text-align: center !important; }
.movement-open { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--blue); font-size: 21px; text-decoration: none; }
.movement-open:hover { background: var(--blue-soft); }
.movement-empty { margin: 0; padding: 22px 10px; color: var(--muted); text-align: center; font-size: 13px; }
.movement-pagination { justify-content: center; }
.movement-pagination button { min-width: 29px; height: 29px; padding: 0 8px; border-radius: 5px; background: var(--transparent); color: var(--blue); font-size: 11px; }
.movement-pagination button:hover { background: var(--blue-soft); }
.movement-pagination button.current { background: var(--blue); color: var(--white); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (max-width: 1000px) {
  .movement-filter-grid { grid-template-columns: minmax(180px, 1.5fr) 1fr 1fr minmax(160px, 1fr); }
  .movement-search-button { grid-column: 4; justify-self: end; }
}
@media (max-width: 720px) {
  .movement-view { width: 100%; }
  .movement-filter-grid { grid-template-columns: 1fr; gap: 9px; }
  .movement-search, .payment-method-picker, .movement-search-button { grid-column: auto; width: 100%; }
  .movement-panel { padding: 15px 12px; }
  .movement-heading { align-items: flex-start; gap: 8px; }
  .movement-heading button { padding: 5px 0; font-size: 9px; }
  .movement-heading h2 { max-width: 60%; }
  .movement-table { width: max-content; min-width: 760px; max-width: none; }
  .movement-pagination { flex-wrap: wrap; gap: 6px; }
}

.management-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; min-height:500px; }
.management-menu { background: var(--canvas); border-radius: 7px; padding: 10px 0; align-self: start; }
.management-menu button { display: block; width: 100%; padding: 10px 12px; color: var(--blue); background: var(--transparent); text-align: left; font-size: 14px; font-weight: 600; }
.management-menu button:hover, .management-menu button.is-active { background: var(--blue-soft); }
.management-menu .management-menu-title { font-size: 12px; margin-bottom: 8px; }
.management-content { min-width: 0; display: grid; align-content: start; gap: 12px; }
.management-card { background: var(--surface); border-radius: 9px; box-shadow: var(--shadow); padding: 19px 20px 15px; }
.management-card h2 { color: var(--orange); font: 700 18px 'Space Grotesk', sans-serif; margin: 0 0 3px; }
.management-description { color: var(--ink); font-size: 13px; margin: 0 0 7px; }
.management-table { width: 100%; }
.management-table > div { display: grid; grid-template-columns: 1.4fr .7fr .7fr; align-items: center; min-height: 54px; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 14px; border-radius: 6px; }
.management-table > div:hover { background: var(--blue-soft); }
.management-table > div > span:nth-child(2) { text-align: left; }
.management-table > div > span:last-child { text-align: right; }
.management-table.without-amount > div { grid-template-columns: 1fr .7fr; }
.action-table > div { grid-template-columns: 1.4fr .7fr .7fr .7fr; }
.action-table .action-table-header { min-height: 30px; padding-top: 0; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.action-table .action-table-header:hover { background: var(--transparent); }
.action-table > div:not(.action-table-header) { grid-template-columns: 1.4fr .7fr .7fr .7fr; }
.action-table .amount-cell.is-disabled { color: var(--muted); cursor: default; }
.row-status { display: flex; justify-content: flex-end; }
.management-action-cell { display: flex; justify-content: center; }
.management-actions { display: inline-flex; align-items: center; gap: 4px; }
.user-table > div { grid-template-columns: 1fr 1fr .7fr; }
.user-table-header { min-height: 30px; padding-top: 0; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.user-table-header:hover { background: var(--transparent); }
.category-table > div { grid-template-columns: 1.05fr 1.35fr .55fr .55fr .7fr .8fr .65fr; }
.category-table .category-table-header { min-height: 30px; padding-top: 0; padding-bottom: 7px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.category-table .category-table-header:hover { background: var(--transparent); }
.category-table-row > span:nth-child(2) { color: var(--muted); font-size: 12px; }
.category-table .category-switch-cell { display: flex; justify-content: center; }
.category-mobile-features { display: none; }
.category-status { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; font-size: 18px; font-weight: 700; line-height: 1; }
.category-status.is-enabled { color: var(--success-text); }
.category-status.is-disabled { color: var(--muted); font-weight: 500; }
.category-table .amount-cell { min-width: 82px; }
.category-action-cell { display: flex; justify-content: center; }
.category-actions { display: inline-flex; align-items: center; gap: 4px; }
.category-action { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 3px; color: var(--muted); background: var(--transparent); }
.category-action svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.category-action:hover, .category-action:focus-visible { color: var(--blue); background: var(--blue-soft); outline: none; }
.amount-cell { min-width: 104px; padding: 7px 9px; border: 1px solid var(--transparent); border-radius: 5px; cursor: text; }
.amount-cell:hover, .amount-cell:focus-visible { border-color: var(--field-border); background: var(--surface); outline: none; }
.amount-editor { width: 100%; min-height: 29px; padding: 5px 8px; border: 1px solid var(--blue); border-radius: 5px; color: var(--ink); background: var(--surface); font: inherit; }
.management-add { display: flex; align-items: center; justify-content: center; width: 25px; height: 25px; margin: 12px auto -3px; padding: 0; border-radius: 50%; color: var(--white); background: var(--blue); font-size: 18px; line-height: 1; }
.delete-action, .edit-action { color: var(--muted); font-size: 12px; }
.switch { display: inline-block; justify-self: end; width: 29px; height: 15px; padding: 0; border: 0; border-radius: 10px; background: var(--line); position: relative; cursor: pointer; transition: background .2s ease; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--muted); }
.switch.is-on { background: var(--success); }.switch.is-on::after { left: 16px; background: var(--success-text); }
.user-table > div { grid-template-columns: 1fr 1fr .7fr; }.user-table .select-field { width: 100%; height: 30px; font-size: 13px; padding-top: 0; padding-bottom: 0; }.user-table .edit-action { text-align: right; color: var(--blue); }
.modal-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(29, 30, 52, .32); }
.modal-backdrop[hidden] { display: none; }
.category-modal { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 14px; background: var(--surface); box-shadow: 0 16px 38px rgba(29, 30, 52, .25); }
.category-modal-header { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 10px 18px; color: var(--white); background: var(--blue); }
.category-modal-header h2 { margin: 0; font: 700 16px 'Space Grotesk', sans-serif; }
.modal-close { width: 30px; height: 30px; padding: 0; color: var(--white); background: var(--transparent); font-size: 32px; font-weight: 300; line-height: 1; }
.category-form { display: grid; gap: 18px; padding: 28px 58px 32px; }
.category-form .form-label { gap: 5px; color: var(--muted); font-size: 13px; }
.category-form input[type="text"], .category-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: var(--surface); font: inherit; outline: none; }
.category-form input[type="text"] { height: 38px; padding: 0 10px; }
.category-form textarea { min-height: 72px; padding: 9px 10px; resize: vertical; }
.category-form input[type="text"]:focus, .category-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }
.category-options { display: grid; gap: 12px; margin-top: 2px; }
.category-option { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--ink); font-size: 14px; cursor: pointer; }
.category-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.modal-switch { flex: 0 0 auto; width: 29px; height: 15px; border-radius: 10px; background: var(--line); position: relative; transition: .2s ease; }
.modal-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--muted); transition: .2s ease; }
.category-option input:checked + .modal-switch { background: var(--success-border); }.category-option input:checked + .modal-switch::after { left: 16px; background: var(--success-text); }
.category-option input:focus-visible + .modal-switch { outline: 2px solid var(--blue); outline-offset: 2px; }
.category-submit { width: 100%; height: 38px; margin-top: 8px; font-size: 14px; }
@media (max-width: 720px) { .management-layout { grid-template-columns: 1fr; gap: 12px; min-height: 0; padding: 10px; }.management-menu { display: block; padding: 5px 0; }.management-menu button { display: block; width: 100%; padding: 10px 12px; font-size: 16px; }.management-card { padding: 15px 12px 13px; }.management-card h2 { color: var(--orange); }.management-table { width: 100%; max-width: 100%; overflow-x: auto; }.management-table > div { padding: 10px; } .management-content { min-width: 0; overflow: hidden; } }
@media (max-width: 720px) { .activity-service-table { overflow-x: visible; }.activity-service-table .action-table-header { display: none; }.activity-service-table > div:not(.action-table-header) { display: grid; grid-template-columns: 1fr; min-width: 0; gap: 8px; padding: 12px 4px; border-bottom: 1px solid var(--line); }.activity-service-table > div > span:first-child { min-width: 0; overflow-wrap: anywhere; }.activity-service-table > div > .management-action-cell { grid-row: 1; grid-column: 1; justify-self: end; }.activity-service-table > div > .row-status { grid-row: 2; grid-column: 1; justify-content: flex-start; }.activity-service-table > div > .amount-cell { grid-row: 2; grid-column: 1; justify-self: end; }.activity-service-table > div > span:first-child { grid-row: 1; grid-column: 1; padding-right: 62px; }.activity-service-table > div > .row-status:has(+ .amount-cell) { padding-right: 118px; } }
@media (max-width: 720px) { .user-table { width: 100%; overflow: visible; }.user-table > div { display: block; width: 100%; min-width: 0; padding: 12px 4px; }.user-table > div:not(.user-table-header) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 8px; }.user-table > div:not(.user-table-header) > span { display: block; width: 100%; margin-bottom: 0; text-align: left; }.user-table > div:not(.user-table-header) > span:first-child { grid-column: 1; grid-row: 1; }.user-table > div:not(.user-table-header) > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }.user-table > div:not(.user-table-header) > span:last-child { grid-column: 2; grid-row: 1; width: auto; justify-self: end; text-align: right; }.user-table .select-field { width: 100%; }.user-table-header { display: block; }.user-table-header > span { display: inline-block; width: 48%; }.user-table-header > span:last-child { display: none; } }
@media (max-width: 720px) { .category-table { width: 100%; min-width: 0; overflow: visible; }.category-table .category-table-header { display: none; }.category-table > .category-table-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; width: 100%; min-width: 0; padding: 12px 4px; border-bottom: 1px solid var(--line); }.category-table-row .category-name { grid-column: 1; grid-row: 1; min-width: 0; font-size: 17px; color: var(--blue); font-weight: 700; overflow-wrap: anywhere; }.category-table-row .category-description-cell { grid-column: 1 / -1; grid-row: 2; min-width: 0; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }.category-table-row .category-action-cell { grid-column: 2; grid-row: 1; justify-self: end; }.category-table-row .category-desktop-feature { display: none; }.category-table-row .category-mobile-features { display: grid; grid-column: 1 / -1; grid-row: 3; grid-template-columns: 1fr auto; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 15px; }.category-mobile-features > span { display: contents; }.category-mobile-features .category-status { grid-column: 2; justify-self: center; }.category-table-row > .amount-cell { grid-column: 1 / -1; grid-row: 4; width: 100%; min-width: 0; box-sizing: border-box; font-size: 15px; }.category-table .category-action-cell { display: flex; justify-content: center; } }
@media (max-width: 720px) { .category-modal { border-radius: 12px; }.category-modal-header { min-height: 46px; padding: 8px 14px; }.category-modal-header h2 { font-size: 14px; }.category-form { gap: 18px; padding: 24px 20px 26px; }.category-form .form-label { font-size: 13px; }.category-option { font-size: 12px; }.category-submit { height: 40px; font-size: 12px; } }
@media (max-width: 720px) { .primary-button, .outline-button { font-size: 15px; } }
@media (max-width: 720px) { .filter-grid .field, .filter-grid .select-field, .filter-grid .primary-button { font-size: 14px; } }
@media (max-width: 720px) { .content-panel.table-wrap { overflow-x: auto; overflow-y: visible; }.member-table { width: max-content; min-width: 760px; max-width: none; overflow-x: visible; } }
@media (max-width: 720px) { .category-table-row { font-size: 15px; }.category-table-row .category-name { font-size: 17px; } }
.member-table th, .payment-table th { font-size: 12px; }
.category-description { grid-column: span 2; margin: 0; align-self: center; max-width: 40ch;}
@media (max-width: 720px) { .main-area { margin-left: 0; } }
@media (max-width: 720px) {
  .content-panel.table-wrap { overflow: hidden; }
  .member-table-scroll { width: 100%; max-width: 100%; box-sizing: border-box; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
  .member-table { display: table; width: max-content; min-width: 760px; max-width: none; max-height: none; overflow: visible; }
  .pagination { position: static; width: 100%; transform: none; margin: 12px 0 0; padding: 6px 10px; }
  .detail-main .family-table { width: 100%; min-width: 0; table-layout: fixed; }
  .detail-main .family-table th:nth-child(4), .detail-main .family-table td:nth-child(4),
  .detail-main .family-table th:nth-child(5), .detail-main .family-table td:nth-child(5) { display: none; }
  .detail-main .family-table th:first-child, .detail-main .family-table td:first-child { width: 30px; }
  .detail-main .family-table th:nth-child(2), .detail-main .family-table td:nth-child(2),
  .detail-main .family-table th:nth-child(3), .detail-main .family-table td:nth-child(3) { width: 26%; }
  .detail-main .family-table th:last-child, .detail-main .family-table td:last-child { width: 40%; text-align: center; }
  .detail-main .family-table td { overflow-wrap: anywhere; }
  .detail-main .family-table .role-pill { min-width: 0; max-width: 100%; box-sizing: border-box; gap: 4px; padding: 5px 6px; white-space: normal; }
}
