/* ========================================================================= */
/* MATERIAL UI (MUI v9) & ENTERPRISE ERP / CRM DESIGN SYSTEM TOKENS          */
/* Authentic Material UI components, elevations, ripples & Enterprise tokens */
/* ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700;900&family=Roboto+Mono:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

/* Material UI (MUI) Icon Standards */
.material-symbols-outlined,
.material-icons-outlined,
.mui-icon {
  font-family: 'Material Symbols Outlined', 'Material Icons Outlined', sans-serif !important;
  font-weight: normal;
  font-style: normal;
  font-size: 1.125rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.mui-svg-icon {
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  user-select: none;
}

:root {
  /* 4.1. MUI Typography & Base Size Standard */
  --mui-font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mui-font-mono: 'Roboto Mono', 'JetBrains Mono', monospace;
  --fontSz14: 14px;

  /* 4.1. MUI Custom Theme - Brand Blue Accent */
  --mui-primary-main: #0088ff;
  --mui-primary-hover: #0077e6;
  --mui-primary-light: #33a0ff;
  --mui-primary-dark: #0066cc;
  --mui-primary-contrast: #ffffff;
}

:is(html.light, [data-theme*="light"]) {
  --canvas-neutral: #f7f9fb;
  --card-bg: #ffffff;
  --card-border: #d7e2ed;
  --divider-color: #e6e6e6;
  --row-hover-bg: #f1f4f7;
  --text-heading: #222222;
  --text-main: #333333;
  --text-secondary: #555555;
  --text-muted: #666666;
  --chip-domain-bg: #edf0f4;
  --chip-domain-border: #d7e2ed;
}

:is(html.dark, [data-theme*="dark"], [data-theme*="blue"], [data-theme*="obsidian"], :root:not(.light):not([data-theme*="light"])) {
  --divider-color: rgba(255, 255, 255, 0.1);
  --row-hover-bg: rgba(255, 255, 255, 0.05);
  --text-heading: #fafafa;
  --text-main: #f4f4f5;
  --chip-domain-bg: rgba(255, 255, 255, 0.08);
  --chip-domain-border: rgba(255, 255, 255, 0.15);
}

:root {

  /* 4.2. Pill Status Badges Tokens */
  --badge-success-bg: #d7f3e2;
  --badge-success-text: #08683b;
  --badge-warning-bg: #ffedcd;
  --badge-warning-text: #d98911;
  --badge-error-bg: #ffd9da;
  --badge-error-text: #b9131c;
  --badge-info-bg: #e1f1ff;
  --badge-info-text: #006aff;

  /* Monospace domain chips */
  --chip-domain-bg: #edf0f4;
  --chip-domain-border: #d7e2ed;

  /* MUI Semantic Colors */
  --mui-error-main: #b9131c;
  --mui-error-light: #ffd9da;
  --mui-warning-main: #d98911;
  --mui-warning-light: #ffedcd;
  --mui-info-main: #006aff;
  --mui-info-light: #e1f1ff;
  --mui-success-main: #08683b;
  --mui-success-light: #d7f3e2;

  /* MUI Standard Shadows / Elevations */
  --mui-elevation-0: none;
  --mui-elevation-1: 0px 2px 1px -1px rgba(0,0,0,0.1), 0px 1px 1px 0px rgba(0,0,0,0.07), 0px 1px 3px 0px rgba(0,0,0,0.06);
  --mui-elevation-2: 0px 3px 1px -2px rgba(0,0,0,0.1), 0px 2px 2px 0px rgba(0,0,0,0.07), 0px 1px 5px 0px rgba(0,0,0,0.06);
  --mui-elevation-3: 0px 3px 3px -2px rgba(0,0,0,0.1), 0px 3px 4px 0px rgba(0,0,0,0.07), 0px 1px 8px 0px rgba(0,0,0,0.06);
  --mui-elevation-4: 0px 2px 4px -1px rgba(0,0,0,0.1), 0px 4px 5px 0px rgba(0,0,0,0.07), 0px 1px 10px 0px rgba(0,0,0,0.06);
  --mui-elevation-6: 0px 3px 5px -1px rgba(0,0,0,0.1), 0px 6px 10px 0px rgba(0,0,0,0.07), 0px 1px 18px 0px rgba(0,0,0,0.06);
  --mui-elevation-8: 0px 5px 5px -3px rgba(0,0,0,0.1), 0px 8px 10px 1px rgba(0,0,0,0.07), 0px 3px 14px 2px rgba(0,0,0,0.06);
  --mui-elevation-12: 0px 7px 8px -4px rgba(0,0,0,0.1), 0px 12px 17px 2px rgba(0,0,0,0.07), 0px 5px 22px 4px rgba(0,0,0,0.06);
  --mui-elevation-16: 0px 8px 10px -5px rgba(0,0,0,0.1), 0px 16px 24px 2px rgba(0,0,0,0.07), 0px 6px 30px 5px rgba(0,0,0,0.06);
  --mui-elevation-24: 0px 11px 15px -7px rgba(0,0,0,0.15), 0px 24px 38px 3px rgba(0,0,0,0.1), 0px 9px 46px 8px rgba(0,0,0,0.08);

  /* MUI Transitions */
  --mui-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --mui-transition-standard: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --mui-transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --mui-shape-border-radius: 8px;
  --mui-card-border-radius: 10px;
  --mui-dialog-border-radius: 14px;
}

/* ========================================================================= */
/* 4.2. BASE FONT SIZE (14px MANDATORY STANDARD)                             */
/* ========================================================================= */
body, html {
  font-family: var(--mui-font-sans);
  font-size: var(--fontSz14);
}

button, input, select, textarea, table, p, span, h1, h2, h3, h4, h5, h6 {
  font-family: var(--mui-font-sans);
}

code, pre, .font-mono {
  font-family: var(--mui-font-mono) !important;
}

/* Upgrade small unreadable micro-text to legible 14px standard (Report 03) */
.text-\[8px\], .text-\[9px\], .text-\[10px\], .text-\[11px\], .text-xs, .text-sm {
  font-size: var(--fontSz14) !important;
  line-height: 1.4;
}

/* ========================================================================= */
/* 4.1. TYPOGRAPHY: HEADINGS #222222, MAIN #333333, SECONDARY #555555        */
/* ========================================================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}

:is(html.light, [data-theme*="light"]) h1,
:is(html.light, [data-theme*="light"]) h2,
:is(html.light, [data-theme*="light"]) h3,
:is(html.light, [data-theme*="light"]) h4,
:is(html.light, [data-theme*="light"]) h5,
:is(html.light, [data-theme*="light"]) h6 {
  color: var(--text-heading) !important;
}

:is(html.light, [data-theme*="light"]) p,
:is(html.light, [data-theme*="light"]) div:not([class*="bg-"]):not([class*="badge"]):not([class*="chip"]) {
  color: var(--text-main);
}

/* ========================================================================= */
/* 4.2. DATA DENSITY TABLES (36-40px Row Height, Sticky Header)              */
/* ========================================================================= */
table {
  font-size: var(--fontSz14);
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

thead,
table thead tr {
  position: sticky;
  top: 0;
  z-index: 10;
}

thead th,
table thead th {
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  height: 38px;
  box-sizing: border-box;
  text-align: left;
}

:is(html.light, [data-theme*="light"]) thead,
:is(html.light, [data-theme*="light"]) thead tr,
:is(html.light, [data-theme*="light"]) thead th,
:is(html.light, [data-theme*="light"]) table thead th {
  background-color: var(--canvas-neutral) !important;
  color: var(--text-heading) !important;
  border-bottom: 1px solid var(--divider-color) !important;
}

:is(html.dark, [data-theme*="dark"], [data-theme*="blue"], [data-theme*="obsidian"], :root:not(.light):not([data-theme*="light"])) thead,
:is(html.dark, [data-theme*="dark"], [data-theme*="blue"], [data-theme*="obsidian"], :root:not(.light):not([data-theme*="light"])) thead tr,
:is(html.dark, [data-theme*="dark"], [data-theme*="blue"], [data-theme*="obsidian"], :root:not(.light):not([data-theme*="light"])) thead th,
:is(html.dark, [data-theme*="dark"], [data-theme*="blue"], [data-theme*="obsidian"], :root:not(.light):not([data-theme*="light"])) table thead th {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

tbody tr,
table tbody tr,
tr.hover\:bg-white\/5 {
  height: 38px;
  min-height: 36px;
  max-height: 40px;
  transition: background-color 120ms ease;
  box-sizing: border-box;
}

:is(html.light, [data-theme*="light"]) tbody tr:hover,
:is(html.light, [data-theme*="light"]) table tbody tr:hover {
  background-color: var(--row-hover-bg) !important;
}

:is(html.dark, [data-theme*="dark"], [data-theme*="blue"], [data-theme*="obsidian"], :root:not(.light):not([data-theme*="light"])) tbody tr:hover,
:is(html.dark, [data-theme*="dark"], [data-theme*="blue"], [data-theme*="obsidian"], :root:not(.light):not([data-theme*="light"])) table tbody tr:hover,
:is(html.dark, [data-theme*="dark"], [data-theme*="blue"], [data-theme*="obsidian"], :root:not(.light):not([data-theme*="light"])) tr.hover\:bg-white\/5:hover {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

tbody td,
table tbody td {
  padding: 6px 12px !important;
  font-size: 14px !important;
  vertical-align: middle;
}

:is(html.light, [data-theme*="light"]) tbody td,
:is(html.light, [data-theme*="light"]) table tbody td {
  border-bottom: 1px solid var(--divider-color);
  color: var(--text-main);
}

:is(html.dark, [data-theme*="dark"]) tbody td,
:is(html.dark, [data-theme*="dark"]) table tbody td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========================================================================= */
/* 4.2. ENTERPRISE PILL BADGES (High Contrast Corporate Statuses)            */
/* ========================================================================= */
.enterprise-badge,
.erp-badge,
.pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: var(--fontSz14);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Success (Approved / Active / Passed / Low Risk / Clean): #d7f3e2 / #08683b */
.enterprise-badge-success,
.erp-badge-success,
.badge-success,
span[class*="bg-emerald-500/10"],
span[class*="bg-emerald-500/20"],
span[class*="text-emerald-400"][class*="bg-emerald-500"],
span[class*="text-emerald-300"][class*="bg-emerald-500"] {
  background-color: var(--badge-success-bg) !important;
  color: var(--badge-success-text) !important;
  border: 1px solid rgba(8, 104, 59, 0.25) !important;
}

/* Warning (Pending / In Review / Medium Risk): #ffedcd / #d98911 */
.enterprise-badge-warning,
.erp-badge-warning,
.badge-warning,
span[class*="bg-amber-500/10"],
span[class*="bg-amber-500/20"],
span[class*="text-amber-400"][class*="bg-amber-500"],
span[class*="text-amber-300"][class*="bg-amber-500"] {
  background-color: var(--badge-warning-bg) !important;
  color: var(--badge-warning-text) !important;
  border: 1px solid rgba(217, 137, 17, 0.25) !important;
}

/* Error / Rejected (Failed / Blocked / High Risk): #ffd9da / #b9131c */
.enterprise-badge-error,
.erp-badge-error,
.badge-error,
span[class*="bg-rose-500/10"],
span[class*="bg-rose-500/20"],
span[class*="bg-red-500/10"],
span[class*="bg-red-500/20"],
span[class*="text-rose-400"][class*="bg-rose-500"],
span[class*="text-red-400"][class*="bg-red-500"] {
  background-color: var(--badge-error-bg) !important;
  color: var(--badge-error-text) !important;
  border: 1px solid rgba(185, 19, 28, 0.25) !important;
}

/* Info / Neutral: #e1f1ff / #006aff */
.enterprise-badge-info,
.erp-badge-info,
.badge-info,
span[class*="bg-blue-500/10"],
span[class*="bg-blue-500/20"],
span[class*="text-blue-400"][class*="bg-blue-500"],
span[class*="text-blue-300"][class*="bg-blue-500"] {
  background-color: var(--badge-info-bg) !important;
  color: var(--badge-info-text) !important;
  border: 1px solid rgba(0, 106, 255, 0.25) !important;
}

/* Dark themes high-contrast badge tokens and border overrides */
:is(html.dark, [data-theme*="dark"], [data-theme="blue"], [data-theme="dark-ocean"], [data-theme="dark-obsidian"]) {
  --badge-success-bg: rgba(16, 185, 129, 0.18);
  --badge-success-text: #34d399;
  --badge-warning-bg: rgba(245, 158, 11, 0.18);
  --badge-warning-text: #fbbf24;
  --badge-error-bg: rgba(244, 63, 94, 0.18);
  --badge-error-text: #fb7185;
  --badge-info-bg: rgba(59, 130, 246, 0.18);
  --badge-info-text: #60a5fa;
}

:is(html.dark, [data-theme*="dark"], [data-theme="blue"], [data-theme="dark-ocean"], [data-theme="dark-obsidian"]) :is(
  .enterprise-badge-success, .erp-badge-success, .badge-success,
  span[class*="bg-emerald-500/10"], span[class*="bg-emerald-500/20"]
) {
  border-color: rgba(16, 185, 129, 0.35) !important;
}

:is(html.dark, [data-theme*="dark"], [data-theme="blue"], [data-theme="dark-ocean"], [data-theme="dark-obsidian"]) :is(
  .enterprise-badge-warning, .erp-badge-warning, .badge-warning,
  span[class*="bg-amber-500/10"], span[class*="bg-amber-500/20"]
) {
  border-color: rgba(245, 158, 11, 0.35) !important;
}

:is(html.dark, [data-theme*="dark"], [data-theme="blue"], [data-theme="dark-ocean"], [data-theme="dark-obsidian"]) :is(
  .enterprise-badge-error, .erp-badge-error, .badge-error,
  span[class*="bg-rose-500/10"], span[class*="bg-rose-500/20"],
  span[class*="bg-red-500/10"], span[class*="bg-red-500/20"]
) {
  border-color: rgba(244, 63, 94, 0.35) !important;
}

:is(html.dark, [data-theme*="dark"], [data-theme="blue"], [data-theme="dark-ocean"], [data-theme="dark-obsidian"]) :is(
  .enterprise-badge-info, .erp-badge-info, .badge-info,
  span[class*="bg-blue-500/10"], span[class*="bg-blue-500/20"]
) {
  border-color: rgba(59, 130, 246, 0.35) !important;
}

/* ========================================================================= */
/* 4.2. ENTERPRISE WIDGETS & CARDS (QuickLinksWidget, White Cards, Blue Focus)*/
/* ========================================================================= */
.enterprise-card,
.erp-card,
.quick-links-widget,
.quick-link-card {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--mui-shape-border-radius);
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1),
              border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

:is(html.dark, [data-theme*="dark"], [data-theme="blue"], [data-theme="dark-ocean"], [data-theme="dark-obsidian"]) :is(.enterprise-card, .erp-card, .quick-links-widget, .quick-link-card) {
  background-color: var(--card-bg, #09090b) !important;
  border-color: var(--card-border, rgba(255, 255, 255, 0.1)) !important;
}

.enterprise-card:hover,
.erp-card:hover,
.quick-links-widget:hover,
.quick-link-card:hover,
.hover\:-translate-y-0\.5:hover {
  transform: translateY(-2px) !important;
  border-color: var(--mui-primary-main) !important;
  box-shadow: 0 4px 14px rgba(0, 136, 255, 0.12) !important;
}

/* Monospace Domain Badges: #edf0f4 background, #d7e2ed border */
.enterprise-domain-chip,
.erp-domain-chip,
.domain-badge {
  background-color: var(--chip-domain-bg) !important;
  border: 1px solid var(--chip-domain-border) !important;
  color: var(--text-main) !important;
  font-family: var(--mui-font-mono) !important;
  font-size: var(--fontSz14) !important;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Micro Tech Stack Badges (e.g. YAML/JSON, XML, JavaScript, C++, Python) */
.tech-stack-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--mui-font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}

:is(html.dark, [data-theme*="dark"], [data-theme*="blue"], [data-theme*="obsidian"], :root:not(.light):not([data-theme*="light"])) .tech-stack-pill {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #cbd5e1 !important;
}

:is(html.light, [data-theme*="light"]) .tech-stack-pill {
  background-color: #f1f4f7 !important;
  border: 1px solid #d7e2ed !important;
  color: #334155 !important;
}

/* ========================================================================= */
/* 4.1. MUI BUTTONS (Contained with #0088ff & #0077e6 Hover)                 */
/* ========================================================================= */
.mui-button,
button:not(.raw-btn):not([class*="text-slate-"]):not([class*="p-0"]) {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: var(--mui-font-sans);
  font-weight: 500;
  font-size: var(--fontSz14);
  line-height: 1.75;
  letter-spacing: 0.02857em;
  text-transform: none;
  border-radius: var(--mui-shape-border-radius);
  transition: background-color var(--mui-transition-standard),
              box-shadow var(--mui-transition-standard),
              border-color var(--mui-transition-standard),
              color var(--mui-transition-standard),
              transform 100ms ease;
  user-select: none;
  cursor: pointer;
}

.mui-button:active,
button:not(.raw-btn):active {
  transform: scale(0.98);
}

/* Contained Primary Buttons (#0088ff, Hover #0077e6) */
.mui-btn-contained-primary,
button.bg-blue-600,
button.bg-blue-500 {
  background-color: var(--mui-primary-main) !important;
  color: var(--mui-primary-contrast) !important;
  box-shadow: var(--mui-elevation-2);
}
.mui-btn-contained-primary:hover,
button.bg-blue-600:hover,
button.bg-blue-500:hover {
  background-color: var(--mui-primary-hover) !important;
  box-shadow: var(--mui-elevation-4);
}

.mui-btn-contained-success,
button.bg-emerald-600,
button.bg-emerald-500 {
  background-color: #08683b !important;
  color: #ffffff !important;
  box-shadow: var(--mui-elevation-2);
}
.mui-btn-contained-success:hover,
button.bg-emerald-600:hover,
button.bg-emerald-500:hover {
  background-color: #06542f !important;
  box-shadow: var(--mui-elevation-4);
}

.mui-btn-contained-error,
button.bg-rose-600,
button.bg-rose-500,
button.bg-red-600 {
  background-color: #b9131c !important;
  color: #ffffff !important;
  box-shadow: var(--mui-elevation-2);
}
.mui-btn-contained-error:hover,
button.bg-rose-600:hover,
button.bg-rose-500:hover,
button.bg-red-600:hover {
  background-color: #960f17 !important;
  box-shadow: var(--mui-elevation-4);
}

/* Outlined Buttons */
.mui-btn-outlined {
  background-color: transparent !important;
  border: 1px solid currentColor;
}
.mui-btn-outlined:hover {
  background-color: rgba(0, 136, 255, 0.08) !important;
}

/* ========================================================================= */
/* MUI TOUCH RIPPLE EFFECT                                                   */
/* ========================================================================= */
.mui-ripple-effect {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background-color: rgba(255, 255, 255, 0.32);
  transform: scale(0);
  animation: mui-ripple-anim 550ms cubic-bezier(0.4, 0, 0.2, 1);
}

:is(html.light, [data-theme*="light"]) .mui-ripple-effect {
  background-color: rgba(0, 136, 255, 0.2);
}

@keyframes mui-ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ========================================================================= */
/* MUI CARDS, PAPERS & ELEVATIONS                                            */
/* ========================================================================= */
.mui-paper,
.glass-panel,
.rounded-2xl.bg-surface-900,
.rounded-2xl.bg-surface-900\/90,
.rounded-xl.bg-surface-900 {
  border-radius: var(--mui-card-border-radius);
  box-shadow: var(--mui-elevation-2);
  transition: box-shadow var(--mui-transition-standard), border-color var(--mui-transition-standard);
}

:is(html.light, [data-theme*="light"]) .mui-paper,
:is(html.light, [data-theme*="light"]) .glass-panel,
:is(html.light, [data-theme*="light"]) .rounded-2xl.bg-surface-900,
:is(html.light, [data-theme*="light"]) .rounded-2xl.bg-surface-900\/90,
:is(html.light, [data-theme*="light"]) .rounded-xl.bg-surface-900 {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
}

.mui-paper:hover,
.glass-card-hover:hover,
.hover\:border-blue-500\/40:hover,
.hover\:border-purple-500\/40:hover,
.hover\:border-purple-500\/60:hover {
  box-shadow: var(--mui-elevation-6) !important;
}

/* ========================================================================= */
/* MUI OUTLINED TEXT FIELDS & SELECTS (Blue Focus Ring #0088ff)              */
/* ========================================================================= */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  font-family: var(--mui-font-sans);
  font-size: var(--fontSz14) !important;
  border-radius: var(--mui-shape-border-radius) !important;
  transition: border-color var(--mui-transition-fast), box-shadow var(--mui-transition-fast);
}

:is(html.light, [data-theme*="light"]) input:not([type="checkbox"]):not([type="radio"]),
:is(html.light, [data-theme*="light"]) select,
:is(html.light, [data-theme*="light"]) textarea {
  background-color: #ffffff !important;
  border: 1px solid var(--card-border) !important;
  color: var(--text-main) !important;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
  border-color: var(--mui-primary-main) !important;
  box-shadow: 0 0 0 2px rgba(0, 136, 255, 0.25) !important;
  outline: none !important;
}

/* ========================================================================= */
/* MUI MODALS & DIALOGS (ELEVATION 24)                                       */
/* ========================================================================= */
.fixed.z-50 > div.bg-surface-900,
.fixed.z-50 > div.bg-surface-900\/95,
.fixed.z-50 > div.bg-surface-950,
.fixed.inset-0 > div[class*="bg-surface-"] {
  border-radius: var(--mui-dialog-border-radius) !important;
  box-shadow: var(--mui-elevation-24) !important;
  animation: muiModalScaleIn 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes muiModalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ========================================================================= */
/* MUI APP BAR HEADER (ELEVATION 4)                                          */
/* ========================================================================= */
header#mainHeader,
header {
  box-shadow: var(--mui-elevation-4) !important;
  z-index: 40;
}

/* ========================================================================= */
/* 4.3. LIGHT THEME TOKEN HARMONIZATION                                      */
/* ========================================================================= */
:is(html.light, [data-theme*="light"]) .border-white\/10,
:is(html.light, [data-theme*="light"]) .border-white\/5,
:is(html.light, [data-theme*="light"]) .border-white\/20 {
  border-color: var(--card-border) !important;
}

:is(html.light, [data-theme*="light"]) .text-slate-400 {
  color: var(--text-secondary) !important;
}

:is(html.light, [data-theme*="light"]) .text-slate-300,
:is(html.light, [data-theme*="light"]) .text-slate-200 {
  color: var(--text-main) !important;
}

:is(html.light, [data-theme*="light"]) .text-slate-500,
:is(html.light, [data-theme*="light"]) .text-slate-600 {
  color: var(--text-muted) !important;
}

/* ========================================================================= */
/* 4.4. KEYBOARD ACCESSIBILITY (a11y) & FOCUS-VISIBLE RING STANDARD          */
/* ========================================================================= */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--mui-primary-main, #0088ff) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.25) !important;
}



