/* ═══════════════════════════════════════════════════════════════
   Petco360 — Shared Design System v3
   Micro-details applied:
   1. text-wrap: balance
   2. Concentric border radii (outer 12px / inner 8px / gap 4px)
   3. Animated icon transitions (opacity + scale 0.2s ease)
   4. Font smoothing (antialiased)
   5. Tabular numerals
   6. Interruptible animations (CSS transitions only for hover)
   7. Staggered enter animations
   8. Subtle exit animations
   9. Optical alignment (1-2px manual adjustments)
   10. Box-shadow instead of borders
   11. Image border overlay (outline)
═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --navy: #141D57;
  --navy-mid: #1a2570;
  --navy-light: rgba(20,29,87,0.08);
  --lime: #C6D22D;
  --lime-mid: rgba(198,210,45,0.15);
  --lime-dark: #a8b425;
  --white: #ffffff;
  --bg: #F4F5FA;
  --surface: #ffffff;
  --border-subtle: rgba(0,0,0,0.06);
  --text-primary: #1a1a2e;
  --text-secondary: #5a5f7a;
  --text-tertiary: #9095B0;
  --radius-outer: 12px;
  --radius-inner: 8px;
  --radius-pill: 999px;
  --shadow-card: 0px 0px 0px 1px rgba(0,0,0,0.06), 0px 1px 2px -1px rgba(0,0,0,0.06), 0px 2px 4px 0px rgba(0,0,0,0.04);
  --shadow-elevated: 0px 0px 0px 1px rgba(0,0,0,0.06), 0px 4px 12px -2px rgba(0,0,0,0.08), 0px 8px 24px 0px rgba(0,0,0,0.06);
  --shadow-modal: 0px 0px 0px 1px rgba(0,0,0,0.06), 0px 8px 32px -4px rgba(0,0,0,0.14), 0px 24px 56px 0px rgba(0,0,0,0.10);
  --transition-fast: 0.15s ease;
  --transition-std: 0.2s ease;
}

/* ── #4 FONT SMOOTHING ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

/* ── #1 TEXT-WRAP: BALANCE ── */
h1, h2, h3, h4,
.card-title, .page-title, .stat-label, .section-heading {
  text-wrap: balance;
}

/* ── #5 TABULAR NUMERALS ── */
.stat-value, .kpi-num, td.num, .badge-num,
.table td:where([class*="num"]), .tabular,
.count, .money, .percent, .volume {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ── TYPOGRAPHY ── */
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
h2 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 0.9rem; font-weight: 600; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

/* ── #10 BOX-SHADOW CARDS (replacing flat borders) ── */
.card {
  background: var(--surface);
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-inner {
  background: var(--bg);
  border-radius: var(--radius-inner);
  /* concentric: outer 12px, inner 8px, 4px gap = correct proportion */
  padding: 4px;
}
.card-elevated {
  box-shadow: var(--shadow-elevated);
}

/* ── CARD STAGGER ANIMATIONS ── */
/* #7 Staggered enter */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stagger > * {
  animation: fadeSlideIn 0.4s ease forwards;
  opacity: 0;
}
.stagger > *:nth-child(1)  { animation-delay: 0ms; }
.stagger > *:nth-child(2)  { animation-delay: 60ms; }
.stagger > *:nth-child(3)  { animation-delay: 120ms; }
.stagger > *:nth-child(4)  { animation-delay: 180ms; }
.stagger > *:nth-child(5)  { animation-delay: 240ms; }
.stagger > *:nth-child(6)  { animation-delay: 300ms; }
.stagger > *:nth-child(7)  { animation-delay: 360ms; }
.stagger > *:nth-child(8)  { animation-delay: 420ms; }
.stagger > *:nth-child(9)  { animation-delay: 480ms; }
.stagger > *:nth-child(10) { animation-delay: 540ms; }

/* List stagger */
.stagger-list > * {
  animation: fadeSlideIn 0.35s ease forwards;
  opacity: 0;
}
.stagger-list > *:nth-child(1)  { animation-delay: 0ms; }
.stagger-list > *:nth-child(2)  { animation-delay: 40ms; }
.stagger-list > *:nth-child(3)  { animation-delay: 80ms; }
.stagger-list > *:nth-child(4)  { animation-delay: 120ms; }
.stagger-list > *:nth-child(5)  { animation-delay: 160ms; }
.stagger-list > *:nth-child(6)  { animation-delay: 200ms; }
.stagger-list > *:nth-child(7)  { animation-delay: 240ms; }
.stagger-list > *:nth-child(8)  { animation-delay: 280ms; }
.stagger-list > *:nth-child(9)  { animation-delay: 320ms; }
.stagger-list > *:nth-child(10) { animation-delay: 360ms; }

/* ── #8 MODAL EXIT ANIMATION ── */
@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modalFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-12px); }
}
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity var(--transition-std);
}
.modal-overlay.visible { opacity: 1; }
.modal-box {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-modal);
  animation: modalFadeIn 0.25s ease forwards;
  max-width: 560px;
  width: calc(100% - 32px);
}
.modal-overlay.closing .modal-box {
  animation: modalFadeOut 0.2s ease forwards;
}

/* ── HUB LAYOUT ── */
.hub-shell { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: 220px;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--lime);
  color: var(--navy);
  font-weight: 800;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  /* #11 image border overlay */
  outline: 1px solid rgba(0,0,0,0.1);
  outline-offset: -1px;
}
.logo-text { color: white; font-size: 13px; font-weight: 700; line-height: 1.2; }
.logo-sub  { color: rgba(255,255,255,0.45); font-size: 11px; }

.nav-section {
  padding: 16px 0 4px;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
  padding: 0 16px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  /* #6 Interruptible — transition not keyframe */
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  border-left: 3px solid transparent;
  text-decoration: none;
  /* #9 Optical alignment — slight padding compensation */
  padding-left: 13px;
}
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: white;
  border-left-color: rgba(198,210,45,0.4);
}
.nav-item.active {
  background: rgba(198,210,45,0.12);
  color: white;
  border-left-color: var(--lime);
  font-weight: 600;
}
.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  /* #9 Optical: slight upward nudge for visual center */
  position: relative; top: -1px;
}
.nav-icon img {
  /* #3 Animated icon transitions */
  transition: transform var(--transition-std), opacity var(--transition-std);
  filter: brightness(0) invert(0.65);
}
.nav-item:hover .nav-icon img,
.nav-item.active .nav-icon img {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}
.sidebar-footer {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(198,210,45,0.2);
  color: var(--lime);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  /* #11 */
  outline: 1px solid rgba(0,0,0,0.1);
  outline-offset: -1px;
}
.sidebar-name { color: white; font-size: 12px; font-weight: 500; }
.sidebar-role { color: rgba(255,255,255,0.4); font-size: 11px; }

/* ── MAIN CONTENT AREA ── */
.main-content {
  margin-left: 220px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── TOP BAR ── */
.topbar {
  background: white;
  box-shadow: var(--shadow-card);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 16px; font-weight: 600; color: var(--navy); }
.topbar-sub   { font-size: 11px; color: var(--text-secondary); }
.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-inner);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
  /* #6 Interruptible */
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--navy);
  color: white;
  box-shadow: var(--shadow-card);
}
.btn-primary:hover { background: var(--navy-mid); box-shadow: var(--shadow-elevated); }
.btn-lime {
  background: var(--lime);
  color: var(--navy);
  font-weight: 700;
  box-shadow: var(--shadow-card);
}
.btn-lime:hover { background: var(--lime-dark); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  box-shadow: var(--shadow-card);
}
.btn-ghost:hover { background: var(--bg); color: var(--text-primary); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon {
  width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-inner);
}
.btn-icon img {
  /* #3 Animated icon transitions */
  transition: transform var(--transition-std), opacity var(--transition-std);
}
.btn-icon:hover img { transform: scale(1.12); opacity: 0.85; }

/* ── PAGE BODY ── */
.page-body { padding: 24px; flex: 1; }

/* ── KPI GRID ── */
.kpi-grid { display: grid; gap: 16px; }
.kpi-grid-4 { grid-template-columns: repeat(4, 1fr); }
.kpi-grid-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid-2 { grid-template-columns: repeat(2, 1fr); }

.kpi-card {
  background: white;
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-card);
  padding: 20px;
  /* #6 Interruptible hover */
  transition: box-shadow var(--transition-std), transform var(--transition-std);
}
.kpi-card:hover { box-shadow: var(--shadow-elevated); transform: translateY(-2px); }
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-wrap: balance;
}
.kpi-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.kpi-trend {
  font-size: 12px;
  color: var(--text-secondary);
}
.kpi-trend.up   { color: #16a34a; }
.kpi-trend.warn { color: #d97706; }
.kpi-trend.down { color: #dc2626; }

/* ── #2 CONCENTRIC RADIUS — nested badges inside cards ── */
.kpi-badge-wrap {
  background: var(--bg);
  border-radius: var(--radius-inner); /* 8px inside 12px outer with padding */
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── DATA TABLE ── */
.data-table-wrap {
  background: white;
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.table-toolbar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.table-toolbar-left { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search-input {
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-inner);
  padding: 6px 10px 6px 32px;
  font-size: 13px;
  font-family: inherit;
  width: 220px;
  outline: none;
  background: white;
  transition: box-shadow var(--transition-fast);
  color: var(--text-primary);
}
.search-input:focus { box-shadow: 0 0 0 2px rgba(20,29,87,0.2), var(--shadow-card); }
.search-wrap { position: relative; }
.search-wrap::before {
  content: '';
  position: absolute;
  left: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  background: url('https://cdn.hugeicons.com/icons/search-01-stroke-rounded.svg') no-repeat center / contain;
  opacity: 0.35;
}
.filter-select {
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-inner);
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  background: white;
  outline: none;
  cursor: pointer;
  color: var(--text-primary);
  transition: box-shadow var(--transition-fast);
}
.filter-select:focus { box-shadow: 0 0 0 2px rgba(20,29,87,0.2); }

/* Table itself */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
  background: #FAFAFA;
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  white-space: nowrap;
}
.data-table thead th .sort-icon { opacity: 0.35; font-size: 10px; margin-left: 4px; }
.data-table tbody tr {
  /* #6 Interruptible */
  transition: background var(--transition-fast);
  border-bottom: 1px solid rgba(0,0,0,0.03);
}
/* Alternating rows */
.data-table tbody tr:nth-child(even) { background: #FAFAFA; }
.data-table tbody tr:hover { background: var(--navy-light); cursor: pointer; }
.data-table tbody td {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-primary);
}
.data-table tbody td.tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.td-link {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}
.td-link:hover { text-decoration: underline; }
.table-action-link {
  font-size: 12px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  transition: opacity var(--transition-fast);
}
.table-action-link:hover { opacity: 0.7; }

/* Pager */
.table-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid rgba(0,0,0,0.04);
  background: #FAFAFA;
}
.pager-info { font-size: 12px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pager-btns { display: flex; gap: 4px; }
.pager-btn {
  width: 30px; height: 30px;
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: 6px;
  background: white;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition-fast), color var(--transition-fast);
  display: flex; align-items: center; justify-content: center;
}
.pager-btn:hover { background: var(--navy-light); }
.pager-btn.active { background: var(--navy); color: white; }

/* ── STATUS BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-red    { background: #fee2e2; color: #b91c1c; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-purple { background: #f3e8ff; color: #7e22ce; }
.badge-gray   { background: #f1f5f9; color: #475569; }
.badge-lime   { background: rgba(198,210,45,0.2); color: #3a4a00; }
.badge-navy   { background: var(--navy); color: white; }

/* ── ACTIVITY FEED ── */
.activity-list { padding: 12px 16px; display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  align-items: flex-start;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  /* #9 Optical — top align with text */
  margin-top: 1px;
}
.activity-icon img {
  /* #3 Animated icon */
  transition: transform var(--transition-std), opacity var(--transition-std);
}
.activity-item:hover .activity-icon img { transform: scale(1.1); }
.activity-body { flex: 1; min-width: 0; }
.activity-title { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.activity-meta  { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

/* ── PROGRESS BARS ── */
.progress-track {
  height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}
.progress-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.progress-label { width: 130px; font-size: 12px; color: var(--text-secondary); flex-shrink: 0; }
.progress-track-wrap { flex: 1; }
.progress-pct { width: 36px; text-align: right; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── SECTION CARD ── */
.section-card {
  background: white;
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  overflow: hidden;
}
.section-card-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.section-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  text-wrap: balance;
}
.section-card-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}
.section-card-body { padding: 16px; }

/* ── TWO COLUMN GRID ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* ── FORMS ── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}
.form-label .req { color: #dc2626; margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-inner);
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: white;
  outline: none;
  transition: box-shadow var(--transition-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  box-shadow: 0 0 0 2px rgba(20,29,87,0.25), var(--shadow-card);
}
.form-input::placeholder { color: var(--text-tertiary); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── TOPBAR NAV TABS (for portals) ── */
.portal-header {
  background: var(--navy);
  padding: 0;
}
.portal-topbar {
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.portal-logo { display: flex; align-items: center; gap: 10px; }
.portal-logo-text { color: white; font-weight: 700; font-size: 14px; }
.portal-logo-sub  { color: rgba(255,255,255,0.5); font-size: 11px; }
.portal-nav {
  display: flex;
  gap: 0;
  padding: 0 24px;
  background: rgba(0,0,0,0.2);
}
.portal-nav-item {
  padding: 10px 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.portal-nav-item:hover { color: white; border-bottom-color: rgba(198,210,45,0.4); }
.portal-nav-item.active { color: white; border-bottom-color: var(--lime); font-weight: 600; }

/* ── PHONE FRAME (M&E App) ── */
.phone-frame-outer {
  background: #e0e2eb;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
}
.phone-frame {
  width: 375px;
  min-height: 812px;
  background: white;
  border-radius: 44px;
  box-shadow: 0 0 0 8px #1a1a1a, 0 32px 80px rgba(0,0,0,0.35);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone-notch {
  height: 44px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone-notch::after {
  content: '';
  width: 120px; height: 22px;
  background: #1a1a1a;
  border-radius: 0 0 20px 20px;
}
.phone-content { flex: 1; overflow-y: auto; }
.phone-home-bar {
  height: 34px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone-home-bar::after {
  content: '';
  width: 120px; height: 4px;
  background: #1a1a1a;
  border-radius: 999px;
  opacity: 0.3;
}

/* M&E App header */
.me-header {
  background: var(--navy);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.me-header-title { color: white; font-size: 16px; font-weight: 700; }
.me-header-sub   { color: rgba(255,255,255,0.5); font-size: 11px; }
.me-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--lime);
  color: var(--navy);
  font-weight: 800;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  /* #11 */
  outline: 1px solid rgba(0,0,0,0.1);
  outline-offset: -1px;
}

/* M&E Bottom Nav */
.me-bottom-nav {
  background: var(--navy);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.me-nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 8px;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  gap: 4px;
  text-decoration: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.me-nav-tab:hover { color: rgba(255,255,255,0.85); }
.me-nav-tab.active {
  color: var(--lime);
  background: rgba(255,255,255,0.06);
}
.me-nav-tab img {
  /* #3 */
  transition: transform var(--transition-std), filter var(--transition-std);
  filter: brightness(0) invert(0.55);
}
.me-nav-tab.active img { filter: brightness(0) saturate(100%) invert(83%) sepia(35%) saturate(623%) hue-rotate(28deg) brightness(101%) contrast(87%); transform: scale(1.1); }
.me-nav-tab:hover img  { filter: brightness(0) invert(0.9); }

/* M&E content sections */
.me-section { background: var(--bg); }
.me-card {
  background: white;
  border-radius: var(--radius-outer);
  box-shadow: var(--shadow-card);
  margin: 12px;
  overflow: hidden;
  /* #6 interruptible */
  transition: box-shadow var(--transition-std), transform var(--transition-std);
}
.me-card:hover { box-shadow: var(--shadow-elevated); transform: translateY(-2px); }

/* M&E list rows */
.me-list-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  gap: 12px;
  transition: background var(--transition-fast);
  cursor: pointer;
}
.me-list-row:last-child { border-bottom: none; }
.me-list-row:hover { background: var(--navy-light); }
.me-list-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.me-list-icon img {
  /* #3 */
  transition: transform var(--transition-std);
}
.me-list-row:hover .me-list-icon img { transform: scale(1.08); }

/* ── STEP INDICATOR (Funding form) ── */
.step-indicator {
  display: flex;
  align-items: center;
  padding: 24px;
  background: white;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  border-radius: var(--radius-outer);
  gap: 0;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 14px);
  right: calc(-50% + 14px);
  height: 2px;
  background: rgba(0,0,0,0.1);
  z-index: 0;
}
.step.done:not(:last-child)::after { background: var(--lime); }
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  color: var(--text-secondary);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  transition: background var(--transition-std), color var(--transition-std);
  /* #5 tabular */
  font-variant-numeric: tabular-nums;
}
.step.active .step-dot { background: var(--navy); color: white; }
.step.done .step-dot   { background: var(--lime); color: var(--navy); }
.step-label { font-size: 10px; color: var(--text-secondary); margin-top: 6px; text-align: center; text-wrap: balance; }
.step.active .step-label { color: var(--navy); font-weight: 600; }
.step.done .step-label   { color: var(--lime-dark); }

/* ── PENDING ALERTS ── */
.alert {
  border-radius: var(--radius-inner);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.alert-yellow { background: #fef9c3; border-left: 3px solid #eab308; }
.alert-red    { background: #fee2e2; border-left: 3px solid #dc2626; }
.alert-blue   { background: #dbeafe; border-left: 3px solid #2563eb; }
.alert-green  { background: #dcfce7; border-left: 3px solid #16a34a; }
.alert-title  { font-size: 12px; font-weight: 700; }
.alert-body   { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ── UPLOAD ZONE ── */
.upload-zone {
  border-radius: var(--radius-inner);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.08);
  padding: 32px 24px;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition: box-shadow var(--transition-fast), background var(--transition-fast);
}
.upload-zone:hover {
  box-shadow: inset 0 0 0 2px var(--lime);
  background: rgba(198,210,45,0.05);
}
.upload-icon {
  /* #3 */
  transition: transform var(--transition-std);
}
.upload-zone:hover .upload-icon { transform: scale(1.1); }

/* ── AVATAR / IMAGE OVERLAYS ── */
.avatar {
  border-radius: 50%;
  /* #11 Image border overlay */
  outline: 1px solid rgba(0,0,0,0.1);
  outline-offset: -1px;
  object-fit: cover;
}
.entity-logo {
  border-radius: var(--radius-inner);
  outline: 1px solid rgba(0,0,0,0.1);
  outline-offset: -1px;
}

/* ── UTILS ── */
.mt-0  { margin-top: 0; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-1 { flex: 1; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.color-navy { color: var(--navy); }
.color-lime { color: var(--lime-dark); }
.color-green { color: #15803d; }
.color-red   { color: #b91c1c; }
.color-warn  { color: #b45309; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.rounded-full { border-radius: 50%; }
.rounded-sm { border-radius: var(--radius-inner); }
.rounded { border-radius: var(--radius-outer); }
.hidden { display: none; }

/* Fee table in declaration */
.fee-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.04); font-size: 13px; }
.fee-total { display: flex; justify-content: space-between; padding: 12px 0 4px; font-size: 15px; font-weight: 700; color: var(--navy); }

/* Platform badge */
.platform-pill {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pill-model  { background: #e8eaf6; color: #3949ab; }
.pill-canvas { background: #e3f2fd; color: #1565c0; }
.pill-pages  { background: #e8f5e9; color: #2e7d32; }

/* Scrollbar style */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }
