/* ==========================================================================
   SUBRE247 PRO CATALOG MANAGEMENT - EXECUTIVE THEME v2
   Harmonized typography, high density, card-grouped forms & modern toggles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --mc-bg: #0b1120;
  --mc-card-bg: rgba(15, 23, 42, 0.88);
  --mc-card-inner: #090e1a;
  --mc-border: #1e293b;
  --mc-border-light: #334155;
  --mc-border-focus: #3b82f6;
  --mc-text-main: #f1f5f9;
  --mc-text-muted: #94a3b8;
  --mc-text-dim: #64748b;
  --mc-primary: #2563eb;
  --mc-primary-hover: #1d4ed8;
  --mc-success: #10b981;
  --mc-warning: #f59e0b;
  --mc-danger: #ef4444;
  --mc-info: #0ea5e9;
  --mc-purple: #8b5cf6;
}

section.mc {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--mc-text-main);
  background-color: var(--mc-bg);
  min-height: 100vh;
  padding: 10px 16px 36px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.mc-zoom-75 {
  zoom: 0.75;
}

.mc-zoom-85 {
  zoom: 0.85;
}

.mc-zoom-90 {
  zoom: 0.90;
}

.mc-zoom-100 {
  zoom: 1;
}

.mc-zoom-pills {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.mc-zoom-btn {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.mc-zoom-btn:hover {
  color: #f1f5f9;
  background: rgba(51, 65, 85, 0.5);
}

.mc-zoom-btn.is-active {
  background: rgba(14, 165, 233, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

#mc-header-portal,
#mc-header-portal.mc {
  background: transparent !important;
  background-color: transparent !important;
  min-height: 0 !important;
  max-height: 60px !important;
  height: 100% !important;
  padding: 0 8px !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: none !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

#mc-header-portal * {
  pointer-events: auto;
}

#mc-header-portal .mc-top-bar {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  backdrop-filter: none !important;
  width: 100% !important;
}

.mc * {
  box-sizing: border-box;
}

/* Tabular numbers for clean numeric alignment */
.mc-num,
.mc-stat-number,
.mc-cost-row,
.mc-selling-row,
.mc-price-display,
.mc-id-pill,
.mc-api-pill {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Custom Scrollbar */
.mc ::-webkit-scrollbar,
.mc-custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.mc ::-webkit-scrollbar-track,
.mc-custom-scrollbar::-webkit-scrollbar-track {
  background: #090e1a;
}
.mc ::-webkit-scrollbar-thumb,
.mc-custom-scrollbar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
.mc ::-webkit-scrollbar-thumb:hover,
.mc-custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* ================= TOP INTEGRATED HEADER BAR ================= */
.mc-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--mc-card-bg);
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  padding: 10px 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
}

.mc-top-bar-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mc-breadcrumb-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--mc-text-dim);
}
.mc-breadcrumb-line a {
  color: var(--mc-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.mc-breadcrumb-line a:hover {
  color: #60a5fa;
}
.mc-breadcrumb-line span.sep {
  color: #475569;
}
.mc-breadcrumb-line span.current {
  color: #38bdf8;
  font-weight: 600;
}

.mc-title-heading-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mc-header-icon-mini {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(14, 165, 233, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #60a5fa;
  flex-shrink: 0;
}

.mc-page-h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-version-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: 5px;
  background: rgba(37, 99, 235, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.mc-header-description-pill {
  font-size: 11.5px;
  color: var(--mc-text-muted);
  padding-left: 8px;
  border-left: 1px solid var(--mc-border-light);
}

.mc-top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ================= STATS COUNTERS CARDS ================= */
.mc-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.mc-stat-box {
  background: var(--mc-card-bg);
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.3);
}

.mc-stat-box:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.mc-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.mc-stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--mc-text-dim);
}

.mc-stat-icon-wrap {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.mc-stat-number {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 2px;
}

.mc-stat-sub {
  font-size: 10.5px;
  color: var(--mc-text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ================= FILTER TOOLBAR ================= */
.mc-filter-panel {
  background: var(--mc-card-bg);
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.mc-filter-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 10px;
}

.mc-input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mc-input-icon-wrap i {
  position: absolute;
  left: 12px;
  color: var(--mc-text-dim);
  font-size: 12px;
  pointer-events: none;
}

.mc-input-icon-wrap input {
  padding-left: 34px !important;
}

.mc input:not([type=checkbox]),
.mc select,
.mc textarea {
  width: 100%;
  background: #090e1a;
  color: #f1f5f9;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 12px;
  font-family: inherit;
  transition: all 0.15s ease;
  outline: none;
}

.mc input:not([type=checkbox]):focus,
.mc select:focus,
.mc textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
  background: #0d1527;
}

/* ================= ACTION TOOLBAR ================= */
.mc-action-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--mc-border);
  border-radius: 10px;
  padding: 9px 14px;
  margin-bottom: 14px;
}

.mc-action-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.mc-selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(37, 99, 235, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.mc-toolbar-right-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mc-page-size-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc-control-label {
  font-size: 11.5px;
  color: var(--mc-text-dim);
  font-weight: 600;
}

.mc-size-select {
  background: #090e1a !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  font-size: 11.5px !important;
  width: auto !important;
  cursor: pointer;
}

.mc-count-badge {
  font-size: 11.5px;
  color: var(--mc-text-dim);
  padding-left: 8px;
  border-left: 1px solid var(--mc-border);
}

/* ================= PRO BUTTONS ================= */
.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: 1px solid #3b82f6;
  border-radius: 7px;
  padding: 7px 12px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
  white-space: nowrap;
}

.mc-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.mc-btn:active:not(:disabled) {
  transform: translateY(0);
}

.mc-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.mc-btn.secondary {
  background: rgba(15, 23, 42, 0.8);
  color: #cbd5e1;
  border: 1px solid #334155;
  box-shadow: none;
}
.mc-btn.secondary:hover:not(:disabled) {
  background: rgba(30, 41, 59, 0.9);
  color: #ffffff;
  border-color: #64748b;
}

.mc-btn.success {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #10b981;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.25);
}
.mc-btn.success:hover:not(:disabled) {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

.mc-btn.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  box-shadow: none;
}
.mc-btn.danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.25);
  color: #ffffff;
  border-color: #ef4444;
}

.mc-btn.compact {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
}

/* ================= HIGH-DENSITY SERVER TABLE ================= */
.mc-table-wrap {
  background: var(--mc-card-bg);
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.3);
  margin-bottom: 14px;
}

.mc-table-scroll {
  overflow-x: auto;
  width: 100%;
}

.mc-pro-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  min-width: 1160px;
  white-space: nowrap;
}

.mc-pro-table thead tr {
  background: #070b14;
  border-bottom: 1px solid #1e293b;
  color: #94a3b8;
  font-size: 10.5px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.mc-pro-table th {
  padding: 11px 12px;
}

.mc-pro-table tbody tr {
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
  transition: background-color 0.15s ease;
}

.mc-pro-table tbody tr:hover {
  background-color: rgba(30, 41, 59, 0.35);
}

.mc-pro-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

/* Checkboxes */
.mc input[type=checkbox]:not(.mc-switch-native) {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
  cursor: pointer;
  border-radius: 4px;
}

/* Row Detail Elements */
.mc-server-title-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 340px;
}

.mc-server-main-name {
  font-weight: 700;
  color: #ffffff;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-server-sub-id {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
}

.mc-id-pill {
  background: #1e293b;
  padding: 1px 5px;
  border-radius: 4px;
  color: #38bdf8;
  font-weight: 600;
}

.mc-source-pill {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  padding: 1px 5px;
  border-radius: 4px;
}

.mc-api-pill {
  color: var(--mc-text-dim);
}

.mc-copy-icon-btn {
  background: transparent;
  border: none;
  color: var(--mc-text-dim);
  cursor: pointer;
  padding: 0 2px;
  font-size: 11px;
  transition: color 0.15s;
}
.mc-copy-icon-btn:hover {
  color: #38bdf8;
}

.mc-tags-container {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.mc-tag-badge {
  padding: 1.5px 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
}

/* Pricing Display */
.mc-price-display {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mc-cost-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fbbf24;
}

.mc-selling-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  color: var(--mc-text-muted);
}

.mc-profit-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Status Pills */
.mc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.mc-status-pill.published {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.mc-status-pill.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.mc-status-pill.hidden-state {
  background: rgba(71, 85, 105, 0.25);
  color: #94a3b8;
  border: 1px solid rgba(71, 85, 105, 0.4);
}

.mc-status-pill.error-state {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Pulse Dots */
.mc-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.mc-pulse-dot.green {
  background-color: #10b981;
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.7);
  animation: pulseDotAnim 2s infinite ease-in-out;
}
.mc-pulse-dot.amber {
  background-color: #f59e0b;
}
.mc-pulse-dot.gray {
  background-color: #64748b;
}

@keyframes pulseDotAnim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ================= MODERN TOGGLE SWITCHES ================= */
.mc-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--mc-border);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.mc-toggle-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(30, 41, 59, 0.5);
}

.mc-toggle-card.checked {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.4);
}

.mc-toggle-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mc-toggle-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mc-toggle-icon {
  font-size: 13px;
  color: #38bdf8;
}

.mc-toggle-title {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
}

.mc-toggle-sub {
  font-size: 10.5px;
  color: var(--mc-text-dim);
  line-height: 1.3;
}

.mc-switch-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  width: 54px;
  height: 26px;
}

/* Accessible native checkbox with non-zero dimensions and interactive overlay */
.mc-switch-native {
  position: absolute;
  top: 0;
  left: 0;
  width: 54px;
  height: 26px;
  opacity: 0.01;
  cursor: pointer;
  z-index: 2;
  margin: 0;
  padding: 0;
}

/* Visual switch track */
.mc-switch-track {
  width: 54px;
  height: 26px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  transition: all 0.25s ease;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.mc-switch-track.off {
  background: #1e293b;
  border: 1px solid #334155;
  justify-content: flex-start;
}

.mc-switch-track.on {
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid #10b981;
  justify-content: flex-end;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.mc-switch-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  transition: all 0.25s ease;
}

.mc-switch-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0 4px;
}

.mc-switch-track.off .mc-switch-badge {
  color: #94a3b8;
  margin-left: auto;
}

.mc-switch-track.on .mc-switch-badge {
  color: #ffffff;
  margin-right: auto;
}

/* Grids for Toggles */
.mc-feature-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mc-policy-switch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

/* ================= CARD-BOX LAYOUT FOR FORMS & MODALS ================= */
.mc-modal-flow {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mc-card-box {
  background: var(--mc-card-bg);
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.25);
}

.mc-card-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #090e1a;
  border-bottom: 1px solid var(--mc-border);
}

.mc-card-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.mc-card-box-body {
  padding: 14px 16px;
}

.mc-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.mc-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mc-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.mc-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
}

.mc-field-title {
  font-weight: 600;
  color: #cbd5e1;
}

.mc-field-help {
  font-size: 10.5px;
  color: var(--mc-text-dim);
  line-height: 1.35;
}

.mc-cost-badge {
  font-size: 11px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.mc-badge-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
}
.mc-badge-pill.info {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.mc-header-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc-policy-footnote {
  font-size: 11px;
  color: var(--mc-text-dim);
  padding: 10px 16px 14px;
  margin: 0;
  line-height: 1.4;
}

/* Assign Modal Banner & Preview */
.mc-assign-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(14, 165, 233, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
}

.mc-assign-banner-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.mc-assign-banner-title {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.mc-assign-banner-sub {
  margin: 0;
  font-size: 11.5px;
  color: var(--mc-text-muted);
  line-height: 1.4;
}

.mc-assign-target-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #090e1a;
  border-top: 1px solid var(--mc-border);
}

.mc-preview-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mc-target-platform-logo {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: contain;
}

.mc-target-cat-name {
  font-weight: 700;
  color: #60a5fa;
  font-size: 12.5px;
}

.mc-target-cat-slug {
  font-size: 11px;
  color: var(--mc-text-dim);
}

/* Category Icon Inheritance Preview */
.mc-icon-inheritance-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: #090e1a;
  padding: 10px 16px;
  border-top: 1px solid var(--mc-border);
}

.mc-inheritance-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #cbd5e1;
}

.mc-inherited-logo-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #38bdf8;
}

.mc-inherited-img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: contain;
}

.mc-inherited-empty {
  font-size: 11px;
  color: var(--mc-text-dim);
}

/* Raw pre */
.mc-raw {
  background: #060911;
  padding: 12px;
  border-radius: 8px;
  font-size: 11px;
  color: #94a3b8;
  overflow-x: auto;
  border: 1px solid #1e293b;
  margin: 0;
}

/* ================= PAGINATION BAR ================= */
.mc-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--mc-card-bg);
  border: 1px solid var(--mc-border);
  border-radius: 10px;
  font-size: 11.5px;
  color: var(--mc-text-muted);
}

.mc-page-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mc-current-page-num {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
  font-weight: 700;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* ================= CARD GRIDS (SOURCES, PLATFORMS, CATEGORIES) ================= */
.mc-source-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.mc-platform-cards-grid,
.mc-category-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.mc-card-item {
  background: var(--mc-card-bg);
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.3);
}

.mc-card-item:hover {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 6px 20px -3px rgba(0, 0, 0, 0.45);
  transform: translateY(-1px);
}

.mc-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.mc-card-name {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.mc-card-meta {
  font-size: 11.5px;
  color: var(--mc-text-muted);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mc-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.mc-card-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--mc-border);
  flex-wrap: wrap;
}

/* ================= SUB-TABS (ADD WEBSITE ONLY) ================= */
.mc-section-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--mc-border);
  padding-bottom: 10px;
}

/* ================= MODAL DIALOG ================= */
.mc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.mc-modal-overlay.confirm {
  z-index: 10020;
}

.mc-modal-dialog {
  background: #0b1120;
  color: #f1f5f9;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 20px;
  width: 960px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
}

.mc-modal-dialog.compact {
  width: 480px;
}

.mc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mc-border);
  margin-bottom: 16px;
}

.mc-modal-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--mc-border);
  position: sticky;
  bottom: -20px;
  background: #0b1120;
  padding-bottom: 4px;
}

/* Alerts */
.mc-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.mc-alert.error {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.mc-alert.success {
  background: rgba(16, 185, 129, 0.12);
  color: #86efac;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.mc-info-banner {
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: #7dd3fc;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 11.5px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Empty State */
.mc-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--mc-text-dim);
  font-size: 13px;
}

/* ================= RESPONSIVE RULES ================= */
@media (max-width: 1200px) {
  .mc-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .mc-filter-row {
    grid-template-columns: 1fr 1fr;
  }
  .mc-policy-switch-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mc-feature-toggle-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mc {
    padding: 10px 12px;
  }
  .mc-top-bar {
    padding: 10px 12px;
  }
  .mc-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .mc-filter-row {
    grid-template-columns: 1fr;
  }
  .mc-grid-2col,
  .mc-grid-3col,
  .mc-grid-4col {
    grid-template-columns: 1fr;
  }
  .mc-policy-switch-grid {
    grid-template-columns: 1fr;
  }
  .mc-feature-toggle-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html, body {
    overflow-x: hidden !important;
  }
  .mc {
    padding: 8px !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  .mc-top-bar {
    padding: 10px !important;
    border-radius: 10px !important;
  }
  .mc-page-h1 {
    font-size: 16px !important;
  }
  .mc-header-description-pill {
    display: none !important;
  }
  .mc-stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }
  .mc-stat-box {
    padding: 8px 10px !important;
  }
  .mc-stat-number {
    font-size: 16px !important;
  }
  .mc-action-toolbar {
    padding: 8px 10px !important;
  }
  .mc-source-cards-grid,
  .mc-platform-cards-grid,
  .mc-category-cards-grid {
    grid-template-columns: 1fr !important;
  }
  .mc-table-wrap {
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .mc-table-scroll {
    overflow-x: auto !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch;
  }
  .mc-pagination-bar {
    flex-direction: column !important;
    gap: 8px !important;
    align-items: center !important;
  }
}


/* ================= LABEL STUDIO ================= */
.mc-label-studio {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mc-label-studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  padding-bottom: 8px;
}
.mc-label-studio-title {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  display: flex;
  align-items: center;
}
.mc-label-studio-count {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 600;
}
.mc-label-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
  align-items: center;
}
.mc-label-empty-hint {
  font-size: 12px;
  color: #64748b;
  font-style: italic;
}
.mc-label-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid;
  transition: all 0.15s ease;
}
.mc-label-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.mc-label-chip-remove {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.mc-label-chip-remove:hover {
  opacity: 1;
}
.mc-label-creator-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.4);
  border-radius: 8px;
  padding: 10px 12px;
}
.mc-label-creator-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mc-label-input {
  flex: 1;
  min-width: 180px;
  height: 36px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
  color: #f8fafc;
  outline: none;
}
.mc-label-input:focus {
  border-color: #38bdf8;
}
.mc-label-color-select {
  height: 36px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13px;
  color: #f8fafc;
  outline: none;
}
.mc-label-color-picker {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #334155;
  border-radius: 6px;
  background: #0f172a;
  cursor: pointer;
}
.mc-label-add-btn {
  height: 36px;
  padding: 0 14px;
  background: #0284c7;
  border: 1px solid #38bdf8;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.mc-label-add-btn:hover:not(:disabled) {
  background: #0369a1;
}
.mc-label-add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.mc-label-live-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px dashed rgba(51, 65, 85, 0.4);
}
.mc-label-preview-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}
.mc-label-raw-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mc-label-raw-title {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
}
.mc-label-raw-textarea {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #cbd5e1;
  font-family: monospace;
  outline: none;
  resize: vertical;
}
.mc-label-raw-textarea:focus {
  border-color: #38bdf8;
}
.mc-label-raw-help {
  font-size: 11px;
  color: #64748b;
}

/* =========================================================
   CUSTOM CYBER-ANIMATED CHECKBOXES (GLOBAL, NO NORMAL BOXES)
   ========================================================= */
body input[type="checkbox"]:not(.mc-switch-native):not(.sr-only),
.mc input[type="checkbox"]:not(.mc-switch-native):not(.sr-only) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 19px;
  height: 19px;
  min-width: 19px;
  min-height: 19px;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(56, 189, 248, 0.52);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  position: relative;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(0, 0, 0, 0.45);
  vertical-align: middle;
  outline: none;
  margin: 0;
  padding: 0;
}

html:not(.dark) body input[type="checkbox"]:not(.mc-switch-native):not(.sr-only) {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.65);
  box-shadow: 0 0 6px rgba(14, 165, 233, 0.16), inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

#subre-welcome-popup-backdrop input[type="checkbox"]:not(.mc-switch-native):not(.sr-only) {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(56, 189, 248, 0.6);
}

body input[type="checkbox"]:not(.mc-switch-native):not(.sr-only):hover,
.mc input[type="checkbox"]:not(.mc-switch-native):not(.sr-only):hover {
  border-color: #38bdf8;
  background: rgba(30, 41, 59, 0.96);
  box-shadow: 0 0 11px rgba(56, 189, 248, 0.5), inset 0 1px 2px rgba(0, 0, 0, 0.45);
  transform: scale(1.08);
}

html:not(.dark) body input[type="checkbox"]:not(.mc-switch-native):not(.sr-only):hover {
  background: rgba(56, 189, 248, 0.22);
}

body input[type="checkbox"]:not(.mc-switch-native):not(.sr-only):checked,
.mc input[type="checkbox"]:not(.mc-switch-native):not(.sr-only):checked {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 52%, #38bdf8 100%);
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.62), inset 0 1px 1px rgba(255, 255, 255, 0.42);
  transform: scale(1.05);
}

body input[type="checkbox"]:not(.mc-switch-native):not(.sr-only)::before,
.mc input[type="checkbox"]:not(.mc-switch-native):not(.sr-only)::before {
  content: "";
  width: 9px;
  height: 5.5px;
  border-left: 2.2px solid #ffffff;
  border-bottom: 2.2px solid #ffffff;
  transform: rotate(-45deg) translate(0.5px, -0.5px) scale(0);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center;
}

body input[type="checkbox"]:not(.mc-switch-native):not(.sr-only):checked::before,
.mc input[type="checkbox"]:not(.mc-switch-native):not(.sr-only):checked::before {
  transform: rotate(-45deg) translate(0.5px, -0.5px) scale(1);
}

body input[type="checkbox"]:not(.mc-switch-native):not(.sr-only):indeterminate,
.mc input[type="checkbox"]:not(.mc-switch-native):not(.sr-only):indeterminate {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  border-color: #38bdf8;
}

body input[type="checkbox"]:not(.mc-switch-native):not(.sr-only):indeterminate::before,
.mc input[type="checkbox"]:not(.mc-switch-native):not(.sr-only):indeterminate::before {
  content: "";
  width: 9px;
  height: 2.5px;
  background: #ffffff;
  border: none;
  transform: scale(1);
  border-radius: 2px;
}

/* =========================================================
   TOP NAVBAR PORTAL STYLING (PC-HEADER COMPACT HEADER)
   ========================================================= */
#mc-header-portal {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}

#mc-header-portal .mc-top-bar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.mc > .mc-filter-panel {
  margin-top: 0;
}

/* Sticky header clearance & scroll margin */
html, body {
  scroll-padding-top: 85px !important;
}

.mc, .mc *, .mc-toolbar, .mc-btn, [role="button"] {
  scroll-margin-top: 90px;
}

#mc-header-portal {
  pointer-events: none;
}

#mc-header-portal a, #mc-header-portal button, #mc-header-portal input {
  pointer-events: auto;
}

/* Transparent header pointer-events pass-through */
.pc-header,
.pc-header > div,
.pc-header div.flex,
#mc-header-portal {
  pointer-events: none !important;
}

.pc-header button,
.pc-header a,
.pc-header input,
.pc-header select,
.pc-header [role="button"],
#mc-header-portal button,
#mc-header-portal a {
  pointer-events: auto !important;
}

.mc, .mc-toolbar, .mc-btn, .mc-stats-grid, .mc-filter-panel, [role="button"], button {
  scroll-margin-top: 90px !important;
}


/* =========================================================
   TOP PORTAL ENHANCED STYLING - NEVER WRAP, PROPER FONT SIZE
   ========================================================= */
#mc-header-portal,
#mc-header-portal.mc {
  background: transparent !important;
  background-color: transparent !important;
  min-height: 0 !important;
  max-height: 60px !important;
  height: 100% !important;
  padding: 0 4px !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: none !important;
  overflow: visible !important;
  pointer-events: none !important;
  display: flex !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

#mc-header-portal * {
  pointer-events: auto !important;
}

#mc-header-portal .mc-top-bar,
#mc-header-portal .mc-header-portal-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding: 0 4px !important;
  margin: 0 !important;
  gap: 16px !important;
}

#mc-header-portal .mc-top-bar-left {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

#mc-header-portal .mc-portal-icon-badge {
  width: 34px !important;
  height: 34px !important;
  border-radius: 8px !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #38bdf8 !important;
  font-size: 16px !important;
  flex-shrink: 0 !important;
}

#mc-header-portal .mc-top-bar-right {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

#mc-header-portal .mc-breadcrumb-line {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #94a3b8 !important;
}

#mc-header-portal .mc-page-h1 {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em !important;
}


/* =========================================================
   ACTION BUTTONS & MODAL CLOSE & PRICING PREVIEW ENHANCEMENTS
   ========================================================= */
.mc-modal-close-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  color: #94a3b8 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  outline: none !important;
  padding: 0 !important;
}

.mc-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
  color: #ef4444 !important;
  transform: scale(1.08) !important;
}

.mc-action-cell-btn-group {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

.mc-action-toggle-btn {
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

.mc-action-toggle-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.mc-action-edit-btn {
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
}

.mc-action-edit-btn:hover {
  transform: translateY(-1px) !important;
  background: rgba(56, 189, 248, 0.25) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  color: #38bdf8 !important;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.25) !important;
}

.mc-api-category-tag {
  transition: all 0.15s ease !important;
}

.mc-api-category-tag:hover {
  background: rgba(51, 65, 85, 0.7) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}


/* =========================================================
   MULTI-LAYER SUBRE247.COM MAINTENANCE PAGE & ADMIN STUDIO
   ========================================================= */
@keyframes mcMaintFloatSlow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(20px, -24px, 0) scale(1.08); }
}
@keyframes mcMaintFloatAlt {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-24px, 18px, 0) scale(1.06); }
}
@keyframes mcMaintSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes mcMaintSpinRev {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}
@keyframes mcMaintPulseGlow {
  0%, 100% { box-shadow: 0 0 22px rgba(0, 240, 255, 0.35), 0 0 50px rgba(124, 58, 237, 0.25); }
  50% { box-shadow: 0 0 38px rgba(0, 240, 255, 0.65), 0 0 80px rgba(124, 58, 237, 0.45); }
}
@keyframes mcMaintShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes mcMaintScanline {
  0% { transform: translateY(-100%); opacity: 0; }
  30% { opacity: 0.4; }
  70% { opacity: 0.4; }
  100% { transform: translateY(1000%); opacity: 0; }
}

.mc-maint-root {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  background: radial-gradient(circle at 50% 0%, #0d1633 0%, #050914 55%, #02040a 100%);
  color: #f8fafc;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  z-index: 9990;
}

.mc-maint-preview-shell {
  min-height: 580px !important;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

/* Layer 1: Cosmic Orbs & Cyber Grid */
.mc-maint-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.mc-maint-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(56, 189, 248, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(139, 92, 246, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 35%, transparent 100%);
}

.mc-maint-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(75px);
  opacity: 0.45;
  pointer-events: none;
}
.mc-maint-orb-1 {
  width: 460px;
  height: 460px;
  top: -120px;
  left: -90px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.55), transparent 70%);
  animation: mcMaintFloatSlow 11s ease-in-out infinite;
}
.mc-maint-orb-2 {
  width: 520px;
  height: 520px;
  bottom: -150px;
  right: -110px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.55), transparent 70%);
  animation: mcMaintFloatAlt 13s ease-in-out infinite;
}
.mc-maint-orb-3 {
  width: 340px;
  height: 340px;
  top: 40%;
  left: 55%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 70%);
  animation: mcMaintFloatSlow 15s ease-in-out infinite reverse;
}

/* Layer 2: Glass Card */
.mc-maint-card-outer {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 820px;
  padding: 2px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.55), rgba(124, 58, 237, 0.45) 50%, rgba(16, 185, 129, 0.45));
  box-shadow:
    0 24px 70px -12px rgba(0, 0, 0, 0.85),
    0 0 60px -15px rgba(0, 240, 255, 0.28);
}

.mc-maint-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(165deg, rgba(13, 20, 38, 0.98) 0%, rgba(7, 11, 24, 0.99) 100%) !important;
  background-color: #070b18 !important;
  padding: 38px 34px 28px;
  text-align: center;
}

.mc-maint-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.8), rgba(168, 85, 247, 0.8), transparent);
}

.mc-maint-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(to bottom, transparent, rgba(0, 240, 255, 0.045), transparent);
  pointer-events: none;
  animation: mcMaintScanline 7s linear infinite;
}

.mc-maint-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(0, 240, 255, 0.55);
  pointer-events: none;
}
.mc-maint-corner.tl { top: 14px; left: 14px; border-top: 2px solid; border-left: 2px solid; border-top-left-radius: 6px; }
.mc-maint-corner.tr { top: 14px; right: 14px; border-top: 2px solid; border-right: 2px solid; border-top-right-radius: 6px; }
.mc-maint-corner.bl { bottom: 14px; left: 14px; border-bottom: 2px solid; border-left: 2px solid; border-bottom-left-radius: 6px; }
.mc-maint-corner.br { bottom: 14px; right: 14px; border-bottom: 2px solid; border-right: 2px solid; border-bottom-right-radius: 6px; }

/* Layer 3: Brand Logo Crest */
.mc-maint-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.16), rgba(0, 240, 255, 0.14));
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fde68a;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 22px;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.16);
}

.mc-maint-logo-stage {
  position: relative;
  width: 136px;
  height: 136px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-maint-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px dashed rgba(0, 240, 255, 0.45);
  animation: mcMaintSpin 18s linear infinite;
}

.mc-maint-ring-inner {
  position: absolute;
  inset: 10px;
  border-radius: 9999px;
  border: 2px solid transparent;
  border-top-color: #00f0ff;
  border-right-color: #8b5cf6;
  animation: mcMaintSpinRev 9s linear infinite;
}

.mc-maint-logo-core {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 9999px;
  padding: 4px;
  background: linear-gradient(135deg, #00f0ff, #7c3aed, #10b981);
  animation: mcMaintPulseGlow 3.2s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mc-maint-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
  background: #090f20;
}

.mc-maint-brand-name {
  font-size: clamp(22px, 3.6vw, 28px);
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, #ffffff 0%, #38bdf8 45%, #a78bfa 80%, #34d399 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
}

.mc-maint-title {
  font-size: clamp(20px, 3.4vw, 27px);
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.3;
  margin: 0 0 12px;
  text-shadow: 0 2px 20px rgba(56, 189, 248, 0.25);
}

.mc-maint-message-box {
  max-width: 640px;
  margin: 0 auto 24px;
  padding: 14px 20px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.68;
  white-space: pre-line;
}

/* Layer 4: Countdown & Progress */
.mc-maint-countdown-wrap {
  margin: 0 auto 24px;
  max-width: 560px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.78), rgba(9, 14, 29, 0.88));
  border: 1px solid rgba(56, 189, 248, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mc-maint-countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 12px 0 10px;
}

.mc-maint-time-box {
  padding: 12px 6px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.mc-maint-time-num {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  background: linear-gradient(180deg, #ffffff 20%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mc-maint-time-lbl {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-top: 4px;
}

.mc-maint-progress-wrap {
  max-width: 560px;
  margin: 0 auto 24px;
  text-align: left;
}

@keyframes mcMaintIndeterminate {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(310%); }
}

.mc-maint-progress-track {
  height: 9px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.92);
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.55);
}

.mc-maint-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #10b981, #06b6d4, #38bdf8, #818cf8, #10b981);
  background-size: 220% 100%;
  transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.55);
  animation: mcMaintShimmer 3s linear infinite;
}

.mc-maint-progress-fill.is-indeterminate {
  width: 36%;
  transition: none;
  animation: mcMaintShimmer 3s linear infinite, mcMaintIndeterminate 2.2s ease-in-out infinite;
}

/* Layer 5: 3-Column Guarantee Cards */
.mc-maint-guarantees {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto 24px;
  text-align: left;
}

@media (max-width: 640px) {
  .mc-maint-guarantees {
    grid-template-columns: 1fr;
  }
  .mc-maint-card {
    padding: 28px 18px 22px;
  }
}

.mc-maint-guarantee-card {
  padding: 13px 14px;
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mc-maint-guarantee-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.38);
}

/* Layer 6: Action Buttons & Admin Banner */
.mc-maint-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.mc-maint-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13.5px;
  color: #030712 !important;
  background: linear-gradient(90deg, #00f0ff, #38bdf8, #34d399);
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mc-maint-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 240, 255, 0.45);
}

.mc-maint-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13.5px;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.28);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mc-maint-btn-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(56, 189, 248, 0.5);
  color: #fff;
}

.mc-maint-admin-ribbon {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  padding: 8px 16px;
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.95), rgba(180, 83, 9, 0.95));
  border-bottom: 1px solid rgba(253, 224, 71, 0.45);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.mc-maint-card-footer {
  background: transparent !important;
  background-color: transparent !important;
}

/* =========================================================
   COMPACT SIDEBAR MAINTENANCE LINK WITH FLOWING GRADIENT TEXT
   ========================================================= */
@keyframes mcMaintTextFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

.mc-maint-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.mc-maint-nav-row:hover {
  background: rgba(148, 163, 184, 0.12);
}

.mc-maint-nav-row.is-on {
  background: rgba(245, 158, 11, 0.1);
}

.mc-maint-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  flex-shrink: 0;
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.75);
}

.mc-maint-dot.is-on {
  background: #f59e0b;
  box-shadow: 0 0 9px rgba(245, 158, 11, 0.85);
  animation: mcMaintPulseGlow 1.6s ease-in-out infinite;
}

.mc-maint-flow-text {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-image: linear-gradient(90deg, #38bdf8, #34d399, #818cf8, #f472b6, #38bdf8);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: mcMaintTextFlow 3.4s linear infinite;
}

.mc-maint-flow-text.is-on {
  background-image: linear-gradient(90deg, #fbbf24, #fb7185, #f59e0b, #fde047, #fbbf24);
}

html:not(.dark) .mc-maint-flow-text:not(.is-on) {
  background-image: linear-gradient(90deg, #0284c7, #059669, #4f46e5, #db2777, #0284c7);
}

.mc-maint-mini-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 30px;
  height: 16px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(51, 65, 85, 0.9);
  padding: 2px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mc-maint-mini-switch.is-on {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: rgba(251, 191, 36, 0.75);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.mc-maint-mini-thumb {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transform: translateX(0);
  transition: transform 0.2s ease;
}

.mc-maint-mini-switch.is-on .mc-maint-mini-thumb {
  transform: translateX(14px);
}

/* Section .mc always uses dark executive surfaces, so toggle cards stay dark inside .mc */
section.mc .mc-toggle-card {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(51, 65, 85, 0.85);
}

section.mc .mc-toggle-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.45);
}

section.mc .mc-toggle-card.checked {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.52);
}

section.mc .mc-toggle-title {
  color: #f1f5f9;
}

section.mc .mc-toggle-sub {
  color: #94a3b8;
}

/* =========================================================
   PRO CATALOG v2: 6-CARD STATS, QUICK FILTER CHIPS & 3-COLUMN CATEGORIES
   ========================================================= */
.mc-stats-grid.mc-stats-grid-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.mc-stat-box.is-clickable {
  cursor: pointer;
}

.mc-stat-box.is-clickable:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(15, 23, 42, 0.96);
}

.mc-stat-box.is-active {
  background: rgba(15, 23, 42, 0.98);
}

/* Quick Chips Bar */
.mc-quick-chips-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.mc-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  border: 1px solid #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.mc-quick-chip:hover {
  border-color: #60a5fa;
  color: #ffffff;
  background: rgba(30, 41, 59, 0.95);
}

.mc-quick-chip.is-active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(14, 165, 233, 0.22));
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.mc-quick-chip.tone-emerald.is-active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  color: #6ee7b7;
}

.mc-quick-chip.tone-amber.is-active,
.mc-quick-chip.tone-yellow.is-active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fde68a;
}

.mc-quick-chip.tone-red.is-active,
.mc-quick-chip.tone-rose.is-active {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

.mc-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.mc-chip-count {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(2, 6, 23, 0.55);
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
}

.mc-quick-chip-reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  cursor: pointer;
  margin-left: auto;
}

.mc-quick-chip-reset:hover {
  background: rgba(239, 68, 68, 0.28);
  color: #ffffff;
}

/* Pro Filter Grid */
.mc-filter-row.mc-filter-row-pro {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mc-filter-row.mc-filter-row-pro .mc-filter-search {
  grid-column: span 1;
}

/* Badges inside Server Table */
.mc-enable-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mc-enable-pill.is-on {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.32);
}

.mc-enable-pill.is-off {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.35);
}

.mc-new-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  letter-spacing: 0.04em;
}

.mc-api-category-tag {
  display: inline-block;
  font-size: 10px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #1e293b;
  border-radius: 4px;
  padding: 1px 6px;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ================= 3-COLUMN CATEGORIES WORKSPACE ================= */
.mc-cat-top-panel {
  background: var(--mc-card-bg);
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mc-cat-kpi-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.85);
}

.mc-cat-kpi-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  color: #cbd5e1;
}

.mc-cat-kpi-item.is-clickable {
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid #1e293b;
  transition: border-color 0.15s;
}

.mc-cat-kpi-item.is-clickable:hover {
  border-color: #38bdf8;
}

.mc-cat-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mc-cat-kpi-item small {
  font-size: 11px;
  color: #64748b;
}

.mc-cat-global-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mc-cat-global-filters select {
  width: auto;
  min-width: 155px;
  flex: 1 1 155px;
}

.mc-cat-3col {
  display: grid;
  grid-template-columns: clamp(315px, 18.5vw, 420px) clamp(350px, 22.5vw, 480px) minmax(500px, 1fr);
  gap: 12px;
  align-items: stretch;
  height: calc(100vh - 215px);
  min-height: 580px;
  width: 100%;
}

.mc-col-pane {
  background: var(--mc-card-bg);
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.35);
}

.mc-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #070b14;
  border-bottom: 1px solid var(--mc-border);
  flex-shrink: 0;
}

.mc-col-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  color: #ffffff;
}

.mc-col-title-wrap strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-col-step {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(59, 130, 246, 0.45);
  color: #60a5fa;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mc-col-count {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 9999px;
  background: #1e293b;
  color: #94a3b8;
  flex-shrink: 0;
}

.mc-col-subsearch {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.75);
  background: rgba(9, 14, 26, 0.7);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.mc-col-subsearch input {
  padding: 6px 9px;
  font-size: 11.5px;
}

.mc-col-mini-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.mc-mini-pill {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  font-family: inherit;
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  border: 1px solid #283548;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.mc-mini-pill:hover {
  color: #ffffff;
  border-color: #475569;
}

.mc-mini-pill.is-active {
  background: rgba(37, 99, 235, 0.25);
  border-color: #3b82f6;
  color: #93c5fd;
}

.mc-col-list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mc-col-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(9, 14, 26, 0.72);
  border: 1px solid rgba(30, 41, 59, 0.9);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  user-select: none;
}

.mc-col-item.is-dragging {
  opacity: 0.35;
  border: 1px dashed #38bdf8;
  background: rgba(14, 165, 233, 0.08);
}

.mc-col-item.is-drag-over-top {
  border-top: 2px solid #38bdf8 !important;
  box-shadow: 0 -3px 8px rgba(56, 189, 248, 0.45);
}

.mc-col-item.is-drag-over-bottom {
  border-bottom: 2px solid #38bdf8 !important;
  box-shadow: 0 3px 8px rgba(56, 189, 248, 0.45);
}

.mc-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 22px;
  color: #475569;
  cursor: grab;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.mc-col-item:hover .mc-drag-handle {
  color: #94a3b8;
}

.mc-drag-handle:hover {
  color: #38bdf8 !important;
}

.mc-drag-handle:active {
  cursor: grabbing;
}

.mc-col-item:hover {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(30, 41, 59, 0.55);
}

.mc-col-item.is-selected {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.12));
  border-color: #38bdf8;
  box-shadow: inset 3px 0 0 #38bdf8;
}

.mc-col-item.is-disabled-item {
  opacity: 0.72;
}

.mc-col-item-main {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
}

.mc-plat-logo-box {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.mc-plat-logo-box img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.mc-col-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.mc-col-item-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.mc-col-item-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-col-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #94a3b8;
  flex-wrap: wrap;
}

.mc-col-item-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.mc-mini-icon-btn {
  width: 23px;
  height: 23px;
  border-radius: 5px;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.mc-mini-icon-btn:hover:not(:disabled) {
  color: #ffffff;
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.22);
}

.mc-mini-icon-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.mc-mini-icon-btn.mc-arrow-btn:hover:not(:disabled) {
  color: #38bdf8;
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.18);
}

.mc-mini-icon-btn.on {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.mc-mini-icon-btn.off {
  color: #94a3b8;
}

.mc-mini-icon-btn.danger:hover:not(:disabled) {
  color: #fca5a5;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

.mc-sort-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 0.5px 5px;
  border-radius: 4px;
  background: #1e293b;
  color: #94a3b8;
  flex-shrink: 0;
}

.mc-cat-slug-line {
  font-size: 10.5px;
  color: #60a5fa;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-cat-badges-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.mc-cat-stat-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.mc-cat-stat-tag.total {
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
}

.mc-cat-stat-tag.pub {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
}

.mc-cat-stat-tag.hid {
  background: rgba(100, 116, 139, 0.22);
  color: #cbd5e1;
}

.mc-cat-stat-tag.err {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.mc-match-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Column 3: Servers Pane */
.mc-col-servers-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: #070b14;
  border-bottom: 1px solid var(--mc-border);
  flex-shrink: 0;
}

.mc-col-servers-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.mc-col-servers-logo {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: contain;
  flex-shrink: 0;
}

.mc-col-servers-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13.5px;
  color: #e2e8f0;
}

.mc-col-servers-crumb strong {
  color: #ffffff;
}

.mc-col-servers-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.mc-col-servers-sub code {
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
}

.mc-col-servers-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mc-col-warn-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(245, 158, 11, 0.14);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  font-size: 11.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.mc-col-servers-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(9, 14, 26, 0.65);
  border-bottom: 1px solid rgba(30, 41, 59, 0.8);
  flex-shrink: 0;
}

.mc-col-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid var(--mc-border);
  flex-shrink: 0;
}

.mc-col-table-scroll {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
}

.mc-pro-table.mc-cat-compact-table {
  min-width: 780px;
}

.mc-pro-table.mc-cat-compact-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #070b14;
  padding: 9px 10px;
}

.mc-pro-table.mc-cat-compact-table td {
  padding: 8px 10px;
}

.mc-col-empty {
  text-align: center;
  padding: 24px 12px;
  color: #64748b;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mc-col-empty-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  color: #94a3b8;
  font-size: 13px;
}

/* Quick Assign Modal List */
.mc-qa-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.mc-qa-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(9, 14, 26, 0.78);
  border: 1px solid #1e293b;
  cursor: pointer;
  transition: all 0.14s ease;
}

.mc-qa-row:hover {
  border-color: #38bdf8;
}

.mc-qa-row.is-checked {
  background: rgba(37, 99, 235, 0.15);
  border-color: #3b82f6;
}

.mc-qa-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.mc-qa-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #f8fafc;
  flex-wrap: wrap;
}

.mc-qa-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #94a3b8;
  flex-wrap: wrap;
}

/* Responsive Breakpoints for 6-Card Stats, Pro Filter Row, and 3-Column Categories */
@media (max-width: 1380px) {
  .mc-stats-grid.mc-stats-grid-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .mc-cat-3col {
    grid-template-columns: clamp(280px, 22vw, 360px) clamp(320px, 26vw, 420px) minmax(420px, 1fr);
  }
}

@media (max-width: 1120px) {
  .mc-cat-3col {
    grid-template-columns: 1fr 1fr;
    height: auto;
    min-height: 0;
  }
  .mc-col-platforms,
  .mc-col-categories {
    max-height: 380px;
  }
  .mc-col-servers {
    grid-column: 1 / -1;
    max-height: 620px;
  }
  .mc-filter-row.mc-filter-row-pro {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .mc-stats-grid.mc-stats-grid-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mc-cat-3col {
    grid-template-columns: 1fr;
    height: auto;
  }
  .mc-col-platforms,
  .mc-col-categories {
    max-height: 300px;
  }
  .mc-col-servers {
    grid-column: auto;
    max-height: none;
  }
  .mc-filter-row.mc-filter-row-pro {
    grid-template-columns: 1fr;
  }
  .mc-cat-global-filters select {
    width: 100%;
    min-width: 0;
  }
  .mc-source-cards-grid {
    grid-template-columns: 1fr;
  }
  .mc-source-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* =========================================================
   PRO SOURCE PROFIT, PRICING BADGES & ACTION BAR POLISH
   ========================================================= */
.mc-source-card-pro {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.96), rgba(9, 14, 26, 0.98));
  border: 1px solid rgba(51, 65, 85, 0.8);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, box-shadow 0.22s ease;
}

.mc-source-card-pro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.7), rgba(16, 185, 129, 0.7), transparent);
  opacity: 0.45;
  transition: opacity 0.25s ease;
}

.mc-source-card-pro:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 12px 28px -8px rgba(14, 165, 233, 0.25);
}

.mc-source-card-pro:hover::before {
  opacity: 1;
}

.mc-source-url-pill {
  font-size: 11px;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 5px 9px;
  border-radius: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.mc-source-tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.mc-tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(51, 65, 85, 0.85);
  padding: 2px 8px;
  border-radius: 6px;
}

.mc-source-pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.mc-source-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.42);
  border: 1px solid rgba(100, 116, 139, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
}

.mc-profit-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mc-profit-badge.is-source {
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.mc-profit-badge.is-custom {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.mc-source-profit-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.22);
  margin: 2px 0;
}

.mc-profit-strip-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}

.mc-profit-strip-label i {
  color: #34d399;
}

.mc-profit-tier-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mc-tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.mc-tier-chip.is-member {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.mc-tier-chip.is-vip {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.mc-tier-chip.is-dist {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

#mc-header-portal .mc-top-bar-left {
  overflow: hidden !important;
  flex: 1 1 0% !important;
  min-width: 0 !important;
}

#mc-header-portal .mc-top-bar-right {
  flex-shrink: 0 !important;
  margin-left: 10px !important;
}

.mc-source-sync-time {
  font-size: 11px !important;
  color: #94a3b8 !important;
  background: rgba(15, 23, 42, 0.55) !important;
  border: 1px solid rgba(51, 65, 85, 0.55) !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  width: fit-content;
}

.mc-source-actions-grid {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap;
  gap: 7px !important;
  padding-top: 12px !important;
}

.mc-source-actions-grid .mc-btn {
  justify-content: center;
  white-space: nowrap !important;
  flex: 1 0 auto;
  padding: 7px 11px !important;
  font-size: 12px !important;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.mc-source-actions-grid .mc-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.mc-btn.mc-btn-profit {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(14, 165, 233, 0.16)) !important;
  border: 1px solid rgba(52, 211, 153, 0.48) !important;
  color: #6ee7b7 !important;
  font-weight: 700 !important;
}

.mc-btn.mc-btn-profit:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(14, 165, 233, 0.26)) !important;
  border-color: rgba(52, 211, 153, 0.78) !important;
  box-shadow: 0 4px 14px -3px rgba(16, 185, 129, 0.4);
  color: #a7f3d0 !important;
}

.mc-profit-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px !important;
}

.mc-tier-preview-card {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 9px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.mc-tier-preview-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -5px rgba(0, 0, 0, 0.45);
}

.mc-tier-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mc-tier-preview-price {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.mc-profit-callout {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 11.5px;
  line-height: 1.45;
}

.mc-profit-callout i {
  margin-top: 2px;
  flex-shrink: 0;
}

.mc-profit-callout.is-source {
  background: rgba(14, 165, 233, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #bae6fd;
}

.mc-profit-callout.is-source i {
  color: #38bdf8;
}

.mc-profit-callout.is-custom {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fde68a;
}

.mc-profit-callout.is-custom i {
  color: #fbbf24;
}
