/* ============================================ Baby Tracker — Warm Minimal (Parent Care) Palette: bg #FAF7F2 surface #FFFFFF ink #2C2A28 muted #8A8580 accent #D4896A terracotta milk #6B9AC4 food #D4A574 poo #7D9B76 meds #9B8EC4 danger #C45C5C success #5B9A6F warning #C4923A ============================================ */ :root { /* Surfaces */ --bg: #FAF7F2; --bg-soft: #F3EDE4; --surface: #FFFFFF; --ink: #2C2A28; --ink-secondary: #5C574F; --muted: #8A8580; --line: #E8E2D9; --line-soft: #F0EBE3; /* Brand */ --accent: #D4896A; --accent-soft: #F6E4DB; --accent-ink: #8B4F35; --accent-border: #E8C9B8; --on-accent: #FFFFFF; /* Type colors */ --milk: #6B9AC4; --milk-soft: #E8F1F8; --milk-ink: #3D6488; --milk-border: #C5D9EB; --food: #D4A574; --food-soft: #F7EDE0; --food-ink: #8A6235; --food-border: #E8D4B8; --poo: #7D9B76; --poo-soft: #E8F0E6; --poo-ink: #4A6545; --poo-border: #C5D8C0; --meds: #9B8EC4; --meds-soft: #EEEAF6; --meds-ink: #5E5288; --meds-border: #D5CEE8; /* Status */ --danger: #C45C5C; --danger-soft: #F8E8E8; --danger-border: #E8C0C0; --success: #5B9A6F; --success-soft: #E5F2EA; --success-border: #BFD9C8; --success-ink: #2F5A3E; --warning: #C4923A; --warning-soft: #F8F0E0; --warning-border: #E8D4A8; --placeholder: #B5AFA6; --icon-subtle: #C4BDB4; /* Overlays / focus */ --overlay: rgba(44, 42, 40, 0.72); --focus-ring: color-mix(in srgb, var(--accent) 22%, transparent); --tint-shadow: color-mix(in srgb, var(--accent) 28%, transparent); /* Depth */ --shadow-sm: 0 1px 2px rgba(44, 42, 40, 0.04), 0 1px 3px rgba(44, 42, 40, 0.06); --shadow-md: 0 4px 16px rgba(44, 42, 40, 0.08); --shadow-lg: 0 12px 32px rgba(44, 42, 40, 0.12); /* Radius */ --radius-sm: 12px; --radius-md: 16px; --radius-lg: 20px; --radius-full: 999px; /* Spacing rhythm */ --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --touch-min: 44px; /* Motion */ --ease: 0.2s ease; --ease-out: 0.22s cubic-bezier(0.22, 1, 0.36, 1); /* Safe areas */ --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px); } /* ============================================ Dark Mode — [data-theme="dark"] ============================================ */ [data-theme="dark"] { --bg: #1A1816; --bg-soft: #24211E; --surface: #2C2926; --ink: #EBE7E0; --ink-secondary: #B0AAA2; --muted: #8A857F; --line: #3D3832; --line-soft: #332E2A; --accent: #E0A086; --accent-soft: #3A2620; --accent-ink: #E8C9B8; --accent-border: #5A3A28; --on-accent: #1A1816; --milk: #8AB8D8; --milk-soft: #1E2933; --milk-ink: #B8D4E8; --milk-border: #2D3F50; --food: #E0C4A0; --food-soft: #2D241E; --food-ink: #E0C8A0; --food-border: #4A3828; --poo: #9ABD94; --poo-soft: #1E2820; --poo-ink: #B8D0B4; --poo-border: #2D3F2A; --meds: #B8AED8; --meds-soft: #242130; --meds-ink: #C8C0E0; --meds-border: #3D3860; --danger: #D88080; --danger-soft: #362020; --danger-border: #583030; --success: #6DAD82; --success-soft: #1E2822; --success-border: #2A3F30; --success-ink: #A8D0B8; --warning: #D8A850; --warning-soft: #2E2620; --warning-border: #4A3A28; --placeholder: #706B64; --icon-subtle: #5A5550; --overlay: rgba(0, 0, 0, 0.8); --focus-ring: color-mix(in srgb, var(--accent) 28%, transparent); --tint-shadow: color-mix(in srgb, var(--accent) 32%, transparent); --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.18); --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.22); --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.32); } /* ============================================ Type tint tokens (shared by buttons / stats / logs) ============================================ */ .milk, .type-button.milk, .today-stat.milk, .stats-card.milk, .submit-button.milk, .log-item.milk, .amount-chip, .report-summary-card.milk { --tint: var(--milk); --tint-soft: var(--milk-soft); --tint-ink: var(--milk-ink); --tint-border: var(--milk-border); } .food, .type-button.food, .today-stat.food, .stats-card.food, .submit-button.food, .log-item.food, .report-summary-card.food { --tint: var(--food); --tint-soft: var(--food-soft); --tint-ink: var(--food-ink); --tint-border: var(--food-border); } .poo, .type-button.poo, .today-stat.poo, .stats-card.poo, .submit-button.poo, .log-item.poo, .report-summary-card.poo { --tint: var(--poo); --tint-soft: var(--poo-soft); --tint-ink: var(--poo-ink); --tint-border: var(--poo-border); } .meds, .type-button.meds, .today-stat.vitd, .stats-card.vitd, .submit-button.meds, .log-item.meds, .report-summary-card.meds { --tint: var(--meds); --tint-soft: var(--meds-soft); --tint-ink: var(--meds-ink); --tint-border: var(--meds-border); } /* --- Base --- */ [x-cloak] { display: none !important; } *, *::before, *::after { box-sizing: border-box; } html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; } /* Keyboard accessibility */ :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; } :focus:not(:focus-visible) { outline: none; } .tab-button:focus-visible, .type-button:focus-visible, .chip:focus-visible, .amount-chip:focus-visible, .submit-button:focus-visible, .log-item:focus-visible, .date-nav-btn:focus-visible, .log-action-btn:focus-visible, .export-btn:focus-visible, .theme-toggle:focus-visible, .report-range-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: inherit; } input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); } html, body { overflow-x: hidden; max-width: 100%; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; background: var(--bg); color: var(--ink); margin: 0; min-height: 100vh; min-height: 100dvh; padding-bottom: max(var(--space-4), var(--sab)); overscroll-behavior-y: contain; } /* --- Boot splash --- */ .boot-splash { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg); color: var(--muted); padding: var(--sat) var(--sar) var(--sab) var(--sal); } .boot-splash .boot-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 30px; margin-bottom: 14px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-soft) 70%, transparent); animation: boot-pulse 1.6s var(--ease-out) infinite; } .boot-splash .boot-brand { font-size: 16px; font-weight: 750; color: var(--ink); letter-spacing: 0.02em; margin-bottom: 6px; } .boot-splash .boot-text { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); } @keyframes boot-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.04); opacity: 0.92; } } /* --- Main Container --- */ .main-container { max-width: 430px; width: 100%; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--bg); overflow-x: hidden; padding-left: var(--sal); padding-right: var(--sar); } .file-input { display: none; } .lightbox { background: var(--overlay); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: max(16px, var(--sat)) max(16px, var(--sar)) max(16px, var(--sab)) max(16px, var(--sal)); } .lightbox-close { position: absolute; top: -12px; right: -12px; width: var(--touch-min); height: var(--touch-min); background: var(--surface); color: var(--ink-secondary); border: 1px solid var(--line); border-radius: 50%; box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; cursor: pointer; transition: background var(--ease), color var(--ease); } .lightbox-close:hover { background: var(--bg-soft); color: var(--ink); } .date-selector::-webkit-calendar-picker-indicator { background: transparent; bottom: 0; color: transparent; cursor: pointer; height: auto; left: 0; position: absolute; right: 0; top: 0; width: auto; } /* ============================================ Header ============================================ */ .modern-header { background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); padding: calc(0.85rem + var(--sat)) 1rem 1rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; } .header-title { font-weight: 700; font-size: 1.05rem; color: var(--ink); display: flex; align-items: center; gap: 0.75rem; margin: 0; } .header-title .subtitle { font-size: 0.72rem; font-weight: 500; color: var(--muted); margin-top: 2px; } /* --- Tab Bar --- */ .tab-bar { background: var(--bg-soft); border-radius: var(--radius-md); padding: 4px; margin-top: 0.85rem; border: 1px solid var(--line-soft); gap: 2px; } .tab-button { flex: 1; min-height: 36px; padding: 9px 4px; border-radius: 12px; font-weight: 600; font-size: 12.5px; color: var(--muted); background: transparent; border: none; cursor: pointer; transition: background var(--ease), color var(--ease), box-shadow var(--ease); -webkit-user-select: none; user-select: none; } .tab-button:hover { color: var(--ink-secondary); } .tab-button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 700; } .tab-button:active { transform: scale(0.98); } /* ============================================ Cards ============================================ */ .modern-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--line); } /* ============================================ Type Selection Buttons ============================================ */ .type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } @media (max-width: 360px) { .type-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } } .type-button { min-height: 56px; padding: 12px 6px; border-radius: var(--radius-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 650; font-size: 12.5px; background: var(--surface); color: var(--muted); border: 1.5px solid var(--line); cursor: pointer; transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease), transform var(--ease); -webkit-user-select: none; user-select: none; } .type-button span:first-child { font-size: 22px; line-height: 1; } .type-button:active { transform: scale(0.97); } .type-button.active { background: var(--tint-soft); border-color: var(--tint); color: var(--tint-ink); box-shadow: 0 0 0 1px var(--tint); } /* Sub-option chips (milk type etc.) */ .chip-row { display: flex; gap: 8px; } .chip { flex: 1; min-height: 42px; padding: 10px 8px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink-secondary); font-size: 13px; font-weight: 600; cursor: pointer; transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease); } .chip.active { background: var(--milk-soft); border-color: var(--milk); color: var(--milk-ink); box-shadow: 0 0 0 1px var(--milk); } .chip:active { transform: scale(0.97); } /* ============================================ Form Elements ============================================ */ .label-title { display: block; font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 8px; margin-left: 2px; letter-spacing: 0.02em; } .input-field { width: 100%; padding: 13px 14px; background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; outline: none; transition: border-color var(--ease), box-shadow var(--ease), background var(--ease); font-size: 16px; color: var(--ink); } .datetime-split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 8px; } .datetime-split-field { min-width: 0; } .datetime-split .input-field { min-width: 0; width: 100%; max-width: 100%; } input[type="date"], input[type="time"] { min-width: 0; max-width: 100%; -webkit-appearance: none; appearance: none; } input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator { opacity: 0.7; cursor: pointer; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } @media (max-width: 360px) { .datetime-split { grid-template-columns: 1fr; } } .input-field::placeholder { color: var(--placeholder); } .input-field:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); } .modern-checkbox { display: flex; align-items: center; padding: 13px 14px; background: var(--warning-soft); border-radius: 14px; border: 1.5px solid var(--warning-border); } .modern-checkbox input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--warning); border-radius: 6px; } /* Meds callout */ .meds-callout { padding: 22px 16px; background: var(--meds-soft); border-radius: var(--radius-md); text-align: center; border: 1.5px solid var(--meds-border); } .meds-callout .icon { font-size: 36px; margin-bottom: 8px; } .meds-callout .title { font-weight: 700; color: var(--meds-ink); font-size: 16px; } .meds-callout .hint { font-size: 13px; color: var(--muted); margin-top: 6px; } /* ============================================ Submit Button ============================================ */ .submit-button { width: 100%; min-height: 50px; padding: 15px; border-radius: 14px; border: none; color: var(--on-accent); font-weight: 700; font-size: 16px; cursor: pointer; transition: opacity var(--ease), transform var(--ease), filter var(--ease), box-shadow var(--ease); display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; background: var(--accent); box-shadow: 0 2px 10px var(--tint-shadow); } .submit-button:hover:not(:disabled) { filter: brightness(0.97); } .submit-button:active:not(:disabled) { transform: scale(0.985); } .submit-button:disabled { cursor: not-allowed; opacity: 0.65; box-shadow: none; } .submit-button.milk, .submit-button.food, .submit-button.poo, .submit-button.meds { background: var(--tint); box-shadow: 0 2px 10px color-mix(in srgb, var(--tint) 30%, transparent); } /* ============================================ Date Navigation ============================================ */ .date-nav-card { background: var(--surface); border-radius: var(--radius-lg); padding: 12px 12px 11px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); } .date-nav-btn { width: var(--touch-min); height: var(--touch-min); display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-secondary); cursor: pointer; font-size: 16px; font-weight: 700; transition: background var(--ease), transform var(--ease); flex-shrink: 0; } .date-nav-btn:hover { background: var(--bg-soft); } .date-nav-btn:active { transform: scale(0.96); } .age-pill { font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); padding: 6px 12px; border-radius: var(--radius-full); line-height: 1.2; } .export-btn { font-size: 12px; font-weight: 650; background: var(--surface); color: var(--ink-secondary); border: 1px solid var(--line); padding: 6px 12px; min-height: 32px; border-radius: var(--radius-full); cursor: pointer; transition: background var(--ease), border-color var(--ease); } .export-btn:hover { background: var(--bg); border-color: var(--muted); } .export-btn:disabled { opacity: 0.55; cursor: not-allowed; } .link-today { color: var(--accent); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; background: none; border: none; cursor: pointer; font-size: inherit; padding: 0; } /* ============================================ Today Summary (record page) ============================================ */ .today-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow-sm); } .today-summary-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; } .today-summary-title { font-size: 13px; font-weight: 750; color: var(--ink); letter-spacing: 0.01em; } .today-summary-feed { font-size: 12px; color: var(--ink-secondary); } .today-summary-feed strong { color: var(--accent-ink); font-weight: 700; } .today-summary-feed.muted { color: var(--muted); } .today-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } /* Shared metric cell (today + history) */ .today-stat, .stats-card { text-align: center; padding: 10px 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; } .today-stat.milk, .today-stat.food, .today-stat.poo, .today-stat.vitd, .stats-card.milk, .stats-card.food, .stats-card.poo, .stats-card.vitd { background: var(--tint-soft); border-color: var(--tint-border); } .today-stat.vitd.empty, .stats-card.vitd.empty { background: var(--bg); border-color: var(--line); --tint-ink: var(--placeholder); } .today-stat-val, .stats-value { font-size: 17px; font-weight: 750; color: var(--ink); line-height: 1.15; letter-spacing: -0.01em; } .today-stat-val small { font-size: 11px; font-weight: 550; margin-left: 1px; color: var(--muted); } .today-stat.milk .today-stat-val, .today-stat.food .today-stat-val, .today-stat.poo .today-stat-val, .today-stat.vitd .today-stat-val, .stats-card.milk .stats-value, .stats-card.food .stats-value, .stats-card.poo .stats-value, .stats-card.vitd .stats-value { color: var(--tint-ink); } .today-stat.vitd.empty .today-stat-val, .stats-card.vitd.empty .stats-value { color: var(--placeholder); } .today-stat-lbl, .stats-label { font-size: 10px; font-weight: 650; color: var(--muted); margin-top: 3px; letter-spacing: 0.03em; } .today-stat.milk .today-stat-lbl, .today-stat.food .today-stat-lbl, .today-stat.poo .today-stat-lbl, .today-stat.vitd .today-stat-lbl, .stats-card.milk .stats-label, .stats-card.food .stats-label, .stats-card.poo .stats-label, .stats-card.vitd .stats-label { color: color-mix(in srgb, var(--tint-ink) 78%, var(--muted)); } .today-stat.vitd.empty .today-stat-lbl, .stats-card.vitd.empty .stats-label { color: var(--muted); } /* Edit banner */ .edit-banner { background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: var(--radius-md); padding: 10px 14px; margin-bottom: 12px; } .edit-cancel-btn { font-size: 13px; font-weight: 650; color: var(--accent-ink); background: var(--surface); border: 1px solid var(--accent-border); border-radius: var(--radius-full); padding: 6px 14px; min-height: 32px; cursor: pointer; transition: background var(--ease); } .edit-cancel-btn:hover { background: var(--bg); } /* Milk amount presets */ .amount-presets { display: flex; gap: 6px; flex-wrap: wrap; } .amount-chip { flex: 1; min-width: 52px; min-height: 40px; padding: 9px 6px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink-secondary); font-size: 14px; font-weight: 700; cursor: pointer; transition: background var(--ease), border-color var(--ease), color var(--ease), transform var(--ease); } .amount-chip.active { background: var(--tint-soft, var(--milk-soft)); border-color: var(--tint, var(--milk)); color: var(--tint-ink, var(--milk-ink)); box-shadow: 0 0 0 1px var(--tint, var(--milk)); } .amount-chip:active { transform: scale(0.97); } /* ============================================ Stats Cards (history) ============================================ */ .stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .stats-grid-4 { grid-template-columns: repeat(4, 1fr); gap: 6px; } .stats-grid-4 .stats-value { font-size: 15px; } .stats-card { padding: 12px 6px; border-radius: var(--radius-md); min-height: 64px; } /* ============================================ Log Items ============================================ */ .log-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 16px; padding-right: 40px; border-radius: var(--radius-md); border: 1px solid var(--line-soft); border-left: 3px solid var(--line); cursor: pointer; transition: background var(--ease), box-shadow var(--ease), border-color var(--ease); background: var(--surface); box-shadow: var(--shadow-sm); position: relative; } .log-item:hover { box-shadow: var(--shadow-md); } .log-item.milk, .log-item.food, .log-item.poo, .log-item.meds { border-left-color: var(--tint); background: linear-gradient( 90deg, color-mix(in srgb, var(--tint-soft) 55%, var(--surface)) 0%, var(--surface) 28% ); } .log-item.expanded { background: var(--bg); border-color: var(--line); } .badge { padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 650; } .badge.new { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-border); } .badge.reaction { background: var(--food-soft); color: var(--food-ink); border: 1px solid var(--food-border); } .log-edit { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: none; background: transparent; color: var(--icon-subtle); cursor: pointer; font-size: 14px; line-height: 1; transition: color var(--ease), background var(--ease); } .log-edit:hover { color: var(--accent-ink); background: var(--accent-soft); } .log-actions { display: flex; gap: 8px; flex-wrap: wrap; } .log-action-btn { font-size: 12px; font-weight: 650; padding: 7px 14px; min-height: 32px; border-radius: var(--radius-full); border: 1px solid var(--line); background: var(--bg); color: var(--ink-secondary); cursor: pointer; transition: background var(--ease), transform var(--ease); } .log-action-btn:active { transform: scale(0.97); } .log-action-btn.edit { border-color: var(--accent-border); background: var(--accent-soft); color: var(--accent-ink); } .log-action-btn.danger { border-color: var(--danger-border); background: var(--danger-soft); color: var(--danger); } .time-since { margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); padding: 2px 7px; border-radius: 8px; white-space: nowrap; } .photo-link { margin-top: 4px; color: var(--poo-ink); font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; background: var(--poo-soft); padding: 4px 8px; border-radius: 8px; font-size: 13px; } /* ============================================ Image Upload ============================================ */ .image-upload-area { display: flex; align-items: center; gap: 12px; margin-top: 8px; } .upload-box { width: 76px; height: 76px; border-radius: 14px; background: var(--bg); border: 1.5px dashed var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; transition: background var(--ease), border-color var(--ease); overflow: hidden; flex-shrink: 0; } .upload-box:hover { background: var(--accent-soft); border-color: var(--accent); } .upload-box img { width: 100%; height: 100%; object-fit: cover; } /* ============================================ VitD Reminder ============================================ */ .vitamind-reminder { background: var(--warning-soft); border: 1px solid var(--warning-border); border-left: 3px solid var(--warning); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 14px; } /* ============================================ Growth / Chart Page ============================================ */ .assessment-box { background: var(--success-soft); border: 1px solid var(--success-border); color: var(--success-ink); padding: 18px; border-radius: var(--radius-lg); margin-bottom: 14px; font-size: 14px; line-height: 1.65; } .assessment-box h3 { margin: 0 0 10px 0; font-size: 15px; color: var(--success-ink); display: flex; align-items: center; font-weight: 750; } .assessment-box h3::before { content: '✦'; margin-right: 8px; font-size: 14px; color: var(--success); } .assessment-loading { color: var(--muted); font-style: italic; } .assessment-body { word-break: break-word; } .chart-container { background: var(--surface); border-radius: var(--radius-lg); padding: 14px 10px 12px; margin-bottom: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); } .chart-box { width: 100%; height: 280px; } /* ============================================ Avatar Ring ============================================ */ .avatar-ring { position: relative; display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); transition: transform var(--ease); } .avatar-ring:active { transform: scale(0.96); } .avatar-ring img { display: block; border-radius: 50%; } /* ============================================ Spinner ============================================ */ .spinner { width: 20px; height: 20px; border: 2.5px solid color-mix(in srgb, var(--on-accent) 35%, transparent); border-top-color: var(--on-accent); border-radius: 50%; animation: spin 0.7s linear infinite; flex-shrink: 0; } .spinner-dark { border-color: color-mix(in srgb, var(--accent) 22%, transparent); border-top-color: var(--accent); } @keyframes spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } } /* ============================================ Empty State ============================================ */ .empty-state { text-align: center; padding: 48px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); } .empty-state-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; font-size: 28px; opacity: 1; } .empty-state-text { font-size: 14px; font-weight: 600; color: var(--ink-secondary); } .empty-state-hint { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 6px; } .empty-action { margin-top: 16px; font-size: 13px; font-weight: 650; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: var(--radius-full); cursor: pointer; padding: 8px 16px; min-height: 36px; text-decoration: none; transition: background var(--ease), transform var(--ease); } .empty-action:hover { background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent-border)); } .empty-action:active { transform: scale(0.97); } /* ============================================ Toast ============================================ */ .toast-kid { font-size: 14px; border-radius: 14px; box-shadow: var(--shadow-md); font-weight: 600; padding: 12px 16px !important; backdrop-filter: blur(8px); } .toast-success { background: var(--success) !important; } .toast-error { background: var(--danger) !important; } .toast-warning { background: var(--warning) !important; } .toast-info { background: var(--milk) !important; } /* Utility helpers used from HTML */ .text-accent { color: var(--accent); } .text-ink { color: var(--ink); } .text-muted { color: var(--muted); } .text-milk { color: var(--milk-ink); } .bg-surface { background: var(--surface); } /* ============================================ Theme Toggle ============================================ */ .theme-toggle { width: var(--touch-min); height: var(--touch-min); display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-soft); border: 1px solid var(--line); cursor: pointer; font-size: 18px; line-height: 1; transition: background var(--ease), border-color var(--ease), transform var(--ease); flex-shrink: 0; } .theme-toggle:hover { background: var(--accent-soft); border-color: var(--accent-border); } .theme-toggle:active { transform: scale(0.95); } /* ============================================ Report Tab ============================================ */ .report-range-bar { display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-md); } .report-range-btn { flex: 1; min-height: 36px; padding: 9px 8px; border-radius: 12px; border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; cursor: pointer; transition: background var(--ease), color var(--ease), box-shadow var(--ease); } .report-range-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 700; } .report-range-btn:active { transform: scale(0.98); } .report-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; } .report-summary-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 12px; text-align: center; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; } .report-summary-card.milk, .report-summary-card.food, .report-summary-card.poo, .report-summary-card.meds { background: linear-gradient( 160deg, var(--tint-soft) 0%, var(--surface) 70% ); border-color: var(--tint-border); } .report-summary-card .rsc-value { font-size: 22px; font-weight: 750; color: var(--ink); line-height: 1.2; letter-spacing: -0.02em; } .report-summary-card.milk .rsc-value, .report-summary-card.food .rsc-value, .report-summary-card.poo .rsc-value, .report-summary-card.meds .rsc-value { color: var(--tint-ink); } .report-summary-card .rsc-label { font-size: 11px; font-weight: 650; color: var(--muted); margin-top: 4px; letter-spacing: 0.02em; } .report-section-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; } .report-food-list { display: flex; flex-wrap: wrap; gap: 6px; } .report-food-tag { padding: 6px 11px; border-radius: 10px; background: var(--food-soft); color: var(--food-ink); border: 1px solid var(--food-border); font-size: 12px; font-weight: 600; } .report-poo-row { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; font-size: 13px; color: var(--ink-secondary); } .report-poo-count { font-size: 14px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-full); } .report-poo-count.normal { color: var(--poo-ink); background: var(--poo-soft); } .report-poo-count.abnormal { color: var(--danger); background: var(--danger-soft); } /* Content bottom breathing room */ .content-pad { padding-left: 1rem; padding-right: 1rem; padding-top: 1rem; padding-bottom: max(1.5rem, var(--sab)); }