/* ========================================================================
   MarketTalent — Components
   ========================================================================
   OWNERSHIP: This file owns ALL component styles:
   - Cards (mt-glass-card, mt-card, mt-stat-card, mt-health-card, mt-media-card, mt-folder-card)
   - Buttons (mt-btn, mt-btn-primary, mt-btn-secondary, mt-btn-danger, mt-btn-ghost, mt-gradient-btn)
   - Badges (mt-badge)
   - Tables (mt-table)
   - Alerts (mt-alert)
   - Forms (mt-input, mt-textarea, mt-label, mt-form-group)
   - Modals (mt-modal, mt-modal-overlay)
   - Top navigation (mt-topbar, mt-nav-group, mt-nav-dropdown, mt-drawer)

/* Prevent horizontal page scroll on small screens (breaks mobile layout) */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
   - Loading states (mt-skeleton, mt-loading-spinner, mt-loading-overlay)
   - Media (mt-media-card, mt-media-item, mt-media-grid)
   - Tags, Empty states, Confirm dialog
   - Analytics charts grid
   - Responsive component overrides

   This file does NOT own:
   - CSS custom properties (→ tailwind.css)
   - Utility classes (→ tailwind.css)
   - Animations (→ tailwind.css)
   - Platform/status colors (→ tailwind.css)
   - Gradient text/divider (→ tailwind.css)

   Merged from: theme.css + glassmorphism.css + analytics.css
   ======================================================================== */

/* --- Base Typography (component — owned by components.css) --- */
/* For standalone pages without Tailwind CDN */
html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Glass Card (component — owned by components.css) --- */
.mt-glass-card {
  background: var(--mt-c-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--mt-c-border);
  border-radius: var(--mt-r-xl);
  position: relative;
  transition: transform 280ms cubic-bezier(0.15, 0.75, 0.35, 1), box-shadow 280ms cubic-bezier(0.15, 0.75, 0.35, 1), border-color 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.2), rgba(34, 211, 238, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-glass-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1), 0 0 40px rgba(99, 102, 241, 0.05);
  transform: translateY(-2px);
}
.mt-glass-card:hover::before { opacity: 1; }
.mt-glass-card:active { transform: translateY(0) scale(0.99); }

/* --- Glass (lighter) (component — owned by components.css) --- */
.mt-glass {
  background: var(--mt-c-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--mt-c-border);
}

/* --- Stat Card (component — owned by components.css) --- */
.mt-stat-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.04));
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--mt-r-xl);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 280ms cubic-bezier(0.15, 0.75, 0.35, 1), box-shadow 280ms cubic-bezier(0.15, 0.75, 0.35, 1), border-color 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.15), rgba(34, 211, 238, 0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-stat-card:hover { border-color: rgba(99, 102, 241, 0.3); box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1); transform: translateY(-2px); }
.mt-stat-card:hover::before { opacity: 1; }
.mt-stat-card:active { transform: translateY(0) scale(0.99); }

.mt-stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.mt-stat-icon.primary { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.mt-stat-icon.success { background: rgba(34, 197, 94, 0.15); color: #34d399; }
.mt-stat-icon.warning { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.mt-stat-icon.danger  { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.mt-stat-icon.info    { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.mt-stat-value { font-size: 24px; font-weight: 700; color: var(--mt-text); line-height: 1; }
.mt-stat-label { font-size: 12px; color: var(--mt-text-muted); margin-top: 2px; }

/* --- Card (component — owned by components.css) --- */
.mt-card {
  background: var(--mt-c-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--mt-c-border);
  border-radius: var(--mt-r-xl);
  overflow: hidden;
  position: relative;
  transition: transform 280ms cubic-bezier(0.15, 0.75, 0.35, 1), box-shadow 280ms cubic-bezier(0.15, 0.75, 0.35, 1), border-color 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.2), rgba(34, 211, 238, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-card:hover { border-color: rgba(99, 102, 241, 0.3); box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08); transform: translateY(-2px); }
.mt-card:hover::before { opacity: 1; }
.mt-card:active { transform: translateY(0) scale(0.99); }

.mt-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--mt-c-border);
  font-weight: 600;
  font-size: 14px;
  background: var(--mt-c-surface);
}
.mt-card-body { padding: 20px; }
.mt-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--mt-c-border);
  background: var(--mt-c-surface);
}

/* --- Cards Grid (component — owned by components.css) --- */
.mt-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* --- Stat Grid (component — owned by components.css) --- */
.mt-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }

/* --- Health Card (component — owned by components.css) --- */
.mt-health-card {
  background: var(--mt-c-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--mt-c-border);
  border-radius: var(--mt-r-lg);
  padding: 12px;
  position: relative;
  transition: transform 280ms cubic-bezier(0.15, 0.75, 0.35, 1), box-shadow 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-health-card:hover { border-color: rgba(99, 102, 241, 0.3); box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08); transform: translateY(-2px); }

/* --- Media Card (component — owned by components.css) --- */
.mt-media-card {
  background: var(--mt-c-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--mt-c-border);
  border-radius: var(--mt-r-lg);
  overflow: hidden;
  position: relative;
  transition: transform 280ms cubic-bezier(0.15, 0.75, 0.35, 1), box-shadow 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
  cursor: pointer;
}
.mt-media-card:hover { border-color: rgba(99, 102, 241, 0.3); box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08); transform: translateY(-2px); }

/* --- Folder Card (component — owned by components.css) --- */
.mt-folder-card {
  background: var(--mt-c-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--mt-c-border);
  border-radius: var(--mt-r-lg);
  padding: 14px;
  cursor: pointer;
  position: relative;
  transition: transform 280ms cubic-bezier(0.15, 0.75, 0.35, 1), box-shadow 280ms cubic-bezier(0.15, 0.75, 0.35, 1), background 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-folder-card:hover { border-color: rgba(99, 102, 241, 0.3); background: rgba(99, 102, 241, 0.03); box-shadow: 0 4px 20px rgba(99, 102, 241, 0.08); transform: translateY(-2px); }

/* --- Glass Panel (component — owned by components.css) --- */
.mt-glass-panel {
  background: var(--mt-c-surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--mt-c-border);
  border-radius: var(--mt-r-2xl);
  position: relative;
  overflow: hidden;
}

/* --- Buttons (component — owned by components.css) --- */
.mt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 280ms cubic-bezier(0.15, 0.75, 0.35, 1), box-shadow 280ms cubic-bezier(0.15, 0.75, 0.35, 1), background 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
  white-space: nowrap;
  font-family: inherit;
}
.mt-btn svg { width: 16px; height: 16px; }
.mt-btn:hover { transform: translateY(-1px); }
.mt-btn:active { transform: translateY(0) scale(0.98); }

.mt-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  position: relative;
  overflow: hidden;
}
.mt-btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-btn-primary:hover::before { opacity: 1; }
.mt-btn-primary:hover { box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); color: #fff; }

.mt-btn-secondary {
  background: var(--mt-c-input-bg);
  color: var(--mt-text);
  border-color: var(--mt-c-border-strong);
}
.mt-btn-secondary:hover { background: var(--mt-c-surface-active); }

.mt-btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}
.mt-btn-danger:hover { box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); color: #fff; }

.mt-btn-ghost { background: transparent; color: var(--mt-text-muted); }
.mt-btn-ghost:hover { background: var(--mt-c-input-bg); color: var(--mt-text); }

.mt-btn-sm { padding: 5px 12px; font-size: 12px; }

.mt-gradient-btn {
  background: linear-gradient(135deg, var(--mt-c-primary), #8b5cf6);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--mt-r-md);
  font-weight: var(--mt-fw-semibold);
  font-size: var(--mt-fs-md);
  cursor: pointer;
  transition: all 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.mt-gradient-btn svg { flex-shrink: 0; }
.mt-gradient-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-gradient-btn:hover::before { opacity: 1; }
.mt-gradient-btn:hover { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); transform: translateY(-1px); }
.mt-gradient-btn:active { transform: translateY(0); }

/* --- Badges (component — owned by components.css) --- */
.mt-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.mt-badge-draft    { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.mt-badge-scheduled { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.mt-badge-published { background: rgba(34, 197, 94, 0.15); color: #34d399; }
.mt-badge-failed   { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.mt-badge-active   { background: rgba(34, 197, 94, 0.15); color: #34d399; }
.mt-badge-inactive { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* Badge dot indicator */
.mt-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mt-badge-draft .mt-badge-dot    { background: var(--mt-c-text-muted); }
.mt-badge-scheduled .mt-badge-dot { background: #3b82f6; }
.mt-badge-published .mt-badge-dot { background: #22c55e; }
.mt-badge-failed .mt-badge-dot   { background: #ef4444; }

/* --- Table (component — owned by components.css) --- */
.mt-table { width: 100%; border-collapse: collapse; }
.mt-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mt-text-muted);
  border-bottom: 1px solid var(--mt-c-border);
}
.mt-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--mt-c-border);
  vertical-align: middle;
}
.mt-table tbody tr { transition: background 280ms cubic-bezier(0.15, 0.75, 0.35, 1); }
.mt-table tbody tr:hover { background: var(--mt-c-surface-hover); }

/* --- Alerts (component — owned by components.css) --- */
.mt-alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; border: 1px solid transparent; }
.mt-alert-error { background: rgba(239, 68, 68, 0.1); color: #f87171; border-color: rgba(239, 68, 68, 0.2); }
.mt-alert-success { background: rgba(34, 197, 94, 0.1); color: #34d399; border-color: rgba(34, 197, 94, 0.2); }
.mt-alert-warning { background: rgba(251, 191, 36, 0.1); color: #fbbf24; border-color: rgba(251, 191, 36, 0.2); }

/* --- Forms (component — owned by components.css) --- */
.mt-form-group { margin-bottom: 16px; }
.mt-label { display: block; font-size: 13px; font-weight: 600; color: var(--mt-text); margin-bottom: 6px; }
.mt-label-hint { font-weight: 400; color: var(--mt-text-muted); }
.mt-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--mt-c-border-strong);
  border-radius: 10px;
  font-size: 14px;
  color: var(--mt-text);
  background: var(--mt-c-input-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
  box-sizing: border-box;
}
.mt-input:focus {
  outline: none;
  border-color: var(--mt-primary);
  box-shadow: 0 0 0 3px var(--mt-primary-light), 0 0 20px rgba(99, 102, 241, 0.1);
  background: var(--mt-c-surface-hover);
}

/* Select dropdowns — glassmorphism (scoped to .mt-input only) */
select.mt-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
select.mt-input:hover {
  border-color: var(--mt-c-border-strong);
  background-color: var(--mt-c-surface-hover);
}
select.mt-input:focus {
  border-color: var(--mt-primary);
  box-shadow: 0 0 0 3px var(--mt-primary-light), 0 0 20px rgba(99, 102, 241, 0.1);
}
/* option styling — limited browser support (Chrome ignores most CSS on options) */
select.mt-input option {
  background: var(--mt-c-modal-bg);
  color: var(--mt-text);
  padding: 8px 12px;
}

.mt-input-group { display: flex; gap: 8px; align-items: center; }
.mt-input-group .mt-input { flex: 1; }

.mt-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--mt-c-border-strong);
  border-radius: 10px;
  font-size: 14px;
  color: var(--mt-text);
  background: var(--mt-c-input-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
}
.mt-textarea:focus {
  outline: none;
  border-color: var(--mt-primary);
  box-shadow: 0 0 0 3px var(--mt-primary-light), 0 0 20px rgba(99, 102, 241, 0.1);
  background: var(--mt-c-surface-hover);
}
.mt-textarea:hover:not(:focus) {
  border-color: var(--mt-c-border-strong);
  background: var(--mt-c-surface-hover);
}

/* --- Modal (component — owned by components.css) --- */
.mt-modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.15, 0.75, 0.35, 1), visibility 280ms;
}
/* When JS sets display via inline style, make the modal visible.
   This fixes all modals app-wide that use style.display='flex' without
   adding the .visible class. */
.mt-modal-overlay[style*="display"] { visibility: visible; opacity: 1; }
.mt-modal-overlay.visible { visibility: visible; opacity: 1; }
.mt-modal {
  background: var(--mt-c-modal-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--mt-c-border-strong);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(99, 102, 241, 0.08);
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

/* Gradient border on modal */
.mt-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.2), rgba(34, 211, 238, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-modal:hover::before { opacity: 1; }

.mt-modal-overlay.visible .mt-modal {
  animation: mtModalIn 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes mtModalIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}



.mt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--mt-c-border);
  font-weight: 600;
  font-size: 16px;
}
.mt-modal-title { margin: 0; font-size: 16px; font-weight: 600; }
.mt-modal-close {
  background: none; border: none; color: var(--mt-c-sidebar-text); cursor: pointer;
  padding: 4px; border-radius: 8px; display: flex; align-items: center; font-size: 20px; line-height: 1;
  transition: all 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-modal-close:hover { background: var(--mt-c-surface-active); color: #fff; transform: rotate(90deg); }
.mt-modal-body { padding: 20px 24px; }
.mt-modal-footer {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 16px 24px; border-top: 1px solid var(--mt-c-border);
}

/* --- Skeleton Loading (component — owned by components.css) --- */
.mt-skeleton {
  background: linear-gradient(90deg, var(--mt-c-surface) 25%, var(--mt-c-surface-active) 50%, var(--mt-c-surface) 75%);
  background-size: 200% 100%;
  animation: mtShimmer 1.5s infinite;
  border-radius: 6px; height: 14px; margin-bottom: 8px;
}
@keyframes mtShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.mt-stat-skeleton { display: flex; align-items: center; gap: 16px; width: 100%; }
.mt-stat-skeleton-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(90deg, var(--mt-c-surface) 25%, var(--mt-c-surface-active) 50%, var(--mt-c-surface) 75%);
  background-size: 200% 100%; animation: mtShimmer 1.5s ease-in-out infinite; flex-shrink: 0;
}
.mt-stat-skeleton-text { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.mt-stat-skeleton-value {
  height: 24px; width: 60%; border-radius: 6px;
  background: linear-gradient(90deg, var(--mt-c-surface) 25%, var(--mt-c-surface-active) 50%, var(--mt-c-surface) 75%);
  background-size: 200% 100%; animation: mtShimmer 1.5s ease-in-out infinite; animation-delay: 0.1s;
}
.mt-stat-skeleton-label {
  height: 12px; width: 80%; border-radius: 6px;
  background: linear-gradient(90deg, var(--mt-c-surface) 25%, var(--mt-c-surface-active) 50%, var(--mt-c-surface) 75%);
  background-size: 200% 100%; animation: mtShimmer 1.5s ease-in-out infinite; animation-delay: 0.2s;
}

/* --- Loading Spinner (component — owned by components.css) --- */
.mt-loading-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--mt-c-surface-active);
  border-top-color: var(--mt-primary);
  border-radius: 50%;
  animation: mtSpin 0.6s linear infinite;
  display: inline-block; flex-shrink: 0;
}
.mt-loading-spinner.hidden { display: none; }

/* --- Loading Overlay (component — owned by components.css) --- */
.mt-loading-overlay {
  position: absolute; inset: 0;
  background: var(--mt-c-overlay);
  display: flex; align-items: center; justify-content: center;
  z-index: 10; border-radius: inherit;
}

/* --- Container (component — owned by components.css) --- */
.mt-container { max-width: 1100px; margin: 0 auto; }

/* --- Page Header (component — owned by components.css) --- */
.mt-page-header { display: flex; justify-content: space-between; align-items: center; }
.mt-page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.mt-page-subtitle { font-size: 13px; color: var(--mt-text-muted); margin-top: 4px; }

/* --- Empty State (component — owned by components.css) --- */
.mt-empty { text-align: center; padding: 64px 24px; color: var(--mt-text-muted); }
.mt-empty svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.3; }
.mt-empty h3 { font-size: 16px; font-weight: 600; color: var(--mt-text); margin: 0 0 8px; }
.mt-empty p { font-size: 13px; margin: 0 0 20px; }

/* --- Tags (component — owned by components.css) --- */
.mt-tags-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-tag { display: inline-flex; align-items: center; font-size: 12px; padding: 3px 10px; border-radius: 20px; background: var(--mt-c-input-bg); color: var(--mt-text-muted); border: 1px solid var(--mt-c-border); }
.mt-tag-green { background: rgba(34, 197, 94, 0.1); color: #34d399; border-color: rgba(34, 197, 94, 0.2); }
.mt-tag-red { background: rgba(239, 68, 68, 0.1); color: #f87171; border-color: rgba(239, 68, 68, 0.2); }

/* --- Media (component — owned by components.css) --- */
.mt-media-toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.mt-media-toolbar .mt-input { max-width: 260px; }
.mt-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.mt-media-item { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--mt-c-border); transition: transform 280ms cubic-bezier(0.15, 0.75, 0.35, 1), box-shadow 280ms cubic-bezier(0.15, 0.75, 0.35, 1); }
.mt-media-item:hover { border-color: rgba(99, 102, 241, 0.3); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); }
.mt-media-thumb { aspect-ratio: 1 / 1; background: var(--mt-c-surface); overflow: hidden; }
.mt-media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mt-media-video { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--mt-text-muted); }
.mt-media-meta { padding: 8px 10px; }
.mt-media-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-media-del { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: none; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; backdrop-filter: blur(8px); }
.mt-media-del:hover { background: #dc2626; }

/* --- Confirm Dialog (component — owned by components.css) --- */
.mt-confirm-overlay {
  display: flex; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  z-index: 2000; align-items: center; justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.15, 0.75, 0.35, 1), visibility 280ms;
}
.mt-confirm-overlay.visible { visibility: visible; opacity: 1; }
.mt-confirm-box {
  background: var(--mt-c-modal-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--mt-c-border-strong);
  border-radius: 16px; padding: 24px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 80px rgba(99, 102, 241, 0.08);
  max-width: 400px; width: 90%;
  position: relative;
}
/* Gradient border on confirm box */
.mt-confirm-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.2), rgba(34, 211, 238, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
}
.mt-confirm-box:hover::before { opacity: 1; }
.mt-confirm-overlay.visible .mt-confirm-box {
  animation: mtModalIn 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mt-confirm-icon { font-size: 32px; margin-bottom: 12px; }
.mt-confirm-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--mt-text); }
.mt-confirm-message { font-size: 13px; color: var(--mt-text-muted); margin-bottom: 20px; }
.mt-confirm-actions { display: flex; gap: 8px; justify-content: center; }

/* --- Top Navigation (component — owned by components.css) --- */
.mt-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 16px;
  background: var(--mt-c-sidebar-bg);
  border-bottom: 1px solid var(--mt-c-border);
  overflow: visible;
  min-width: 0;
}
@supports (padding-top: env(safe-area-inset-top)) {
  .mt-topbar {
    padding-top: env(safe-area-inset-top);
    height: calc(56px + env(safe-area-inset-top));
  }
  .mt-drawer-head { padding-top: calc(16px + env(safe-area-inset-top)); }
}

.mt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--mt-c-text);
}
.mt-brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--mt-c-primary), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.35);
}
.mt-brand-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--mt-c-text);
  white-space: nowrap;
}

/* Nav groups */
:where(.mt-nav) { display: flex; align-items: center; gap: 2px; }
.mt-nav-group { position: relative; }
.mt-nav-group-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--mt-c-text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.mt-nav-group-btn:hover { background: var(--mt-c-surface-hover); color: var(--mt-c-text); }
.mt-nav-group.active > .mt-nav-group-btn {
  background: color-mix(in srgb, var(--mt-c-primary) 12%, transparent);
  color: var(--mt-c-primary);
  font-weight: 600;
}
.mt-nav-group-btn svg { opacity: 0.7; transition: transform 160ms ease; }
.mt-nav-group.open .mt-nav-group-btn svg { transform: rotate(180deg); }

.mt-nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 224px;
  padding: 6px;
  border-radius: 14px;
  background: var(--mt-c-modal-bg);
  border: 1px solid var(--mt-c-border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 100;
}
.mt-dd-align-right { right: 0; left: auto; }
.mt-nav-dropdown.open { display: block; animation: mtNavIn 180ms cubic-bezier(0.15, 0.75, 0.35, 1); }
@keyframes mtNavIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mt-nav-dd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 11px;
  color: var(--mt-c-text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease;
}
.mt-nav-dd-item:hover { background: var(--mt-c-surface-hover); color: var(--mt-c-text); }
.mt-nav-dd-item.active {
  background: color-mix(in srgb, var(--mt-c-primary) 14%, transparent);
  color: var(--mt-c-primary);
  font-weight: 600;
}
.mt-nav-dd-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.mt-nav-dd-icon svg { width: 18px; height: 18px; }
.mt-nav-dd-text { overflow: hidden; text-overflow: ellipsis; }
.mt-nav-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--mt-c-primary);
  color: #fff;
  flex-shrink: 0;
}

/* Topbar controls */
:where(.mt-topbar-btn) { display: flex; }
.mt-topbar-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--mt-c-text-muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.mt-topbar-btn:hover { background: var(--mt-c-surface-hover); color: var(--mt-c-text); }
.mt-topbar-btn:active { transform: scale(0.95); }

.mt-topbar-search { position: relative; flex: 1; max-width: 360px; margin-left: auto; }
.mt-topbar-input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border-radius: 10px;
  border: 1px solid var(--mt-c-border);
  background: var(--mt-c-input-bg);
  color: var(--mt-c-text);
  font-size: 13px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.mt-topbar-input:focus {
  border-color: var(--mt-c-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mt-c-primary) 18%, transparent);
  background: var(--mt-c-surface-hover);
}
.mt-topbar-input::placeholder { color: var(--mt-c-text-muted); }

.mt-notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mt-c-danger);
  border: 1.5px solid var(--mt-c-bg);
}

/* Avatar + context menu */
.mt-avatar-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mt-c-primary), #8b5cf6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--mt-c-primary) 40%, transparent);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.mt-avatar-btn:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--mt-c-primary) 60%, transparent); transform: scale(1.03); }
.mt-dd-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mt-c-text-muted);
  padding: 8px 10px 4px;
  white-space: nowrap;
}
.mt-dd-select {
  width: 100%;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--mt-c-border-strong);
  background: var(--mt-c-input-bg);
  color: var(--mt-c-text);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}
.mt-dd-select:focus { border-color: var(--mt-c-primary); }
.mt-dd-select option { background: var(--mt-c-modal-bg); color: var(--mt-c-text); }
.mt-dd-divider { height: 1px; background: var(--mt-c-border); margin: 6px 0; }

/* Mobile drawer */
.mt-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 84%;
  max-width: 340px;
  z-index: 100;
  background: var(--mt-c-modal-bg);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border-right: 1px solid var(--mt-c-border-strong);
  border-radius: 0 22px 22px 0;
  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.4);
  transform: translateX(-100%);
  transition: transform 280ms cubic-bezier(0.15, 0.75, 0.35, 1);
  display: flex;
  flex-direction: column;
}
.mt-drawer.open { transform: translateX(0); }
.mt-drawer-overlay {
  position: fixed;
  inset: 0;
  background: var(--mt-c-overlay);
  z-index: 90;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.mt-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  padding-top: calc(16px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--mt-c-border);
  flex-shrink: 0;
}
.mt-drawer-nav { flex: 1; overflow-y: auto; padding: 8px 12px 16px; -webkit-overflow-scrolling: touch; }
.mt-drawer-section { margin-bottom: 10px; }
.mt-drawer-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--mt-c-text-muted);
  padding: 12px 12px 6px;
}
.mt-drawer-foot {
  border-top: 1px solid var(--mt-c-border);
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  flex-shrink: 0;
}
.mt-drawer-search {
  position: relative;
  margin-bottom: 10px;
}
.mt-drawer-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mt-c-text-muted);
  pointer-events: none;
}
.mt-drawer-search input { padding-left: 32px; }
.mt-drawer-dark-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--mt-c-border);
  background: var(--mt-c-surface);
  color: var(--mt-c-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background 160ms ease;
}
.mt-drawer-dark-toggle:hover { background: var(--mt-c-surface-hover); }

/* PWA install toggle (drawer) */
.mt-drawer-install-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.1));
  color: var(--mt-c-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background 160ms ease, border-color 160ms ease;
}
.mt-drawer-install-toggle:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.16));
  border-color: rgba(99, 102, 241, 0.55);
}
.mt-drawer-install-toggle:active { transform: scale(0.98); }
.mt-drawer-install-toggle[hidden] { display: none; }

/* User card (drawer + context menu) */
.mt-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--mt-c-border);
}
.mt-user-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.mt-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mt-c-primary), #8b5cf6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mt-user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.mt-user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--mt-c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mt-user-email {
  font-size: 10px;
  color: var(--mt-c-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mt-logout-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mt-c-text-muted);
  flex-shrink: 0;
  transition: background 160ms ease, color 160ms ease;
}
.mt-logout-btn:hover { background: var(--mt-c-surface-hover); color: var(--mt-c-danger); }

.mt-switch-select {
  width: 100%;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--mt-c-border-strong);
  background: var(--mt-c-input-bg);
  color: var(--mt-c-text);
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: border-color 160ms ease;
}
.mt-switch-select:focus { border-color: var(--mt-c-primary); }
.mt-switch-select option { background: var(--mt-c-modal-bg); color: var(--mt-c-text); }

/* --- Analytics Charts Grid (component — owned by components.css) --- */
.an-charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* --- Mobile Bottom Navigation (premium shell) --- */
.mt-bottomnav {
  display: none; /* hidden by default; shown on small screens below */
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  z-index: 60;
  background: var(--mt-c-modal-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--mt-c-border-strong);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.35);
  padding-bottom: env(safe-area-inset-bottom);
  align-items: stretch;
  justify-content: space-around;
  height: calc(60px + env(safe-area-inset-bottom));
}
@media (max-width: 1023px) {
  .mt-bottomnav { display: flex; }
  .mt-topbar .mt-nav { display: none; }
}
.mt-bottomnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 4px;
  border: none;
  background: transparent;
  color: var(--mt-c-text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 160ms ease;
  touch-action: manipulation;
}
.mt-bottomnav-item:hover { color: var(--mt-c-text); }
.mt-bottomnav-item.active { color: var(--mt-c-primary); }
.mt-bottomnav-item:focus-visible,
.mt-bottomnav-fab:focus-visible {
  outline: 2px solid var(--mt-c-primary);
  outline-offset: -2px;
  border-radius: 12px;
}
.mt-bottomnav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}
.mt-bottomnav-icon svg { width: 21px; height: 21px; }
.mt-bottomnav-item.active .mt-bottomnav-icon svg { stroke-width: 2.4; }
.mt-bottomnav-item.active .mt-bottomnav-label { font-weight: 600; }
.mt-bottomnav-label {
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
}
.mt-bottomnav-fab {
  position: relative;
  top: -18px;
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  margin: 0 4px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--mt-c-primary), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.45), 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  transition: transform 180ms var(--mt-spring-bounce), box-shadow 180ms ease;
  touch-action: manipulation;
}
.mt-bottomnav-fab:hover { transform: translateY(-2px) scale(1.04); }
.mt-bottomnav-fab:active { transform: translateY(-2px) scale(0.96); }
.mt-bottomnav-fab-icon { display: flex; align-items: center; justify-content: center; }
.mt-bottomnav-fab-icon svg { width: 26px; height: 26px; stroke-width: 2; }

/* Reduced motion for the mobile shell */
@media (prefers-reduced-motion: reduce) {
  .mt-bottomnav,
  .mt-bottomnav-item,
  .mt-bottomnav-fab {
    transition: none !important;
  }
  .mt-bottomnav-fab:hover,
  .mt-bottomnav-fab:active { transform: none; }
}

/* Main content clear height so content is never hidden behind the bottom nav */
@media (max-width: 1023px) {
  .mt-mainwrap { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* --- Responsive component overrides (component — owned by components.css) --- */
@media (max-width: 1024px) {
  .mt-topbar-search { max-width: none; }
  .an-charts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .mt-topbar { padding: 0 12px; gap: 8px; height: 56px; }
  .mt-topbar-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  .mt-avatar-btn { width: 38px; height: 38px; }
  .mt-page { padding: 16px; overflow-x: hidden; }
  .mt-stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mt-page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .mt-table-wrap { overflow-x: auto; }
  .mt-cards-grid { grid-template-columns: 1fr; }
  .mt-media-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .mt-stat-card { min-height: 64px; padding: 14px 16px; }
  .mt-stat-value { font-size: 20px; }
  .mt-btn { min-height: 44px; padding: 10px 16px; font-size: 14px; }
  .mt-btn-sm { min-height: 36px; padding: 6px 12px; font-size: 12px; }
  .mt-table td, .mt-table th { padding: 10px 12px; font-size: 13px; white-space: nowrap; }
  .mt-input, .mt-label + .mt-input { min-height: 44px; font-size: 16px; padding: 10px 14px; }
  .mt-modal { width: 95%; max-height: 90vh; }
  .mt-page-title { font-size: 20px; }
  .mt-card-header { flex-wrap: wrap; gap: 8px; }
  .an-charts-grid { grid-template-columns: 1fr; gap: 12px; }
  .mt-nav-group-btn { font-size: 12px; padding: 6px 8px; }
  .mt-card { padding: 14px; }
  .mt-glass-card { padding: 14px; }
  .mt-tab-bar { overflow-x: auto; flex-wrap: nowrap; }
  .mt-tab { white-space: nowrap; }
  .mt-toolbar { flex-wrap: wrap; gap: 6px; }
  .mt-btn-group { flex-wrap: wrap; }
}
@media (max-width: 360px) {
  .mt-stat-grid { grid-template-columns: 1fr; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .mt-glass-card, .mt-card, .mt-stat-card, .mt-health-card, .mt-media-card, .mt-folder-card,
  .mt-btn, .mt-gradient-btn, .mt-table tbody tr {
    transition: none !important;
    transform: none !important;
  }
  .mt-glass-card:hover, .mt-card:hover, .mt-stat-card:hover, .mt-health-card:hover, .mt-media-card:hover,
  .mt-folder-card:hover, .mt-btn:hover, .mt-gradient-btn:hover { transform: none !important; }
  .mt-modal-overlay.visible .mt-modal { animation: none; }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--mt-c-scrollbar, rgba(255,255,255,0.1)); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--mt-c-scrollbar-hover, rgba(255,255,255,0.2)); }

