/* Activity grid */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 4px 0 8px;
}
.activity-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 8px;
  min-height: 80px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.activity-btn:active { background: #f0f4ff; }
.activity-btn-icon { font-size: 24px; line-height: 1; }
.activity-btn-label { font-size: 11px; font-weight: 500; color: var(--text); text-align: center; }

/* Bottom sheet */
.sheet-container { position: fixed; inset: 0; z-index: 300; }
.bottom-sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease-out;
}
@keyframes slideUp { from { transform: translateY(100%) } to { transform: translateY(0) } }
.bottom-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
}
.sheet-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  min-height: 44px;
  min-width: 44px;
  -webkit-tap-highlight-color: transparent;
}
.sheet-close-btn.left-hand { order: -1; }
.bottom-sheet-body { overflow-y: auto; padding: 16px; flex: 1; -webkit-overflow-scrolling: touch; }
.bottom-sheet-footer {
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
}
.btn-save { width: 100%; padding: 14px; font-size: 15px; font-weight: 600; }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 5px; }
.form-input, .form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--primary); }
textarea.form-input { resize: vertical; }

/* History */
.history-view { padding-bottom: 16px; }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.history-title { font-size: 18px; font-weight: 700; }
.sync-btn { background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px 8px; color: var(--text-muted); min-height: 44px; }
.sync-btn.spinning { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; position: relative; }
.history-item.pending-sync { border-left: 3px solid var(--warning); }
.history-item-type { font-size: 14px; font-weight: 600; }
.history-item-time { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.history-item-notes { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-style: italic; }
.sync-dot { position: absolute; top: 10px; right: 12px; color: var(--warning); font-size: 10px; }

/* Log view */
.log-view { padding-bottom: 8px; }
.log-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.log-title { font-size: 18px; font-weight: 700; }
.active-baby-name { font-size: 14px; color: var(--text-muted); }
.baby-switcher { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px; background: var(--surface); }

/* Settings */
.settings-view { padding-bottom: 16px; }
.settings-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.settings-section { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.settings-section-title { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.hand-toggle { display: flex; gap: 8px; }
.hand-btn { flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); font-size: 14px; cursor: pointer; min-height: 44px; }
.hand-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.sync-status-row { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; -webkit-tap-highlight-color: transparent; min-height: 44px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.btn-sm { padding: 7px 12px; font-size: 13px; min-height: 36px; }

/* Page headers */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.page-title { font-size: 18px; font-weight: 700; }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* Charts */
.chart-section { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.chart-title { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 10px; }
.chart-container { position: relative; }
.tab-group { display: flex; gap: 8px; margin-bottom: 12px; }
.tab-btn { padding: 7px 14px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg); font-size: 13px; cursor: pointer; min-height: 36px; }
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
