/* Base Design System & CSS Variables */
:root {
  --primary-rose: #f43f5e;
  --primary-rose-light: #fff1f2;
  --primary-indigo: #6366f1;
  --primary-indigo-light: #eef2ff;
  --accent-sky: #0ea5e9;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  
  --bg-gradient-start: #f8fafc;
  --bg-gradient-end: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(244, 63, 94, 0.25);
  
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

[data-theme="dark"] {
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e293b;
  --card-bg: #1e293b;
  --card-border: #334155;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(244, 63, 94, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  margin: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

/* App Container (Mobile-first Frame) */
.app-container {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  background: var(--card-bg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

@media (min-width: 640px) {
  body {
    padding: 20px 0;
  }
  .app-container {
    min-height: calc(100vh - 40px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--card-border);
  }
}

/* Header Section */
.app-header {
  background: linear-gradient(135deg, #fff5f5 0%, #fff0f3 50%, #f0f5ff 100%);
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--card-border);
  position: relative;
}

[data-theme="dark"] .app-header {
  background: linear-gradient(135deg, #1e1b2e 0%, #2a1b28 50%, #172554 100%);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.header-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
  animation: pulse-heart 2s infinite ease-in-out;
}

@keyframes pulse-heart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.header-title {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(90deg, #e11d48, #9333ea);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.header-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle-btn, .btn-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.theme-toggle-btn:active, .btn-icon-circle:active {
  transform: scale(0.92);
}

/* Date Selector Bar */
.date-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.8);
  margin-bottom: 12px;
}

[data-theme="dark"] .date-bar {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.date-nav-btn {
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
}

.date-nav-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.date-display {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.today-tag {
  background: #f43f5e;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Next Medication Banner */
.next-dose-banner {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
  margin-bottom: 12px;
}

.next-dose-info {
  display: flex;
  flex-direction: column;
}

.next-dose-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
}

.next-dose-title {
  font-size: 15px;
  font-weight: 700;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.next-dose-timer {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Daily Progress Bar */
.progress-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.progress-text {
  color: var(--text-main);
}

.progress-count {
  color: var(--primary-rose);
  font-weight: 700;
}

.progress-track {
  height: 10px;
  background: var(--card-border);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f43f5e, #ec4899, #10b981);
  background-size: 200% 100%;
  border-radius: 5px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.tab-btn {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--primary-rose);
  border-bottom-color: var(--primary-rose);
  background: rgba(244, 63, 94, 0.04);
}

.tab-icon {
  font-size: 16px;
}

/* Content Area */
.content-area {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dynamic Action Bar */
.action-banner {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}

.btn-primary-action {
  flex: 1;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25);
  transition: all 0.2s ease;
}

.btn-primary-action:active {
  transform: scale(0.97);
}

.btn-secondary-action {
  padding: 10px 14px;
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-secondary-action:active {
  transform: scale(0.97);
}

/* Timeline Cards */
.timeline-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-card:hover {
  box-shadow: var(--shadow-md);
}

.timeline-card.is-next {
  border: 2px solid var(--primary-rose);
  box-shadow: var(--shadow-glow);
}

.timeline-card-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed var(--card-border);
  background: rgba(0,0,0,0.015);
}

.time-badge-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-clock-pill {
  background: var(--text-main);
  color: var(--card-bg);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.time-name-group {
  display: flex;
  flex-direction: column;
}

.time-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.slot-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon-small {
  background: var(--bg-gradient-start);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon-small:hover {
  background: var(--card-border);
  color: var(--text-main);
}

.btn-batch-check {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-batch-check:active {
  transform: scale(0.95);
}

.btn-batch-check.completed {
  background: #10b981;
  color: white;
  border-color: #10b981;
}

.timeline-card-body {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Med Item Checkbox Line */
.med-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-gradient-start);
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.med-item-row:hover {
  border-color: var(--card-border);
  transform: translateX(2px);
}

.med-item-row.checked {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

.med-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkbox-custom {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.med-item-row.checked .checkbox-custom {
  background: #10b981;
  border-color: #10b981;
}

.med-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.med-details {
  display: flex;
  flex-direction: column;
}

.med-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.med-item-row.checked .med-name {
  text-decoration: line-through;
  color: var(--text-muted);
}

.med-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-indigo);
}

.med-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.med-dose-pill {
  background: var(--primary-rose-light);
  color: var(--primary-rose);
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.med-item-row.checked .med-dose-pill {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.timeline-card-footer {
  padding: 8px 16px 12px;
  background: rgba(0,0,0,0.01);
  border-top: 1px solid var(--card-border);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Medication Catalog / Summary Tab */
.med-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.med-summary-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.med-summary-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.med-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.med-summary-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.med-summary-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: var(--shadow-sm);
}

.med-summary-title {
  font-size: 16px;
  font-weight: 700;
}

.med-summary-category {
  font-size: 11px;
  color: var(--text-muted);
}

.med-summary-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-gradient-start);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-rose);
}

.stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
}

.med-time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.time-chip {
  font-size: 11px;
  background: var(--card-border);
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* History Calendar View */
.calendar-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-weight: 700;
  font-size: 15px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}

.cal-day-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 0;
}

.cal-cell {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-gradient-start);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.cal-cell:hover {
  background: var(--card-border);
}

.cal-cell.today {
  border: 2px solid var(--primary-rose);
}

.cal-cell.full-completed {
  background: #10b981;
  color: white;
}

.cal-cell.partial-completed {
  background: #f59e0b;
  color: white;
}

.cal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  margin-top: 2px;
}

/* Tools & Export View */
.tools-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tools-title {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--bg-gradient-start);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.tool-btn:hover {
  background: var(--card-border);
  transform: translateY(-1px);
}

.tool-btn-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.tool-btn-text {
  display: flex;
  flex-direction: column;
}

.tool-btn-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
}

/* Warm Care Note Card */
.care-note-card {
  background: linear-gradient(135deg, #fef2f2, #fff7ed);
  border: 1px solid #fecdd3;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

[data-theme="dark"] .care-note-card {
  background: linear-gradient(135deg, #2a1b24, #271a17);
  border-color: #4c1d24;
}

.care-note-icon {
  font-size: 24px;
}

.care-note-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.care-note-title {
  font-size: 14px;
  font-weight: 700;
  color: #e11d48;
}

.care-note-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Modal Overlay & Custom Editor Panels */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--card-bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.form-input, .form-select {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--bg-gradient-start);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary-rose);
}

.time-slot-assign-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.time-slot-assign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-gradient-start);
  border: 1px solid var(--card-border);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-stepper {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-main);
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper-val {
  font-size: 14px;
  font-weight: 700;
  width: 20px;
  text-align: center;
}

.icon-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.icon-option {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  background: var(--bg-gradient-start);
}

.icon-option.selected {
  border-color: var(--primary-rose);
  background: rgba(244, 63, 94, 0.1);
}

.modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.btn-modal-submit {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  color: white;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.btn-modal-cancel {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

/* Toast Overlay */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.9);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
}

/* Print View Styles */
@media print {
  body {
    background: white !important;
    color: black !important;
    padding: 0;
  }
  .app-container {
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
  }
  .nav-tabs, .theme-toggle-btn, .next-dose-banner, .date-bar button, .tools-card button, .action-banner {
    display: none !important;
  }
  .tab-content {
    display: block !important;
  }
}
