/* TrackIt - Modern Glassmorphic Dark Design System */
:root {
  --bg-main: #07090e;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --bg-surface: #0f172a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.25);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Macro Palette */
  --cal-color: #38bdf8;
  --cal-glow: rgba(56, 189, 248, 0.35);
  
  --pro-color: #10b981;
  --pro-glow: rgba(16, 185, 129, 0.35);
  
  --carb-color: #f59e0b;
  --carb-glow: rgba(245, 158, 11, 0.35);
  
  --fat-color: #a855f7;
  --fat-glow: rgba(168, 85, 247, 0.35);

  --sodium-color: #f43f5e;
  --water-color: #06b6d4;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
  --safe-top: max(12px, env(safe-area-inset-top));
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  background-image: 
    radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(7, 9, 14, 0.85);
  border-bottom: 1px solid var(--border-subtle);
  padding: calc(var(--safe-top) + 6px) 16px 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 0 12px var(--cal-glow);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, var(--cal-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.date-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 3px 8px;
}

.date-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: var(--radius-full);
  transition: all 0.2s;
  display: flex;
  align-items: center;
}

.date-btn:active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.date-display {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0 4px;
  cursor: pointer;
}

/* App Main Container */
.main-content {
  padding: 16px 16px calc(var(--safe-bottom) + 84px) 16px;
  max-width: 680px;
  margin: 0 auto;
}

/* View Switcher */
.view-panel {
  display: none;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-panel.active {
  display: block;
}

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

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.glass-card.highlight {
  border-color: var(--border-glow);
}

/* Macro Rings & Summary Card */
.rings-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.macro-ring-svg {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke-width: 10;
}

.ring-fg {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.calorie-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.cal-number {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}

.cal-label {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 2px;
}

.ring-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Macro Breakdown Bars */
.macro-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.macro-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.macro-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
}

.macro-bar-track {
  height: 7px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.macro-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fill-pro { background: linear-gradient(90deg, #10b981, #34d399); box-shadow: 0 0 10px var(--pro-glow); }
.fill-carb { background: linear-gradient(90deg, #f59e0b, #fbbf24); box-shadow: 0 0 10px var(--carb-glow); }
.fill-fat { background: linear-gradient(90deg, #a855f7, #c084fc); box-shadow: 0 0 10px var(--fat-glow); }
.fill-cal { background: linear-gradient(90deg, #0284c7, #38bdf8); box-shadow: 0 0 10px var(--cal-glow); }

/* Quick Daily Banner (Biometrics & Scale sync info) */
.health-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.82rem;
}

.health-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.health-stat strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Hydration Bar */
.water-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 16px;
}

.water-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.water-actions {
  display: flex;
  gap: 6px;
}

.btn-water-quick {
  background: rgba(6, 182, 212, 0.18);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-water-quick:active {
  transform: scale(0.95);
  background: rgba(6, 182, 212, 0.3);
}

/* Meal Section Cards */
.meal-section {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.meal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.meal-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.meal-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: capitalize;
}

.meal-total-cals {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.meal-add-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--cal-color);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 5px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.meal-add-btn:active {
  transform: scale(0.96);
  background: rgba(56, 189, 248, 0.25);
}

.meal-items-list {
  padding: 4px 0;
}

.empty-meal-hint {
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
}

.meal-food-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.15s;
}

.meal-food-row:last-child {
  border-bottom: none;
}

.meal-food-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.food-info-col {
  flex: 1;
}

.food-row-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.food-source-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.15);
  color: var(--cal-color);
  font-weight: 700;
  text-transform: uppercase;
}

.food-row-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.food-macros-col {
  text-align: right;
  display: flex;
  align-items: center;
  gap: 12px;
}

.food-cals-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.food-macro-pills {
  display: flex;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.pill-p { color: var(--pro-color); }
.pill-c { color: var(--carb-color); }
.pill-f { color: var(--fat-color); }

.delete-meal-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.delete-meal-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* AI Camera & Vision Scanner View */
.scanner-card {
  text-align: center;
  padding: 24px 18px;
}

.camera-preview-box {
  width: 100%;
  height: 260px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px dashed rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.camera-preview-box:hover {
  border-color: var(--cal-color);
}

.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.cam-placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.cam-icon-big {
  width: 48px;
  height: 48px;
  color: var(--cal-color);
}

.scan-action-row {
  display: flex;
  gap: 10px;
}

.btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #07090e;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px var(--cal-glow);
  transition: all 0.2s;
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.12);
}

/* AI Scan Results Breakdown */
.ai-results-box {
  margin-top: 20px;
  text-align: left;
  display: none;
}

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

.ai-confidence-pill {
  background: rgba(16, 185, 129, 0.15);
  color: var(--pro-color);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.ai-items-review {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.ai-item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-item-left {
  flex: 1;
}

.ai-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ai-item-assumption {
  font-size: 0.72rem;
  color: var(--text-muted);
}

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

.portion-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-primary);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
}

.portion-grams-input {
  width: 54px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  font-size: 0.82rem;
  text-align: center;
  font-weight: 600;
}

/* Recipes & Coach View */
.recipes-context-banner {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 18px;
}

.recipe-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recipe-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s;
}

.recipe-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.recipe-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.recipe-meta-row {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.recipe-macros-pill-bar {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
}

.recipe-ingredients-list {
  padding-left: 18px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recipe-steps-list {
  padding-left: 18px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Adaptive Coach Check-In Card */
.coach-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(56, 189, 248, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 20px;
}

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

.coach-badge {
  background: rgba(16, 185, 129, 0.2);
  color: var(--pro-color);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

/* Analytics View */
.chart-container {
  width: 100%;
  margin: 16px 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  padding: 12px;
}

.stat-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.stat-box-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
}

.stat-box-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

/* Settings & Sync View */
.settings-group {
  margin-bottom: 24px;
}

.settings-group-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cal-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.form-row {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

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

.copy-box {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.copy-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 12px;
  font-family: monospace;
  font-size: 0.78rem;
  outline: none;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-primary);
  padding: 0 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(7, 9, 14, 0.88);
  border-top: 1px solid var(--border-subtle);
  padding: 6px 16px var(--safe-bottom) 16px;
  display: flex;
  justify-content: space-around;
  max-width: 680px;
  margin: 0 auto;
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: color 0.2s, transform 0.15s;
  font-family: inherit;
}

.nav-item.active {
  color: var(--cal-color);
}

.nav-item:active {
  transform: scale(0.92);
}

.nav-icon {
  width: 22px;
  height: 22px;
}

.nav-label {
  font-size: 0.68rem;
  font-weight: 600;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
  display: flex;
}

.modal-sheet {
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px 20px calc(var(--safe-bottom) + 20px) 20px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-drag-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  margin: 0 auto 16px auto;
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Search results list in food modal */
.food-search-results {
  max-height: 280px;
  overflow-y: auto;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.food-search-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s;
}

.food-search-item:hover, .food-search-item.selected {
  border-color: var(--cal-color);
  background: rgba(56, 189, 248, 0.08);
}

/* Loading spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--cal-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: calc(var(--safe-top) + 60px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* App PIN Lock Overlay */
.pin-lock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pin-lock-card {
  background: rgba(18, 24, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  padding: 36px 28px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.15);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pin-lock-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

.pin-lock-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.pin-lock-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 24px;
}

.pin-input-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.pin-input {
  font-family: inherit;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
  padding: 12px 20px;
  border-radius: 16px;
  background: rgba(10, 15, 26, 0.8);
  border: 1.5px solid rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
  width: 100%;
  max-width: 240px;
  outline: none;
  transition: all 0.2s ease;
}

.pin-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.pin-error-msg {
  color: var(--macro-fat);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 8px;
}

.pin-note {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

