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

/* ==========================================================================
   MediCore Healthcare OS — Master Enterprise Design System
   Copyright (c) 2026 TVB Network (Pty) Ltd. All rights reserved.
   ========================================================================== */

:root, [data-theme="light"] {
  --mc-bg-page: #f8fafc;
  --mc-bg-sidebar: #ffffff;
  --mc-bg-topbar: rgba(255, 255, 255, 0.95);
  --mc-bg-card: #ffffff;
  --mc-bg-surface: #f1f5f9;
  --mc-bg-hover: #e2e8f0;
  --mc-bg-input: #ffffff;

  --mc-border: #e2e8f0;
  --mc-border-subtle: rgba(0, 0, 0, 0.05);
  --mc-border-strong: #cbd5e1;
  --mc-border-accent: rgba(37, 99, 235, 0.35);

  --mc-primary: #2563eb;
  --mc-primary-dark: #1d4ed8;
  --mc-primary-soft: rgba(37, 99, 235, 0.08);

  --mc-emerald: #059669;
  --mc-emerald-dark: #047857;
  --mc-emerald-soft: rgba(5, 150, 105, 0.1);

  --mc-amber: #d97706;
  --mc-amber-soft: rgba(217, 119, 6, 0.1);

  --mc-rose: #dc2626;
  --mc-rose-soft: rgba(220, 38, 38, 0.1);

  --mc-purple: #9333ea;
  --mc-purple-soft: rgba(147, 51, 234, 0.1);

  --mc-text-main: #0f172a;
  --mc-text-muted: #64748b;
  --mc-text-dim: #94a3b8;

  --mc-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --mc-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
  --mc-shadow-glow: 0 0 25px rgba(37, 99, 235, 0.08);

  --mc-radius-sm: 6px;
  --mc-radius-md: 10px;
  --mc-radius-lg: 14px;
  --mc-radius-xl: 20px;
}

[data-theme="dark"] {
  --mc-bg-page: #070c14;
  --mc-bg-sidebar: #0a121e;
  --mc-bg-topbar: rgba(10, 18, 30, 0.92);
  --mc-bg-card: #0f1a2c;
  --mc-bg-surface: #142238;
  --mc-bg-hover: #192b47;
  --mc-bg-input: #09101d;

  --mc-border: #17263d;
  --mc-border-subtle: rgba(255, 255, 255, 0.05);
  --mc-border-strong: #223756;
  --mc-border-accent: rgba(37, 99, 235, 0.35);

  --mc-primary: #3b82f6;
  --mc-primary-dark: #2563eb;
  --mc-primary-soft: rgba(59, 130, 246, 0.14);

  --mc-emerald: #10b981;
  --mc-emerald-dark: #059669;
  --mc-emerald-soft: rgba(16, 185, 129, 0.14);

  --mc-amber: #f59e0b;
  --mc-amber-soft: rgba(245, 158, 11, 0.14);

  --mc-rose: #ef4444;
  --mc-rose-soft: rgba(239, 68, 68, 0.14);

  --mc-purple: #a855f7;
  --mc-purple-soft: rgba(168, 85, 247, 0.14);

  --mc-text-main: #f8fafc;
  --mc-text-muted: #94a3b8;
  --mc-text-dim: #64748b;

  --mc-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --mc-shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  --mc-shadow-glow: 0 0 40px rgba(37, 99, 235, 0.15);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--mc-bg-page);
  color: var(--mc-text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

/* ==========================================================================
   APP SHELL LAYOUT
   ========================================================================== */
.mc-shell {
  display: flex;
  min-height: 100vh;
}

.mc-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   SIDEBAR NAVIGATION (BREATHING LAYOUT)
   ========================================================================== */
.mc-sidebar {
  width: 280px;
  background: var(--mc-bg-sidebar);
  border-right: 1px solid var(--mc-border);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 16px 28px;
  overflow-y: auto;
  flex-shrink: 0;
  z-index: 80;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.mc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 18px;
  border-bottom: 1px solid var(--mc-border);
  margin-bottom: 16px;
}

.mc-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--mc-radius-md);
  background: linear-gradient(135deg, var(--mc-primary), var(--mc-primary-dark));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.mc-brand-title {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--mc-text-main);
}

.mc-brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mc-nav-group-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mc-text-dim);
  padding: 14px 12px 6px;
  margin-top: 4px;
}

.mc-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--mc-radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mc-text-muted);
  transition: all 0.15s ease;
  cursor: pointer;
  margin-bottom: 3px;
  user-select: none;
}

.mc-nav-item svg {
  color: var(--mc-text-muted);
  flex-shrink: 0;
  transition: color 0.15s;
}

.mc-nav-item:hover {
  background: var(--mc-bg-surface);
  color: var(--mc-text-main);
}

.mc-nav-item:hover svg {
  color: var(--mc-primary);
}

.mc-nav-item.active {
  background: var(--mc-primary-soft);
  color: var(--mc-primary);
  font-weight: 700;
}

.mc-nav-item.active svg {
  color: var(--mc-primary);
}

/* Sidebar Subscription Plan Card */
.mc-plan-box {
  background: var(--mc-bg-card);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-lg);
  padding: 14px 16px;
  margin-top: 14px;
}

.mc-plan-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.mc-plan-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mc-primary);
  background: var(--mc-primary-soft);
  padding: 3px 8px;
  border-radius: 999px;
}

.mc-quota-bar {
  height: 5px;
  background: var(--mc-bg-surface);
  border-radius: 999px;
  overflow: hidden;
  margin: 6px 0;
}

.mc-quota-fill {
  height: 100%;
  background: var(--mc-primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.mc-upgrade-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  background: linear-gradient(135deg, var(--mc-primary), var(--mc-primary-dark));
  color: #fff;
  border-radius: var(--mc-radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
}

.mc-upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* ==========================================================================
   TOPBAR & HEADER
   ========================================================================== */
.mc-topbar {
  height: 68px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--mc-border);
  background: var(--mc-bg-topbar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 90;
}

.mc-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mc-hamburger {
  display: none;
  background: var(--mc-bg-surface);
  border: 1px solid var(--mc-border);
  color: var(--mc-text-main);
  cursor: pointer;
  padding: 7px;
  border-radius: var(--mc-radius-md);
  align-items: center;
  justify-content: center;
}

.mc-top-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 380px;
  max-width: 100%;
}

.mc-top-search svg {
  position: absolute;
  left: 14px;
  color: var(--mc-text-muted);
  pointer-events: none;
}

.mc-top-search-input {
  width: 100%;
  height: 40px;
  padding: 0 48px 0 40px;
  background: var(--mc-bg-surface);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-md);
  color: var(--mc-text-main);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.mc-top-search-input:focus {
  outline: none;
  border-color: var(--mc-primary);
  background: var(--mc-bg-card);
  box-shadow: 0 0 0 3px var(--mc-primary-soft);
  width: 420px;
}

.mc-kbd-hint {
  position: absolute;
  right: 12px;
  background: var(--mc-bg-card);
  border: 1px solid var(--mc-border);
  color: var(--mc-text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
}

.mc-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--mc-radius-md);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.mc-btn-primary {
  background: linear-gradient(135deg, var(--mc-primary), var(--mc-primary-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.mc-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.mc-btn-secondary {
  background: var(--mc-bg-surface);
  border: 1px solid var(--mc-border);
  color: var(--mc-text-main);
}

.mc-btn-secondary:hover {
  background: var(--mc-bg-hover);
  border-color: var(--mc-border-strong);
}

.mc-btn-sm {
  padding: 5px 12px;
  font-size: 0.78rem;
  border-radius: var(--mc-radius-sm);
}

.mc-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--mc-radius-md);
  background: var(--mc-bg-surface);
  border: 1px solid var(--mc-border);
  color: var(--mc-text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.mc-icon-btn:hover,
.mc-icon-btn.active {
  color: var(--mc-text-main);
  background: var(--mc-bg-hover);
  border-color: var(--mc-border-strong);
}

.mc-dot-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mc-rose);
  border: 2px solid var(--mc-bg-topbar);
}

/* ==========================================================================
   USER PROFILE PILL & FLOATING DIALOGUE CARD
   ========================================================================== */
.mc-user-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mc-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 5px;
  background: var(--mc-bg-surface);
  border: 1px solid var(--mc-border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.mc-user-pill:hover,
.mc-user-pill.active {
  background: var(--mc-bg-card);
  border-color: var(--mc-border-strong);
}

.mc-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mc-primary), #8b5cf6);
  color: #fff;
  font-weight: 700;
  font-size: 0.76rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}

.mc-user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--mc-text-main);
  white-space: nowrap;
}

.mc-user-role {
  font-size: 0.68rem;
  color: var(--mc-text-muted);
}

.mc-user-chevron {
  color: var(--mc-text-muted);
  transition: transform 0.2s ease;
}

.mc-user-pill.active .mc-user-chevron,
.mc-user-menu-wrap.active .mc-user-chevron {
  transform: rotate(180deg);
}

/* Elevated Floating Dialogue Card */
.mc-user-dropdown,
.mc-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 285px;
  background: var(--mc-bg-card);
  border: 1px solid var(--mc-border-strong);
  border-radius: var(--mc-radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  z-index: 250;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s;
  padding: 8px;
  overflow: hidden;
  pointer-events: none;
}

.mc-user-dropdown.show,
.mc-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

[data-theme="light"] .mc-user-dropdown,
[data-theme="light"] .mc-dropdown-menu {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  background: #ffffff;
}

.mc-user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--mc-border);
  margin-bottom: 6px;
}

.mc-user-dropdown-header .mc-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.mc-user-dropdown-header .mc-user-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--mc-text-main);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.mc-user-dropdown-header .mc-plan-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mc-primary);
  background: var(--mc-primary-soft);
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 3px;
}

.mc-user-dropdown-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0;
}

.mc-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mc-text-main);
  text-decoration: none;
  border-radius: var(--mc-radius-sm);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
  font-family: inherit;
}

.mc-dropdown-item:hover {
  background: var(--mc-bg-surface);
  color: var(--mc-primary);
}

.mc-dropdown-item svg {
  color: var(--mc-text-muted);
  flex-shrink: 0;
  transition: color 0.15s;
}

.mc-dropdown-item:hover svg {
  color: var(--mc-primary);
}

.mc-dropdown-item.danger {
  color: var(--mc-rose);
}

.mc-dropdown-item.danger svg {
  color: var(--mc-rose);
}

.mc-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--mc-rose);
}

.mc-dropdown-divider {
  height: 1px;
  background: var(--mc-border);
  margin: 6px 0;
}

.mc-user-dropdown-footer {
  padding-top: 2px;
}

/* ==========================================================================
   TOPBAR NOTIFICATIONS DROPDOWN
   ========================================================================== */
.mc-notif-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.mc-notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-width: 90vw;
  background: var(--mc-bg-card);
  border: 1px solid var(--mc-border-strong);
  border-radius: var(--mc-radius-lg);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
  z-index: 250;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mc-notif-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

[data-theme="light"] .mc-notif-dropdown {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  background: #ffffff;
}

.mc-notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--mc-border);
  font-weight: 700;
  font-size: 0.88rem;
}

.mc-notif-body {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 0;
}

.mc-notif-empty {
  padding: 36px 20px;
  text-align: center;
}

.mc-notif-empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--mc-emerald-soft);
  color: var(--mc-emerald);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.mc-notif-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--mc-border);
  background: var(--mc-bg-surface);
}

/* ==========================================================================
   WORKSPACE CONTENT & TAB PANELS (CONTAINED BREATHING ROOM)
   ========================================================================== */
.mc-workspace {
  padding: 24px 28px 48px;
  max-width: 1380px;
  margin: 0 auto;
  width: 100%;
}

.mc-tab-panel {
  display: none;
}

.mc-tab-panel.active {
  display: block;
  animation: mcFadeIn 0.2s ease-out;
}

@keyframes mcFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* KPI Grids */
.mc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.mc-kpi-card {
  background: var(--mc-bg-card);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--mc-shadow-sm);
}

.mc-kpi-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.mc-kpi-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--mc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mc-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--mc-radius-md);
  display: grid;
  place-items: center;
  background: var(--mc-primary-soft);
  color: var(--mc-primary);
}

.mc-kpi-icon.emerald { background: var(--mc-emerald-soft); color: var(--mc-emerald); }
.mc-kpi-icon.amber { background: var(--mc-amber-soft); color: var(--mc-amber); }
.mc-kpi-icon.rose { background: var(--mc-rose-soft); color: var(--mc-rose); }
.mc-kpi-icon.purple { background: var(--mc-purple-soft); color: var(--mc-purple); }

.mc-kpi-val {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--mc-text-main);
}

.mc-kpi-sub {
  font-size: 0.75rem;
  color: var(--mc-text-muted);
  margin-top: 4px;
}

/* Cards & Tables */
.mc-card {
  background: var(--mc-bg-card);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-lg);
  box-shadow: var(--mc-shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.mc-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--mc-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.mc-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--mc-text-main);
}

.mc-card-sub {
  font-size: 0.78rem;
  color: var(--mc-text-muted);
  margin-top: 2px;
}

.mc-table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.mc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

table.mc-table th {
  padding: 12px 18px;
  background: var(--mc-bg-surface);
  color: var(--mc-text-muted);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--mc-border);
  white-space: nowrap;
}

table.mc-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--mc-border);
  color: var(--mc-text-main);
  white-space: nowrap;
}

table.mc-table tbody tr:hover td {
  background: var(--mc-bg-surface);
}

/* Status Badges */
.mc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mc-badge.active,
.mc-badge.stable,
.mc-badge.passed {
  background: var(--mc-emerald-soft);
  color: var(--mc-emerald);
}

.mc-badge.monitoring,
.mc-badge.pending,
.mc-badge.scheduled {
  background: var(--mc-amber-soft);
  color: var(--mc-amber);
}

.mc-badge.critical,
.mc-badge.danger,
.mc-badge.grounded {
  background: var(--mc-rose-soft);
  color: var(--mc-rose);
}

.mc-badge.blue {
  background: var(--mc-primary-soft);
  color: var(--mc-primary);
}

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

.mc-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--mc-radius-md);
  background: var(--mc-bg-surface);
  color: var(--mc-text-muted);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.mc-empty-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mc-text-main);
  margin-bottom: 4px;
}

.mc-empty-sub {
  font-size: 0.8rem;
  color: var(--mc-text-muted);
  max-width: 360px;
  margin: 0 auto 16px;
  line-height: 1.4;
}

/* ==========================================================================
   RIGHT SLIDE-OVER MODAL DRAWERS (.mc-modal-box)
   ========================================================================== */
.mc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.mc-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mc-modal-box {
  background: var(--mc-bg-card);
  border-left: 1px solid var(--mc-border-strong);
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  padding: 24px 28px;
}

.mc-modal-box.large {
  max-width: 820px;
}

.mc-modal-backdrop.open .mc-modal-box {
  transform: translateX(0);
}

/* Modal Drawer Layout Structure */
.mc-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--mc-border);
  padding-bottom: 16px;
  flex-shrink: 0;
}

.mc-modal-head h3 {
  font-size: 1.22rem;
  font-weight: 800;
  margin: 0;
  color: var(--mc-text-main);
}

.mc-modal-head p {
  font-size: 0.8rem;
  color: var(--mc-text-muted);
  margin: 4px 0 0;
}

.mc-modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--mc-radius-md);
  background: var(--mc-bg-surface);
  border: 1px solid var(--mc-border);
  color: var(--mc-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mc-modal-close:hover {
  background: var(--mc-bg-card);
  color: var(--mc-text-main);
  border-color: var(--mc-border-strong);
}

.mc-modal-body {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mc-modal-foot {
  padding-top: 16px;
  border-top: 1px solid var(--mc-border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Backward compatibility for generic modal classes to ensure right slide-over */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.modal-overlay.open,
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay .modal-dialog {
  background: var(--mc-bg-card);
  border-left: 1px solid var(--mc-border-strong);
  border-radius: 0;
  height: 100vh;
  max-height: 100vh;
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  padding: 24px 28px;
}

.modal-overlay .modal-dialog.large {
  max-width: 820px;
}

.modal-overlay.open .modal-dialog,
.modal-overlay.active .modal-dialog {
  transform: translateX(0);
}

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

.mc-form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mc-text-main);
  margin-bottom: 6px;
}

.mc-input, .mc-select, .mc-textarea {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--mc-bg-input);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-md);
  color: var(--mc-text-main);
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mc-input::placeholder, .mc-textarea::placeholder {
  color: var(--mc-text-dim);
}

.mc-textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 14px;
}

.mc-input:focus, .mc-select:focus, .mc-textarea:focus {
  outline: none;
  border-color: var(--mc-primary);
  box-shadow: 0 0 0 3px var(--mc-primary-soft);
  background: var(--mc-bg-card);
}

/* Universal SVG Vector Icon Standardization */
svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.mc-btn svg, .mc-icon-btn svg {
  display: inline-block;
  flex-shrink: 0;
}

.mc-kpi-icon svg {
  width: 20px;
  height: 20px;
}

.mc-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Plan options card selection */
.mc-plan-card-opt {
  background: var(--mc-bg-surface);
  border: 2px solid var(--mc-border);
  border-radius: var(--mc-radius-lg);
  padding: 18px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.mc-plan-card-opt:hover,
.mc-plan-card-opt.selected {
  border-color: var(--mc-primary);
  background: var(--mc-primary-soft);
}

.mc-plan-card-opt.selected::after {
  content: '';
  position: absolute;
  top: 10px; right: 10px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background-color: var(--mc-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px 13px;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .mc-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
  }
  .mc-sidebar.open {
    transform: translateX(0);
  }
  .mc-hamburger {
    display: flex;
  }
  .mc-top-search {
    width: 260px;
  }
  .mc-top-search-input:focus {
    width: 280px;
  }
  .mc-topbar {
    padding: 0 16px;
  }
  .mc-workspace {
    padding: 18px 16px 36px;
  }
}

@media (max-width: 640px) {
  .mc-form-row {
    grid-template-columns: 1fr;
  }
  .hide-mobile {
    display: none !important;
  }
}

/* ============================================================
   SHIMMER SKELETON ANIMATIONS & STYLES
   ============================================================ */
:root, [data-theme="light"] {
  --mc-shimmer-base: #f1f5f9;
  --mc-shimmer-highlight: #e2e8f0;
}

[data-theme="dark"] {
  --mc-shimmer-base: rgba(255, 255, 255, 0.05);
  --mc-shimmer-highlight: rgba(255, 255, 255, 0.12);
}

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

.mc-shimmer {
  background: linear-gradient(90deg, var(--mc-shimmer-base) 25%, var(--mc-shimmer-highlight) 50%, var(--mc-shimmer-base) 75%);
  background-size: 200% 100%;
  animation: mcShimmer 1.5s infinite ease-in-out;
  border-radius: 4px;
}

.mc-skeleton-cell {
  height: 14px;
  border-radius: 4px;
}

.mc-skeleton-kpi {
  height: 28px;
  width: 90px;
  border-radius: 6px;
}

.mc-skeleton-kpi-sub {
  height: 12px;
  width: 140px;
  border-radius: 4px;
  margin-top: 6px;
}

/* ============================================================
   SETTINGS TABS & NAVIGATION
   ============================================================ */
.mc-settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 24px;
  background: var(--mc-bg-surface);
  border-bottom: 1px solid var(--mc-border);
}

.mc-settings-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--mc-text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.mc-settings-tab-btn:hover {
  color: var(--mc-text-main);
  background: var(--mc-card);
  border-color: var(--mc-border);
}

.mc-settings-tab-btn.active {
  color: var(--mc-primary);
  background: var(--mc-card);
  border-color: var(--mc-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mc-settings-panel {
  padding: 24px;
}

/* ============================================================
   RETRY ERROR BOX COMPONENT
   ============================================================ */
.mc-retry-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  color: var(--mc-text-muted);
}

.mc-retry-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.mc-retry-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--mc-text-main);
  margin-bottom: 4px;
}

.mc-retry-sub {
  font-size: 0.78rem;
  color: var(--mc-text-muted);
  margin-bottom: 16px;
  max-width: 320px;
}
