/*
 * VHF Foundation — Design System
 * theme.css — Central source of truth for all colors, typography, and component tokens.
 *
 * USAGE
 *   All pages include this file BEFORE their own <style> block.
 *   The default :root defines the Dashboard (amber-brown) theme.
 *   Volunteer portal pages add class="vol-theme" to <html> to activate the green theme.
 *
 * TOKEN GROUPS
 *   Backgrounds    --bg-*
 *   Accent         --accent, --accent-hover, --accent-pale
 *   Text           --text-*
 *   Border/Shadow  --border, --shadow, --shadow-lg
 *   Status         --success-*, --warning-*, --error-*, --info-*, --purple-*
 *   Typography     --font-*, --text-[size]
 *   Spacing        --sp-[1-10]
 *   Radius         --radius[-sm|-lg|-xl|-full]
 *   Layout         --mobile-bar-h, --mobile-nav-h
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

/* ═══════════════════════════════════════════════════════════════════════════
   FOUNDATION — shared across both themes
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* ── Typography ── */
  --font-ui:       'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display:  'Playfair Display', Georgia, serif;
  --font-mono:     'DM Mono', 'Courier New', monospace;

  /* ── Type Scale ── */
  --text-2xs:  10px;
  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 15px;
  --text-lg:   18px;
  --text-xl:   22px;
  --text-2xl:  28px;
  --text-3xl:  36px;

  /* ── Spacing Scale ── */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* ── Border Radius ── */
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* ── Status / Semantic Colors (universal across both themes) ── */
  --success:    #2d6a4f;
  --success-bg: #d8f3dc;
  --warning:    #b87c2a;
  --warning-bg: #fef3c7;
  --error:      #9b2c2c;
  --error-bg:   #fee2e2;
  --info:       #1e40af;
  --info-bg:    #dbeafe;
  --purple:     #5b21b6;
  --purple-bg:  #ede9fe;

  /* ── Mobile Layout ── */
  --mobile-bar-h: 56px;
  --mobile-nav-h: 62px;

  /* ══════════════════════════════════════════════════════════════════════════
     DASHBOARD THEME — modern earth-tone (default)
     Applied to: dashboard.html, dashboard-mobile.html, workorder.html
     ══════════════════════════════════════════════════════════════════════════ */
  --bg-primary:         #f5f2ed;
  --bg-secondary:       #ece8e1;
  --bg-surface:         #ffffff;
  --bg-dark:            #5b4f42;
  --bg-dark-mid:        #6d5e50;
  --bg-dark-deep:       #463b31;

  --accent:             #b87c2a;
  --accent-hover:       #d4992f;
  --accent-pale:        #f0e0c8;

  --text-primary:       #3a3028;
  --text-secondary:     #7a6d60;
  --text-on-dark:       #ffffff;
  --text-on-dark-muted: rgba(255, 255, 255, 0.6);

  --border:     #ddd5ca;
  --shadow:     0 2px 12px rgba(58, 48, 40, 0.06);
  --shadow-md:  0 4px 20px rgba(58, 48, 40, 0.09);
  --shadow-lg:  0 8px 32px rgba(58, 48, 40, 0.12);
}

/* ══════════════════════════════════════════════════════════════════════════
   VOLUNTEER THEME — green/teal
   Applied by adding class="vol-theme" to <html>
   Used by: volunteer.html, volunteer-mobile.html
   ══════════════════════════════════════════════════════════════════════════ */
.vol-theme {
  --bg-primary:         #f8fafb;
  --bg-secondary:       #f0f4f2;
  --bg-surface:         #ffffff;
  --bg-dark:            #1b4332;
  --bg-dark-mid:        #2d6a4f;
  --bg-dark-deep:       #0f2419;

  --accent:             #2d6a4f;
  --accent-hover:       #40916c;
  --accent-pale:        #d8f3dc;

  --text-primary:       #1f3328;
  --text-secondary:     #4a6358;
  --text-on-dark:       #ffffff;
  --text-on-dark-muted: rgba(255, 255, 255, 0.65);

  --border:    #e0e8e4;
  --shadow:    0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.11);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.14);

  --error:    #c0392b;
  --error-bg: #fde8e6;
}

/* ══════════════════════════════════════════════════════════════════════════
   DARK MODE — standard Material-style dark (applies to any theme)
   Applied by adding class="dark-mode" to <html>
   ══════════════════════════════════════════════════════════════════════════ */
.dark-mode {
  --bg-primary:    #121212;
  --bg-secondary:  #1e1e1e;
  --bg-surface:    #2c2c2c;
  --bg-dark:       #0a0a0a;
  --bg-dark-mid:   #1a1a1a;
  --bg-dark-deep:  #050505;

  --accent:        #d4992f;
  --accent-hover:  #e8b046;
  --accent-pale:   #3d3020;

  --text-primary:    #e0e0e0;
  --text-secondary:  #a0a0a0;
  --text-on-dark:    #e0e0e0;
  --text-on-dark-muted: rgba(224,224,224,0.55);

  --border:    #333333;
  --shadow:    0 2px 12px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);

  --success-bg: #1a3d2a;
  --warning-bg: #3d3020;
  --error-bg:   #3d1a1a;
  --info-bg:    #1a2040;
  --purple-bg:  #2a1a40;
}

.vol-theme.dark-mode {
  --accent:        #40916c;
  --accent-hover:  #52b788;
  --accent-pale:   #1a3d2a;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESETS & BASE
   ═══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHARED COMPONENT LIBRARY
   These classes work with both themes automatically via CSS variables.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Buttons ── */
.t-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-family: var(--font-ui);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s, opacity .15s, transform .08s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}
.t-btn:active { transform: scale(.97); }

.t-btn-primary   { background: var(--bg-dark);      color: var(--text-on-dark); }
.t-btn-primary:hover { background: var(--bg-dark-mid); }

.t-btn-accent    { background: var(--accent);        color: var(--text-on-dark); }
.t-btn-accent:hover  { background: var(--accent-hover); }

.t-btn-secondary { background: var(--bg-secondary);  color: var(--text-primary); border: 1.5px solid var(--border); }
.t-btn-secondary:hover { background: var(--bg-surface); }

.t-btn-ghost     { background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border); }
.t-btn-ghost:hover { background: var(--bg-secondary); color: var(--text-primary); }

.t-btn-success   { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }
.t-btn-success:hover { filter: brightness(.95); }

.t-btn-danger    { background: var(--error-bg);   color: var(--error);   border: 1.5px solid #fca5a5; }
.t-btn-danger:hover  { filter: brightness(.95); }

.t-btn-sm  { padding: 6px 12px;  font-size: var(--text-xs); }
.t-btn-lg  { padding: 13px 24px; font-size: var(--text-base); }
.t-btn-xl  { padding: 15px 28px; font-size: var(--text-lg); }
.t-btn-full { width: 100%; justify-content: center; }

/* ── Status Badges ── */
.t-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .03em;
}
.t-badge-success { background: var(--success-bg); color: var(--success); }
.t-badge-warning { background: var(--warning-bg); color: var(--warning); }
.t-badge-error   { background: var(--error-bg);   color: var(--error); }
.t-badge-info    { background: var(--info-bg);    color: var(--info); }
.t-badge-purple  { background: var(--purple-bg);  color: var(--purple); }
.t-badge-neutral { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border); }
.t-badge-accent  { background: var(--accent-pale); color: var(--bg-dark); }

/* ── Form Elements ── */
.t-input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-family: var(--font-ui);
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: border-color .15s;
}
.t-input:focus { outline: none; border-color: var(--accent); }
.t-input::placeholder { color: var(--text-secondary); opacity: .7; }

.t-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.t-form-group { margin-bottom: 14px; }

/* ── Card ── */
.t-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.t-card-header {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-primary);
}
.t-card-body { padding: 18px; }

/* ── Toast notification ── */
.t-toast {
  position: fixed;
  bottom: calc(var(--mobile-nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  z-index: 9999;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .25s;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.t-toast.show  { transform: translateX(-50%) translateY(0); opacity: 1; }
.t-toast.error { background: var(--error); }
.t-toast.success { background: var(--success); }

/* ── Spinner ── */
.t-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: t-spin .7s linear infinite;
}
.t-spinner-sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes t-spin { to { transform: rotate(360deg); } }

.t-loading-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: var(--sp-10);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* ── Empty state ── */
.t-empty {
  text-align: center;
  padding: var(--sp-10) var(--sp-6);
  color: var(--text-secondary);
}
.t-empty-icon { font-size: 40px; opacity: .35; margin-bottom: var(--sp-3); }
.t-empty-title { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--sp-2); color: var(--text-primary); }
.t-empty-sub { font-size: var(--text-sm); }

/* ── Divider ── */
.t-divider { border: none; border-top: 1px solid var(--border); margin: var(--sp-4) 0; }

/* ── List Row (shared pattern) ── */
.t-list-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--sp-2);
  cursor: pointer;
  transition: background .12s, box-shadow .12s;
}
.t-list-row:hover,
.t-list-row:active { background: var(--bg-secondary); box-shadow: var(--shadow); }

.t-list-row-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.t-list-row-body { flex: 1; min-width: 0; }
.t-list-row-title { font-weight: 600; font-size: var(--text-sm); color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-list-row-sub   { font-size: var(--text-xs); color: var(--text-secondary); margin-top: 2px; line-height: 1.4; }
.t-list-row-right { text-align: right; flex-shrink: 0; }
.t-list-row-arrow { color: var(--text-secondary); font-size: 18px; flex-shrink: 0; }

/* ── Stat Card (mobile grid) ── */
.t-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  text-align: center;
  box-shadow: var(--shadow);
}
.t-stat-val {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}
.t-stat-lbl {
  font-size: var(--text-2xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: 4px;
  font-weight: 600;
}
.t-stat-sub {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}
.t-stat.accent { border-left: 3px solid var(--accent); }
.t-stat.success { border-left: 3px solid var(--success); }
.t-stat.error   { border-left: 3px solid var(--error); }

/* ── Stats grid ── */
.t-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

/* ── Search bar ── */
.t-search-wrap {
  position: relative;
  margin-bottom: var(--sp-3);
}
.t-search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}
.t-search {
  width: 100%;
  padding: 10px 13px 10px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-family: var(--font-ui);
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: border-color .15s;
}
.t-search:focus { outline: none; border-color: var(--accent); }

/* ── Section Header ── */
.t-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.t-section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--text-primary);
  line-height: 1.1;
}
.t-section-sub {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ── Capacity bar ── */
.t-cap-bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 6px 0;
}
.t-cap-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--success);
  transition: width .3s;
}
.t-cap-fill.warn { background: var(--warning); }
.t-cap-fill.full { background: var(--error); }

/* ── Segmented control ── */
.t-seg {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
  margin-bottom: var(--sp-3);
}
.t-seg-btn {
  flex: 1;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: var(--text-xs);
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .15s, color .15s;
  text-align: center;
}
.t-seg-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE LAYOUT SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Top App Bar ── */
.m-top-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--mobile-bar-h);
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  padding: 0 var(--sp-4);
  gap: var(--sp-3);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  flex-shrink: 0;
}

.m-top-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.m-top-brand-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--text-on-dark);
  font-weight: 700;
  line-height: 1.1;
}
.m-top-brand-sub {
  font-size: var(--text-2xs);
  color: var(--text-on-dark-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.m-top-page-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text-on-dark);
  font-weight: 600;
}

.m-top-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-dark-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-pale);
  flex-shrink: 0;
  cursor: pointer;
}

.m-top-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  color: var(--text-on-dark);
  font-size: 20px;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.m-top-icon-btn:hover { background: var(--bg-dark-mid); }

/* ── Bottom Navigation ── */
.m-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--mobile-nav-h);
  background: var(--bg-dark);
  display: flex;
  border-top: 1px solid var(--bg-dark-mid);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.m-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-on-dark-muted);
  cursor: pointer;
  padding: 6px 0;
  font-size: var(--text-2xs);
  font-family: var(--font-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: color .15s;
  min-width: 0;
}
.m-nav-btn .m-nav-icon { font-size: 22px; line-height: 1; }
.m-nav-btn.active { color: var(--accent); }
.m-nav-btn .m-nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  background: var(--error);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  line-height: 1.4;
}

/* ── Page Container ── */
.m-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-primary);
}

.m-body {
  flex: 1;
  min-height: 0; /* flex child overflow fix */
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0) + 8px);
  -webkit-overflow-scrolling: touch;
}

.m-page { display: none; }
.m-page.active { display: block; }

.m-content { padding: var(--sp-4); }

/* ── Slide-up Sheet (detail panel) ── */
.m-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.m-sheet-overlay.open { opacity: 1; pointer-events: all; }

.m-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 301;
  background: var(--bg-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.32,.72,0,1);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.m-sheet.open { transform: translateY(0); }

.m-sheet-drag {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 6px;
  flex-shrink: 0;
}

.m-sheet-header {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.m-sheet-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--text-primary);
  font-weight: 700;
}
.m-sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}
.m-sheet-close:hover { background: var(--border); }

.m-sheet-body {
  overflow-y: auto;
  padding: var(--sp-4);
  flex: 1;
  min-height: 0; /* flex child overflow fix */
  -webkit-overflow-scrolling: touch;
}

.m-sheet-footer {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
  padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0));
}

/* ── Field display (label + value in sheet) ── */
.m-field {
  margin-bottom: var(--sp-4);
}
.m-field-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-secondary);
  margin-bottom: 3px;
}
.m-field-value {
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: 1.5;
  word-break: break-word;
}
.m-field-value.mono { font-family: var(--font-mono); }

/* ── Two-column field grid ── */
.m-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4) var(--sp-6);
  margin-bottom: var(--sp-4);
}

/* ── Shift pill (small calendar use) ── */
.m-shift-pill {
  font-size: var(--text-2xs);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.m-shift-pill.published   { background: #d4f1e0; color: #0a5932; }
.m-shift-pill.unpublished { background: #e8e0f7; color: #5d4a91; }
.m-shift-pill.cancelled   { background: #f5e0e0; color: #8b1a1a; text-decoration: line-through; }

/* ── Weather badge ── */
.m-weather-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ── Roster avatar ── */
.m-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
  font-family: var(--font-ui);
}

/* ── Info row (icon + text) ── */
.m-info-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}
.m-info-row .icon { font-size: 16px; margin-top: 1px; flex-shrink: 0; }

/* ── Pull-to-refresh indicator ── */
.m-ptr {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0;
  overflow: hidden;
  transition: height .2s;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  gap: 8px;
}
.m-ptr.showing { height: 48px; }

/* ── Responsive utilities ── */
.m-hide { display: none !important; }
@media (min-width: 768px) {
  .desktop-hide { display: none !important; }
  .mobile-only  { display: none !important; }
}

/* ── Scrollbar suppression on mobile ── */
.m-body::-webkit-scrollbar,
.m-sheet-body::-webkit-scrollbar { display: none; }
.m-body, .m-sheet-body { scrollbar-width: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — narrow mobile (<375px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 374px) {
  .m-field-grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .t-stats-grid { gap: var(--sp-2); }
  .t-stat { padding: var(--sp-3); }
  .t-stat-val { font-size: var(--text-xl); }
  .m-content { padding: var(--sp-3); }
  .m-sheet-body { padding: var(--sp-3); }
  .t-list-row { padding: var(--sp-2) var(--sp-3); }
  .t-section-title { font-size: var(--text-lg); }
}
