:root {
  --bg: #f4f7fb;
  --bg-alt: #eaf0f7;
  --surface: #ffffff;
  --surface-muted: #f7fafd;
  --text: #16202a;
  --text-muted: #667789;
  --text-soft: #8c9aaa;
  --primary: #16697a;
  --primary-dark: #0d4f5c;
  --primary-light: #d9f0f4;
  --accent: #f4b53f;
  --accent-soft: #fff0c8;
  --positive: #21885b;
  --negative: #c24a5a;
  --border: #d9e2ec;
  --border-strong: #c7d2de;
  --shadow: rgba(14, 30, 37, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 240, 244, 0.92), transparent 28%),
    linear-gradient(180deg, #eef5fb 0%, var(--bg) 38%, #eef4fa 100%);
  overflow-x: hidden;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

textarea {
  resize: vertical;
}

.portal-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-shell {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.hero-card,
.panel-card,
.section-card,
.stat-card,
.soft-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 16px 34px var(--shadow);
}

.hero-card {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(223, 243, 239, 0.92), rgba(229, 240, 255, 0.9) 50%, rgba(244, 247, 251, 0.98)),
    var(--surface);
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--primary-dark);
  text-transform: uppercase;
}

.hero-logo {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.48);
  padding: 6px;
}

.hero-title {
  margin: 18px 0 0;
  font-size: 38px;
  line-height: 1.05;
  font-weight: 800;
}

.hero-copy {
  margin: 14px 0 0;
  max-width: 42rem;
  font-size: 16px;
  line-height: 1.65;
  color: #42515c;
}

.hero-points {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.hero-point {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-dark);
  font-weight: 600;
}

.hero-point-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(244, 181, 63, 0.2);
}

.panel-card {
  padding: 24px;
}

.panel-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
}

.panel-copy {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.auth-mode-switch {
  display: inline-flex;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-mode-chip {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-weight: 700;
}

.auth-mode-chip.is-active {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.flash {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
}

.flash-success {
  background: #e8f8ef;
  border: 1px solid #9bd5b3;
  color: #215c3a;
}

.flash-error {
  background: #fce8eb;
  border: 1px solid #efb4be;
  color: #842c3d;
}

.flash-info {
  background: #ebf4ff;
  border: 1px solid #b8d6f7;
  color: #214b77;
}

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

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

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

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.field-input,
.field-select {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: #fbfdff;
  color: var(--text);
}

.field-input:focus,
.field-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(22, 105, 122, 0.12);
}

.field-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
  background-color: rgba(247, 250, 253, 0.98);
  color: var(--text);
}

.field-select option {
  background: #f3f8fc;
  color: var(--text);
  font-size: 14px;
}

.portal-avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 10px 22px rgba(14, 30, 37, 0.1);
}

.portal-avatar.is-lg {
  width: 72px;
  height: 72px;
  border-radius: 22px;
}

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

.portal-avatar span {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.portal-avatar.is-lg span {
  font-size: 28px;
}

.hero-inline,
.list-with-avatar {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-inline {
  margin-bottom: 18px;
}

.hero-inline-copy {
  display: grid;
  gap: 4px;
}

.topbar-brandline {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.topbar-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.18);
  padding: 5px;
  flex: 0 0 auto;
}

.topbar-brand-name-mobile {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: #fff;
}

.button,
.button-secondary,
.button-ghost,
.button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 18px;
  border: 0;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
  font-weight: 700;
  font-size: 14px;
}

.button:hover,
.button-secondary:hover,
.button-ghost:hover,
.button-danger:hover {
  transform: translateY(-1px);
}

.button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(13, 79, 92, 0.18);
}

.button-secondary {
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border);
}

.button-ghost {
  background: transparent;
  color: var(--primary-dark);
}

.button-danger {
  background: #fff0f2;
  color: var(--negative);
  border: 1px solid #efb4be;
}

.button-premium {
  box-shadow: 0 0 0 2px rgba(244, 181, 63, 0.22);
}

.auth-help {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, rgba(13, 79, 92, 0.97), rgba(22, 105, 122, 0.94));
  color: #fff;
  padding: 22px 18px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.14);
  padding: 6px;
}

.sidebar-brand-copy {
  display: grid;
  gap: 2px;
}

.sidebar-brand-name {
  font-size: 16px;
  font-weight: 800;
}

.sidebar-brand-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
}

.sidebar-link.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.sidebar-tier {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-tier-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-tier-value {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
}

.sidebar-tier-copy {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}

.main {
  min-width: 0;
  padding: 24px 24px 36px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: 18px;
  background: var(--primary-dark);
  color: #fff;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px rgba(13, 79, 92, 0.16);
  overflow: hidden;
}

.topbar-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 800;
}

.topbar-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: #cdeff4;
}

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

.topbar-family-form {
  margin: 0;
}

.topbar-select-shell {
  position: relative;
  min-width: 220px;
}

.topbar-select-shell::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2px solid rgba(255, 255, 255, 0.92);
  border-bottom: 2px solid rgba(255, 255, 255, 0.92);
  transform: rotate(45deg);
  pointer-events: none;
}

.topbar-family-select {
  min-width: 220px;
  min-height: 44px;
  padding: 10px 40px 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
}

.topbar-family-select:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.topbar-family-select option {
  color: var(--text);
  background: #fff;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.mobile-tabbar {
  display: none !important;
}

.mobile-only {
  display: none;
}

.drawer-sheet {
  display: grid;
  gap: 18px;
}

.drawer-sheet-group {
  display: grid;
  gap: 10px;
}

.drawer-sheet-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-soft);
}

.drawer-sheet-links {
  display: grid;
  gap: 10px;
}

.drawer-sheet-link {
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  display: flex;
  align-items: center;
}

.drawer-sheet-link.is-active {
  background: var(--primary-light);
  border-color: rgba(22, 105, 122, 0.2);
  color: var(--primary-dark);
}

.drawer-sheet-link.is-danger {
  color: var(--negative);
  border-color: #efb4be;
  background: #fff1f3;
}

.content-grid {
  display: grid;
  gap: 18px;
}

.action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.action-bar-tight {
  margin-bottom: 14px;
}

.paywall-card {
  background:
    linear-gradient(135deg, rgba(223, 243, 239, 0.92), rgba(229, 240, 255, 0.9) 50%, rgba(244, 247, 251, 0.98)),
    var(--surface);
}

.paywall-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.paywall-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 800;
}

.paywall-copy {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: #42515c;
  max-width: 44rem;
}

.paywall-price-block {
  min-width: 220px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
}

.paywall-price {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary-dark);
}

.paywall-price-note {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}

.section-card {
  padding: 18px;
}

.section-card-full {
  grid-column: 1 / -1;
}

.section-subtitle,
.modal-copy {
  display: none;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-header .icon-button {
  background: var(--surface-muted);
  color: var(--primary-dark);
  border: 1px solid var(--border);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 800;
}

.section-subtitle {
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 16px;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
}

.stat-value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 800;
}

.stat-value.positive {
  color: var(--positive);
}

.stat-value.negative {
  color: var(--negative);
}

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

.soft-card {
  padding: 16px;
}

.soft-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.soft-copy {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

.list {
  display: grid;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.list-row:last-child {
  border-bottom: 0;
}

.list-copy {
  min-width: 0;
}

.list-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.list-meta {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.value-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.value-chip.positive {
  color: var(--positive);
}

.value-chip.negative {
  color: var(--negative);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.badge-accent {
  background: var(--accent-soft);
  color: #8a5c09;
}

.badge-positive {
  background: #e8f8ef;
  color: var(--positive);
}

.badge-negative {
  background: #fce8eb;
  color: var(--negative);
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-soft);
}

.empty-state {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.family-switch-inline {
  min-width: 240px;
}

.family-switch-select {
  min-width: 240px;
  min-height: 44px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

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

.compact-form {
  margin-top: 16px;
}

.field-inline {
  display: grid;
  gap: 8px;
  max-width: 220px;
}

.field-inline span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.list-row-stacked {
  align-items: stretch;
}

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

.modal-scroll-list {
  max-height: min(62vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.is-hidden {
  display: none !important;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  font-size: 13px;
  font-weight: 600;
}

.checkbox-chip input {
  margin: 0;
}

.muted {
  color: var(--text-muted);
}

.right {
  text-align: right;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 32, 42, 0.46);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 40;
}

.modal-card {
  width: min(820px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 24px 46px rgba(14, 30, 37, 0.22);
  padding: 22px;
}

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

.modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.modal-copy {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.child-shell .sidebar {
  background: linear-gradient(180deg, rgba(25, 69, 117, 0.97), rgba(42, 100, 161, 0.94));
}

.child-hero-card {
  background:
    linear-gradient(135deg, rgba(223, 243, 239, 0.92), rgba(229, 240, 255, 0.9) 50%, rgba(244, 247, 251, 0.98)),
    var(--surface);
}

.child-hero-copy {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.child-hero-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 800;
}

.child-hero-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.goal-progress-card {
  display: grid;
  gap: 12px;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: var(--bg-alt);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent) 0%, #f7c864 100%);
}

body.portal-ajax-loading .portal-shell,
body.portal-ajax-loading .portal-auth,
body.portal-ajax-loading .modal-backdrop {
  opacity: 0.72;
}

body.portal-ajax-loading .portal-shell,
body.portal-ajax-loading .portal-auth {
  pointer-events: none;
}

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 960px) {
  .hero-card {
    display: none;
  }

  .auth-shell,
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px;
    border-radius: 0 0 24px 24px;
  }

  .main {
    padding: 14px 14px 94px;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
  }

  .topbar-actions {
    margin-left: auto;
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    flex: 0 0 auto;
  }

  .topbar-family-form,
  .topbar-select-shell,
  .topbar-family-select {
    width: 100%;
    min-width: 0;
  }

  .topbar-family-form {
    display: none;
  }

  .family-switch-inline {
    display: none;
  }

  .topbar-title {
    font-size: 19px;
  }

  .topbar-subtitle {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.45;
  }

  .sidebar-nav,
  .sidebar-footer {
    display: none;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: inline-flex;
  }

  .sidebar-brand .mobile-only {
    margin-left: auto;
  }

  .topbar-actions {
    display: none;
  }

  .paywall-hero {
    flex-direction: column;
  }

  .paywall-price-block {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 31px;
  }

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

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

  .section-card,
  .stat-card,
  .soft-card {
    border-radius: 22px;
  }

  .action-bar,
  .inline-actions {
    width: 100%;
  }

  .button,
  .button-secondary,
  .button-ghost,
  .button-danger {
    width: auto;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 16px;
  }

  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
    justify-content: center;
  }

  .modal-card {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    height: auto;
    border-radius: 28px 28px 0 0;
    padding: 18px;
  }

  .modal-card.drawer-modal {
    width: min(100vw, 420px);
    max-height: 100vh;
    height: 100vh;
    margin-left: auto;
    border-radius: 28px 0 0 28px;
  }

  .list-row {
    align-items: flex-start;
  }

  .list-row,
  .clickable-row {
    gap: 12px;
  }

  .family-switch-inline,
  .family-switch-select,
  .field-inline,
  .list-actions,
  .list-copy,
  .hero-inline-copy {
    min-width: 0;
  }

  .topbar-brand-logo {
    width: 32px;
    height: 32px;
  }

  .topbar-brand-name-mobile {
    font-size: 12px;
  }

  .table-wrap,
  .list,
  .content-grid,
  .section-card,
  .portal-shell,
  .main {
    max-width: 100%;
  }
}
