/* =========================================================================
   FAIRSHARE – CO-PARENTING BETRIEBSSYSTEM
   Ultra-Modern High-Contrast UI Stylesheet with 4 Distinct Color Themes
   ========================================================================= */

/* Theme 1: Ocean Breeze (High-Contrast Maritime Daylight – Crisp White Cards on Cool Sky Canvas) */
:root,
html[data-theme="ocean"] {
  --bg-primary: #dceaf7;
  --bg-secondary: #f0f7fd;
  --bg-card: #ffffff;
  --bg-card-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.94);
  --bg-header: linear-gradient(135deg, #ffffff 0%, #f0f7fd 100%);
  --bg-hero: linear-gradient(135deg, #075985 0%, #0284c7 55%, #0d9488 100%);
  --border-subtle: #bfd6ec;
  --border-strong: #0284c7;
  --text-main: #0c1e35;
  --text-secondary: #1e3a5f;
  --text-muted: #475569;
  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-secondary: #0d9488;
  --accent-glow: rgba(2, 132, 199, 0.22);
  --parent-a: #0284c7;
  --parent-a-bg: rgba(2, 132, 199, 0.14);
  --parent-a-border: rgba(2, 132, 199, 0.55);
  --parent-b: #d97706;
  --parent-b-bg: rgba(217, 119, 6, 0.14);
  --parent-b-border: rgba(217, 119, 6, 0.55);
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.13);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.14);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.12);
  --shadow-card: 0 8px 22px -6px rgba(12, 30, 53, 0.12);
  --input-bg: #f8fbff;
}

/* Theme 2: Nordic Light (Clean & Bright Scandinavian – Sage & Slate) */
html[data-theme="nordic"] {
  --bg-primary: #e2e8f0;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.94);
  --bg-header: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  --bg-hero: linear-gradient(135deg, #0f766e 0%, #0369a1 100%);
  --border-subtle: #cbd5e1;
  --border-strong: #0d9488;
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #475569;
  --accent-primary: #0d9488;
  --accent-primary-hover: #0f766e;
  --accent-secondary: #0284c7;
  --accent-glow: rgba(13, 148, 136, 0.22);
  --parent-a: #0284c7;
  --parent-a-bg: rgba(2, 132, 199, 0.14);
  --parent-a-border: rgba(2, 132, 199, 0.55);
  --parent-b: #ea580c;
  --parent-b-bg: rgba(234, 88, 12, 0.14);
  --parent-b-border: rgba(234, 88, 12, 0.55);
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.13);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.14);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.12);
  --shadow-card: 0 8px 22px -6px rgba(15, 23, 42, 0.1);
  --input-bg: #f8fafc;
}

/* Theme 3: Sunset Warmth (High-Contrast Warm Sand, Crisp White Cards & Terracotta/Rose) */
html[data-theme="sunset"] {
  --bg-primary: #f3e3d7;
  --bg-secondary: #fcf5f0;
  --bg-card: #ffffff;
  --bg-card-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.94);
  --bg-header: linear-gradient(135deg, #ffffff 0%, #fcf5f0 100%);
  --bg-hero: linear-gradient(135deg, #9a3412 0%, #ea580c 52%, #be123c 100%);
  --border-subtle: #e2c6b3;
  --border-strong: #e11d48;
  --text-main: #1c1412;
  --text-secondary: #43302b;
  --text-muted: #6b534b;
  --accent-primary: #e11d48;
  --accent-primary-hover: #be123c;
  --accent-secondary: #ea580c;
  --accent-glow: rgba(225, 29, 72, 0.22);
  --parent-a: #e11d48;
  --parent-a-bg: rgba(225, 29, 72, 0.13);
  --parent-a-border: rgba(225, 29, 72, 0.55);
  --parent-b: #0284c7;
  --parent-b-bg: rgba(2, 132, 199, 0.13);
  --parent-b-border: rgba(2, 132, 199, 0.55);
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.13);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.14);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.12);
  --shadow-card: 0 8px 22px -6px rgba(67, 48, 43, 0.12);
  --input-bg: #fffaf7;
}

/* Theme 4: Midnight Aurora (High-Contrast Structured Dark Mode – Clear Layered Surfaces & Crisp White Text) */
html[data-theme="aurora"] {
  --bg-primary: #090d16;
  --bg-secondary: #243452;
  --bg-card: #162033;
  --bg-card-elevated: #283a5a;
  --bg-glass: rgba(22, 32, 51, 0.95);
  --bg-header: linear-gradient(135deg, #162033 0%, #1e2b45 100%);
  --bg-hero: linear-gradient(135deg, #4338ca 0%, #0284c7 52%, #0d9488 100%);
  --border-subtle: #3b4f73;
  --border-strong: #38bdf8;
  --text-main: #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted: #cbd5e1;
  --accent-primary: #38bdf8;
  --accent-primary-hover: #0ea5e9;
  --accent-secondary: #10b981;
  --accent-glow: rgba(56, 189, 248, 0.28);
  --parent-a: #38bdf8;
  --parent-a-bg: rgba(56, 189, 248, 0.22);
  --parent-a-border: rgba(56, 189, 248, 0.7);
  --parent-b: #fbbf24;
  --parent-b-bg: rgba(251, 191, 36, 0.22);
  --parent-b-border: rgba(251, 191, 36, 0.7);
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.2);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.2);
  --danger: #fb7185;
  --danger-bg: rgba(251, 113, 133, 0.22);
  --shadow-card: 0 12px 28px -6px rgba(0, 0, 0, 0.65);
  --input-bg: #0f172a;
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* =========================================================================
   STRICT CIRCULAR ICON BUTTONS (User Rule Compliance)
   ========================================================================= */
.icon-circle-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  padding: 0;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.icon-circle-btn:hover,
.icon-circle-btn:active {
  transform: scale(1.05);
  border-color: var(--accent-primary);
}

.icon-circle-btn.sm {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  max-width: 30px;
  max-height: 30px;
  padding: 0;
  border-radius: 15px;
  font-size: 0.82rem;
}

.icon-circle-btn.lg {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  padding: 0;
  border-radius: 22px;
  font-size: 1.15rem;
}

.icon-circle-btn.accent-glow {
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* =========================================================================
   INTRO SPLASH SCREEN
   ========================================================================= */
.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 50% 35%, #132a46 0%, #070e1a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.intro-splash.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-stage {
  text-align: center;
  padding: 24px;
  position: relative;
}

.intro-logo-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0 auto 18px;
}

.intro-logo {
  width: 108px;
  height: 108px;
  border-radius: 26px;
  position: relative;
  z-index: 2;
  box-shadow: 0 14px 35px rgba(6, 182, 212, 0.35);
}

.intro-ring-pulse {
  position: absolute;
  inset: -10px;
  border-radius: 34px;
  border: 2px solid rgba(6, 182, 212, 0.5);
  animation: pulseRing 1.8s infinite ease-out;
}

@keyframes pulseRing {
  0% { transform: scale(0.92); opacity: 0.9; }
  100% { transform: scale(1.22); opacity: 0; }
}

.intro-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-bottom: 10px;
}

.intro-title {
  margin: 0 0 6px;
  font-size: 2rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.5px;
}

.intro-subtitle {
  margin: 0;
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.45;
}

/* =========================================================================
   PUSH NOTIFICATION BANNER (S24+ / iOS Style)
   ========================================================================= */
.push-zone {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 520px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.push-toast {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-left: 4px solid var(--accent-primary);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  animation: slideDownPush 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownPush {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.push-toast-meta {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 2px;
}

.push-toast-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.push-toast-msg {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.35;
}

/* =========================================================================
   APP SHELL & STICKY TOP HEADER
   ========================================================================= */
.app-shell {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(82px + env(safe-area-inset-bottom, 12px));
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.sync-badge {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.35);
  white-space: nowrap;
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* =========================================================================
   4-THEME SELECTOR BAR
   ========================================================================= */
.theme-selector-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 16px;
  animation: fadeIn 0.2s ease;
}

.theme-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.76rem;
}

.theme-bar-title {
  font-weight: 700;
  color: var(--text-secondary);
}

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

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.theme-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.theme-chip.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.theme-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--border-subtle);
}

.swatch-ocean { background: linear-gradient(135deg, #dceaf7 35%, #0284c7 100%); }
.swatch-nordic { background: linear-gradient(135deg, #f8fafc 35%, #0d9488 100%); }
.swatch-sunset { background: linear-gradient(135deg, #f3e3d7 35%, #e11d48 70%, #ea580c 100%); }
.swatch-aurora { background: linear-gradient(135deg, #162033 35%, #38bdf8 70%, #10b981 100%); }

.theme-chip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.theme-chip-text strong {
  font-size: 0.8rem;
}

.theme-chip-text small {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* =========================================================================
   CONTEXT BAR: PERSPECTIVE SWITCHER (PARENT A <-> B) & CHILD FILTER
   ========================================================================= */
.context-bar {
  padding: 10px 16px;
  background: var(--bg-card);
  border-bottom: 1.5px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
}

.role-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 2px;
}

.role-pill {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.18s ease;
}

.role-pill.active[data-role="A"] {
  background: var(--parent-a-bg);
  color: var(--text-main);
  border-color: var(--parent-a);
}

.role-pill.active[data-role="B"] {
  background: var(--parent-b-bg);
  color: var(--text-main);
  border-color: var(--parent-b);
}

.role-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-a { background: var(--parent-a); }
.dot-b { background: var(--parent-b); }

.child-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.child-filter-row::-webkit-scrollbar {
  display: none;
}

.child-pill {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  white-space: nowrap;
}

.child-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* =========================================================================
   MAIN CONTENT & CARDS
   ========================================================================= */
.main-content {
  padding: 14px 16px;
  flex: 1;
}

.app-screen {
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.22s ease;
}

.app-screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.section-card.compact-card {
  padding: 12px 14px;
}

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

.section-kicker {
  display: block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 2px;
}

.section-title {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 800;
}

.section-desc {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* =========================================================================
   HERO CARD (COCKPIT)
   ========================================================================= */
.hero-card {
  background: var(--bg-hero);
  color: #ffffff;
  border-radius: 20px;
  padding: 18px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}

.hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.eyebrow-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  margin-bottom: 6px;
}

.hero-headline {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
}

.hero-subtext {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.82);
}

.duty-avatar-badge {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.hero-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.kpi-tile {
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 13px;
  padding: 10px 8px;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.kpi-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.55);
}

.kpi-label {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.kpi-value {
  font-size: 0.96rem;
  font-weight: 800;
}

.kpi-sub {
  font-size: 0.67rem;
  color: #e0f2fe;
  font-weight: 600;
}

/* Action Alert Banners */
.action-alerts-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  font-size: 0.82rem;
}

.alert-banner.danger {
  background: var(--danger-bg);
  border-color: var(--danger);
}

/* =========================================================================
   MODULE 1: ZERO-KNOWLEDGE HANDSHAKE & QR
   ========================================================================= */
.status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.status-pill.verified {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.handshake-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.hs-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}

.hs-step.done {
  border-color: rgba(16, 185, 129, 0.35);
}

.hs-step-num {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hs-step-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.74rem;
}

.hs-step-body span {
  color: var(--text-muted);
  font-size: 0.69rem;
}

.invite-box {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
}

.invite-qr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.qr-box {
  width: 104px;
  height: 104px;
  background: #ffffff;
  padding: 6px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-caption {
  font-size: 0.64rem;
  color: var(--text-muted);
}

.invite-details-col {
  flex: 1;
  min-width: 0;
}

.invite-field-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.invite-code-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: var(--bg-card);
  border: 1px dashed var(--accent-primary);
  padding: 6px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.invite-code-display code {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--accent-primary);
  letter-spacing: 0.6px;
}

.rls-meta-box {
  font-size: 0.69rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.rls-meta-box code {
  color: var(--text-secondary);
}

.invite-btn-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Children Cards */
.children-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.child-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.child-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #ffffff;
  font-size: 1rem;
  flex-shrink: 0;
}

.child-card-info {
  flex: 1;
  min-width: 0;
}

.child-card-info h4 {
  margin: 0 0 2px;
  font-size: 0.92rem;
}

.child-card-info p {
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.feed-icon {
  font-size: 1.05rem;
}

.feed-body {
  flex: 1;
}

.feed-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* =========================================================================
   MODULE 2: FINANZ- & CLEARING-KONTO
   ========================================================================= */
.clearing-hero-card {
  background: var(--bg-hero);
  color: #ffffff;
  border-radius: 20px;
  padding: 18px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}

.clearing-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.split-pill-indicator {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.clearing-balance-main {
  text-align: center;
  padding: 8px 0 14px;
}

.clearing-status-label {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.85);
}

.clearing-big-amount {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -1px;
  margin: 4px 0;
  color: #fde047;
}

.clearing-sub-detail {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.72);
}

.clearing-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.c-stat {
  background: rgba(15, 23, 42, 0.42);
  border-radius: 11px;
  padding: 8px;
  text-align: center;
}

.c-stat span {
  display: block;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.72);
}

.c-stat strong {
  font-size: 0.88rem;
}

.clearing-actions-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-settle {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  background: #10b981;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
}

.btn-scan-receipt {
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.ratio-highlight {
  font-size: 0.82rem;
  color: var(--accent-primary);
}

.ratio-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.preset-chip {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.preset-chip.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.ratio-slider-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--accent-primary);
}

.ratio-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 4px;
}

.quick-scan-strip p {
  margin: 3px 0 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.quick-scan-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip-action-btn {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  cursor: pointer;
}

/* Expense Items */
.expenses-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.expense-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}

.expense-card.settled {
  opacity: 0.68;
}

.exp-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.exp-cat-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 12px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.exp-info h4 {
  margin: 0 0 2px;
  font-size: 0.88rem;
}

.exp-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.exp-right {
  text-align: right;
  flex-shrink: 0;
}

.exp-total {
  font-size: 0.95rem;
  font-weight: 800;
  display: block;
}

.exp-share-tag {
  font-size: 0.69rem;
  color: var(--accent-primary);
  display: block;
}

.receipt-badge-btn {
  margin-top: 4px;
  padding: 2px 7px;
  font-size: 0.66rem;
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

/* =========================================================================
   MODULE 3: LOGISTIK- & ÜBERGABE-KALENDER
   ========================================================================= */
.rotation-summary-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rot-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.76rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot-parent-a,
.dot-parent-b,
.dot-swap {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-parent-a { background: var(--parent-a); }
.dot-parent-b { background: var(--parent-b); }
.dot-swap { background: #ec4899; }

.rot-model-active {
  font-size: 0.76rem;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bg-secondary);
}

.rotation-setup-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.cal-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-month-title-wrap {
  text-align: center;
}

.cal-month-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.cal-month-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.cal-day {
  aspect-ratio: 1 / 1.08;
  border-radius: 11px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border: 1.5px solid transparent;
  font-size: 0.8rem;
  font-weight: 700;
  position: relative;
  transition: transform 0.12s ease;
}

.cal-day:hover {
  transform: scale(1.04);
}

.cal-day.empty {
  background: transparent;
  cursor: default;
}

.cal-day.parent-a {
  background: var(--parent-a-bg);
  border-color: var(--parent-a-border);
  color: var(--text-main);
}

.cal-day.parent-b {
  background: var(--parent-b-bg);
  border-color: var(--parent-b-border);
  color: var(--text-main);
}

.cal-day.today {
  box-shadow: 0 0 0 2px var(--text-main);
}

.cal-day.selected {
  transform: scale(1.06);
  box-shadow: 0 0 0 2.5px var(--accent-primary);
}

.cal-day-badges {
  display: flex;
  gap: 2px;
  font-size: 0.62rem;
  line-height: 1;
}

.cal-parent-tag {
  font-size: 0.6rem;
  font-weight: 800;
  opacity: 0.85;
}

.cal-tap-hint {
  margin: 10px 0 0;
  font-size: 0.73rem;
  color: var(--text-muted);
  text-align: center;
}

/* Swap Requests */
.swap-requests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.swap-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
}

.swap-card.pending {
  border-color: var(--warning);
}

.swap-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.swap-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* =========================================================================
   MODULE 4: SCHUL- & ENTWICKLUNGS-HUB
   ========================================================================= */
.segmented-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg-card);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
}

.seg-btn {
  padding: 8px 6px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
}

.ab-week-toggle {
  display: inline-flex;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 3px;
  border: 1px solid var(--border-subtle);
}

.ab-btn {
  padding: 4px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.ab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
}

.weekday-pills {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.day-pill {
  padding: 7px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}

.day-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.timetable-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lesson-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}

.lesson-row.cancelled {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.lesson-time {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--accent-primary);
  min-width: 68px;
}

.lesson-info {
  flex: 1;
}

.lesson-info strong {
  display: block;
  font-size: 0.88rem;
}

.lesson-info span {
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* Exams, Grades & Termin-Silo */
.exams-list,
.grades-container,
.silo-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exam-card,
.silo-card,
.grade-card {
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}

.attendance-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.att-btn {
  flex: 1;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
}

.att-btn.going {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success);
}

/* =========================================================================
   MODULE 5: DOKUMENTEN-TRESOR
   ========================================================================= */
.vault-hero-card {
  background: var(--bg-hero);
  color: #ffffff;
  border-radius: 20px;
  padding: 18px;
  border: 1px solid var(--border-strong);
}

.vault-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.vault-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.vault-desc {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
}

.vault-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.vault-doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.vault-locked-card {
  text-align: center;
  padding: 28px 18px;
}

.lock-icon-big {
  font-size: 2.5rem;
  margin-bottom: 6px;
}

.pin-row {
  display: flex;
  gap: 8px;
  max-width: 280px;
  margin: 12px auto 0;
}

.pin-input {
  text-align: center;
  font-weight: 800;
  letter-spacing: 4px;
}

/* =========================================================================
   BOTTOM NAVIGATION BAR
   ========================================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 560px;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-subtle);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 4px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.nav-tab {
  position: relative;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 4px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-tab.active {
  color: var(--accent-primary);
  background: var(--bg-secondary);
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 10px;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent-primary);
  color: #ffffff;
}

.nav-badge.warn {
  background: var(--warning);
  color: #0f172a;
}

/* =========================================================================
   REFINED MODERN BUTTONS, FORMS & MODALS
   ========================================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-hover) 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.1px;
  white-space: nowrap;
  box-shadow: 0 4px 12px var(--accent-glow);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn-primary:hover,
.btn-primary:active {
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-secondary:hover,
.btn-secondary:active {
  border-color: var(--accent-primary);
  color: var(--text-main);
}

.btn-primary.sm,
.btn-secondary.sm {
  padding: 6px 13px;
  font-size: 0.75rem;
  border-radius: 999px;
}

.hero-briefing-pill {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.full-width {
  width: 100%;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.input-control {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1.5px solid var(--border-subtle);
  background: var(--input-bg);
  color: var(--text-main);
  font-size: 0.86rem;
  font-weight: 500;
}

.input-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

.modal-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--bg-card-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.receipt-upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 12px;
  background: var(--bg-secondary);
}

.receipt-empty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
}

.receipt-cam-icon {
  font-size: 1.6rem;
}

.receipt-filled img {
  max-height: 150px;
  border-radius: 10px;
  display: block;
  margin: 0 auto 8px;
}

.split-live-preview {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-secondary);
  font-size: 0.78rem;
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 12px;
}

.settle-summary-box {
  text-align: center;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-secondary);
  margin-bottom: 14px;
}

.settle-amount-big {
  font-size: 2rem;
  font-weight: 900;
  color: var(--success);
  margin: 4px 0;
}

.payment-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pay-method-btn {
  padding: 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pay-method-btn.active {
  border-color: var(--accent-primary);
  background: var(--parent-a-bg);
}

.code-preview-box {
  background: #090d16;
  color: #38bdf8;
  padding: 12px;
  border-radius: 12px;
  font-size: 0.72rem;
  overflow-x: auto;
  margin-bottom: 14px;
  border: 1px solid var(--border-subtle);
}

.code-box-title {
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 6px;
}

.code-preview-box pre {
  margin: 0;
}

.sub-price-card {
  text-align: center;
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-hero);
  color: #ffffff;
  margin-bottom: 14px;
}

.sub-price {
  font-size: 2.2rem;
  font-weight: 900;
}

.sub-benefits-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
}

.sub-status-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.privacy-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 700;
}

.filter-pills-mini {
  display: flex;
  gap: 4px;
}

.mini-pill {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: pointer;
}

.mini-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.badge-subtle {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.modal-btn-pair {
  display: flex;
  gap: 8px;
}

.modal-btn-pair > button {
  flex: 1;
}

/* =========================================================================
   SETTINGS MODAL, 14-DAY CUSTOM ROTATION BUILDER & 2-STEP PAYMENT UI
   ========================================================================= */
.settings-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 13px;
  margin-bottom: 12px;
}

.settings-children-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-child-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.settings-child-row strong {
  display: block;
  font-size: 0.85rem;
}

.settings-child-row small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.custom-pattern-box {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.custom-week-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 4px;
}

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

.custom-day-btn {
  padding: 7px 2px;
  border-radius: 9px;
  font-size: 0.68rem;
  font-weight: 800;
  border: 1.5px solid transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-main);
}

.custom-day-btn.role-a {
  background: var(--parent-a-bg);
  border-color: var(--parent-a);
}

.custom-day-btn.role-b {
  background: var(--parent-b-bg);
  border-color: var(--parent-b);
}

.weekday-pills.cols-7 {
  grid-template-columns: repeat(7, 1fr);
}

.payment-pending-box {
  background: rgba(15, 23, 42, 0.55);
  border: 1.5px solid #fde047;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.payment-pending-box h4 {
  margin: 0 0 4px;
  font-size: 0.92rem;
  color: #fde047;
}

.payment-pending-box p {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.88);
}

.device-identity-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.device-owner-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  font-size: 0.76rem;
  color: var(--text-main);
}

.device-partner-info {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.recurrence-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--parent-a-bg);
  color: var(--accent-primary);
  border: 1px solid var(--border-strong);
}

/* =========================================================================
   DASHBOARD SUMMARY & CATEGORIZED SETTINGS TABS + WIDGET PREVIEW
   ========================================================================= */
.dashboard-finance-summary {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.dashboard-finance-amount {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--accent-primary);
  display: block;
}

.settings-cat-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  border-bottom: 1.5px solid var(--border-subtle);
  scrollbar-width: none;
}

.settings-cat-tabs::-webkit-scrollbar {
  display: none;
}

.settings-cat-btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.settings-cat-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.settings-cat-pane {
  display: flex;
  flex-direction: column;
}

.briefing-toggles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.briefing-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  font-size: 0.78rem;
  line-height: 1.38;
  cursor: pointer;
}

.briefing-check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-primary);
  flex-shrink: 0;
}

.homescreen-widget-preview {
  background: linear-gradient(145deg, #12283a 0%, #17445e 55%, #165e59 100%);
  color: #ffffff;
  border-radius: 22px;
  padding: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 26px rgba(9, 21, 38, 0.32);
}

.widget-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.widget-grid-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.78rem;
}

.widget-row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.12);
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  overflow: hidden;
}

.widget-row-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.widget-row-item strong {
  flex-shrink: 0;
  text-align: right;
  font-weight: 800;
}

/* =========================================================================
   CALM, STRUCTURED ROW LAYOUT (LEFT AVATAR • MIDDLE INFO • RIGHT VALUE)
   ========================================================================= */
.clean-rows-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.structured-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-primary);
  transition: transform 0.12s ease;
}

.structured-row.clickable {
  cursor: pointer;
}

.structured-row.clickable:hover {
  transform: translateY(-1px);
}

.row-left-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
}

.row-left-avatar img,
.child-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.row-center-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.row-title-line {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-sub-line {
  font-size: 0.73rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-right-meta {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  white-space: nowrap;
}

.row-right-primary {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-main);
}

.row-right-secondary {
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--text-muted);
}

.child-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
}

/* =========================================================================
   CHILD AVATAR / PHOTO UPLOAD & COLOR SWATCH PICKER
   ========================================================================= */
.child-appearance-box {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

.child-avatar-preview-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.child-avatar.lg {
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  font-size: 1.45rem;
  border: 2.5px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.child-photo-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.avatar-preset-row,
.color-swatch-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.avatar-preset-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  padding: 0;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.avatar-preset-btn.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2.5px var(--accent-glow);
  transform: scale(1.06);
}

.child-color-swatch {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;
  padding: 0;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  border: 2.5px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.14s ease;
}

.child-color-swatch.active {
  transform: scale(1.16);
  border-color: var(--text-main);
  box-shadow: 0 0 0 2.5px var(--accent-glow);
}

@media (max-width: 420px) {
  .handshake-steps,
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .invite-box {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================================
   TRANSPARENT RINGS BRAND ICON, CHILD DOTS, SWAP GLOW POPUP & WISHLIST
   ========================================================================= */
.brand-icon-rings {
  width: 44px;
  height: 32px;
  flex-shrink: 0;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 2px 5px rgba(2, 132, 199, 0.25));
}

.cal-compact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.cal-model-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--bg-card);
  color: var(--accent-primary);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  white-space: nowrap;
}

.cal-child-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 9px;
  flex-wrap: wrap;
}

.cal-child-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  min-height: 7px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 1.5px var(--bg-card);
}

.swap-inspect-details {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.swap-inspect-date-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.swap-date-box {
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  font-size: 0.75rem;
  line-height: 1.35;
}

.swap-date-box.target-box {
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.swap-date-box.offer-box {
  border-color: #ec4899;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.2);
}

.swap-inspect-cal-wrap {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px;
}

.swap-inspect-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.swap-glow-legend {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.glow-legend-pill {
  font-size: 0.67rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.glow-legend-pill.target-pill {
  background: rgba(245, 158, 11, 0.2);
  color: #d97706;
  border: 1px solid #f59e0b;
}

.glow-legend-pill.offer-pill {
  background: rgba(236, 72, 153, 0.2);
  color: #db2777;
  border: 1px solid #ec4899;
}

@keyframes pulseSwapTarget {
  0%, 100% {
    box-shadow: 0 0 0 2px #f59e0b, 0 0 12px rgba(245, 158, 11, 0.85);
    transform: scale(1.04);
  }
  50% {
    box-shadow: 0 0 0 3px #fbbf24, 0 0 20px rgba(251, 191, 36, 1);
    transform: scale(1.08);
  }
}

@keyframes pulseSwapOffer {
  0%, 100% {
    box-shadow: 0 0 0 2px #ec4899, 0 0 12px rgba(236, 72, 153, 0.85);
    transform: scale(1.04);
  }
  50% {
    box-shadow: 0 0 0 3px #f472b6, 0 0 20px rgba(244, 114, 182, 1);
    transform: scale(1.08);
  }
}

.cal-day.swap-glow-target {
  border: 2px solid #f59e0b !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.36), rgba(251, 191, 36, 0.22)) !important;
  z-index: 3;
  animation: pulseSwapTarget 1.5s infinite ease-in-out;
}

.cal-day.swap-glow-offer {
  border: 2px solid #ec4899 !important;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.36), rgba(244, 114, 182, 0.22)) !important;
  z-index: 3;
  animation: pulseSwapOffer 1.5s infinite ease-in-out;
}

.birthday-hero-banner {
  border-radius: 16px;
  padding: 14px;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
}

.wish-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.wishlist-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wish-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
}

/* =========================================================================
   STRICT CONTAINER BOUNDARIES & OVERFLOW PROTECTION + CARE NOTES UI
   ========================================================================= */
.section-card,
.swap-card,
.silo-card,
.exam-card,
.grade-card,
.structured-row,
.child-card,
.swap-inspect-cal-wrap,
.swap-inspect-details {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.modal-sheet {
  width: 100%;
  max-width: min(520px, calc(100vw - 24px));
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
}

.cal-day {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.cal-parent-tag {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  text-align: center;
}

#swapInspectCalendarGrid {
  gap: 4px;
  padding: 2px;
}

#swapInspectCalendarGrid .cal-day {
  aspect-ratio: auto;
  min-height: 44px;
  padding: 3px 2px;
  font-size: 0.73rem;
}

#swapInspectCalendarGrid .cal-parent-tag {
  font-size: 0.54rem;
}

@keyframes pulseSwapTarget {
  0%, 100% {
    box-shadow: inset 0 0 0 1.5px #f59e0b, 0 0 8px rgba(245, 158, 11, 0.75);
  }
  50% {
    box-shadow: inset 0 0 0 2.5px #fbbf24, 0 0 14px rgba(251, 191, 36, 0.95);
  }
}

@keyframes pulseSwapOffer {
  0%, 100% {
    box-shadow: inset 0 0 0 1.5px #ec4899, 0 0 8px rgba(236, 72, 153, 0.75);
  }
  50% {
    box-shadow: inset 0 0 0 2.5px #f472b6, 0 0 14px rgba(244, 114, 182, 0.95);
  }
}

.swap-actions,
.attendance-row,
.invite-btn-row,
.modal-btn-pair {
  flex-wrap: wrap;
  max-width: 100%;
}

.swap-actions > button,
.attendance-row > button {
  max-width: 100%;
  box-sizing: border-box;
}

.row-sub-line > span:not(.child-tag-pill) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* Care Notes (Schul- & Gesundheitsbemerkungen mit Lesebestätigung) */
.care-notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.care-note-card {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.care-note-card.unread-for-me {
  border-color: var(--warning);
  box-shadow: 0 0 0 2px var(--warning-bg);
}

.care-note-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.care-note-left-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.care-note-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
}

.care-note-body {
  font-size: 0.8rem;
  line-height: 1.42;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.care-note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* =========================================================================
   EXPANDABLE EXPENSE ROWS (Offenes Geld: Nur Farbe, Bezeichnung & Preis -> Aufklappbar)
   ========================================================================= */
.expense-accordion-item {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  max-width: 100%;
  box-sizing: border-box;
}

.expense-accordion-item.is-settled {
  opacity: 0.68;
}

.expense-compact-head {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-main);
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}

.expense-compact-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.expense-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.expense-compact-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.expense-compact-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.expense-compact-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.expense-chevron {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  display: inline-block;
}

.expense-accordion-item.open .expense-chevron {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

.expense-details-body {
  display: none;
  padding: 0 13px 12px 13px;
  border-top: 1px dashed var(--border-subtle);
  margin-top: 2px;
  padding-top: 10px;
  flex-direction: column;
  gap: 10px;
}

.expense-accordion-item.open .expense-details-body {
  display: flex;
}

.expense-detail-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.expense-detail-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.expense-shares-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.76rem;
}

.expense-shares-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.expense-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* =========================================================================
   TOP BAR CHILD HUB BUTTONS & ALL-IN-ONE CHILD POPUP (#modalChildHub)
   ========================================================================= */
#childFilterBar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}

.top-child-hub-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 13px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  min-width: 0;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.top-child-hub-btn:active {
  transform: scale(0.98);
}

.top-child-hub-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.top-child-hub-text {
  min-width: 0;
  flex: 1;
}

.top-child-hub-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.22;
}

.top-child-hub-text small {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.28;
  margin-top: 2px;
}

.top-child-hub-arrow {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.child-hub-hero {
  border-radius: 16px;
  padding: 13px 14px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.child-hub-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 12px;
  background: var(--bg-secondary);
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
}

.chub-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 7px 4px;
  font-size: 0.69rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chub-tab.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.28);
}

.chub-pane.hidden {
  display: none !important;
}

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

.chub-section-head strong {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-main);
}

/* =========================================================================
   STACKED NON-OVERLAPPING EVENT CARDS (.silo-card) & CARE NOTES (.care-note-card)
   ========================================================================= */
.silo-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px;
}

.silo-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.silo-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.silo-event-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.silo-time-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.silo-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  padding-left: 2px;
}

.silo-location-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.35;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.silo-schedule-row {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 5px 10px;
  width: 100%;
  box-sizing: border-box;
}

.attendance-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
  margin-top: 4px;
  align-items: center;
  width: 100%;
}

.att-btn {
  white-space: nowrap;
  padding: 7px 8px;
  font-size: 0.73rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Care Note Card Stacked Header (prevents title & status pill overlap) */
.care-note-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.care-note-badges-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.care-note-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.care-note-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.32;
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
