/* ============================================
   Homeschool Journal — Modern Mobile-First
   Soft & Warm Design System
   ============================================ */

:root {
  --bg: #FAF6F1;
  --card: #FFFFFF;
  --primary: #D4816B;
  --primary-hover: #C4705A;
  --primary-light: #D4816B18;
  --green: #7BAE7F;
  --green-light: #7BAE7F18;
  --blue: #6B9FBF;
  --blue-light: #6B9FBF18;
  --purple: #9B7FB5;
  --purple-light: #9B7FB518;
  --dark: #2D2A26;
  --text: #4A4540;
  --muted: #8C8378;
  --light-muted: #B5ADA4;
  --border: #EDE7DF;
  --input-bg: #FDFBF8;
  --danger: #D4816B;
  --danger-light: #FCEAE5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(72px + var(--safe-bottom));
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3, .section-title, .entry-title, .child-card-name {
  font-family: 'Lora', Georgia, serif;
  color: var(--dark);
}

/* ---- Header ---- */
header {
  background: var(--dark);
  padding: 14px 20px 12px;
  position: sticky;
  top: 0;
  z-index: 40;
}
header h1 {
  color: #F5E6C8;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.header-sub {
  color: var(--light-muted);
  font-size: 12px;
  margin-top: 3px;
  font-family: 'Inter', sans-serif;
}
.header-sub strong { color: var(--primary); }

.child-tabs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.child-tabs::-webkit-scrollbar { display: none; }
.child-tab {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255,255,255,0.15);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 34px;
}
.child-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---- Bottom Nav ---- */
nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark);
  display: flex;
  z-index: 50;
  padding-bottom: var(--safe-bottom);
  border-top: 1px solid rgba(255,255,255,0.08);
}
nav button {
  flex: 1;
  padding: 10px 4px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
  min-height: 56px;
  position: relative;
}
nav button .nav-icon { font-size: 22px; }
nav button.active { color: var(--primary); }
nav button.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 0 0 2px 2px;
}

/* ---- Main Content ---- */
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ---- Cards ---- */
.card {
  background: var(--card);
  border-radius: var(--radius-md);
  border: none;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

/* ---- Entry Cards ---- */
.entry-type {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}
.entry-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}
.entry-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  font-family: 'Inter', sans-serif;
}
.entry-desc {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
}
.entry-notes {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.del-btn {
  float: right;
  background: none;
  border: none;
  color: var(--light-muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 0 0 0 8px;
  transition: color 0.2s;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.del-btn:active { color: var(--danger); }

/* ---- Forms ---- */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
  font-family: 'Inter', sans-serif;
}
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=time], textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--dark);
  background: var(--input-bg);
  margin-bottom: 14px;
  outline: none;
  -webkit-appearance: none;
  min-height: 44px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
textarea { min-height: 100px; resize: vertical; }

.form-row-2 {
  display: flex;
  gap: 12px;
}
.form-row-2 > div { flex: 1; }

/* ---- Type & Filter Chips ---- */
.type-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.type-chip {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 12px;
  padding-bottom: 2px;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 38px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.filter-chip.active {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
  box-shadow: none;
}

/* ---- View Toggle ---- */
.view-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--card);
  border: 1.5px solid var(--border);
  padding: 3px;
  box-shadow: var(--shadow-sm);
}
.view-toggle-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s;
  border-radius: var(--radius-pill);
  min-height: 36px;
}
.view-toggle-btn.active {
  background: var(--dark);
  color: #fff;
}

/* ---- Buttons ---- */
.btn {
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  transition: background 0.15s, transform 0.1s;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  background: var(--card);
  color: var(--text);
  transition: border-color 0.15s, transform 0.1s;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-secondary:active { transform: scale(0.97); }

.btn-danger {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid #E8B4B4;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  background: var(--danger-light);
  color: #B85C5C;
  transition: transform 0.1s;
  min-height: 44px;
}
.btn-danger:active { transform: scale(0.97); }

.icon-btn-danger {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #E8B4B4;
  background: var(--danger-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.icon-btn-danger:active { transform: scale(0.92); background: #f5d0c8; }

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

/* ---- Date Row ---- */
.date-row { display: flex; gap: 12px; }
.date-row > div { flex: 1; }

/* ---- Report ---- */
.report-box {
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

/* ---- Saved Reports ---- */
.saved-report-card {
  background: var(--input-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ---- Empty States ---- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
}
.empty-state .emoji {
  font-size: 56px;
  margin-bottom: 16px;
}
.empty-state h3 {
  font-size: 17px;
  color: var(--dark);
  margin-bottom: 8px;
  font-family: 'Lora', serif;
}
.empty-state p {
  font-size: 14px;
  line-height: 1.5;
  max-width: 260px;
  margin: 0 auto;
}
.empty-state .btn { margin-top: 20px; }

/* ---- Modals ---- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(45,42,38,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.modal-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.modal-card h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.modal-card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ---- Section Titles ---- */
.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.section-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
  font-family: 'Inter', sans-serif;
}
.error-msg {
  color: #C06060;
  font-size: 13px;
  margin-top: 8px;
  font-family: 'Inter', sans-serif;
}
.success-msg {
  color: #4A7C59;
  font-size: 13px;
  margin-top: 8px;
  font-family: 'Inter', sans-serif;
}

/* ---- Children Cards ---- */
.child-card {
  background: var(--input-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.child-card-name { font-size: 16px; font-weight: 700; }
.child-card-count { font-size: 12px; color: var(--muted); margin-top: 2px; font-family: 'Inter', sans-serif; }
.child-card-medical {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  font-family: 'Inter', sans-serif;
}
.child-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ---- Goals ---- */
.goal-card {
  background: var(--input-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.goal-card.goal-completed {
  opacity: 0.6;
}
.goal-check {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 0;
  margin-top: 2px;
  flex-shrink: 0;
  min-width: 28px;
  min-height: 28px;
}
.goal-title {
  font-size: 15px;
  font-weight: 700;
  font-family: 'Lora', serif;
  color: var(--dark);
}
.goal-completed .goal-title {
  text-decoration: line-through;
}
.goal-desc {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  font-family: 'Inter', sans-serif;
}
.goal-date {
  font-size: 11px;
  color: var(--primary);
  margin-top: 4px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

/* ---- Install Banner ---- */
.install-banner {
  background: linear-gradient(135deg, #3D352C, #2D2A26);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.install-banner p { color: #C8B8A2; font-size: 13px; line-height: 1.6; flex: 1; font-family: 'Inter', sans-serif; }
.install-banner strong { color: #F5E6C8; display: block; margin-bottom: 4px; font-size: 14px; }

.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

/* ---- Toggle Switch ---- */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 28px;
  transition: 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ---- Day Picker ---- */
.day-picker {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.day-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.day-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ---- Spreadsheet View ---- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.spreadsheet {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
}
.spreadsheet th {
  background: var(--dark);
  color: #F5E6C8;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.spreadsheet td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  color: var(--text);
}
.spreadsheet tr:last-child td { border-bottom: none; }
.spreadsheet tr:nth-child(even) td { background: var(--input-bg); }

/* ---- Chart Bars ---- */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding-top: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chart-bars::-webkit-scrollbar { display: none; }
.chart-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 36px;
}
.chart-bar {
  width: 100%;
  max-width: 32px;
  min-height: 4px;
  background: linear-gradient(180deg, var(--primary), #E8A090);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s;
}
.chart-bar-label {
  font-size: 10px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.chart-bar-value {
  font-size: 11px;
  font-weight: 700;
  color: var(--dark);
  font-family: 'Inter', sans-serif;
}

/* ---- Horizontal Bars ---- */
.hbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.hbar-label {
  font-size: 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hbar-track {
  flex: 1;
  height: 16px;
  background: var(--input-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.hbar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #E8A090);
  border-radius: 8px;
  min-width: 4px;
  transition: width 0.3s;
}
.hbar-fill-blue {
  background: linear-gradient(90deg, var(--blue), #9BC4DE);
}
.hbar-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
  font-family: 'Inter', sans-serif;
  min-width: 36px;
  text-align: right;
}

/* ---- Type Stats ---- */
.type-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.type-stat {
  position: relative;
  background: var(--input-bg);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.type-stat-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  opacity: 0.12;
  border-radius: var(--radius-sm);
  transition: width 0.3s;
}
.type-stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  font-family: 'Inter', sans-serif;
  position: relative;
}
.type-stat-value {
  float: right;
  font-size: 12px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  position: relative;
}

/* ============================================
   Auth Screen
   ============================================ */
#view-auth {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}
.auth-hero {
  background: linear-gradient(160deg, #2D2A26 0%, #3D352C 100%);
  padding: 48px 24px 36px;
  text-align: center;
}
.auth-hero .logo { font-size: 48px; margin-bottom: 12px; }
.auth-hero h1 {
  color: #F5E6C8;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.auth-hero p {
  color: var(--light-muted);
  font-size: 14px;
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
}

.auth-container {
  max-width: 400px;
  margin: -20px auto 0;
  padding: 0 20px 40px;
  position: relative;
}
.auth-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  padding: 3px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.25s ease;
  border-radius: var(--radius-pill);
  min-height: 40px;
}
.auth-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(212,129,107,0.3);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: var(--light-muted);
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.google-btn {
  width: 100%;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  background: var(--card);
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
  min-height: 48px;
}
.google-btn:hover { border-color: var(--muted); box-shadow: var(--shadow-sm); }
.google-btn:active { transform: scale(0.97); }

.auth-card .btn { width: 100%; }
.auth-card label { text-align: left; }
.auth-card input[type=text],
.auth-card input[type=email],
.auth-card input[type=password] { text-align: left; }

/* ---- Migration Banner ---- */
.migrate-banner {
  background: #F0F7F0;
  border: 1.5px solid #C8E0C8;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.migrate-banner p {
  font-size: 14px;
  color: #3D6B3D;
  line-height: 1.5;
  margin-bottom: 12px;
  font-family: 'Inter', sans-serif;
}
.migrate-banner .btn-row { justify-content: flex-start; }

/* ---- Profile Button ---- */
.profile-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, transform 0.1s;
  flex-shrink: 0;
}
.profile-btn:hover { border-color: var(--primary); }
.profile-btn:active { transform: scale(0.93); }

/* ---- Account View ---- */
.account-header-card {
  text-align: center;
  padding: 32px 24px 28px;
}
.account-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #E8A090);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(212,129,107,0.25);
}
.account-header-card h2 {
  font-size: 20px;
  margin-bottom: 4px;
}
.account-email {
  font-size: 13px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
}

/* ---- Duration Row ---- */
.duration-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.duration-row input { margin-bottom: 0; }
.duration-label {
  font-size: 14px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

/* ---- Category Cards ---- */
.category-card {
  background: var(--input-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.category-card-info { flex: 1; min-width: 0; }
.category-card-name {
  font-size: 15px;
  font-weight: 700;
  font-family: 'Lora', serif;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.category-card-detail {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.category-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ---- Utility ---- */
.hidden { display: none !important; }

/* ---- Report Stats ---- */
.report-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.report-stat {
  flex: 1;
  text-align: center;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
}
.report-stat-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  font-family: 'Lora', serif;
}
.report-stat-label {
  font-size: 11px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  margin-top: 2px;
}

/* ---- Print Styles ---- */
.print-only { display: none; }

@media print {
  body { background: #fff !important; padding: 0 !important; }
  #app-shell, #view-auth, .edit-cat-modal, .edit-child-modal { display: none !important; }
  .print-only {
    display: block !important;
    padding: 20px;
    font-family: 'Inter', -apple-system, sans-serif;
    color: #2D2A26;
  }
  .print-only h1 {
    font-size: 20px;
    margin-bottom: 6px;
    font-family: 'Lora', Georgia, serif;
  }
  .print-only .print-meta {
    font-size: 11px;
    color: #8C8378;
    margin-bottom: 4px;
    font-family: 'Inter', sans-serif;
  }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9px;
    margin-top: 16px;
    font-family: 'Inter', sans-serif;
  }
  .print-table th {
    background: #2D2A26;
    color: #F5E6C8;
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }
  .print-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #EDE7DF;
    vertical-align: top;
    word-wrap: break-word;
    max-width: 150px;
  }
  .print-table tr:nth-child(even) td { background: #FDFBF8; }
}

/* ---- Responsive ---- */
@media (max-width: 380px) {
  .auth-container { padding: 0 12px 32px; }
  .auth-card { padding: 24px 18px; }
  main { padding: 16px 12px; }
  .card { padding: 16px; }
  .hbar-label { min-width: 70px; font-size: 11px; }
}
