/* ========================================================================
   MarketTalent — Design Tokens & Component Styles
   ======================================================================== */

/* --- Design Tokens --- */
:root {
  --mt-primary: #6366f1;
  --mt-primary-hover: #4f46e5;
  --mt-primary-light: #e0e7ff;
  --mt-bg: #f8fafc;
  --mt-sidebar-bg: #1e293b;
  --mt-sidebar-text: #94a3b8;
  --mt-sidebar-active: #6366f1;
  --mt-card-bg: #ffffff;
  --mt-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --mt-card-radius: 12px;
  --mt-btn-radius: 8px;
  --mt-border: #e2e8f0;
  --mt-text: #1e293b;
  --mt-text-muted: #64748b;
  --mt-success: #22c55e;
  --mt-danger: #ef4444;
  --mt-warning: #f59e0b;
  --mt-info: #3b82f6;
  --mt-transition: 200ms ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--mt-bg);
  color: var(--mt-text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--mt-primary); text-decoration: none; }
a:hover { color: var(--mt-primary-hover); }

/* --- Layout Shell --- */
.mt-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* --- Sidebar --- */
.mt-sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--mt-sidebar-bg);
  color: var(--mt-sidebar-text);
  display: flex;
  flex-direction: column;
  transition: width var(--mt-transition), min-width var(--mt-transition);
  overflow: hidden;
  z-index: 10;
}

.mt-sidebar.collapsed {
  width: 64px;
  min-width: 64px;
}

.mt-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mt-sidebar-brand svg {
  flex-shrink: 0;
}

.mt-sidebar.collapsed .mt-sidebar-brand span {
  display: none;
}

.mt-sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.mt-sidebar-nav .mt-nav-section {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(148, 163, 184, 0.5);
  padding: 16px 12px 6px;
  white-space: nowrap;
}

.mt-sidebar.collapsed .mt-nav-section {
  display: none;
}

.mt-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--mt-sidebar-text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--mt-transition), color var(--mt-transition);
  cursor: pointer;
}

.mt-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.mt-nav-link.active {
  background: var(--mt-primary);
  color: #ffffff;
}

.mt-nav-link svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.mt-sidebar.collapsed .mt-nav-link span {
  display: none;
}

.mt-nav-badge {
  margin-left: auto;
  background: var(--mt-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.mt-nav-link.active .mt-nav-badge {
  background: rgba(255, 255, 255, 0.25);
}

/* Sidebar account switcher */
.mt-sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mt-account-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--mt-transition);
  color: var(--mt-sidebar-text);
}

.mt-account-switcher:hover {
  background: rgba(255, 255, 255, 0.06);
}

.mt-account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mt-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.mt-account-info {
  overflow: hidden;
  white-space: nowrap;
}

.mt-account-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.mt-account-role {
  font-size: 11px;
  color: var(--mt-sidebar-text);
}

.mt-sidebar.collapsed .mt-account-info {
  display: none;
}

/* --- Main Content --- */
.mt-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* --- Topbar --- */
.mt-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 56px;
  background: var(--mt-card-bg);
  border-bottom: 1px solid var(--mt-border);
  flex-shrink: 0;
}

.mt-topbar-toggle {
  background: none;
  border: none;
  color: var(--mt-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: background var(--mt-transition);
}

.mt-topbar-toggle:hover {
  background: var(--mt-bg);
}

.mt-topbar-search {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.mt-topbar-search input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--mt-border);
  border-radius: var(--mt-btn-radius);
  font-size: 13px;
  background: var(--mt-bg);
  color: var(--mt-text);
  outline: none;
  transition: border-color var(--mt-transition);
}

.mt-topbar-search input:focus {
  border-color: var(--mt-primary);
}

.mt-topbar-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--mt-text-muted);
}

.mt-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.mt-topbar-btn {
  background: none;
  border: none;
  color: var(--mt-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  position: relative;
  transition: background var(--mt-transition);
}

.mt-topbar-btn:hover {
  background: var(--mt-bg);
}

.mt-topbar-btn .mt-badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--mt-danger);
  border-radius: 50%;
  border: 2px solid var(--mt-card-bg);
}

/* --- Page Content --- */
.mt-page {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.mt-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.mt-page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--mt-text);
  margin: 0;
}

.mt-page-subtitle {
  font-size: 14px;
  color: var(--mt-text-muted);
  margin: 4px 0 0;
}

/* --- Cards --- */
.mt-card {
  background: var(--mt-card-bg);
  border-radius: var(--mt-card-radius);
  box-shadow: var(--mt-card-shadow);
  border: 1px solid var(--mt-border);
  overflow: hidden;
}

.mt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--mt-border);
  font-weight: 600;
  font-size: 14px;
}

.mt-card-body {
  padding: 20px;
}

.mt-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--mt-border);
  background: var(--mt-bg);
}

/* --- Stat Cards --- */
.mt-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.mt-stat-card {
  background: var(--mt-card-bg);
  border-radius: var(--mt-card-radius);
  box-shadow: var(--mt-card-shadow);
  border: 1px solid var(--mt-border);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.mt-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mt-stat-icon.primary { background: var(--mt-primary-light); color: var(--mt-primary); }
.mt-stat-icon.success { background: #dcfce7; color: var(--mt-success); }
.mt-stat-icon.warning { background: #fef3c7; color: var(--mt-warning); }
.mt-stat-icon.danger  { background: #fee2e2; color: var(--mt-danger); }

.mt-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--mt-text);
  line-height: 1;
}

.mt-stat-label {
  font-size: 13px;
  color: var(--mt-text-muted);
  margin-top: 2px;
}

/* --- Buttons --- */
.mt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--mt-btn-radius);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--mt-transition), box-shadow var(--mt-transition);
  white-space: nowrap;
}

.mt-btn svg {
  width: 16px;
  height: 16px;
}

.mt-btn-primary {
  background: var(--mt-primary);
  color: #fff;
}
.mt-btn-primary:hover { background: var(--mt-primary-hover); color: #fff; }

.mt-btn-secondary {
  background: var(--mt-bg);
  color: var(--mt-text);
  border-color: var(--mt-border);
}
.mt-btn-secondary:hover { background: #e2e8f0; }

.mt-btn-danger {
  background: var(--mt-danger);
  color: #fff;
}
.mt-btn-danger:hover { background: #dc2626; color: #fff; }

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

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

/* --- Badges --- */
.mt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.mt-badge-draft    { background: #f1f5f9; color: #64748b; }
.mt-badge-scheduled { background: #dbeafe; color: #2563eb; }
.mt-badge-published { background: #dcfce7; color: #16a34a; }
.mt-badge-failed   { background: #fee2e2; color: #dc2626; }
.mt-badge-active   { background: #dcfce7; color: #16a34a; }
.mt-badge-inactive { background: #f1f5f9; color: #64748b; }

/* --- Tables --- */
.mt-table {
  width: 100%;
  border-collapse: collapse;
}

.mt-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mt-text-muted);
  border-bottom: 1px solid var(--mt-border);
}

.mt-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--mt-border);
  vertical-align: middle;
}

.mt-table tbody tr:hover {
  background: var(--mt-bg);
}

/* --- Empty State --- */
.mt-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--mt-text-muted);
}

.mt-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.mt-empty h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--mt-text);
  margin: 0 0 8px;
}

.mt-empty p {
  font-size: 14px;
  margin: 0 0 16px;
}

/* --- Forms --- */
.mt-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--mt-border);
  border-radius: var(--mt-btn-radius);
  font-size: 14px;
  color: var(--mt-text);
  background: var(--mt-card-bg);
  outline: none;
  transition: border-color var(--mt-transition);
}

.mt-input:focus {
  border-color: var(--mt-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.mt-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--mt-text);
  margin-bottom: 4px;
}

.mt-form-group {
  margin-bottom: 16px;
}

/* --- Toast container --- */
#mt-toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mt-toast {
  padding: 12px 16px;
  border-radius: var(--mt-btn-radius);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: mt-slide-in 0.25s ease;
}

.mt-toast.success { background: var(--mt-success); }
.mt-toast.error   { background: var(--mt-danger); }
.mt-toast.info    { background: var(--mt-info); }
.mt-toast-action {
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  padding: 2px 10px;
  border-radius: 4px;
  margin-left: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.mt-toast-action:hover { background: rgba(255,255,255,0.4); }

/* --- Inline alerts --- */
.mt-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--mt-btn-radius);
  font-size: 14px;
  font-weight: 500;
}
.mt-alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.mt-alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

@keyframes mt-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .mt-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    z-index: 100;
  }
  .mt-sidebar.open {
    transform: translateX(0);
  }
  .mt-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
  }
  .mt-sidebar-overlay.visible {
    display: block;
  }
  .mt-page {
    padding: 16px;
    -webkit-overflow-scrolling: touch;
  }
  .mt-topbar {
    padding: 0 16px;
  }
  .mt-topbar-search {
    max-width: none;
  }
  .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;
    -webkit-overflow-scrolling: touch;
  }
  .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;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .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;
  }
  /* Forms: bigger touch targets */
  .mt-input, .mt-label + .mt-input {
    min-height: 44px;
    font-size: 16px; /* prevents iOS zoom on focus */
    padding: 10px 12px;
  }
  select.mt-input {
    min-height: 44px;
    -webkit-appearance: menulist;
  }
  /* Modals: full-width on mobile */
  .mt-modal {
    width: 95%;
    max-height: 90vh;
    margin: auto;
  }
  .mt-modal-body {
    padding: 16px;
  }
  /* Confirm dialog: full-width on mobile */
  .mt-confirm-box {
    width: 92%;
    max-width: none;
    padding: 24px 20px 20px;
  }
  /* Stat grid 2-col on very small screens */
  .mt-stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .mt-stat-icon {
    width: 36px;
    height: 36px;
  }
  /* Page title smaller on mobile */
  .mt-page-title {
    font-size: 20px;
  }
  /* Card headers: stack on mobile */
  .mt-card-header {
    flex-wrap: wrap;
    gap: 8px;
  }
  /* Compose/media toolbar: stack */
  .mt-media-toolbar {
    flex-direction: column;
  }
  .mt-media-toolbar .mt-input {
    max-width: none;
  }
}

/* Very small phones (< 360px) */
@media (max-width: 360px) {
  .mt-stat-grid {
    grid-template-columns: 1fr;
  }
  .mt-page {
    padding: 12px;
  }
}

/* Tablets (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .mt-sidebar {
    width: 200px;
    min-width: 200px;
  }
  .mt-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================================================
   DARK MODE
   ======================================================================== */
html.dark {
  --mt-bg: #0f172a;
  --mt-card-bg: #1e293b;
  --mt-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --mt-border: #334155;
  --mt-text: #e2e8f0;
  --mt-text-muted: #94a3b8;
  --mt-sidebar-bg: #020617;
  --mt-primary-light: #312e81;
}

html.dark .mt-topbar {
  background: var(--mt-card-bg);
  border-bottom-color: var(--mt-border);
}

html.dark .mt-topbar-search input {
  background: var(--mt-bg);
  color: var(--mt-text);
  border-color: var(--mt-border);
}

html.dark .mt-card-footer,
html.dark .mt-stat-card {
  background: var(--mt-card-bg);
}

html.dark .mt-input {
  background: var(--mt-bg);
  color: var(--mt-text);
  border-color: var(--mt-border);
}

html.dark pre {
  background: #020617 !important;
}

html.dark code {
  background: var(--mt-bg);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.9em;
}

html.dark .mt-modal {
  background: var(--mt-card-bg);
  color: var(--mt-text);
}

html.dark kbd {
  background: var(--mt-sidebar-bg);
  border-color: var(--mt-border);
  color: var(--mt-text);
}

/* ========================================================================
   SHARED MODAL STYLES (used by calendar, accounts, compose)
   ======================================================================== */
.mt-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.mt-modal-overlay.visible {
  display: flex;
}

.mt-modal {
  background: var(--mt-card-bg);
  border-radius: var(--mt-card-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
}

.mt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--mt-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-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  font-size: 20px;
  line-height: 1;
}

.mt-modal-close:hover {
  background: var(--mt-bg);
}

.mt-modal-body {
  padding: 20px;
}

.mt-modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid var(--mt-border);
}

/* ========================================================================
   SHARED FORM STYLES
   ======================================================================== */
.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 12px;
  border: 1px solid var(--mt-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--mt-text);
  background: var(--mt-bg);
  transition: border-color var(--mt-transition);
  box-sizing: border-box;
}

.mt-input:focus {
  outline: none;
  border-color: var(--mt-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

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

.mt-input-group .mt-input {
  flex: 1;
}

/* ========================================================================
   BUTTON VARIANTS
   ======================================================================== */
.mt-btn-danger {
  background: var(--mt-danger, #ef4444);
  color: #fff;
}

.mt-btn-danger:hover {
  background: #dc2626;
}

/* ========================================================================
   SKELETON LOADING
   ======================================================================== */
.mt-skeleton {
  background: linear-gradient(90deg, var(--mt-bg) 25%, #e2e8f0 50%, var(--mt-bg) 75%);
  background-size: 200% 100%;
  animation: mt-shimmer 1.5s infinite;
  border-radius: 6px;
  height: 14px;
  margin-bottom: 8px;
}

html.dark .mt-skeleton {
  background: linear-gradient(90deg, var(--mt-sidebar-bg) 25%, #334155 50%, var(--mt-sidebar-bg) 75%);
  background-size: 200% 100%;
}

.mt-skeleton-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

@keyframes mt-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================================================
   MOBILE BOTTOM NAV
   ======================================================================== */
.mt-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--mt-card-bg);
  border-top: 1px solid var(--mt-border);
  z-index: 100;
  padding: 6px 0;
  padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (max-width: 768px) {
  .mt-mobile-nav {
    display: flex;
    justify-content: space-around;
  }
  .mt-page {
    padding-bottom: 80px;
  }
}

.mt-mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 10px 4px;
  color: var(--mt-text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  border-radius: 8px;
  transition: color var(--mt-transition);
  min-width: 48px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mt-mobile-nav-link.active {
  color: var(--mt-primary);
}

.mt-mobile-nav-link svg {
  width: 22px;
  height: 22px;
}

/* ---------------------------------------------------------------------------
   Workspaces / Hashtags / Media / Audit (v7)
   --------------------------------------------------------------------------- */
.mt-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.mt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mt-card-header h3 { font-size: 16px; margin: 0; }
.mt-card-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--mt-border);
}
.mt-ws-accounts { display: flex; flex-direction: column; gap: 8px; }
.mt-ws-account {
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  background: var(--mt-bg); padding: 8px 10px; border-radius: 8px;
}
.mt-platform-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: #94a3b8;
}
.mt-platform-instagram { background: #e1306c; }
.mt-platform-tiktok { background: #000; }
.mt-platform-x { background: #1d9bf0; }
.mt-tags-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.mt-tag {
  display: inline-flex; align-items: center;
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: var(--mt-bg); color: var(--mt-text-muted);
  border: 1px solid var(--mt-border);
}
.mt-tag-green { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.mt-tag-red { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.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;
  background: var(--mt-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--mt-card-shadow);
}
.mt-media-thumb { aspect-ratio: 1 / 1; background: var(--mt-bg); 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.55); color: #fff; cursor: pointer; font-size: 16px; line-height: 1;
}
.mt-media-del:hover { background: #dc2626; }

.mt-health-card {
  background: var(--mt-card-bg);
  border: 1px solid var(--mt-border);
  border-radius: 10px;
  padding: 12px;
}
