/* FlexPetCare HMS - Master Design System */
:root {
    --primary: #0f766e;
    --primary-dark: #115e59;
    --accent: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #cbd5e1;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Source Sans 3', sans-serif; }
body { background: var(--bg-body); color: var(--text-main); }

header { background: var(--primary-dark); color: white; padding: 1rem; display: flex; justify-content: space-between; align-items: center; }
.brand { font-family: 'DM Serif Display', serif; font-size: 1.5rem; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: white; border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 10px 0; z-index: 1000; }
.nav-btn { background: none; border: none; font-weight: 600; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; }
.nav-btn.active { color: var(--primary); }

.page { display: none; padding: 1.25rem; max-width: 1200px; margin: 0 auto 80px auto; }
.page.active { display: block; }

.card { background: white; border-radius: 12px; padding: 1.25rem; border: 1px solid var(--border); margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

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

.btn { background: var(--primary); color: white; border: none; padding: 0.65rem 1.2rem; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn-accent { background: var(--accent); color: black; }
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }

.form-group { margin-bottom: 0.85rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--text-muted); }
.form-control { width: 100%; padding: 0.65rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem; }

.badge { padding: 0.2rem 0.5rem; border-radius: 12px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.badge-calm { background: #d1fae5; color: #065f46; }
.badge-aggressive { background: #fee2e2; color: #991b1b; }
.badge-anxious { background: #fef3c7; color: #92400e; }

.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.pos-item { border: 1px solid var(--border); padding: 1rem; border-radius: 8px; text-align: center; cursor: pointer; background: white; }
.pos-item:hover { border-color: var(--primary); }

#offline-banner { background: var(--accent); color: black; text-align: center; padding: 6px; font-weight: bold; font-size: 0.85rem; display: none; }

/* Thermal Printing View */
@media print {
    body * { visibility: hidden; }
    #receipt-print, #receipt-print * { visibility: visible; }
    #receipt-print { position: absolute; left: 0; top: 0; width: 80mm; font-family: 'JetBrains Mono', monospace; }
}