/* ============================================================
   IGBG Core Stylesheet - Mobile First Health & Calorie Tracker
   ============================================================ */

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

html {
  font-size: 16px;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-primary);
  line-height: 1.5;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-app);
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* Ambient glow in background for desktop */
body::before {
  content: '';
  position: fixed;
  top: -10vw;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  transition: background var(--trans-normal);
}

/* Main App Shell Container (Mobile-first viewport) */
.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  background: var(--bg-app);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.4);
  padding-bottom: 90px; /* Space for bottom dock */
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--nav-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1.5px solid var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.brand-info h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-info p {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.date-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-pill svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.btn-icon {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ------------------------------------------------------------
   Main Content Area & Views
   ------------------------------------------------------------ */
.app-content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.view-section {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-section.active {
  display: flex;
}

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

/* ------------------------------------------------------------
   Cards & Modules
   ------------------------------------------------------------ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--card-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  position: relative;
  overflow: hidden;
  transition: border-color var(--trans-fast), transform var(--trans-fast);
}

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

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.card-title svg {
  color: var(--primary);
  width: 18px;
  height: 18px;
}

.badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-glow);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-muted {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ------------------------------------------------------------
   Weight Hero Metric Card
   ------------------------------------------------------------ */
.weight-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.weight-hero-main {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.weight-val-container {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.weight-big-number {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-main);
  line-height: 1;
}

.weight-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.weight-delta-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.metric-tile {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-tile-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.metric-tile-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.metric-tile-sub {
  font-size: 0.7rem;
  color: var(--text-faint);
}

/* Progress toward Goal Bar */
.progress-container {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Chart Canvas / SVG Container */
.chart-container {
  width: 100%;
  height: 140px;
  position: relative;
  margin-top: 10px;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ------------------------------------------------------------
   Calories Hero & Visual Ring
   ------------------------------------------------------------ */
.calorie-hero-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}

.calorie-ring-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.calorie-ring-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.ring-bg {
  stroke: var(--bg-surface-elevated);
}

.ring-progress {
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1), stroke var(--trans-normal);
  filter: drop-shadow(0 0 6px var(--primary-glow));
}

.calorie-ring-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.calorie-ring-center .num {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
}

.calorie-ring-center .label {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 2px;
}

.calorie-hero-stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calorie-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.calorie-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.calorie-stat-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Macros Breakdown */
.macros-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.macro-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
}

.macro-box .macro-name {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.macro-box.protein .macro-name { color: #3b82f6; }
.macro-box.carbs .macro-name { color: #f59e0b; }
.macro-box.fat .macro-name { color: #f43f5e; }

.macro-box .macro-val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
}

/* Quick Calorie Presets */
.quick-add-group {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.quick-add-group::-webkit-scrollbar { display: none; }

.btn-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Meal Category Accordions / Cards */
.meal-group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meal-item-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.meal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meal-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.meal-calories-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
}

.food-entries-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.food-entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.food-entry-name {
  color: var(--text-main);
  font-weight: 500;
}

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

.btn-delete-entry {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color var(--trans-fast);
}

.btn-delete-entry:hover {
  color: var(--danger);
}

/* ------------------------------------------------------------
   Unified Dashboard Segmented View Control
   ------------------------------------------------------------ */
.dashboard-segmented-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-surface-elevated);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  gap: 4px;
}

.segment-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--trans-fast);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.segment-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.dashboard-tab-content {
  display: none;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.2s ease-in-out;
}

.dashboard-tab-content.active {
  display: flex;
}

/* Prediction Card Styling */
.prediction-highlight-card {
  background: linear-gradient(135deg, var(--bg-surface-elevated) 0%, rgba(var(--primary-rgb), 0.1) 100%);
  border: 1.5px solid var(--primary-glow);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.prediction-highlight-card::after {
  content: '★';
  position: absolute;
  top: -10px;
  right: 10px;
  font-size: 5rem;
  color: var(--primary-glow);
  pointer-events: none;
  opacity: 0.15;
}

.prediction-val-hero {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0;
}

.forecast-weight {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.forecast-trend-tag {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.science-explainer {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  background: var(--bg-app);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 10px;
  border-left: 3px solid var(--primary);
}

.igbg-coach-bubble {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.coach-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--primary);
}

.coach-text {
  font-size: 0.78rem;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.35;
}

.coach-text strong {
  color: var(--primary);
  display: block;
  font-size: 0.82rem;
  margin-bottom: 2px;
}

/* ------------------------------------------------------------
   Settings & Customization
   ------------------------------------------------------------ */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child {
  border-bottom: none;
}

.settings-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.settings-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Palette Swatches */
.palette-swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.swatch-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: transform var(--trans-fast), border-color var(--trans-fast);
}

.swatch-btn:hover {
  transform: scale(1.1);
}

.swatch-btn.active {
  border-color: var(--text-main);
  box-shadow: 0 0 12px var(--primary-glow);
}

.swatch-btn.active::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* Mode toggles (Dark, Light, OLED) */
.mode-toggle-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.mode-btn.active {
  background: var(--primary);
  color: #ffffff;
}

/* Form Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--trans-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--trans-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

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

.btn-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-block {
  width: 100%;
}

/* Floating Action Button (FAB) */
.fab-container {
  position: fixed;
  bottom: 84px;
  right: calc(50% - 220px);
  z-index: 35;
}

@media (max-width: 480px) {
  .fab-container {
    right: 18px;
  }
}

.fab-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  border: none;
  box-shadow: 0 8px 24px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--trans-bounce), background var(--trans-fast);
}

.fab-btn:hover {
  transform: scale(1.08) translateY(-2px);
}

.fab-btn svg {
  width: 26px;
  height: 26px;
}

/* ------------------------------------------------------------
   Bottom Navigation Bar (Dock)
   ------------------------------------------------------------ */
.bottom-dock {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 68px;
  background: var(--nav-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 45;
  padding: 0 8px;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  flex: 1;
  height: 100%;
  transition: all var(--trans-fast);
  position: relative;
}

.dock-item svg {
  width: 22px;
  height: 22px;
  transition: transform var(--trans-fast), color var(--trans-fast);
}

.dock-item span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dock-item.active {
  color: var(--primary);
}

.dock-item.active svg {
  transform: translateY(-2px);
  filter: drop-shadow(0 2px 8px var(--primary-glow));
}

.dock-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  width: 32px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* ------------------------------------------------------------
   Modals
   ------------------------------------------------------------ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 480px) {
  .modal-overlay {
    align-items: center;
  }
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 22px 20px 30px;
  box-shadow: var(--shadow-lg);
  max-height: 88vh;
  overflow-y: auto;
  animation: sheetSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 480px) {
  .modal-sheet {
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-highlight);
  }
}

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

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

.modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ------------------------------------------------------------
   Toast Notifications
   ------------------------------------------------------------ */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-msg {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-highlight);
  box-shadow: var(--shadow-md);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s ease-out;
  pointer-events: auto;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-msg.success { border-left: 4px solid var(--success); }
.toast-msg.error { border-left: 4px solid var(--danger); }
.toast-msg.info { border-left: 4px solid var(--info); }
