/* ==========================================================
   BRESCIA DESIGN SYSTEM v6.0 — Baseado no Google Stitch
   Padrão: Material Design 3 + Navy/Gold editorial
   Fonte: Inter (body) + Manrope (headline) + Material Icons
   ========================================================== */

/* --- 1. GOOGLE FONTS IMPORT --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@600;700;800&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap');

/* --- 2. TOKENS (CSS Custom Properties) --- */
:root {
  /* Core Palette — The Clinical Artisan Stitch */
  --clr-primary:           #003f87;
  --clr-primary-deep:      #001a40;
  --clr-primary-mid:       #0056b3;
  --clr-primary-fixed:     #d7e2ff;
  --clr-primary-fixed-dim: #acc7ff;

  --clr-secondary:         #526069;
  --clr-secondary-cont:    #d3e2ed;
  --clr-on-secondary-cont: #56656e;

  --clr-tertiary:          #722b00;
  --clr-tertiary-cont:     #983c00;

  --clr-bg:                #f8f9fa;
  --clr-surface:           #f8f9fa;
  --clr-surface-bright:    #ffffff;
  --clr-surface-low:       #f3f4f5;
  --clr-surface-med:       #edeeef;
  --clr-surface-high:      #e7e8e9;
  --clr-surface-highest:   #e1e3e4;

  --clr-on-surface:        #191c1d;
  --clr-on-surface-var:    #424752;
  --clr-outline:           #727784;
  --clr-outline-var:       #c2c6d4;

  --clr-white:             #ffffff;
  --clr-error:             #ba1a1a;

  /* Gold accent (Brescia brand) */
  --clr-gold:              #B8860B;
  --clr-gold-light:        #daa520;
  --clr-gold-grad:         linear-gradient(135deg, #B8860B, #daa520);

  /* Primary gradient (Stitch style) */
  --grad-primary:          linear-gradient(135deg, #003f87 0%, #0056b3 100%);
  --grad-hero:             linear-gradient(135deg, #001a40 0%, #003f87 60%, #0056b3 100%);

  /* Glass */
  --glass-bg:              rgba(255, 255, 255, 0.75);
  --glass-blur:            blur(24px);

  /* Typography */
  --font-body:       'Inter', system-ui, -apple-system, sans-serif;
  --font-headline:   'Manrope', system-ui, sans-serif;

  /* 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; --sp-16: 64px;

  /* Border Radius */
  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-2xl:  24px;
  --r-full: 999px;

  /* Shadows */
  --sh-card:    0 8px 32px rgba(0,0,0,0.04);
  --sh-card-hv: 0 12px 40px rgba(0,0,0,0.08);
  --sh-header:  0 1px 0 rgba(0,0,0,0.06);
  --sh-btn:     0 4px 16px rgba(0,63,135,0.20);
  --sh-fab:     0 8px 24px rgba(0,63,135,0.30);
  --sh-drawer:  10px 0 40px rgba(0,0,0,0.18);

  /* Z-index */
  --z-drawer:  1001;
  --z-overlay: 1000;
  --z-header:   100;
  --z-fab:       50;
}

/* --- 3. RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-body);
  background-color: var(--clr-bg);
  color: var(--clr-on-surface);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Scrollbar premium */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--clr-outline-var); border-radius: var(--r-full); }

/* Heading defaults */
h1, h2, h3, h4, h5 {
  font-family: var(--font-headline);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--clr-on-surface);
}

/* Material Symbols */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  font-style: normal;
}
.material-symbols-outlined.filled { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* Animation helpers */
@keyframes bds-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bds-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes bds-spin {
  to { transform: rotate(360deg); }
}
.animate-fade-up { animation: bds-fade-up 0.5s cubic-bezier(0.4,0,0.2,1) both; }
.animate-fade-in { animation: bds-fade-in 0.4s ease both; }

/* --- 4. APP SHELL --- */
#app-shell {
  display: flex;
  flex-direction: row;
  height: 100vh;
  min-height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* --- 5. TOP APP BAR --- */
#app-header {
  flex-shrink: 0;
  height: 60px;
  background: var(--clr-surface-bright);
  border-bottom: 1px solid var(--clr-surface-high);
  box-shadow: var(--sh-header);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}

.app-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--sp-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-logo {
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--clr-primary);
  letter-spacing: -0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.app-logo span { color: var(--clr-gold); }

.app-header-icon-btn {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--clr-surface-low);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--clr-on-surface-var);
  transition: background 0.15s, transform 0.15s;
}
.app-header-icon-btn:hover { background: var(--clr-surface-high); }
.app-header-icon-btn:active { transform: scale(0.93); }

/* --- 6. APP CONTENT --- */
#app-content {
  flex: 1;
  position: relative;
  overflow: auto;
  background: var(--clr-bg);
}

/* --- 7. DRAWER NAV --- */
#drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#drawer-overlay.open { opacity: 1; pointer-events: auto; }

#drawer-nav-container {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100vh;
  background: var(--clr-primary-deep);
  z-index: var(--z-drawer);
  transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--sh-drawer);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#drawer-nav-container.open { left: 0; }

.drawer-profile {
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.drawer-avatar {
  width: 44px; height: 44px;
  border-radius: var(--r-full);
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.15);
}
.drawer-name {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--clr-white);
  line-height: 1.3;
}
.drawer-role {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-gold);
}

.drawer-scroll { flex: 1; overflow-y: auto; padding: var(--sp-3) 0; }

.drawer-section-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  padding: var(--sp-4) var(--sp-5) var(--sp-2);
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 11px var(--sp-5);
  cursor: pointer;
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
  position: relative;
}
.drawer-item:hover {
  background: rgba(255,255,255,0.07);
  color: white;
}
.drawer-item.active {
  background: rgba(0,86,179,0.4);
  color: var(--clr-white);
  font-weight: 700;
}
.drawer-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--clr-gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.drawer-item .material-symbols-outlined {
  font-size: 20px;
  opacity: 0.9;
}

.drawer-footer {
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.drawer-logout {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.65);
  padding: 9px var(--sp-4);
  border-radius: var(--r-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  font-family: var(--font-body);
  transition: background 0.15s, color 0.15s;
}
.drawer-logout:hover { background: rgba(255,255,255,0.08); color: white; }

/* --- 8. PAGE CONTAINER --- */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-5);
  padding-bottom: 80px;
  animation: bds-fade-up 0.45s cubic-bezier(0.4,0,0.2,1) both;
}
@media (max-width: 640px) {
  .page-container { padding: var(--sp-4) var(--sp-4); }
}

/* --- 9. HERO CARD (Dashboard) --- */
.page-hero {
  background: var(--grad-hero);
  color: white;
  padding: var(--sp-8) var(--sp-8);
  border-radius: var(--r-2xl);
  margin-bottom: var(--sp-6);
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-fab);
}
.page-hero-glow {
  position: absolute;
  border-radius: var(--r-full);
  filter: blur(60px);
  opacity: 0.25;
  pointer-events: none;
}
.page-hero-glow--tr { top: -40px; right: -30px; width: 200px; height: 200px; background: rgba(255,255,255,0.28); }
.page-hero-glow--bl { bottom: -60px; left: -20px; width: 180px; height: 180px; background: rgba(184,134,11,0.4); }
.page-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 4px 10px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--r-full);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.page-hero h1 {
  font-family: var(--font-headline);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: white;
  margin-bottom: var(--sp-2);
}
.page-hero p {
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: 560px;
  line-height: 1.6;
  font-weight: 400;
}
@media (max-width: 640px) {
  .page-hero { padding: var(--sp-6) var(--sp-5); border-radius: var(--r-xl); }
}

/* --- 10. STATS ROW --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.stat-card {
  background: var(--clr-surface-bright);
  border: 1px solid var(--clr-surface-high);
  border-radius: var(--r-xl);
  padding: var(--sp-5) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  box-shadow: var(--sh-card);
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--sh-card-hv); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon .material-symbols-outlined { font-size: 22px; }
.stat-icon--blue  { background: #dbeafe; color: #1d4ed8; }
.stat-icon--green { background: #dcfce7; color: #15803d; }
.stat-icon--amber { background: #fef9c3; color: #a16207; }
.stat-icon--red   { background: #fee2e2; color: #b91c1c; }
.stat-icon--navy  { background: #dbeafe; color: var(--clr-primary); }

.stat-info { flex: 1; min-width: 0; }
.stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-on-surface-var);
  line-height: 1;
  margin-bottom: var(--sp-1);
}
.stat-value {
  font-family: var(--font-headline);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--clr-primary);
  line-height: 1;
}

/* --- 11. SECTION HEADER --- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--sp-4);
}
.section-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--clr-on-surface-var);
  margin-bottom: var(--sp-1);
}
.section-title {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--clr-on-surface);
}

/* --- 12. ACTION HUB GRID --- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
@media (max-width: 640px) {
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}

.hub-card {
  background: var(--clr-surface-bright);
  border: 1px solid var(--clr-surface-high);
  border-radius: var(--r-xl);
  padding: var(--sp-5) var(--sp-4);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  min-height: 130px;
  justify-content: space-between;
  box-shadow: var(--sh-card);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-card-hv);
  border-color: var(--clr-primary-fixed-dim);
}
.hub-card:active { transform: translateY(-1px) scale(0.98); }

.hub-card-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hub-card-icon .material-symbols-outlined { font-size: 22px; }
.hub-icon--blue  { background: #dbeafe; color: #1e40af; }
.hub-icon--green { background: #dcfce7; color: #15803d; }
.hub-icon--amber { background: #fef3c7; color: #b45309; }
.hub-icon--slate { background: #f1f5f9; color: #475569; }
.hub-icon--rose  { background: #ffe4e6; color: #be123c; }
.hub-icon--gold  { background: #fef9c3; color: #92400e; }
.hub-icon--teal  { background: #ccfbf1; color: #0f766e; }
.hub-icon--violet{ background: #ede9fe; color: #7c3aed; }
.hub-icon--navy  { background: #dbeafe; color: var(--clr-primary); }

.hub-card-label {
  font-family: var(--font-headline);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--clr-on-surface);
  line-height: 1.25;
}
.hub-card-sub {
  font-size: 0.72rem;
  color: var(--clr-on-surface-var);
  margin-top: 2px;
  line-height: 1.4;
}

/* --- 13. CONTENT CARD --- */
.bds-card {
  background: var(--clr-surface-bright);
  border: 1px solid var(--clr-surface-high);
  border-radius: var(--r-2xl);
  box-shadow: var(--sh-card);
  overflow: hidden;
}
.bds-card-body { padding: var(--sp-6); }
.bds-card-header {
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--clr-surface-high);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.bds-card-title {
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 800;
  color: var(--clr-on-surface);
}

/* --- 14. ACTIVITY FEED ITEM --- */
.feed-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-lg);
  background: var(--clr-surface-low);
  border: 1px solid var(--clr-surface-high);
  font-size: 0.85rem;
}
.feed-badge {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 900;
  flex-shrink: 0;
}
.feed-badge--visit  { background: #dcfce7; color: #166534; }
.feed-badge--sample { background: #fef9c3; color: #854d0e; }
.feed-main { flex: 1; min-width: 0; }
.feed-main-title { font-weight: 700; color: var(--clr-on-surface); font-size: 0.875rem; }
.feed-main-sub { font-size: 0.72rem; color: var(--clr-on-surface-var); }

/* --- 15. BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 20px;
  border-radius: var(--r-lg);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: var(--sh-btn);
}
.btn-primary:hover { opacity: 0.92; box-shadow: 0 6px 20px rgba(0,63,135,0.3); }

.btn-secondary {
  background: var(--clr-surface-med);
  color: var(--clr-on-surface);
}
.btn-secondary:hover { background: var(--clr-surface-high); }

.btn-ghost {
  background: transparent;
  color: var(--clr-primary);
  padding: 8px 12px;
}
.btn-ghost:hover { background: var(--clr-primary-fixed); }

.btn-gold {
  background: var(--clr-gold-grad);
  color: white;
  box-shadow: 0 4px 16px rgba(184,134,11,0.25);
}

.btn-danger {
  background: #fee2e2;
  color: var(--clr-error);
}
.btn-danger:hover { background: #fecaca; }

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 13px 28px; font-size: 0.95rem; }
.btn-icon { padding: 10px; border-radius: var(--r-md); }

/* FAB */
.fab {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-5);
  width: 56px; height: 56px;
  border-radius: var(--r-full);
  background: var(--grad-primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-fab);
  cursor: pointer;
  z-index: var(--z-fab);
  transition: transform 0.2s, box-shadow 0.2s;
}
.fab:hover { transform: scale(1.06); box-shadow: 0 12px 32px rgba(0,63,135,0.35); }
.fab:active { transform: scale(0.94); }
.fab .material-symbols-outlined { font-size: 26px; }

/* --- 16. FORM CONTROLS --- */
.bds-input, .bds-select, .bds-textarea {
  width: 100%;
  background: var(--clr-surface-high);
  border: 1.5px solid transparent;
  border-radius: var(--r-lg);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--clr-on-surface);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  appearance: none;
}
.bds-input:focus, .bds-select:focus, .bds-textarea:focus {
  border-color: var(--clr-primary);
  background: var(--clr-surface-bright);
  box-shadow: 0 0 0 3px rgba(0,63,135,0.08);
}
.bds-input::placeholder, .bds-textarea::placeholder { color: var(--clr-on-surface-var); opacity: 0.7; }

.bds-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--clr-on-surface-var);
  margin-bottom: var(--sp-2);
}

.bds-field { margin-bottom: var(--sp-4); }

.bds-search-wrap { position: relative; }
.bds-search-wrap .material-symbols-outlined {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--clr-outline);
  font-size: 20px;
  pointer-events: none;
}
.bds-search-wrap .bds-input { padding-left: 44px; }

/* --- 17. TABLE --- */
.bds-table { width: 100%; border-collapse: collapse; }
.bds-table th {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-on-surface-var);
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--clr-surface-high);
}
.bds-table td {
  padding: var(--sp-3) var(--sp-4);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--clr-surface-low);
  color: var(--clr-on-surface);
  vertical-align: middle;
}
.bds-table tr:last-child td { border-bottom: none; }
.bds-table tr:hover td { background: var(--clr-surface-low); }
.bds-table-wrap { overflow-x: auto; }

/* --- 18. BADGE / TAG --- */
.bds-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}
.bds-badge--green  { background: #dcfce7; color: #15803d; }
.bds-badge--red    { background: #fee2e2; color: #b91c1c; }
.bds-badge--amber  { background: #fef9c3; color: #92400e; }
.bds-badge--blue   { background: #dbeafe; color: #1e40af; }
.bds-badge--gray   { background: var(--clr-surface-high); color: var(--clr-on-surface-var); }
.bds-badge--navy   { background: var(--clr-primary-fixed); color: var(--clr-primary-deep); }

/* --- 19. PROGRESS BAR --- */
.bds-progress {
  height: 6px;
  width: 100%;
  background: var(--clr-surface-high);
  border-radius: var(--r-full);
  overflow: hidden;
}
.bds-progress-bar {
  height: 100%;
  background: var(--grad-primary);
  border-radius: var(--r-full);
  transition: width 0.5s ease;
}

/* --- 20. EMPTY STATE --- */
.bds-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-12) var(--sp-8);
  color: var(--clr-on-surface-var);
}
.bds-empty .material-symbols-outlined { font-size: 48px; opacity: 0.35; margin-bottom: var(--sp-4); }
.bds-empty-title { font-weight: 700; font-size: 1rem; color: var(--clr-on-surface); margin-bottom: var(--sp-2); }
.bds-empty-sub { font-size: 0.85rem; max-width: 280px; }

/* --- 21. LOADING --- */
.bds-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--clr-surface-high);
  border-top-color: var(--clr-primary);
  border-radius: var(--r-full);
  animation: bds-spin 0.8s linear infinite;
  margin: auto;
}
.bds-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-12);
}

/* --- 22. TOAST / ALERT --- */
.bds-toast {
  position: fixed;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--clr-on-surface);
  color: var(--clr-white);
  padding: 12px 20px;
  border-radius: var(--r-lg);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  max-width: 360px;
  text-align: center;
}
.bds-toast.show { transform: translateX(-50%) translateY(0); }

/* --- 23. GLASS PANEL --- */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255,255,255,0.6);
}

/* --- 24. UTILITY CLASSES --- */
.text-primary   { color: var(--clr-primary); }
.text-secondary { color: var(--clr-secondary); }
.text-muted     { color: var(--clr-on-surface-var); }
.text-gold      { color: var(--clr-gold); }
.text-error     { color: var(--clr-error); }

.bg-primary    { background: var(--clr-primary); }
.bg-surface    { background: var(--clr-surface-bright); }
.bg-surface-lo { background: var(--clr-surface-low); }

.font-headline { font-family: var(--font-headline); }
.font-body     { font-family: var(--font-body); }

.rounded-xl  { border-radius: var(--r-xl); }
.rounded-2xl { border-radius: var(--r-2xl); }

.shadow-card    { box-shadow: var(--sh-card); }
.shadow-card-hv { box-shadow: var(--sh-card-hv); }

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }

.w-full { width: 100%; }
.overflow-hidden { overflow: hidden; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- 25. RESPONSIVE GRID --- */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-4); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

/* --- 26. LOADING SCREEN --- */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--clr-surface-bright);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
}
#loading-screen .bds-spinner { width: 48px; height: 48px; }
