/* Elios Web App - Custom Styles */
/* Works alongside Tailwind CSS CDN */
/* CSS Change: 6 */

/* Base font */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  scroll-behavior: smooth;
}

/* Prevent zoom on input focus (iOS) */
input, select, textarea {
  font-size: 16px;
}

/* Tap highlight removal */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Custom gradients and effects from main website */
.gradient-text {
  background: linear-gradient(90deg, #3B82F6, #F97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.elios-shadow {
  box-shadow: 0 30px 60px -12px rgba(59, 130, 246, 0.15);
}

.bg-mesh {
  background-color: #ffffff;
  background-image: radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.03) 0px, transparent 50%),
                    radial-gradient(at 100% 100%, rgba(249, 115, 22, 0.03) 0px, transparent 50%);
}

@media (prefers-color-scheme: dark) {
  .bg-mesh {
    background-color: #0F172A;
    background-image: radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
                      radial-gradient(at 100% 100%, rgba(249, 115, 22, 0.08) 0px, transparent 50%);
  }
}

/* Login page gradient background */
.login-gradient {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 50%, #0F172A 100%);
}

/* Card styles matching main website */
.card {
  background: white;
  border-radius: 2rem;
  padding: 2rem;
  border: 1px solid rgb(241 245 249);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  .card {
    background: #1E293B;
    border-color: #334155;
  }
}

/* Mobile card adjustments */
@media (max-width: 400px) {
  .card {
    padding: 1.25rem;
    border-radius: 1.5rem;
  }
}

/* Button styles matching main website */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #0F172A;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #000;
  transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
  .btn-primary {
    background: white;
    color: #0F172A;
  }
  .btn-primary:hover:not(:disabled) {
    background: #F1F5F9;
  }
}

.btn-secondary {
  background: white;
  color: #0F172A;
  border: 2px solid #E2E8F0;
}

.btn-secondary:hover:not(:disabled) {
  border-color: #3B82F6;
  transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
  .btn-secondary {
    background: #1E293B;
    color: white;
    border-color: #334155;
  }
  .btn-secondary:hover:not(:disabled) {
    border-color: #3B82F6;
  }
}

.btn-ghost {
  background: transparent;
  color: #3B82F6;
  padding: 0.5rem 1rem;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.1);
}

.btn-full {
  width: 100%;
}

/* Input styles matching main website */
.input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #E2E8F0;
  border-radius: 1rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  background: white;
}

.input:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.input::placeholder {
  color: #94A3B8;
}

.input-error {
  border-color: #EF4444;
}

@media (prefers-color-scheme: dark) {
  .input {
    background: #1E293B;
    border-color: #334155;
    color: white;
  }
  .input:focus {
    border-color: #3B82F6;
  }
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  .label {
    color: #CBD5E1;
  }
}

/* PIN and OTP Input styles */
.pin-container,
.otp-container {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.pin-input,
.otp-input {
  width: 3.5rem;
  height: 4rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid #E2E8F0;
  border-radius: 1rem;
  outline: none;
  transition: all 0.2s;
  background: white;
}

.pin-input:focus,
.otp-input:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.pin-input.error,
.otp-input.error {
  border-color: #EF4444;
  animation: shake 0.5s;
}

@media (prefers-color-scheme: dark) {
  .pin-input,
  .otp-input {
    background: #1E293B;
    border-color: #334155;
    color: white;
  }
  .pin-input:focus,
  .otp-input:focus {
    border-color: #3B82F6;
  }
}

/* Mobile responsive PIN/OTP inputs */
@media (max-width: 400px) {
  .pin-container,
  .otp-container {
    gap: 0.5rem;
  }
  .pin-input,
  .otp-input {
    width: 2.75rem;
    height: 3.25rem;
    font-size: 1.25rem;
    border-radius: 0.75rem;
  }
}

@media (max-width: 340px) {
  .pin-container,
  .otp-container {
    gap: 0.35rem;
  }
  .pin-input,
  .otp-input {
    width: 2.5rem;
    height: 3rem;
    font-size: 1.125rem;
  }
}

/* Recovery code grid */
.recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-width: 100%;
}

@media (min-width: 500px) {
  .recovery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 360px) {
  .recovery-grid {
    grid-template-columns: 1fr;
  }
}

.recovery-word {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.recovery-word span {
  font-size: 0.75rem;
  color: #94A3B8;
  width: 1.5rem;
  text-align: right;
  font-weight: 600;
}

.recovery-word input {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-family: ui-monospace, monospace;
  border: 2px solid #E2E8F0;
  border-radius: 0.75rem;
  outline: none;
  min-width: 0;
  background: white;
  transition: all 0.2s;
}

.recovery-word input:focus {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.recovery-word.readonly {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.recovery-word.readonly span:last-child {
  color: #1E293B;
  font-size: 0.875rem;
}

@media (prefers-color-scheme: dark) {
  .recovery-word.readonly {
    background: #1E293B;
    border-color: #334155;
  }
  .recovery-word.readonly span:last-child {
    color: #F1F5F9;
  }
  .recovery-word input {
    background: #1E293B;
    border-color: #334155;
    color: white;
  }
  .recovery-word input:focus {
    border-color: #3B82F6;
  }
}

/* Alert box */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.alert-warning {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.alert-info {
  background: #DBEAFE;
  color: #1E40AF;
  border: 1px solid #93C5FD;
}

.alert-success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #6EE7B7;
}

@media (prefers-color-scheme: dark) {
  .alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #FCD34D;
  }
  .alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93C5FD;
  }
  .alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #6EE7B7;
  }
}

/* Spinner */
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Icon box */
.icon-box {
  width: 4rem;
  height: 4rem;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-box svg {
  width: 2rem;
  height: 2rem;
}

/* Screen container */
.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.screen-content {
  width: 100%;
  max-width: 28rem;
}

/* Dashboard styles - Redesigned */
.dashboard-page {
  min-height: 100dvh;
  background: #F8FAFC;
}

@media (prefers-color-scheme: dark) {
  .dashboard-page {
    background: #0F172A;
  }
}

.dashboard-header {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: white;
  padding: 1.5rem;
  padding-top: calc(1.5rem + env(safe-area-inset-top, 0px));
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 42rem;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.avatar {
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
}

.header-text {
  display: flex;
  flex-direction: column;
}

.header-greeting {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.header-subtitle {
  font-size: 0.8125rem;
  opacity: 0.8;
}

.header-btn {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.header-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  color: white;
}

.dashboard-main {
  padding: 1.25rem;
  max-width: 42rem;
  margin: 0 auto;
}

/* Navigation Grid */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  background: white;
  border-radius: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid #E2E8F0;
}

.nav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.15);
}

.nav-card:active {
  transform: translateY(0);
}

@media (prefers-color-scheme: dark) {
  .nav-card {
    background: #1E293B;
    border-color: #334155;
  }
}

.nav-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.nav-icon.blue {
  background: #DBEAFE;
  color: #2563EB;
}

.nav-icon.purple {
  background: #EDE9FE;
  color: #7C3AED;
}

.nav-icon.green {
  background: #D1FAE5;
  color: #059669;
}

.nav-icon.orange {
  background: #FFEDD5;
  color: #EA580C;
}

.nav-icon.teal {
  background: #CCFBF1;
  color: #0D9488;
}

.nav-icon.gold {
  background: #FEF3C7;
  color: #D97706;
}

@media (prefers-color-scheme: dark) {
  .nav-icon.blue {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
  }
  .nav-icon.purple {
    background: rgba(139, 92, 246, 0.2);
    color: #A78BFA;
  }
  .nav-icon.green {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
  }
  .nav-icon.orange {
    background: rgba(249, 115, 22, 0.2);
    color: #FB923C;
  }
  .nav-icon.teal {
    background: rgba(20, 184, 166, 0.2);
    color: #2DD4BF;
  }
  .nav-icon.gold {
    background: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
  }
}

.nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}

@media (prefers-color-scheme: dark) {
  .nav-label {
    color: #CBD5E1;
  }
}

/* Stats Row */
.stats-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-card {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #E2E8F0;
}

.stat-card:hover {
  border-color: #3B82F6;
}

.stat-card.skeleton-card {
  height: 4.5rem;
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@media (prefers-color-scheme: dark) {
  .stat-card {
    background: #1E293B;
    border-color: #334155;
  }
  .stat-card.skeleton-card {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
  }
}

.stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.stat-icon.blue {
  background: #DBEAFE;
  color: #2563EB;
}

.stat-icon.purple {
  background: #EDE9FE;
  color: #7C3AED;
}

.stat-icon.orange {
  background: #FFEDD5;
  color: #EA580C;
}

@media (prefers-color-scheme: dark) {
  .stat-icon.blue {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
  }
  .stat-icon.purple {
    background: rgba(139, 92, 246, 0.2);
    color: #A78BFA;
  }
  .stat-icon.orange {
    background: rgba(249, 115, 22, 0.2);
    color: #FB923C;
  }
}

.stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.6875rem;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (prefers-color-scheme: dark) {
  .stat-value {
    color: white;
  }
  .stat-label {
    color: #94A3B8;
  }
}

/* Custody Card */
.custody-card {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: white;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.custody-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custody-label {
  font-size: 0.75rem;
  opacity: 0.8;
}

.custody-name {
  font-size: 1rem;
  font-weight: 700;
}

/* Family Connect Card - iOS Style (Blue Gradient) */
.family-connect-card {
  background: linear-gradient(135deg, #3B82F6 0%, #0D1A33 100%);
  color: white;
  border-radius: 1.5rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 25px -5px rgba(59, 130, 246, 0.4);
}

.family-connect-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.family-connect-header-text {
  flex: 1;
}

.family-connect-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.2;
}

.family-connect-icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

.family-connect-title {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
}

.family-connect-subtitle {
  font-size: 0.75rem;
  opacity: 0.85;
  line-height: 1.4;
}

.family-connect-input-row {
  display: flex;
  gap: 0.625rem;
  margin-bottom: 1rem;
}

.family-connect-input {
  flex: 1;
  padding: 1rem;
  background: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
  color: #0F172A;
}

.family-connect-input::placeholder {
  color: #94A3B8;
  font-weight: 600;
}

.family-connect-submit {
  width: 3.5rem;
  height: 3.5rem;
  background: #22C55E;
  border: none;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.family-connect-submit:hover {
  background: #16A34A;
}

.family-connect-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.family-connect-submit svg {
  width: 1.25rem;
  height: 1.25rem;
  color: white;
}

.family-connect-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 1rem 0;
}

.family-code-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.family-code-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
  margin-bottom: 0.25rem;
}

.family-code {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.copy-code-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-radius: 1.25rem;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.copy-code-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.copy-code-btn:active {
  transform: scale(0.98);
}

.copy-code-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

.copy-code-btn svg.hidden {
  display: none;
}

.copy-code-btn.copied {
  background: rgba(34, 197, 94, 0.3);
}

/* PIN sharing tip in family connect card */
.pin-sharing-note {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.625rem;
  opacity: 0.7;
}

.pin-sharing-note svg {
  flex-shrink: 0;
}

.pin-sharing-note p {
  line-height: 1.3;
}

/* Legacy styles for old layout */
.family-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0.875rem;
}

.family-connect-hint {
  font-size: 0.8125rem;
  opacity: 0.85;
  text-align: center;
}

.family-connect-hint a {
  color: white;
  font-weight: 600;
  text-decoration: underline;
}

.family-connect-hint a:hover {
  opacity: 0.9;
}

/* Family Connected Card */
.family-connected-card {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.family-connected-card:hover {
  border-color: #34D399;
}

.family-connected-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: #34D399;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.family-connected-info {
  flex: 1;
}

.family-connected-title {
  font-weight: 600;
  color: #065F46;
}

.family-connected-subtitle {
  font-size: 0.875rem;
  color: #059669;
}

@media (prefers-color-scheme: dark) {
  .family-connected-card {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
  }

  .family-connected-title {
    color: #6EE7B7;
  }

  .family-connected-subtitle {
    color: #34D399;
  }
}

/* Next Event Card */
/* Next Event Banner (gradient) */
.next-event-banner {
  background: linear-gradient(135deg, #4F46E5, #6366F1);
  border-radius: 1rem;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1rem;
  overflow: hidden;
}

.next-event-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.next-event-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1rem 0;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
}

.next-event-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1rem 0.875rem;
}

.next-event-banner .event-date {
  width: 3.25rem;
  height: 3.25rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.next-event-banner .event-day {
  font-size: 1.125rem;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.next-event-banner .event-month {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  font-weight: 600;
}

.next-event-banner .event-info {
  flex: 1;
  min-width: 0;
}

.next-event-banner .event-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.125rem;
}

.next-event-banner .event-subtitle {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
}

/* No event / empty state card */
.next-event-card {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #E2E8F0;
  margin-bottom: 1rem;
}

.next-event-card:hover {
  border-color: #3B82F6;
}

.next-event-card.skeleton-card {
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@media (prefers-color-scheme: dark) {
  .next-event-banner {
    background: linear-gradient(135deg, #3730A3, #4F46E5);
  }
  .next-event-card {
    background: #1E293B;
    border-color: #334155;
  }
  .next-event-card.skeleton-card {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
  }
}

.event-date {
  width: 3.25rem;
  height: 3.25rem;
  background: #EEF2FF;
  border-radius: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.event-date.empty {
  background: #F1F5F9;
}

@media (prefers-color-scheme: dark) {
  .event-date {
    background: rgba(99, 102, 241, 0.2);
  }
  .event-date.empty {
    background: #334155;
  }
}

.event-day {
  font-size: 1.125rem;
  font-weight: 700;
  color: #4F46E5;
  line-height: 1;
}

.event-month {
  font-size: 0.625rem;
  color: #6366F1;
  text-transform: uppercase;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .event-day {
    color: #818CF8;
  }
  .event-month {
    color: #A5B4FC;
  }
}

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

.event-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 0.125rem;
}

.event-subtitle {
  font-size: 0.8125rem;
  color: #64748B;
}

@media (prefers-color-scheme: dark) {
  .event-title {
    color: white;
  }
  .event-subtitle {
    color: #94A3B8;
  }
}

/* Mandatory Profile Modal */
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  backdrop-filter: blur(8px);
}

.profile-modal-content {
  background: white;
  border-radius: 1.5rem;
  width: 100%;
  max-width: 28rem;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  .profile-modal-content {
    background: #1E293B;
  }
}

.profile-modal-header {
  text-align: center;
  padding: 2rem 1.5rem 1rem;
}

.profile-modal-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
}

.profile-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.5rem;
}

.profile-modal-subtitle {
  color: #64748B;
  font-size: 0.9375rem;
}

@media (prefers-color-scheme: dark) {
  .profile-modal-title {
    color: white;
  }
  .profile-modal-subtitle {
    color: #94A3B8;
  }
}

.profile-modal-form {
  padding: 1rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-modal-actions {
  margin-top: 1rem;
}

/* Explanation card (matches iOS) */
.profile-modal-explanation {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #FFF7ED;
  border: 1px solid #FDBA74;
  border-radius: 0.75rem;
  padding: 1rem;
  margin: 0 1.5rem 1rem;
  font-size: 0.875rem;
  color: #9A3412;
  line-height: 1.5;
}

.profile-modal-explanation svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: #F97316;
}

@media (prefers-color-scheme: dark) {
  .profile-modal-explanation {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
    color: #FDBA74;
  }
}

/* Profile sections (mandatory/optional) */
.profile-section {
  margin-bottom: 0.5rem;
}

.profile-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  margin-bottom: 0.75rem;
}

@media (prefers-color-scheme: dark) {
  .profile-section-title {
    color: #94A3B8;
  }
}

/* Profile Banner */
.profile-banner {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: white;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.profile-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -10px rgba(59, 130, 246, 0.5);
}

.profile-banner-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-banner-text {
  flex: 1;
}

.profile-banner-title {
  font-size: 0.9375rem;
  font-weight: 700;
}

.profile-banner-subtitle {
  font-size: 0.8125rem;
  opacity: 0.85;
}

/* Premium Banner */
.premium-banner {
  background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
  color: white;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.premium-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -10px rgba(249, 115, 22, 0.5);
}

.premium-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.premium-text {
  flex: 1;
}

.premium-title {
  font-size: 0.9375rem;
  font-weight: 700;
}

.premium-subtitle {
  font-size: 0.8125rem;
  opacity: 0.85;
}

/* Dashboard Section Headers */
.section-header-dash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.section-title-dash {
  font-weight: 600;
  font-size: 0.875rem;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-count {
  background: #EF4444;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 0.5rem;
  min-width: 1.25rem;
  text-align: center;
}

.section-add-btn {
  width: 1.75rem;
  height: 1.75rem;
  background: #F1F5F9;
  border: none;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748B;
}

.section-add-btn:hover {
  background: #E2E8F0;
}

/* Pending Shares Section */
.pending-shares-section {
  margin-bottom: 1rem;
}

.pending-shares-list {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #E2E8F0;
}

.pending-share-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid #F1F5F9;
}

.pending-share-item:last-child {
  border-bottom: none;
}

.pending-share-item:hover {
  background: #F8FAFC;
}

.pending-share-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: #FEF2F2;
  color: #EF4444;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pending-share-info {
  flex: 1;
  min-width: 0;
}

.pending-share-title {
  font-weight: 500;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-share-from {
  font-size: 0.8125rem;
  color: #64748B;
}

@media (prefers-color-scheme: dark) {
  .pending-shares-list {
    background: #1E293B;
    border-color: #334155;
  }
  .pending-share-item {
    border-color: #334155;
  }
  .pending-share-item:hover {
    background: #334155;
  }
  .pending-share-icon {
    background: rgba(239, 68, 68, 0.2);
  }
  .pending-share-title {
    color: white;
  }
  .section-add-btn {
    background: #334155;
    color: #94A3B8;
  }
}

/* Info Card */
.info-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.info-card:hover {
  border-color: #3B82F6;
}

.info-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-card-icon.blue {
  background: #EFF6FF;
  color: #3B82F6;
}

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

.info-card-title {
  font-weight: 600;
  color: #0F172A;
}

.info-card-subtitle {
  font-size: 0.8125rem;
  color: #64748B;
}

@media (prefers-color-scheme: dark) {
  .info-card {
    background: #1E293B;
    border-color: #334155;
  }
  .info-card-icon.blue {
    background: rgba(59, 130, 246, 0.2);
  }
  .info-card-title {
    color: white;
  }
}

/* Emergency Contacts Card */
.emergency-contacts-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.emergency-contacts-card:hover {
  border-color: #EF4444;
}

.emergency-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #FEE2E2;
  color: #EF4444;
}

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

.emergency-title {
  font-weight: 600;
  color: #0F172A;
}

.emergency-subtitle {
  font-size: 0.8125rem;
  color: #64748B;
}

@media (prefers-color-scheme: dark) {
  .emergency-contacts-card {
    background: #1E293B;
    border-color: #334155;
  }
  .emergency-contacts-card:hover {
    border-color: #F87171;
  }
  .emergency-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #F87171;
  }
  .emergency-title {
    color: white;
  }
}

/* Children Section */
.children-section {
  margin-bottom: 1rem;
}

.children-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.children-scroll::-webkit-scrollbar {
  display: none;
}

.child-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  padding: 1rem;
  min-width: 7rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.child-card:hover {
  border-color: #A855F7;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
}

.child-avatar {
  width: 3rem;
  height: 3rem;
  background: #F3E8FF;
  color: #A855F7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
}

.child-name {
  font-weight: 600;
  color: #0F172A;
  font-size: 0.875rem;
}

.child-age {
  font-size: 0.75rem;
  color: #64748B;
}

@media (prefers-color-scheme: dark) {
  .child-card {
    background: #1E293B;
    border-color: #334155;
  }
  .child-avatar {
    background: rgba(168, 85, 247, 0.2);
  }
  .child-name {
    color: white;
  }
}

/* iOS-style Child Card */
.child-card-ios {
  background: white;
  border-radius: 1.25rem;
  padding: 1rem;
  min-width: 170px;
  max-width: 170px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.child-card-ios:hover {
  transform: scale(0.98);
}

.child-card-ios:active {
  transform: scale(0.95);
}

.child-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

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

.child-card-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.child-card-age {
  font-size: 0.75rem;
  color: #64748B;
  margin-top: 0.125rem;
}

.child-card-avatar {
  width: 1.75rem;
  height: 1.75rem;
  background: #3B82F6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  margin-right: 0.5rem;
}

.child-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.child-card-label {
  font-size: 0.625rem;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.child-card-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0F172A;
  font-variant-numeric: tabular-nums;
}

@media (prefers-color-scheme: dark) {
  .child-card-ios {
    background: #1E293B;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
  }
  .child-card-name {
    color: #F1F5F9;
  }
  .child-card-age {
    color: #94A3B8;
  }
  .child-card-label {
    color: #94A3B8;
  }
  .child-card-value {
    color: #F1F5F9;
  }
}

/* Bottom Actions */
.bottom-actions {
  margin-top: 2rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

.logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  background: transparent;
  border: 1px solid #E2E8F0;
  border-radius: 0.875rem;
  color: #64748B;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  border-color: #EF4444;
  color: #EF4444;
}

.logout-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

@media (prefers-color-scheme: dark) {
  .logout-btn {
    border-color: #334155;
    color: #94A3B8;
  }
  .logout-btn:hover {
    border-color: #EF4444;
    color: #EF4444;
  }
}

/* Legacy feature cards (keep for other pages) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: white;
  border-radius: 1.5rem;
  padding: 1.25rem;
  border: 1px solid #F1F5F9;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

.feature-card:active {
  transform: translateY(0);
}

@media (prefers-color-scheme: dark) {
  .feature-card {
    background: #1E293B;
    border-color: #334155;
  }
}

/* Animations */
.fade-in {
  animation: fadeIn 0.3s ease-out;
}

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

/* Safe area for mobile */
.safe-area-top {
  padding-top: env(safe-area-inset-top, 0px);
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ========================================
   Phase 2 Components
   ======================================== */

/* Modal overlay and content */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: white;
  border-radius: 1.5rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (prefers-color-scheme: dark) {
  .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
  }
  .modal-content {
    background: #1E293B;
  }
}

/* Mobile-friendly modal - full screen on small devices */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-content {
    border-radius: 1.5rem 1.5rem 0 0;
    max-height: 95vh;
    animation: slideUp 0.3s ease-out;
  }

  .modal-content.max-w-2xl,
  .modal-content.max-w-lg {
    max-width: 100%;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* File upload zone */
.file-upload-zone {
  border: 2px dashed #E2E8F0;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.file-upload-zone:hover {
  border-color: #3B82F6;
  background: rgba(59, 130, 246, 0.03);
}

.file-upload-zone.dragover {
  border-color: #3B82F6;
  background: rgba(59, 130, 246, 0.08);
  transform: scale(1.01);
}

.file-upload-zone.has-file {
  border-color: #22C55E;
  border-style: solid;
  background: rgba(34, 197, 94, 0.05);
}

@media (prefers-color-scheme: dark) {
  .file-upload-zone {
    border-color: #334155;
  }
  .file-upload-zone:hover,
  .file-upload-zone.dragover {
    border-color: #3B82F6;
    background: rgba(59, 130, 246, 0.1);
  }
  .file-upload-zone.has-file {
    border-color: #22C55E;
    background: rgba(34, 197, 94, 0.1);
  }
}

/* Tab navigation */
.tab-nav {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: #F1F5F9;
  border-radius: 1rem;
}

.tab-item {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 0.875rem;
}

.tab-item:hover {
  color: #334155;
}

.tab-item.active {
  background: white;
  color: #0F172A;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  .tab-nav {
    background: #334155;
  }
  .tab-item {
    color: #94A3B8;
  }
  .tab-item:hover {
    color: #E2E8F0;
  }
  .tab-item.active {
    background: #1E293B;
    color: white;
  }
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-blue {
  background: #DBEAFE;
  color: #1E40AF;
}

.badge-green {
  background: #D1FAE5;
  color: #065F46;
}

.badge-orange {
  background: #FFEDD5;
  color: #9A3412;
}

.badge-red {
  background: #FEE2E2;
  color: #991B1B;
}

.badge-gray {
  background: #F3F4F6;
  color: #4B5563;
}

@media (prefers-color-scheme: dark) {
  .badge-blue {
    background: rgba(59, 130, 246, 0.2);
    color: #93C5FD;
  }
  .badge-green {
    background: rgba(34, 197, 94, 0.2);
    color: #6EE7B7;
  }
  .badge-orange {
    background: rgba(249, 115, 22, 0.2);
    color: #FDBA74;
  }
  .badge-red {
    background: rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
  }
  .badge-gray {
    background: rgba(107, 114, 128, 0.2);
    color: #D1D5DB;
  }
}

/* Calendar styles */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 0.5rem;
}

.calendar-header-cell {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748B;
  padding: 0.5rem;
}

.calendar-day {
  min-height: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.875rem;
  position: relative;
}

.calendar-day:hover {
  background: rgba(59, 130, 246, 0.1);
}

.calendar-day.today {
  background: rgba(59, 130, 246, 0.15);
  font-weight: 700;
}

.calendar-day.selected {
  background: #3B82F6;
  color: white;
}

.calendar-day.other-month {
  color: #CBD5E1;
}

.event-dots {
  display: flex;
  gap: 3px;
  justify-content: center;
  position: absolute;
  bottom: 3px;
}

.event-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-day.selected .event-dot {
  opacity: 0.8;
}

/* Calendar compact mode toggle button */
button.mobile-only,
.btn.mobile-only {
  display: inline-flex !important;
}

@media (min-width: 768px) {
  button.mobile-only,
  .btn.mobile-only {
    display: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  .calendar-header-cell {
    color: #94A3B8;
  }
  .calendar-day.other-month {
    color: #475569;
  }
  .calendar-day:hover {
    background: rgba(59, 130, 246, 0.2);
  }
  .calendar-day.today {
    background: rgba(59, 130, 246, 0.25);
  }
}

/* List item styles */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #F1F5F9;
  transition: background-color 0.2s;
}

.list-item:hover {
  background: rgba(59, 130, 246, 0.03);
}

.list-item:last-child {
  border-bottom: none;
}

@media (prefers-color-scheme: dark) {
  .list-item {
    border-color: #334155;
  }
  .list-item:hover {
    background: rgba(59, 130, 246, 0.08);
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-state-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.5rem;
  background: #F1F5F9;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (prefers-color-scheme: dark) {
  .empty-state-icon {
    background: #334155;
  }
}

/* Balance indicators */
.balance-positive {
  color: #22C55E;
}

.balance-negative {
  color: #EF4444;
}

.balance-zero {
  color: #64748B;
}

/* Button variants for Phase 2 */
.btn-danger {
  background: #EF4444;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #DC2626;
  transform: translateY(-2px);
}

.btn-success {
  background: #22C55E;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #16A34A;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.75rem;
}

.btn-icon {
  padding: 0.75rem;
  border-radius: 0.75rem;
}

.btn-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Responsive utilities */
.mobile-only {
  display: block;
}

.desktop-only {
  display: none;
}

@media (min-width: 768px) {
  .mobile-only {
    display: none !important;
  }

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

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

/* Floating Action Button - Mobile only */
.fab {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  right: 1.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #3B82F6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  z-index: 40;
}

@media (min-width: 768px) {
  .fab {
    display: none;
  }
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.fab:active {
  transform: scale(0.95);
}

.fab svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Mobile Bottom Action - Full width button */
.mobile-bottom-action {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  background: white;
  border-top: 1px solid #E2E8F0;
  z-index: 40;
}

@media (prefers-color-scheme: dark) {
  .mobile-bottom-action {
    background: #1E293B;
    border-top-color: #334155;
  }
}

@media (min-width: 768px) {
  .mobile-bottom-action {
    display: none;
  }
}

/* Add bottom padding to content when mobile-bottom-action is present */
@media (max-width: 767px) {
  .app-layout:has(.mobile-bottom-action) .content-container {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Desktop action bar - Fixed at bottom */
.desktop-action-bar {
  display: none;
}

@media (min-width: 768px) {
  .desktop-action-bar {
    display: flex;
    justify-content: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #E2E8F0;
    z-index: 40;
  }

  /* Add bottom padding to content when desktop-action-bar is present */
  .app-layout:has(.desktop-action-bar) .content-container {
    padding-bottom: 6rem;
  }
}

@media (min-width: 768px) and (prefers-color-scheme: dark) {
  .desktop-action-bar {
    background: #1E293B;
    border-top-color: #334155;
  }
}

/* Header add button - mobile only */
.header-add-btn {
  display: flex;
}

@media (min-width: 768px) {
  .header-add-btn {
    display: none;
  }
}

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: white;
  position: sticky;
  top: 0;
  z-index: 30;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

@media (prefers-color-scheme: dark) {
  .page-title {
    color: white;
  }
}

/* Section header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
}

@media (prefers-color-scheme: dark) {
  .section-title {
    color: #E2E8F0;
  }
}

/* Divider */
.divider {
  height: 1px;
  background: #F1F5F9;
  margin: 1.5rem 0;
}

@media (prefers-color-scheme: dark) {
  .divider {
    background: #334155;
  }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@media (prefers-color-scheme: dark) {
  .skeleton {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
  }
}

/* Utility: hide scrollbar */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Utility: truncate text */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Utility: line clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive max-width container */
.content-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .content-container {
    max-width: 36rem;
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  .content-container {
    max-width: 42rem;
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Desktop layout wrapper */
@media (min-width: 768px) {
  .dashboard-page {
    display: flex;
    flex-direction: column;
  }

  .header-content {
    max-width: 1210px;
  }

  .dashboard-main {
    max-width: 1210px;
    padding: 1.5rem 2rem;
    padding-top: 5rem;
  }

  .dashboard-desktop-greeting {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
  }

  .dashboard-desktop-greeting .header-greeting {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
  }

  .dashboard-desktop-greeting .header-subtitle {
    font-size: 0.875rem;
    color: #64748B;
    opacity: 1;
  }

  .nav-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
  }

  .nav-card {
    padding: 1.25rem;
  }

  .nav-icon {
    width: 3.5rem;
    height: 3.5rem;
  }

  .nav-icon svg {
    width: 1.75rem;
    height: 1.75rem;
  }

  .nav-label {
    font-size: 0.8125rem;
  }
}

@media (min-width: 768px) and (prefers-color-scheme: dark) {
  .dashboard-desktop-greeting .header-greeting {
    color: #F1F5F9;
  }

  .dashboard-desktop-greeting .header-subtitle {
    color: #94A3B8;
  }
}

/* Desktop inline premium banner (next to greeting) */
.premium-banner-inline {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: 0.875rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.premium-banner-inline:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -6px rgba(249, 115, 22, 0.5);
}

.premium-banner-inline svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

/* Family connect wrapper (card + info side by side on desktop) */
.family-connect-wrapper {
  margin-bottom: 1rem;
}

.family-connect-wrapper .family-connect-card {
  margin-bottom: 0;
}

.family-connect-info {
  display: none;
}

.connect-info-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 1rem;
}

.connect-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.connect-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.connect-step-num {
  width: 1.75rem;
  height: 1.75rem;
  background: #EFF6FF;
  color: #2563EB;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.connect-step-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #0F172A;
  line-height: 1.3;
}

.connect-step-desc {
  font-size: 0.8125rem;
  color: #64748B;
  line-height: 1.4;
}

.connect-info-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #E2E8F0;
  font-size: 0.8125rem;
  color: #64748B;
}

@media (prefers-color-scheme: dark) {
  .connect-info-title { color: #F1F5F9; }
  .connect-step-num { background: rgba(59, 130, 246, 0.2); color: #60A5FA; }
  .connect-step-title { color: #F1F5F9; }
  .connect-step-desc { color: #94A3B8; }
  .connect-info-footer { border-color: #334155; color: #94A3B8; }
}

/* "Adicionar crianca" text button */
.section-add-text-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  color: #3B82F6;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  padding: 0.375rem 0.625rem;
  border-radius: 0.5rem;
  transition: background 0.2s;
}

.section-add-text-btn:hover {
  background: #EFF6FF;
}

.section-add-text-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

@media (prefers-color-scheme: dark) {
  .section-add-text-btn { color: #60A5FA; }
  .section-add-text-btn:hover { background: rgba(59, 130, 246, 0.15); }
}

/* Dashboard two-column grid on desktop */
@media (min-width: 1024px) {
  #dashboard-data {
    display: grid;
    grid-template-columns: 1fr 24rem;
    gap: 1.5rem;
    grid-auto-flow: dense;
  }

  #dashboard-data > * {
    margin-bottom: 0;
  }

  /* Full-width items */
  #dashboard-data > .family-connect-wrapper,
  #dashboard-data > .stats-row,
  #dashboard-data > .children-section {
    grid-column: 1 / -1;
  }

  /* Main column items */
  #dashboard-data > .custody-card,
  #dashboard-data > .next-event-banner,
  #dashboard-data > .next-event-card {
    grid-column: 1;
  }

  /* Side column items */
  #dashboard-data > .pending-shares-section,
  #dashboard-data > .info-card,
  #dashboard-data > .emergency-contacts-card {
    grid-column: 2;
  }

  /* Hide premium banner in grid (shown inline with greeting instead) */
  #dashboard-data > .premium-banner {
    display: none;
  }

  /* Family connect: card + info side by side */
  .family-connect-wrapper {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 0;
  }

  .family-connect-wrapper .family-connect-card {
    flex: 0 0 380px;
  }

  .family-connect-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    border: 1px solid #E2E8F0;
  }

  /* Children section: full width, wrap cards */
  .children-section .children-scroll {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

@media (min-width: 1024px) and (prefers-color-scheme: dark) {
  .family-connect-info {
    background: #1E293B;
    border-color: #334155;
  }
}

@media (min-width: 1024px) {
  .min-h-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .page-header {
    max-width: 100%;
    width: 100%;
  }
}

/* ============================================
   Premium Page
   ============================================ */

/* Hero Section */
.premium-hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  background: linear-gradient(135deg, #F97316 0%, #FB923C 50%, #FBBF24 100%);
  border-radius: 1.5rem;
  margin-bottom: 1.5rem;
  color: white;
}

.premium-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
}

.premium-hero-badge-text {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

.premium-hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.premium-hero-subtitle {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.95;
  margin-bottom: 0.5rem;
}

.premium-hero-desc {
  font-size: 0.8125rem;
  opacity: 0.85;
  max-width: 24rem;
  margin: 0 auto;
  line-height: 1.5;
}

/* Stats Bar */
.premium-stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  .premium-stats-bar {
    background: #1E293B;
  }
}

.premium-stat {
  text-align: center;
  flex: 1;
}

.premium-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #F97316;
}

.premium-stat-label {
  display: block;
  font-size: 0.6875rem;
  color: #64748B;
  line-height: 1.3;
  margin-top: 0.25rem;
}

.premium-stat-divider {
  width: 1px;
  height: 2.5rem;
  background: #E2E8F0;
}

@media (prefers-color-scheme: dark) {
  .premium-stat-divider {
    background: #334155;
  }
}

/* Hero Highlights */
.premium-hero-highlights {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  opacity: 0.95;
  flex-wrap: wrap;
}

.premium-hero-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

/* Acordo Parental Card */
.premium-acordo-card {
  background: white;
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid #E2E8F0;
  margin-bottom: 2rem;
}

@media (prefers-color-scheme: dark) {
  .premium-acordo-card {
    background: #1E293B;
    border-color: #334155;
  }
}

.premium-acordo-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.premium-acordo-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0F172A;
}

@media (prefers-color-scheme: dark) {
  .premium-acordo-title {
    color: white;
  }
}

.premium-acordo-subtitle {
  font-size: 0.75rem;
  color: #64748B;
  margin-top: 0.125rem;
}

.premium-acordo-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.375rem;
}

.premium-acordo-list li {
  font-size: 0.8125rem;
  color: #475569;
  padding-left: 1.25rem;
  position: relative;
}

@media (prefers-color-scheme: dark) {
  .premium-acordo-list li {
    color: #94A3B8;
  }
}

.premium-acordo-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #F97316;
}

/* Section Title */
.premium-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0F172A;
  text-align: center;
  margin-bottom: 1rem;
}

@media (prefers-color-scheme: dark) {
  .premium-section-title {
    color: white;
  }
}

/* Feature Category Cards */
.premium-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

@media (min-width: 480px) {
  .premium-features-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.premium-feature-card {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid #E2E8F0;
}

@media (prefers-color-scheme: dark) {
  .premium-feature-card {
    background: #1E293B;
    border-color: #334155;
  }
}

.premium-feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.premium-feature-card-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  .premium-feature-card-title {
    color: white;
  }
}

.premium-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.premium-feature-list li {
  font-size: 0.6875rem;
  color: #64748B;
  padding: 0.1875rem 0;
  padding-left: 0.75rem;
  position: relative;
}

.premium-feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: #F97316;
}

/* Comparison Table */
.premium-comparison-table {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #E2E8F0;
  margin-bottom: 2rem;
}

@media (prefers-color-scheme: dark) {
  .premium-comparison-table {
    background: #1E293B;
    border-color: #334155;
  }
}

.premium-comparison-header {
  display: grid;
  grid-template-columns: 1fr 4.5rem 4.5rem;
  padding: 0.75rem 1rem;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748B;
}

@media (prefers-color-scheme: dark) {
  .premium-comparison-header {
    background: #0F172A;
    border-color: #334155;
  }
}

.premium-comparison-row {
  display: grid;
  grid-template-columns: 1fr 4.5rem 4.5rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid #F1F5F9;
  align-items: center;
}

.premium-comparison-row:last-child {
  border-bottom: none;
}

@media (prefers-color-scheme: dark) {
  .premium-comparison-row {
    border-color: #1E293B;
  }
}

.premium-comparison-feature {
  font-size: 0.8125rem;
  color: #334155;
}

@media (prefers-color-scheme: dark) {
  .premium-comparison-feature {
    color: #CBD5E1;
  }
}

.premium-comparison-free,
.premium-comparison-premium {
  text-align: center;
  font-size: 0.8125rem;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
}

.premium-comparison-premium.premium-highlight {
  font-weight: 700;
  font-size: 1.125rem;
  color: #F97316;
}

/* Plan Toggle */
.premium-plan-toggle {
  display: flex;
  background: #F1F5F9;
  border-radius: 0.75rem;
  padding: 0.25rem;
  margin-bottom: 1rem;
}

@media (prefers-color-scheme: dark) {
  .premium-plan-toggle {
    background: #0F172A;
  }
}

.premium-plan-toggle-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #64748B;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.premium-plan-toggle-btn.active {
  background: white;
  color: #0F172A;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  .premium-plan-toggle-btn.active {
    background: #334155;
    color: white;
  }
}

.premium-save-badge {
  background: #22C55E;
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

/* Plan Card */
.premium-plan-card {
  background: white;
  border-radius: 1.5rem;
  padding: 1.5rem;
  text-align: center;
  border: 2px solid #F97316;
  box-shadow: 0 10px 40px -10px rgba(249, 115, 22, 0.2);
  margin-bottom: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  .premium-plan-card {
    background: #1E293B;
  }
}

.premium-plan-recommended {
  display: inline-block;
  background: linear-gradient(135deg, #F97316, #FB923C);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
}

.premium-plan-trial {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #22C55E;
  margin-bottom: 0.75rem;
}

.premium-plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
}

.premium-plan-amount {
  font-size: 3rem;
  font-weight: 800;
  color: #0F172A;
}

@media (prefers-color-scheme: dark) {
  .premium-plan-amount {
    color: white;
  }
}

.premium-plan-period {
  font-size: 1.125rem;
  color: #64748B;
}

.premium-plan-billing {
  font-size: 0.8125rem;
  color: #64748B;
  margin-top: 0.25rem;
}

.premium-plan-savings {
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

/* CTA Button */
.premium-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  margin-top: 1.25rem;
  border: none;
  border-radius: 1rem;
  background: linear-gradient(135deg, #F97316 0%, #FB923C 100%);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

.premium-cta-btn:hover {
  box-shadow: 0 6px 24px rgba(249, 115, 22, 0.4);
  transform: translateY(-1px);
}

.premium-cta-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Trust Badges */
.premium-trust-badges {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.premium-trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  text-align: center;
}

.premium-trust-badge span {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #64748B;
  line-height: 1.3;
}

/* FAQ Section */
.premium-faq {
  margin-bottom: 1.5rem;
}

.premium-faq-item {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .premium-faq-item {
    background: #1E293B;
    border-color: #334155;
  }
}

.premium-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0F172A;
}

@media (prefers-color-scheme: dark) {
  .premium-faq-question {
    color: white;
  }
}

.premium-faq-answer {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.premium-faq-answer p {
  padding: 0 1rem 0.875rem;
  font-size: 0.8125rem;
  color: #64748B;
  line-height: 1.6;
}

/* Legal Footer */
.premium-legal {
  text-align: center;
  padding: 1rem 0 2rem;
}

.premium-legal p {
  font-size: 0.6875rem;
  color: #94A3B8;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.premium-legal-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
}

.premium-legal-links a {
  color: #64748B;
  text-decoration: underline;
}

.premium-legal-links span {
  color: #CBD5E1;
}

/* Premium Active Card */
.premium-active-card {
  background: linear-gradient(135deg, #F97316 0%, #FB923C 100%);
  border-radius: 1.5rem;
  padding: 2rem;
  text-align: center;
  color: white;
}

.premium-active-badge {
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: white;
}

.premium-active-features {
  text-align: left;
}

.premium-active-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: white;
}

.premium-manage-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.premium-manage-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Legacy compat */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #FFF7ED;
  color: #EA580C;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (prefers-color-scheme: dark) {
  .premium-badge {
    background: rgba(249, 115, 22, 0.15);
    color: #FB923C;
  }
}

/* ============================================
   Settings Page
   ============================================ */

.settings-section {
  margin-bottom: 2rem;
}

.settings-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

@media (prefers-color-scheme: dark) {
  .settings-section-title {
    color: #94A3B8;
  }
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.settings-item.clickable {
  cursor: pointer;
}

.settings-item.clickable:hover {
  opacity: 0.8;
}

.settings-divider {
  height: 1px;
  background: #E2E8F0;
}

@media (prefers-color-scheme: dark) {
  .settings-divider {
    background: #334155;
  }
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 1.75rem;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #CBD5E1;
  transition: 0.3s;
  border-radius: 1rem;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 1.25rem;
  width: 1.25rem;
  left: 0.25rem;
  bottom: 0.25rem;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
  background-color: #3B82F6;
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(1.25rem);
}

@media (prefers-color-scheme: dark) {
  .toggle-slider {
    background-color: #475569;
  }
}

/* ============================================
   Tab Navigation
   ============================================ */

.tab-nav {
  display: flex;
  background: #F1F5F9;
  border-radius: 0.75rem;
  padding: 0.25rem;
}

@media (prefers-color-scheme: dark) {
  .tab-nav {
    background: #1E293B;
  }
}

.tab-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748B;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: white;
  color: #0F172A;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  .tab-btn {
    color: #94A3B8;
  }

  .tab-btn.active {
    background: #334155;
    color: white;
  }
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #64748B;
}

.empty-state-icon {
  color: #CBD5E1;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.empty-state-message {
  font-size: 0.875rem;
}

@media (prefers-color-scheme: dark) {
  .empty-state {
    color: #94A3B8;
  }

  .empty-state-icon {
    color: #475569;
  }

  .empty-state-title {
    color: #E2E8F0;
  }
}

/* ============================================
   Children Grid & Cards
   ============================================ */

.children-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .children-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .children-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.child-card-wrapper {
  cursor: pointer;
}

.child-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: white;
  border-radius: 1.25rem;
  border: 1px solid #E2E8F0;
  transition: all 0.2s ease;
}

.child-card:hover {
  border-color: #3B82F6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.child-card-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.child-card-avatar span {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

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

.child-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: #0F172A;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.child-card-age {
  font-size: 0.875rem;
  color: #3B82F6;
  font-weight: 500;
  margin: 0.125rem 0 0;
}

.child-card-date {
  font-size: 0.75rem;
  color: #94A3B8;
  margin: 0.125rem 0 0;
}

.child-card-actions {
  display: flex;
  gap: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  .child-card {
    background: #1E293B;
    border-color: #334155;
  }

  .child-card:hover {
    border-color: #3B82F6;
  }

  .child-card-name {
    color: #F1F5F9;
  }

  .child-card-date {
    color: #64748B;
  }
}

/* ============================================
   Child Detail View (Modal)
   ============================================ */

.child-detail-view {
  padding: 0.5rem 0;
}

.child-profile-header {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

.child-avatar {
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6 0%, #6366F1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.child-avatar-letter {
  font-size: 2.75rem;
  font-weight: 700;
  color: white;
}

.child-profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.child-profile-age {
  font-size: 1rem;
  color: #64748B;
  margin: 0.25rem 0 0;
}

.detail-card {
  background: #F8FAFC;
  border-radius: 1.25rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

.detail-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: white;
  border-bottom: 1px solid #E2E8F0;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #0F172A;
}

.detail-card-content {
  padding: 1rem 1.25rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #E2E8F0;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.8125rem;
  color: #64748B;
}

.detail-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #0F172A;
  text-align: right;
}

@media (prefers-color-scheme: dark) {
  .child-profile-name {
    color: #F1F5F9;
  }

  .child-profile-age {
    color: #94A3B8;
  }

  .detail-card {
    background: #1E293B;
  }

  .detail-card-header {
    background: #0F172A;
    border-color: #334155;
    color: #F1F5F9;
  }

  .detail-card-content {
    background: #1E293B;
  }

  .detail-row {
    border-color: #334155;
  }

  .detail-label {
    color: #94A3B8;
  }

  .detail-value {
    color: #F1F5F9;
  }
}

/* ============================================
   Form Sections (Child Modal)
   ============================================ */

.form-section {
  padding: 1.25rem;
  background: #F8FAFC;
  border-radius: 1rem;
  border: 1px solid #E2E8F0;
}

.form-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin: 0 0 1rem;
}

.premium-badge {
  display: inline-flex;
  padding: 0.125rem 0.5rem;
  background: #F97316;
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (prefers-color-scheme: dark) {
  .form-section {
    background: #1E293B;
    border-color: #334155;
  }

  .form-section-title {
    color: #94A3B8;
  }
}

/* ============================================
   Desktop Navigation Bar
   ============================================ */

.desktop-nav {
  display: none;
  background: white;
  border-bottom: 1px solid #E2E8F0;
  padding: 0 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: block;
  }

  /* Add padding to content to account for fixed nav */
  .app-layout .app-main {
    padding-top: 4rem;
  }
}

@media (prefers-color-scheme: dark) {
  .desktop-nav {
    background: #1E293B;
    border-color: #334155;
  }
}

.desktop-nav-inner {
  max-width: 1210px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 4rem;
}

.desktop-nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.desktop-nav-logo svg {
  height: 2.5rem;
  width: auto;
}

.desktop-nav-items {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.desktop-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748B;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.desktop-nav-item svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.desktop-nav-item:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.desktop-nav-item.active {
  background: #EFF6FF;
  color: #2563EB;
}

.desktop-nav-item.disabled {
  color: #94A3B8;
  cursor: not-allowed;
  opacity: 0.7;
}

.desktop-nav-item.disabled:hover {
  background: transparent;
  color: #94A3B8;
}

@media (prefers-color-scheme: dark) {
  .desktop-nav-item {
    color: #94A3B8;
  }

  .desktop-nav-item:hover {
    background: #334155;
    color: #F1F5F9;
  }

  .desktop-nav-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
  }

  .desktop-nav-item.disabled {
    color: #475569;
  }

  .desktop-nav-item.disabled:hover {
    background: transparent;
    color: #475569;
  }
}

.desktop-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.desktop-nav-premium,
.desktop-nav-settings {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  color: #64748B;
  transition: all 0.2s;
}

.desktop-nav-premium svg,
.desktop-nav-settings svg {
  width: 1.125rem;
  height: 1.125rem;
}

.desktop-nav-premium:hover,
.desktop-nav-settings:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.desktop-nav-premium.active {
  background: #FEF3C7;
  color: #D97706;
}

.desktop-nav-settings.active {
  background: #F1F5F9;
  color: #0F172A;
}

@media (prefers-color-scheme: dark) {
  .desktop-nav-premium,
  .desktop-nav-settings {
    color: #94A3B8;
  }

  .desktop-nav-premium:hover,
  .desktop-nav-settings:hover {
    background: #334155;
    color: #F1F5F9;
  }

  .desktop-nav-premium.active {
    background: rgba(245, 158, 11, 0.2);
    color: #FBBF24;
  }

  .desktop-nav-settings.active {
    background: #334155;
    color: #F1F5F9;
  }
}

.desktop-nav-avatar {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-left: 0.5rem;
}

/* Mobile Page Header */
.mobile-page-header {
  display: flex;
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: white;
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 30;
}

@media (min-width: 768px) {
  .mobile-page-header {
    display: none;
  }
}

.mobile-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 1rem;
}

.mobile-header-back {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: background 0.2s;
}

.mobile-header-back:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mobile-header-title {
  font-size: 1.125rem;
  font-weight: 700;
  flex: 1;
  text-align: center;
}

.mobile-header-spacer {
  width: 2.5rem;
  height: 2.5rem;
}

.mobile-header-action {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: white;
  transition: background 0.2s;
}

.mobile-header-action:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* App Layout */
.app-layout {
  min-height: 100dvh;
  background: #F8FAFC;
}

/* Desktop-only nav wrapper needs to be sticky */
.app-layout > .desktop-only:first-child {
  position: sticky;
  top: 0;
  z-index: 40;
}

@media (prefers-color-scheme: dark) {
  .app-layout {
    background: #0F172A;
  }
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .app-main {
    padding: 1.5rem;
  }

  .app-main .content-container {
    max-width: 56rem;
    margin: 0 auto;
    width: 100%;
  }
}

