/**
 * Boutme Design System — Components
 * Buttons, cards, badges, avatars, tabs, stats, modals, toasts
 */

/* ══════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════ */
.bm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bm-space-2);
  padding: 10px var(--bm-space-5);
  border-radius: var(--bm-radius-md);
  font-family: var(--bm-font-sans);
  font-size: var(--bm-text-sm);
  font-weight: var(--bm-weight-semibold);
  line-height: 1;
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: all var(--bm-dur-fast) var(--bm-ease-out);
  letter-spacing: -0.01em;
  -webkit-user-select: none;
  user-select: none;
}
.bm-btn:focus-visible { box-shadow: var(--bm-accent-glow); }

/* Ripple */
.bm-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--bm-dur-fast);
}
.bm-btn:active::after { background: rgba(255,255,255,0.08); }

/* Primary */
.bm-btn-primary {
  background: var(--bm-gradient-brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,122,255,0.3);
}
.bm-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(0,122,255,0.45);
  transform: translateY(-1px);
  color: #fff;
}
.bm-btn-primary:active { transform: translateY(0); }

/* Secondary */
.bm-btn-secondary {
  background: var(--bm-bg-raised);
  color: var(--bm-text-primary);
  border: 1px solid var(--bm-border-default);
}
.bm-btn-secondary:hover {
  background: var(--bm-bg-overlay);
  border-color: var(--bm-border-strong);
  color: var(--bm-text-primary);
}

/* Ghost */
.bm-btn-ghost {
  background: transparent;
  color: var(--bm-text-secondary);
  border: 1px solid transparent;
}
.bm-btn-ghost:hover {
  background: var(--bm-bg-hover);
  color: var(--bm-text-primary);
}

/* Danger */
.bm-btn-danger {
  background: var(--bm-red-dim);
  color: var(--bm-red);
  border: 1px solid rgba(255,59,48,0.2);
}
.bm-btn-danger:hover {
  background: var(--bm-red);
  color: #fff;
  border-color: var(--bm-red);
}

/* Brand (teal) */
.bm-btn-brand {
  background: var(--bm-brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,184,213,0.3);
}
.bm-btn-brand:hover {
  background: var(--bm-brand-hover);
  box-shadow: 0 4px 16px rgba(0,184,213,0.4);
  transform: translateY(-1px);
  color: #fff;
}

/* Sizes */
.bm-btn-xs  { padding: 5px 10px; font-size: var(--bm-text-xs); border-radius: var(--bm-radius-xs); }
.bm-btn-sm  { padding: 7px 14px; font-size: var(--bm-text-xs); }
.bm-btn-lg  { padding: 13px var(--bm-space-6); font-size: var(--bm-text-base); }
.bm-btn-xl  { padding: 16px var(--bm-space-8); font-size: var(--bm-text-md); border-radius: var(--bm-radius-lg); }
.bm-btn-full { width: 100%; }
.bm-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--bm-radius-sm);
}
.bm-btn-icon-lg { width: 44px; height: 44px; border-radius: var(--bm-radius-md); }
.bm-btn:disabled, .bm-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════ */
.bm-card {
  background: var(--bm-bg-elevated);
  border: 1px solid var(--bm-border-subtle);
  border-radius: var(--bm-radius-xl);
  overflow: hidden;
  transition: border-color var(--bm-dur-base) var(--bm-ease-out),
              box-shadow var(--bm-dur-base) var(--bm-ease-out),
              transform var(--bm-dur-base) var(--bm-ease-out);
}
.bm-card-hover:hover {
  border-color: var(--bm-border-default);
  box-shadow: var(--bm-shadow-md);
  transform: translateY(-2px);
}
.bm-card-glass {
  background: rgba(17,17,22,0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--bm-border-subtle);
}
.bm-card-body {
  padding: var(--bm-space-6);
}
.bm-card-body-sm { padding: var(--bm-space-4); }
.bm-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--bm-space-5);
}
.bm-card-title {
  font-size: var(--bm-text-base);
  font-weight: var(--bm-weight-semibold);
  color: var(--bm-text-primary);
  letter-spacing: -0.01em;
}
.bm-card-subtitle {
  font-size: var(--bm-text-xs);
  color: var(--bm-text-tertiary);
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════════════════════ */
.bm-stat-card {
  background: var(--bm-bg-elevated);
  border: 1px solid var(--bm-border-subtle);
  border-radius: var(--bm-radius-xl);
  padding: var(--bm-space-5) var(--bm-space-6);
  position: relative;
  overflow: hidden;
  transition: all var(--bm-dur-base) var(--bm-ease-out);
}
.bm-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bm-border-default), transparent);
}
.bm-stat-card:hover { border-color: var(--bm-border-default); box-shadow: var(--bm-shadow-md); }
.bm-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--bm-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: var(--bm-space-4);
}
.bm-stat-icon-blue   { background: var(--bm-accent-dim);  color: var(--bm-accent); }
.bm-stat-icon-green  { background: var(--bm-green-dim);   color: var(--bm-green); }
.bm-stat-icon-yellow { background: var(--bm-yellow-dim);  color: var(--bm-yellow); }
.bm-stat-icon-purple { background: var(--bm-purple-dim);  color: var(--bm-purple); }
.bm-stat-icon-brand  { background: var(--bm-brand-dim);   color: var(--bm-brand); }
.bm-stat-icon-red    { background: var(--bm-red-dim);     color: var(--bm-red); }

.bm-stat-value {
  font-size: var(--bm-text-2xl);
  font-weight: var(--bm-weight-bold);
  color: var(--bm-text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}
.bm-stat-label {
  font-size: var(--bm-text-xs);
  color: var(--bm-text-tertiary);
  font-weight: var(--bm-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--bm-space-1);
}
.bm-stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: var(--bm-text-xs);
  font-weight: var(--bm-weight-semibold);
  margin-top: var(--bm-space-3);
}
.bm-stat-trend.up   { color: var(--bm-green); }
.bm-stat-trend.down { color: var(--bm-red); }

/* ══════════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════════ */
.bm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--bm-radius-full);
  font-size: var(--bm-text-xs);
  font-weight: var(--bm-weight-semibold);
  line-height: 1;
}
.bm-badge-blue   { background: var(--bm-accent-dim);  color: var(--bm-accent); }
.bm-badge-green  { background: var(--bm-green-dim);   color: var(--bm-green); }
.bm-badge-red    { background: var(--bm-red-dim);     color: var(--bm-red); }
.bm-badge-yellow { background: var(--bm-yellow-dim);  color: var(--bm-yellow); }
.bm-badge-purple { background: var(--bm-purple-dim);  color: var(--bm-purple); }
.bm-badge-brand  { background: var(--bm-brand-dim);   color: var(--bm-brand); }
.bm-badge-gray   { background: var(--bm-bg-raised);   color: var(--bm-text-secondary); border: 1px solid var(--bm-border-subtle); }

/* ══════════════════════════════════════════════════════════
   AVATAR
══════════════════════════════════════════════════════════ */
.bm-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--bm-radius-full);
  background: var(--bm-gradient-brand);
  color: #fff;
  font-weight: var(--bm-weight-semibold);
  overflow: hidden;
  flex-shrink: 0;
}
.bm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bm-avatar-xs  { width: 24px; height: 24px; font-size: 10px; }
.bm-avatar-sm  { width: 32px; height: 32px; font-size: 12px; }
.bm-avatar-md  { width: 40px; height: 40px; font-size: 15px; }
.bm-avatar-lg  { width: 52px; height: 52px; font-size: 18px; }
.bm-avatar-xl  { width: 72px; height: 72px; font-size: 24px; }
.bm-avatar-2xl { width: 96px; height: 96px; font-size: 32px; }
.bm-avatar-sq  { border-radius: var(--bm-radius-md); }

/* ══════════════════════════════════════════════════════════
   TABS
══════════════════════════════════════════════════════════ */
.bm-tabs {
  display: flex;
  gap: 2px;
  background: var(--bm-bg-raised);
  border-radius: var(--bm-radius-lg);
  padding: 3px;
  border: 1px solid var(--bm-border-subtle);
}
.bm-tab {
  flex: 1;
  padding: 8px var(--bm-space-4);
  border-radius: calc(var(--bm-radius-lg) - 3px);
  font-size: var(--bm-text-sm);
  font-weight: var(--bm-weight-medium);
  color: var(--bm-text-secondary);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all var(--bm-dur-fast) var(--bm-ease-out);
  text-align: center;
  white-space: nowrap;
}
.bm-tab:hover { color: var(--bm-text-primary); }
.bm-tab.active {
  background: var(--bm-bg-overlay);
  color: var(--bm-text-primary);
  box-shadow: var(--bm-shadow-sm);
}

/* ══════════════════════════════════════════════════════════
   PROGRESS BAR
══════════════════════════════════════════════════════════ */
.bm-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-1);
}
.bm-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--bm-text-xs);
  color: var(--bm-text-secondary);
}
.bm-progress {
  height: 4px;
  background: var(--bm-bg-raised);
  border-radius: var(--bm-radius-full);
  overflow: hidden;
}
.bm-progress-bar {
  height: 100%;
  border-radius: var(--bm-radius-full);
  background: var(--bm-gradient-brand);
  transition: width var(--bm-dur-slow) var(--bm-ease-out);
}

/* ══════════════════════════════════════════════════════════
   LIST ITEMS
══════════════════════════════════════════════════════════ */
.bm-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.bm-list-item {
  display: flex;
  align-items: center;
  gap: var(--bm-space-3);
  padding: var(--bm-space-3) var(--bm-space-4);
  border-radius: var(--bm-radius-md);
  transition: background var(--bm-dur-fast);
  cursor: pointer;
  text-decoration: none;
  color: var(--bm-text-primary);
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  text-align: left;
}
.bm-list-item:hover { background: var(--bm-bg-hover); }
.bm-list-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--bm-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.bm-list-item-body { flex: 1; min-width: 0; }
.bm-list-item-title {
  font-size: var(--bm-text-sm);
  font-weight: var(--bm-weight-medium);
  color: var(--bm-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bm-list-item-sub {
  font-size: var(--bm-text-xs);
  color: var(--bm-text-tertiary);
}
.bm-list-item-end {
  font-size: var(--bm-text-xs);
  color: var(--bm-text-tertiary);
  flex-shrink: 0;
}
.bm-list-divider {
  height: 1px;
  background: var(--bm-border-subtle);
  margin: var(--bm-space-1) 0;
}

/* ══════════════════════════════════════════════════════════
   TOAST / ALERT
══════════════════════════════════════════════════════════ */
.bm-toast-container {
  position: fixed;
  top: 80px;
  right: var(--bm-space-4);
  z-index: var(--bm-z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-2);
  max-width: 360px;
}
.bm-toast {
  background: var(--bm-bg-elevated);
  border: 1px solid var(--bm-border-default);
  border-radius: var(--bm-radius-lg);
  padding: var(--bm-space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--bm-space-3);
  box-shadow: var(--bm-shadow-lg);
  animation: bm-slide-in-right var(--bm-dur-slow) var(--bm-ease-out);
}
.bm-toast-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.bm-toast-body { flex: 1; }
.bm-toast-title { font-size: var(--bm-text-sm); font-weight: var(--bm-weight-semibold); color: var(--bm-text-primary); }
.bm-toast-msg   { font-size: var(--bm-text-xs); color: var(--bm-text-secondary); margin-top: 2px; }

/* ══════════════════════════════════════════════════════════
   SKELETON
══════════════════════════════════════════════════════════ */
.bm-skeleton {
  background: linear-gradient(90deg,
    var(--bm-bg-raised) 25%,
    var(--bm-bg-overlay) 37%,
    var(--bm-bg-raised) 63%
  );
  background-size: 400% 100%;
  animation: bm-shimmer 1.4s ease infinite;
  border-radius: var(--bm-radius-sm);
}

/* ══════════════════════════════════════════════════════════
   PLUGIN GRID CARDS (Dashboard)
══════════════════════════════════════════════════════════ */
.bm-plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--bm-space-3);
}
.bm-plugin-card {
  background: var(--bm-bg-elevated);
  border: 1px solid var(--bm-border-subtle);
  border-radius: var(--bm-radius-xl);
  padding: var(--bm-space-5) var(--bm-space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--bm-space-3);
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--bm-dur-base) var(--bm-ease-out);
  position: relative;
  overflow: hidden;
}
.bm-plugin-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bm-border-default), transparent);
  opacity: 0;
  transition: opacity var(--bm-dur-base);
}
.bm-plugin-card:hover {
  border-color: var(--bm-border-default);
  box-shadow: var(--bm-shadow-md);
  transform: translateY(-3px);
  text-decoration: none;
}
.bm-plugin-card:hover::before { opacity: 1; }
.bm-plugin-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--bm-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform var(--bm-dur-base) var(--bm-ease-spring);
}
.bm-plugin-card:hover .bm-plugin-icon { transform: scale(1.1); }
.bm-plugin-name {
  font-size: var(--bm-text-xs);
  font-weight: var(--bm-weight-semibold);
  color: var(--bm-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

/* ══════════════════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════════════════ */
.bm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--bm-space-16) var(--bm-space-8);
  text-align: center;
  gap: var(--bm-space-4);
}
.bm-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--bm-radius-2xl);
  background: var(--bm-bg-raised);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--bm-text-tertiary);
}
.bm-empty-title {
  font-size: var(--bm-text-md);
  font-weight: var(--bm-weight-semibold);
  color: var(--bm-text-primary);
}
.bm-empty-sub {
  font-size: var(--bm-text-sm);
  color: var(--bm-text-tertiary);
  max-width: 300px;
  line-height: var(--bm-leading-base);
}

/* ══════════════════════════════════════════════════════════
   ICON BUTTON
══════════════════════════════════════════════════════════ */
.bm-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--bm-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--bm-text-secondary);
  font-size: 15px;
  transition: all var(--bm-dur-fast);
}
.bm-icon-btn:hover { background: var(--bm-bg-hover); color: var(--bm-text-primary); }

/* ══════════════════════════════════════════════════════════
   DROPDOWN
══════════════════════════════════════════════════════════ */
.bm-dropdown-menu {
  background: var(--bm-bg-elevated);
  border: 1px solid var(--bm-border-default);
  border-radius: var(--bm-radius-lg);
  box-shadow: var(--bm-shadow-lg);
  padding: var(--bm-space-1);
  min-width: 180px;
  z-index: var(--bm-z-dropdown);
}
.bm-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--bm-space-2);
  padding: 8px var(--bm-space-3);
  border-radius: var(--bm-radius-sm);
  font-size: var(--bm-text-sm);
  color: var(--bm-text-primary);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background var(--bm-dur-fast);
  text-decoration: none;
}
.bm-dropdown-item:hover { background: var(--bm-bg-hover); }
.bm-dropdown-item.danger { color: var(--bm-red); }
.bm-dropdown-item.danger:hover { background: var(--bm-red-dim); }
.bm-dropdown-sep {
  height: 1px;
  background: var(--bm-border-subtle);
  margin: var(--bm-space-1) 0;
}

/* ══════════════════════════════════════════════════════════
   TOGGLE SWITCH
══════════════════════════════════════════════════════════ */
.bm-toggle {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.bm-toggle input { opacity: 0; width: 0; height: 0; }
.bm-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--bm-bg-raised);
  border: 1px solid var(--bm-border-default);
  border-radius: var(--bm-radius-full);
  cursor: pointer;
  transition: all var(--bm-dur-base) var(--bm-ease-out);
}
.bm-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--bm-text-tertiary);
  border-radius: 50%;
  transition: all var(--bm-dur-base) var(--bm-ease-spring);
}
.bm-toggle input:checked + .bm-toggle-track {
  background: var(--bm-accent);
  border-color: var(--bm-accent);
}
.bm-toggle input:checked + .bm-toggle-track::after {
  left: calc(100% - 22px);
  background: #fff;
}

/* ══════════════════════════════════════════════════════════
   SECTION HEADER
══════════════════════════════════════════════════════════ */
.bm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--bm-space-4);
}
.bm-section-title {
  font-size: var(--bm-text-base);
  font-weight: var(--bm-weight-semibold);
  color: var(--bm-text-primary);
  letter-spacing: -0.01em;
}
.bm-section-sub {
  font-size: var(--bm-text-xs);
  color: var(--bm-text-tertiary);
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════
   FAB (Floating Action Button)
══════════════════════════════════════════════════════════ */
.bm-fab {
  position: fixed;
  bottom: calc(var(--bm-bottomnav-h) + var(--bm-space-4));
  right: var(--bm-space-5);
  width: 52px;
  height: 52px;
  border-radius: var(--bm-radius-full);
  background: var(--bm-gradient-brand);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 20px rgba(0,122,255,0.4);
  z-index: var(--bm-z-dropdown);
  transition: all var(--bm-dur-base) var(--bm-ease-spring);
}
.bm-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(0,122,255,0.5); }
.bm-fab:active { transform: scale(0.96); }

@media (min-width: 769px) {
  .bm-fab { bottom: var(--bm-space-6); }
}

/* ══════════════════════════════════════════════════════════
   UPLOAD ZONE
══════════════════════════════════════════════════════════ */
.bm-upload-zone {
  border: 2px dashed var(--bm-border-default);
  border-radius: var(--bm-radius-xl);
  padding: var(--bm-space-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--bm-dur-base) var(--bm-ease-out);
  background: var(--bm-bg-raised);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--bm-space-3);
}
.bm-upload-zone:hover, .bm-upload-zone.drag-over {
  border-color: var(--bm-accent);
  background: var(--bm-accent-dim);
}
.bm-upload-icon {
  font-size: 32px;
  color: var(--bm-text-tertiary);
}
.bm-upload-zone:hover .bm-upload-icon { color: var(--bm-accent); }

/* ══════════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════════ */
.bm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: calc(var(--bm-z-modal) - 1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--bm-space-4);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: bm-fade-in var(--bm-dur-base) var(--bm-ease-out);
}
.bm-modal-backdrop.menu-active,
.bm-modal-backdrop.bm-modal-active {
  display: flex !important;
}
/* Force responsiveness even when a view sets ad-hoc inline width/height
   on the backdrop (older modals do `style="max-height:600px;max-width:600px"`
   directly on `.bm-modal-backdrop` instead of on the `.bm-modal` panel). */
.bm-modal-backdrop {
  max-width: none !important;
  max-height: none !important;
}
@media (max-width: 480px) {
  .bm-modal-backdrop {
    padding: var(--bm-space-2);
    align-items: flex-end;
  }
}

/* Legacy backdrop element injected by custom.js (`.menu-hider`) and toggled
   via `.menu-active` across ~30 older plugin views, alongside the actual
   `.bm-modal-backdrop` panel it dims behind. It had no styling under the
   new design system (fully invisible) — give it the same dim/blur look as
   `.bm-modal-backdrop`, but one z-step lower so it stays BEHIND the modal
   panel (custom.js appends it last in <body>, so equal z-index would let
   it cover the modal content instead of dimming the page behind it). */
.menu-hider {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: calc(var(--bm-z-modal) - 2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
}
.menu-hider.menu-active {
  display: block !important;
}
.bm-modal {
  background: var(--bm-bg-elevated);
  border: 1px solid var(--bm-border-default);
  border-radius: var(--bm-radius-2xl);
  box-shadow: var(--bm-shadow-xl);
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - var(--bm-space-8));
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: bm-slide-up var(--bm-dur-slow) var(--bm-ease-out);
}
@media (max-width: 480px) {
  .bm-modal {
    max-width: 100%;
    max-height: calc(100dvh - var(--bm-space-4));
    border-radius: var(--bm-radius-2xl) var(--bm-radius-2xl) 0 0;
  }
}
.bm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--bm-space-5) var(--bm-space-6);
  border-bottom: 1px solid var(--bm-border-subtle);
}
.bm-modal-title { font-size: var(--bm-text-md); font-weight: var(--bm-weight-semibold); color: var(--bm-text-primary); }
.bm-modal-body { padding: var(--bm-space-6); }
.bm-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--bm-space-3);
  padding: var(--bm-space-4) var(--bm-space-6);
  border-top: 1px solid var(--bm-border-subtle);
}
