/* Pet Health Journal — Rose Pink theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #F43F5E;
  --primary-dim: rgba(244,63,94,0.12);
  --primary-glow: rgba(244,63,94,0.3);
  --secondary: #FB7185;
  --accent: #06B6D4;
  --accent-dim: rgba(6,182,212,0.12);
  --bg: #1A0A10;
  --bg-card: #261218;
  --bg-input: #1A080D;
  --bg-hover: #3A1822;
  --border: rgba(244,63,94,0.15);
  --border-focus: rgba(244,63,94,0.5);
  --text: #F5E6EA;
  --text-dim: #B8929A;
  --text-muted: #6B4450;
  --green: #34D399;
  --green-dim: rgba(52,211,153,0.12);
  --yellow: #FACC15;
  --yellow-dim: rgba(250,204,21,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }
body::before { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at top, rgba(244,63,94,0.04), transparent 50%); pointer-events: none; }

.header { border-bottom: 1px solid var(--border); background: rgba(38,18,24,0.9); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 800px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.2rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); border-radius: var(--radius-sm); }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-family: var(--font); font-size: 0.8rem; font-weight: 500; border: none; border-radius: 6px; cursor: pointer; transition: all var(--transition); }
.btn-primary { background: linear-gradient(135deg, var(--primary), #DC2650); color: white; font-weight: 600; }
.btn-primary:hover { box-shadow: 0 4px 16px var(--primary-glow); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--primary); background: var(--primary-dim); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }

.main { max-width: 800px; margin: 0 auto; padding: 20px; }

.pet-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.pet-tab { padding: 6px 14px; font-family: var(--font); font-size: 0.78rem; font-weight: 500; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; color: var(--text-dim); cursor: pointer; transition: all var(--transition); display: flex; align-items: center; gap: 6px; }
.pet-tab:hover { border-color: var(--primary); color: var(--text); }
.pet-tab.active { background: var(--primary-dim); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.pet-tab .tab-remove { font-size: 0.65rem; opacity: 0.5; }
.pet-tab .tab-remove:hover { opacity: 1; }

.pet-detail { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-height: 200px; }
.empty-state { text-align: center; color: var(--text-muted); padding: 40px; font-size: 0.88rem; }

.pet-info { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pet-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-dim); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.pet-name-title { font-size: 1rem; font-weight: 700; }
.pet-meta { font-size: 0.72rem; color: var(--text-muted); }

.section-actions { display: flex; gap: 6px; margin-bottom: 12px; }

.entry-card { background: var(--bg); border: 1px solid rgba(244,63,94,0.08); border-radius: var(--radius-sm); padding: 10px; margin-bottom: 6px; display: flex; gap: 10px; align-items: flex-start; }
.entry-type-badge { padding: 2px 6px; font-size: 0.68rem; border-radius: 4px; font-weight: 600; white-space: nowrap; }
.entry-type-badge.vet { background: var(--accent-dim); color: var(--accent); }
.entry-type-badge.med { background: var(--primary-dim); color: var(--secondary); }
.entry-type-badge.vaccine { background: var(--green-dim); color: var(--green); }
.entry-type-badge.weight { background: var(--yellow-dim); color: var(--yellow); }
.entry-type-badge.diet { background: rgba(139,92,246,0.12); color: #A78BFA; }
.entry-content { flex: 1; }
.entry-date { font-size: 0.68rem; color: var(--text-muted); }
.entry-details { font-size: 0.78rem; color: var(--text-dim); }
.entry-cost { font-size: 0.72rem; color: var(--secondary); font-family: var(--mono); }
.entry-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.65rem; padding: 2px; }
.entry-remove:hover { color: var(--primary); }

/* Dialog */
.dialog { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text); padding: 0; max-width: 400px; width: 90%; }
.dialog::backdrop { background: rgba(0,0,0,0.6); }
.dialog-inner { padding: 20px; }
.dialog-title { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--secondary); }
.field { margin-bottom: 8px; }
.field label { display: block; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 3px; }
.field input, .field textarea, .field select { width: 100%; padding: 6px 10px; font-family: var(--font); font-size: 0.82rem; color: var(--text); background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px; outline: none; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--border-focus); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 14px; }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast { padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 4px 24px rgba(0,0,0,0.5); font-size: 0.82rem; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
