/* ============================================================
   APP-THEME.CSS — Corporate Design System for Blazor Server
   Telwin-Inspired Modern Professional Theme
   ============================================================ */

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

/* ── 1. CSS VARIABLES ─────────────────────────────────────── */
:root {
  /* ── Brand Colors (Telwin-inspired teal/cyan) ── */
  --primary: #0891b2;
  --primary-light: #22d3ee;
  --primary-dark: #0e7490;
  --primary-bg: #ecfeff;
  --primary-gradient: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);

  /* Secondary */
  --secondary: #64748b;
  --secondary-light: #94a3b8;
  --secondary-dark: #475569;
  --secondary-bg: #f8fafc;

  /* Success */
  --success: #10b981;
  --success-light: #34d399;
  --success-dark: #059669;
  --success-bg: #ecfdf5;

  /* Warning */
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --warning-dark: #d97706;
  --warning-bg: #fffbeb;

  /* Danger */
  --danger: #ef4444;
  --danger-light: #f87171;
  --danger-dark: #dc2626;
  --danger-bg: #fef2f2;

  /* Info */
  --info: #3b82f6;
  --info-light: #60a5fa;
  --info-dark: #2563eb;
  --info-bg: #eff6ff;

  /* ── Surfaces ── */
  --bg-body: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f8fafc;
  --bg-surface-active: #e2e8f0;
  --bg-overlay: rgba(0, 0, 0, 0.5);

  /* ── Text ── */
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  /* ── Borders ── */
  --border-color: #e2e8f0;
  --border-color-light: #f1f5f9;
  --border-radius-sm: 6px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  --border-radius-pill: 50px;

  /* ── Shadows ── */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
  --shadow-focus: 0 0 0 3px rgba(8,145,178,.25);
  --shadow-header: 0 1px 3px rgba(0,0,0,.08);
  --shadow-sidebar: 2px 0 8px rgba(0,0,0,.1);

  /* ── Transitions ── */
  --transition-fast: 150ms cubic-bezier(.4,0,.2,1);
  --transition-base: 250ms cubic-bezier(.4,0,.2,1);
  --transition-slow: 350ms cubic-bezier(.4,0,.2,1);

  /* ── Typography ── */
  --font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.8125rem;
  --font-size-base: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;

  /* ── Spacing ── */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;

  /* ── Z-index ── */
  --z-sidebar: 100;
  --z-header: 200;
  --z-dropdown: 1050;
  --z-modal: 1060;
  --z-tooltip: 1070;

  /* ── Layout Dimensions ── */
  --sidebar-width: 70px;
  --sidebar-width-expanded: 260px;
  --header-height: 60px;
  --breadcrumb-height: 50px;
  --footer-height: 48px;
}

/* ── THEME MODES ─────────────────────────────────────────── */

/* Light Mode (default) */
.theme-light {
  --bg-body: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f8fafc;
  --bg-surface-active: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  --border-color: #e2e8f0;
  --border-color-light: #f1f5f9;
  --shadow-header: 0 1px 3px rgba(0,0,0,.08);
}

/* Dark Mode */
.theme-dark {
  --bg-body: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-hover: #334155;
  --bg-surface-active: #475569;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;
  --border-color: #334155;
  --border-color-light: #1e293b;
  --shadow-header: 0 1px 3px rgba(0,0,0,.3);
  color-scheme: dark;
}

.theme-dark .mud-drawer {
  background: #1e293b !important;
  border-right-color: #334155 !important;
}

.theme-dark .mud-appbar {
  background: #1e293b !important;
  border-bottom-color: #334155 !important;
}

.theme-dark .mud-appbar .mud-icon-button {
  color: #f1f5f9 !important;
}

.theme-dark .mud-appbar .mud-icon-button:hover {
  background: rgba(255,255,255,0.08) !important;
}

.theme-dark .mud-typography {
  color: #f1f5f9 !important;
}

/* Semi-Dark Mode (dark sidebar, light content) */
.theme-semi-dark {
  --bg-body: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f8fafc;
  --bg-surface-active: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  --border-color: #e2e8f0;
  --border-color-light: #f1f5f9;
}

.theme-semi-dark .mud-drawer {
  background: #0f172a !important;
  border-right-color: #1e293b !important;
}

.theme-semi-dark .mud-drawer .mud-nav-link,
.theme-semi-dark .mud-drawer .mud-navgroup .mud-navgroup-toggle {
  color: rgba(255,255,255,0.7) !important;
}

.theme-semi-dark .mud-drawer .mud-nav-link:hover,
.theme-semi-dark .mud-drawer .mud-navgroup .mud-navgroup-toggle:hover {
  background: rgba(255,255,255,0.1) !important;
  color: #ffffff !important;
}

.theme-semi-dark .sidebar-header {
  border-bottom-color: #1e293b !important;
}

.theme-semi-dark .sidebar-menu-label,
.theme-semi-dark .sidebar-logo-name {
  color: #ffffff !important;
}

.theme-semi-dark .sidebar-logo-subtitle {
  color: rgba(255,255,255,0.6) !important;
}

/* Custom sidebar menu items in semi-dark */
.theme-semi-dark .sidebar-menu .nav-link {
  color: rgba(255,255,255,0.7) !important;
}

.theme-semi-dark .sidebar-menu .nav-link:hover {
  background: rgba(255,255,255,0.1) !important;
  color: #ffffff !important;
}

.theme-semi-dark .sidebar-menu .nav-item.active > .menu-link {
  background: rgba(255,255,255,0.1) !important;
  color: #ffffff !important;
}

.theme-semi-dark .sidebar-menu .sub-menu .nav-link {
  color: rgba(255,255,255,0.6) !important;
}

.theme-semi-dark .sidebar-menu .sub-menu .nav-link:hover {
  color: #ffffff !important;
  background: rgba(255,255,255,0.08) !important;
}

/* Dark mode - same treatment for custom sidebar menu */
.theme-dark .sidebar-menu .nav-link {
  color: rgba(255,255,255,0.7) !important;
}

.theme-dark .sidebar-menu .nav-link:hover {
  background: rgba(255,255,255,0.1) !important;
  color: #ffffff !important;
}

.theme-dark .sidebar-menu .nav-item.active > .menu-link {
  background: rgba(255,255,255,0.1) !important;
  color: #ffffff !important;
}

.theme-dark .sidebar-menu .sub-menu .nav-link {
  color: rgba(255,255,255,0.6) !important;
}

.theme-dark .sidebar-menu .sub-menu .nav-link:hover {
  color: #ffffff !important;
  background: rgba(255,255,255,0.08) !important;
}

.theme-dark .sidebar-menu .sidebar-menu-label {
  color: rgba(255,255,255,0.5) !important;
}

.theme-dark .sidebar-menu .menu-link::after {
  color: rgba(255,255,255,0.4) !important;
}

.theme-semi-dark .mud-drawer .mud-navgroup .mud-navgroup-expand-icon {
  color: rgba(255,255,255,0.5) !important;
}

/* Gradient Mode */
.theme-gradient {
  --bg-body: linear-gradient(135deg, #0891b2 0%, #0e7490 50%, #164e63 100%);
  --bg-surface: rgba(255,255,255,0.95);
  --bg-surface-hover: rgba(255,255,255,0.98);
  --bg-surface-active: rgba(226,232,240,0.9);
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  --border-color: rgba(226,232,240,0.5);
  --border-color-light: rgba(241,245,249,0.3);
  --shadow-header: 0 1px 6px rgba(0,0,0,.15);
}

.theme-gradient .layout-footer {
  background: rgba(255,255,255,0.9);
}

.theme-gradient .breadcrumb-bar {
  background: rgba(255,255,255,0.9);
}

/* ── 2. GLOBAL RESET & BASE ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background: var(--bg-body);
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-dark); }

::selection {
  background: var(--primary);
  color: var(--text-inverse);
}

/* ── 3. TYPOGRAPHY ───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 0.5em;
}
h1 { font-size: var(--font-size-3xl); letter-spacing: -0.02em; }
h2 { font-size: var(--font-size-2xl); letter-spacing: -0.01em; }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

/* ── 4. BUTTONS ──────────────────────────────────────────── */
.btn {
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border-radius: var(--border-radius);
  border: 1px solid transparent;
  cursor: pointer !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  letter-spacing: 0.01em;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--secondary-light);
  box-shadow: var(--shadow-sm);
}

.btn-danger {
  background: var(--danger);
  color: var(--text-inverse);
  border-color: var(--danger);
  box-shadow: var(--shadow-sm);
}
.btn-danger:hover {
  background: var(--danger-dark);
  border-color: var(--danger-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: var(--text-inverse);
  border-color: var(--success);
}
.btn-success:hover {
  background: var(--success-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.btn-sm { padding: 0.35rem 0.875rem; font-size: var(--font-size-xs); }
.btn-lg { padding: 0.625rem 1.75rem; font-size: var(--font-size-md); }
.btn-icon { padding: 0.5rem; width: 36px; height: 36px; justify-content: center; }

/* ── 5. CARDS ────────────────────────────────────────────── */
.card, .mud-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  overflow: hidden;
}

.card:hover, .mud-card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-4) var(--space-5);
  font-weight: 600;
}

.card-body { padding: var(--space-5); }

.card-footer {
  background: var(--bg-surface-hover);
  border-top: 1px solid var(--border-color);
  padding: var(--space-3) var(--space-5);
}

/* ── 6. FORMS ────────────────────────────────────────────── */
.form-label, label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  display: block;
}

.form-control, .form-select, input[type="text"], input[type="email"],
input[type="password"], input[type="number"], textarea, select {
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.5rem 0.875rem;
  height: 40px;
  width: 100%;
  transition: all var(--transition-fast);
  outline: none;
}

.form-control:focus, .form-select:focus, input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
  background: var(--bg-surface);
}

.form-control::placeholder { color: var(--text-muted); font-weight: 400; }

/* ── 7. TABLES ───────────────────────────────────────────── */
.table {
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table thead th {
  background: var(--bg-surface-hover);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.table tbody tr {
  transition: background var(--transition-fast);
}

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

/* ── 8. MODALS ───────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  opacity: 0;
  animation: fadeIn 0.2s ease forwards;
}

.modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: calc(var(--z-modal) + 1);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  opacity: 0;
  animation: modalIn 0.25s ease 0.05s forwards;
}

.modal-content-custom {
  background: var(--bg-surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: none;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes modalIn {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ── 9. SIDEBAR / NAVIGATION ────────────────────────────── */
.mud-drawer {
  transition: width var(--transition-base) !important;
}

.mud-nav-menu {
  padding: var(--space-2) !important;
}

.mud-navgroup {
  margin-bottom: var(--space-1) !important;
}

.mud-navgroup .mud-navgroup-toggle {
  border-radius: var(--border-radius) !important;
  padding: var(--space-2) var(--space-3) !important;
  margin: 2px var(--space-2) !important;
  font-weight: 500 !important;
  transition: all var(--transition-fast) !important;
}

.mud-navgroup .mud-navgroup-toggle:hover {
  background: rgba(255,255,255,.1) !important;
}

.mud-nav-link {
  border-radius: var(--border-radius) !important;
  margin: 2px var(--space-2) !important;
  padding: var(--space-2) var(--space-3) !important;
  transition: all var(--transition-fast) !important;
}

.mud-nav-link:hover {
  background: rgba(255,255,255,.1) !important;
}

.mud-nav-link.active {
  background: rgba(255,255,255,.15) !important;
  color: var(--primary-light) !important;
  font-weight: 500 !important;
}

/* ── 10. NAVBAR / APP BAR ────────────────────────────────── */
.mud-appbar {
  background: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-header) !important;
}

.mud-appbar .mud-typography {
  color: var(--text-primary) !important;
}

/* ── 11. ALERTS ──────────────────────────────────────────── */
.alert {
  border-radius: var(--border-radius);
  border: none;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.alert-success { background: var(--success-bg); color: var(--success-dark); border-left: 4px solid var(--success); }
.alert-danger { background: var(--danger-bg); color: var(--danger-dark); border-left: 4px solid var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning-dark); border-left: 4px solid var(--warning); }
.alert-info { background: var(--info-bg); color: var(--info-dark); border-left: 4px solid var(--info); }

/* ── 12. BADGES & PILLS ──────────────────────────────────── */
.badge {
  font-size: var(--font-size-xs);
  font-weight: 500;
  padding: 0.2em 0.6em;
  border-radius: var(--border-radius-pill);
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning-dark); }
.badge-danger  { background: var(--danger-bg); color: var(--danger); }
.badge-info    { background: var(--info-bg); color: var(--info); }
.badge-default { background: var(--bg-surface-hover); color: var(--text-secondary); }

/* ── 13. SCROLLBAR ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary-light); }

/* ── 14. ANIMATIONS ──────────────────────────────────────── */
.fade-in { animation: fadeIn 0.3s ease; }

.slide-up {
  animation: slideUp 0.3s ease;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── 15. USER MENU / DROPDOWN ────────────────────────────── */
.user-menu-container { position: relative; }

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  border: 1.5px solid transparent;
  background: transparent;
  user-select: none;
}

.user-menu-trigger:hover {
  background: rgba(8,145,178,.06);
  border-color: rgba(8,145,178,.12);
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(100,116,139,.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
  position: relative;
  z-index: 1;
}

.user-avatar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(100,116,139,.45);
}

.user-avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(100,116,139,.4);
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  text-align: left;
}

.user-info-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.user-dropdown {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.12), 0 2px 10px rgba(0,0,0,.06);
  overflow: hidden;
  min-width: 200px;
}

.user-dropdown-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(100,116,139,.05) 0%, rgba(100,116,139,.02) 100%);
}

.user-dropdown-body {
  padding: var(--space-2);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  cursor: pointer !important;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

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

.user-dropdown-item.danger { color: var(--danger); }
.user-dropdown-item.danger:hover { background: var(--danger-bg); color: var(--danger-dark); }

.user-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: var(--space-2) 0;
}

.user-menu-chevron {
  transition: transform var(--transition-fast);
  color: var(--text-muted);
  flex-shrink: 0;
}
.user-menu-chevron.open { transform: rotate(180deg); }

.user-dropdown-portal {
  position: fixed;
  width: 280px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.user-dropdown-portal.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ── 16. MUDPAPER OVERRIDES ──────────────────────────────── */
.mud-paper {
  border-radius: var(--border-radius) !important;
}

/* ── 17. MUDBUTTON OVERRIDES ─────────────────────────────── */
.mud-button-root {
  border-radius: var(--border-radius) !important;
  text-transform: none !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
  transition: all var(--transition-fast) !important;
}

.mud-icon-button {
  border-radius: var(--border-radius) !important;
}

/* ── 18. MUDINPUT OVERRIDES ──────────────────────────────── */
.mud-input > input.mud-input-root {
  font-family: var(--font-family) !important;
  font-size: var(--font-size-sm) !important;
}

.mud-input.mud-input-outlined:hover .mud-input-outlined-border {
  border-color: var(--primary-light) !important;
}

.mud-input.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
  border-color: var(--primary) !important;
  box-shadow: var(--shadow-focus) !important;
}

/* ── 19. MUDSELECT / FORM INPUT FULL-WIDTH OVERRIDES ─────── */
/* Root level - force block display and full width */
.mud-select,
.mud-numeric-field,
.mud-datepicker,
.mud-autocomplete {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex-grow: 1 !important;
  flex-basis: 0 !important;
}

/* Input control wrapper */
.mud-select .mud-input-control,
.mud-numeric-field .mud-input-control,
.mud-datepicker .mud-input-control,
.mud-autocomplete .mud-input-control {
  min-height: 40px !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Input element itself */
.mud-select .mud-input,
.mud-numeric-field .mud-input,
.mud-datepicker .mud-input,
.mud-autocomplete .mud-input {
  width: 100% !important;
  max-width: 100% !important;
}

/* Outlined border */
.mud-select .mud-input-outlined-border,
.mud-numeric-field .mud-input-outlined-border,
.mud-datepicker .mud-input-outlined-border,
.mud-autocomplete .mud-input-outlined-border {
  width: 100% !important;
  max-width: 100% !important;
}

/* ── 20. MUDTEXT OVERRIDES ───────────────────────────────── */
.mud-text-white { color: var(--text-inverse) !important; }
.mud-text-secondary { color: var(--text-secondary) !important; }

/* ── 21. MUDDATAGRID OVERRIDES ───────────────────────────── */
.mud-datagrid {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius-lg) !important;
}

.mud-datagrid .mud-datagrid-toolbar {
  background: var(--bg-surface) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.mud-datagrid .mud-datagrid-headercell {
  background: var(--bg-surface-hover) !important;
  color: var(--text-secondary) !important;
  font-weight: 600 !important;
  font-size: var(--font-size-xs) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  border-bottom: 2px solid var(--border-color) !important;
}

.mud-datagrid .mud-datagrid-cell {
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  font-size: var(--font-size-sm) !important;
}

.mud-datagrid .mud-table-row:hover .mud-datagrid-cell,
.mud-datagrid tr:hover .mud-datagrid-cell {
  background: var(--bg-surface-hover) !important;
}

.mud-datagrid .mud-datagrid-sorter-header {
  color: var(--text-secondary) !important;
}

.mud-datagrid .mud-datagrid-overlay {
  background: var(--bg-surface) !important;
}

.mud-datagrid .mud-datagrid-footer {
  background: var(--bg-surface-hover) !important;
  border-top: 1px solid var(--border-color) !important;
}

/* ── 22. MUDPAPER DARK MODE ──────────────────────────────── */
.theme-dark .mud-paper {
  background: var(--bg-surface) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

.theme-semi-dark .mud-paper {
  background: var(--bg-surface) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

/* ── 23. MUDCHIP DARK MODE ───────────────────────────────── */
.theme-dark .mud-chip {
  color: var(--text-primary) !important;
}

.theme-semi-dark .mud-chip {
  color: var(--text-primary) !important;
}

/* ── 24. MUDSWITCH DARK MODE ─────────────────────────────── */
.theme-dark .mud-switch .mud-switch-label {
  color: var(--text-primary) !important;
}

.theme-semi-dark .mud-switch .mud-switch-label {
  color: var(--text-primary) !important;
}

/* ── 25. MUDDIALOG DARK MODE ─────────────────────────────── */
.theme-dark .mud-dialog {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
}

.theme-semi-dark .mud-dialog {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
}

.theme-dark .mud-dialog-title {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.theme-semi-dark .mud-dialog-title {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.theme-dark .mud-dialog-content {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
}

.theme-semi-dark .mud-dialog-content {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
}

/* ── 26. MUDAUTOCOMPLETE DARK MODE ───────────────────────── */
.theme-dark .mud-autocomplete .mud-input-control {
  color: var(--text-primary) !important;
}

.theme-semi-dark .mud-autocomplete .mud-input-control {
  color: var(--text-primary) !important;
}

/* ── 27. MUDPAGINATION DARK MODE ─────────────────────────── */
.theme-dark .mud-pagination .mud-button-root {
  color: var(--text-primary) !important;
}

.theme-semi-dark .mud-pagination .mud-button-root {
  color: var(--text-primary) !important;
}

/* ── 28. MUDPROGRESSCIRCULAR DARK MODE ───────────────────── */
.theme-dark .mud-progress-circular {
  color: var(--primary) !important;
}

.theme-semi-dark .mud-progress-circular {
  color: var(--primary) !important;
}

/* ── 21. LOGOUT MODAL ICON ───────────────────────────────── */
.logout-modal-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff0f6, #ffe3e3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--danger);
  animation: modalIconIn 0.4s ease 0.1s both;
}

.logout-modal-icon svg {
  width: 40px;
  height: 40px;
}

@keyframes modalIconIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── 22. NOTIFICATION BADGE ──────────────────────────────── */
.notification-icon-wrapper {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  animation: pulse 2s infinite;
}

/* ── 23. RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 768px) {
  .user-info { display: none; }
  .user-dropdown { width: 220px; right: -8px; }
  .modal-dialog { max-width: 95%; margin: var(--space-4); }
  .table { font-size: var(--font-size-xs); }
  .btn { padding: 0.4rem 1rem; font-size: var(--font-size-xs); }

  /* Sidebar completamente oculto en móvil, body full-width */
  .mud-drawer.mud-drawer-clipped.mud-drawer-open {
    display: none !important;
  }
  .mud-drawer.mud-drawer-clipped:not(.mud-drawer-open) {
    display: none !important;
  }
  .mud-main-content.mud-drawer-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .mud-appbar.mud-drawer-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

@media (max-width: 576px) {
  .user-dropdown { width: 200px; }
}

/* ── 24. UTILITY CLASSES ──────────────────────────────────── */

/* Required field indicator (red asterisk) */
.required-indicator {
  color: var(--danger);
  font-weight: 600;
  margin-left: 2px;
}

/* Config cards (ConvenioConfig pattern) */
.config-card {
  background: var(--bg-surface-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  max-width: 250px;
  width: 100%;
}

.config-card:hover {
  background: var(--bg-surface-active);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.config-card.active {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
}

/* Section panels */
.section-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-5);
}

/* Form sections */
.form-section {
  margin-bottom: var(--space-6);
}

.form-section-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--border-color);
}

/* Scrollable list */
.scrollable-list {
  max-height: 250px;
  overflow-y: auto;
}

/* Info panel */
.info-panel {
  background: var(--info-bg);
  border: 1px solid var(--info-light);
  border-radius: var(--border-radius);
  padding: var(--space-4);
  color: var(--info-dark);
}

/* ── 25. TELWIN FORM COMPONENTS ──────────────────────────── */
.telwin-input .mud-input {
  font-family: var(--font-family) !important;
  font-size: var(--font-size-sm) !important;
  color: var(--text-primary) !important;
}

.telwin-input .mud-input-outlined .mud-input-outlined-border {
  border-color: var(--border-color) !important;
  border-width: 1.5px !important;
}

.telwin-input .mud-input-outlined:hover .mud-input-outlined-border {
  border-color: var(--primary-light) !important;
}

.telwin-input .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
  border-color: var(--primary) !important;
  box-shadow: var(--shadow-focus) !important;
}

.telwin-switch .mud-switch-label {
  font-size: var(--font-size-sm) !important;
  color: var(--text-primary) !important;
  font-weight: 500 !important;
}

/* ── 30. TELWIN TABLE (MudTable) ──────────────────────────── */
.mud-table.telwin-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
  overflow: hidden !important;
}

.mud-table.telwin-table .mud-table-container {
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
  overflow: hidden !important;
}

.mud-table.telwin-table .mud-table-root {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.mud-table.telwin-table .mud-table-head {
  background: var(--primary) !important;
}

.mud-table.telwin-table .mud-table-head .mud-th {
  background: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: var(--font-size-xs) !important;
  padding: var(--space-3) var(--space-4) !important;
  border: none !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.mud-table.telwin-table .mud-table-head .mud-th:first-child {
  border-top-left-radius: var(--border-radius-lg);
}

.mud-table.telwin-table .mud-table-head .mud-th:last-child {
  border-top-right-radius: var(--border-radius-lg);
}

.mud-table.telwin-table .mud-table-body .mud-table-row {
  border-bottom: 1px solid var(--border-color-light) !important;
  transition: background var(--transition-fast) !important;
}

.mud-table.telwin-table .mud-table-body .mud-table-row:nth-child(even) {
  background: var(--bg-surface-hover) !important;
}

.mud-table.telwin-table .mud-table-body .mud-table-row:hover {
  background: var(--primary-bg) !important;
}

.mud-table.telwin-table .mud-table-body .mud-table-row:hover .mud-table-cell {
  background: transparent !important;
}

.mud-table.telwin-table .mud-table-body .mud-table-cell {
  padding: var(--space-3) var(--space-4) !important;
  border-bottom: 1px solid var(--border-color-light) !important;
  font-size: var(--font-size-sm) !important;
  color: var(--text-primary) !important;
}

.mud-table.telwin-table .mud-table-body .mud-table-row:last-child .mud-table-cell {
  border-bottom: none !important;
}

/* ── 31. TOOLBAR ICON BUTTONS ─────────────────────────────── */
.toolbar-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toolbar-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.toolbar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.toolbar-btn .mud-icon-root {
  font-size: 22px;
}

.toolbar-btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.toolbar-btn-primary:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

.toolbar-btn-success {
  background: var(--success);
  color: #ffffff;
}

.toolbar-btn-success:hover {
  background: var(--success-dark);
  color: #ffffff;
}

.toolbar-btn-outline {
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.toolbar-btn-outline:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
}

/* ── 32. TELWIN CONTAINER ──────────────────────────────────── */
.telwin-container {
  padding: 0;
  padding-bottom: var(--footer-height, 48px);
}

/* ── 33. TOOLBAR CARD ──────────────────────────────────────── */
.toolbar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.toolbar-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ── 34. FILTER CARD ───────────────────────────────────────── */
.filter-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.filter-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-surface-hover);
  border-bottom: 1px solid var(--border-color);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-body {
  padding: var(--space-3);
}

.filter-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-color-light);
}

/* ── 35. TABLE CARD ────────────────────────────────────────── */
.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.table-scroll-area {
  overflow-y: auto;
  flex: 1;
}

.table-scroll-area::-webkit-scrollbar {
  width: 6px;
}

.table-scroll-area::-webkit-scrollbar-track {
  background: var(--bg-surface-hover);
}

.table-scroll-area::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.table-scroll-area::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-light);
}

/* ── 36. CELL VARIANTS ─────────────────────────────────────── */
.cell-code {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 3px 10px;
  border-radius: var(--border-radius-pill);
  display: inline-block;
  min-width: 48px;
  text-align: center;
}

.cell-primary {
  font-weight: 600;
  color: var(--text-primary);
}

.cell-secondary {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* ── 37. BADGES ────────────────────────────────────────────── */
.badge-telwin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--border-radius-pill);
  line-height: 1;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success-dark);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger-dark);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-dark);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info);
}

.badge-default {
  background: var(--bg-surface-hover);
  color: var(--text-secondary);
}

/* ── 38. ACTION BUTTONS ────────────────────────────────────── */
.action-group {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.action-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--border-radius);
  border: 1.5px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.action-btn-info {
  border-color: var(--info-light);
  color: var(--info);
}

.action-btn-info:hover {
  background: var(--info);
  color: #ffffff;
  border-color: var(--info);
}

.action-btn-warning {
  border-color: var(--warning-light);
  color: var(--warning);
}

.action-btn-warning:hover {
  background: var(--warning);
  color: #ffffff;
  border-color: var(--warning);
}

.action-btn-success {
  border-color: var(--success-light);
  color: var(--success);
}

.action-btn-success:hover {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

.action-btn-danger {
  border-color: var(--danger-light);
  color: var(--danger);
}

.action-btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
  border-color: var(--danger);
}

/* ── 39. EMPTY STATE ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-10) var(--space-4);
}

.empty-state-icon {
  color: var(--text-muted);
  opacity: 0.5;
  margin-bottom: var(--space-3);
}

.empty-state-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 var(--space-2) 0;
}

.empty-state-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: 0;
}

/* ── 40. PAGINATION BAR ────────────────────────────────────── */
.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.telwin-pagination .mud-pagination-item {
  min-width: 28px;
  height: 28px;
}

.telwin-pagination .mud-pagination-item .mud-button-root {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  color: #64748b !important;
  background-color: transparent !important;
  transition: background-color 0.2s ease, color 0.2s ease !important;
}

.telwin-pagination .mud-pagination-item:not(.mud-pagination-item-selected) .mud-button-root:hover {
  background-color: #f1f5f9 !important;
  color: var(--primary, #0891b2) !important;
}

/* Active page — primary fill by default */
.telwin-pagination .mud-pagination-item-selected > .mud-button-root {
  background-color: var(--primary, #0891b2) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 6px rgba(8, 145, 178, 0.35) !important;
}

/* Active hover — darker */
.telwin-pagination .mud-pagination-item-selected > .mud-button-root:hover {
  background-color: var(--primary-dark, #0e7490) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(8, 145, 178, 0.45) !important;
}

/* ── 41. SLIDE UP ANIMATION ────────────────────────────────── */
.slide-up {
  animation: slideUp 0.3s ease-out;
}

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

/* ── 42. TELWIN BUTTONS ────────────────────────────────────── */
.btn-telwin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--border-radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-telwin:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-telwin:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-telwin-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-telwin-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-telwin-success {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

.btn-telwin-success:hover {
  background: var(--success-dark);
  border-color: var(--success-dark);
}

.btn-telwin-outline {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.btn-telwin-outline:hover {
  background: var(--bg-surface-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-icon-left {
  font-size: 18px;
}

.btn-icon-only {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--border-radius);
}

/* ── 30. VALIDATION MESSAGE OVERRIDES ────────────────────── */
.validation-message,
.mud-input-helper-text.mud-input-error,
.field-validation-error {
  color: #ef4444 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  margin-top: 5px !important;
  padding-left: 2px !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.validation-message::before,
.field-validation-error::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ── 31. UPPERCASE TEXT INPUT ────────────────────────────── */
.text-uppercase input,
.uppercase-input .mud-input {
  text-transform: uppercase !important;
}

.text-uppercase input::placeholder {
  text-transform: none !important;
}

/* ── 32. SAMO LOADING SPINNER ────────────────────────────── */
.samo-loading-popup {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  border-radius: 16px !important;
  width: 170px !important;
  max-width: 170px !important;
  height: 180px !important;
  max-height: 180px !important;
  padding: 0 !important;
  overflow: visible !important;
}

.samo-loading-popup .swal2-html-container {
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.samo-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: visible;
}

.samo-loading-glow {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: samoGlowPulse 2s ease-in-out infinite;
}

.samo-loading-visual {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.samo-loading-visual::after {
  content: none;
}

.samo-loading-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 2px 10px rgba(8, 145, 178, 0.35));
  object-fit: contain;
}

.samo-loading-text {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 1px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.4px;
  white-space: nowrap;
  z-index: 2;
  text-shadow: none;
  justify-content: center;
}

.samo-loading-bar {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 2px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  z-index: 2;
}

.samo-loading-bar-inner {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  border-radius: 2px;
  animation: samoBarSlide 1.2s ease-in-out infinite;
}

.samo-dots span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  animation: samoBounce 1.4s infinite ease-in-out both;
}

.samo-dots span:nth-child(1) { animation-delay: 0s; }
.samo-dots span:nth-child(2) { animation-delay: 0.2s; }
.samo-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes samoBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-5px); opacity: 1; }
}

@keyframes samoGlowPulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes samoBarSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ── 33. TELWIN TOAST NOTIFICATIONS ──────────────────────── */
.telwin-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
  width: 100%;
}

.telwin-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  pointer-events: all;
  position: relative;
  overflow: hidden;
  border-left: 4px solid transparent;
}

/* ── Enter Animation ── */
.telwin-toast-enter {
  animation: toastSlideIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

/* ── Leaving Animation ── */
.telwin-toast-leaving {
  animation: toastSlideOut 0.3s cubic-bezier(0.06, 0.71, 0.55, 1) forwards;
}

@keyframes toastSlideIn {
  0% {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }
}

/* ── Icon ── */
.telwin-toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.telwin-toast-icon svg {
  width: 100%;
  height: 100%;
}

/* ── Content ── */
.telwin-toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.telwin-toast-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.telwin-toast-message {
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0.85;
}

/* ── Close Button ── */
.telwin-toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  margin: -2px -4px 0 0;
  opacity: 0.4;
  transition: opacity 0.15s ease;
  color: inherit;
}

.telwin-toast-close:hover {
  opacity: 0.8;
}

.telwin-toast-close svg {
  width: 15px;
  height: 15px;
}

/* ── Progress Bar ── */
.telwin-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.telwin-toast-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  animation: toastProgress linear forwards;
}

@keyframes toastProgress {
  0% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

/* ── SUCCESS ── */
.telwin-toast-success {
  border-left-color: #10b981;
}
.telwin-toast-success .telwin-toast-icon { color: #10b981; }
.telwin-toast-success .telwin-toast-title { color: #065f46; }
.telwin-toast-success .telwin-toast-message { color: #047857; }
.telwin-toast-success .telwin-toast-progress-bar { background: #10b981; }

/* ── ERROR ── */
.telwin-toast-error {
  border-left-color: #ef4444;
}
.telwin-toast-error .telwin-toast-icon { color: #ef4444; }
.telwin-toast-error .telwin-toast-title { color: #991b1b; }
.telwin-toast-error .telwin-toast-message { color: #dc2626; }
.telwin-toast-error .telwin-toast-progress-bar { background: #ef4444; }

/* ── WARNING ── */
.telwin-toast-warning {
  border-left-color: #f59e0b;
}
.telwin-toast-warning .telwin-toast-icon { color: #f59e0b; }
.telwin-toast-warning .telwin-toast-title { color: #92400e; }
.telwin-toast-warning .telwin-toast-message { color: #b45309; }
.telwin-toast-warning .telwin-toast-progress-bar { background: #f59e0b; }

/* ── INFO ── */
.telwin-toast-info {
  border-left-color: #3b82f6;
}
.telwin-toast-info .telwin-toast-icon { color: #3b82f6; }
.telwin-toast-info .telwin-toast-title { color: #1e3a5f; }
.telwin-toast-info .telwin-toast-message { color: #2563eb; }
.telwin-toast-info .telwin-toast-progress-bar { background: #3b82f6; }

/* ── QUESTION ── */
.telwin-toast-question {
  border-left-color: #8b5cf6;
}
.telwin-toast-question .telwin-toast-icon { color: #8b5cf6; }
.telwin-toast-question .telwin-toast-title { color: #4c1d95; }
.telwin-toast-question .telwin-toast-message { color: #6d28d9; }
.telwin-toast-question .telwin-toast-progress-bar { background: #8b5cf6; }

/* ── Dark Mode ── */
.theme-dark .telwin-toast {
  background: #1e293b;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.theme-dark .telwin-toast-title { color: #f1f5f9; }
.theme-dark .telwin-toast-message { color: #94a3b8; }
.theme-dark .telwin-toast-close { color: #94a3b8; }
.theme-dark .telwin-toast-progress { background: rgba(255, 255, 255, 0.08); }
.theme-dark .telwin-toast-success .telwin-toast-title { color: #6ee7b7; }
.theme-dark .telwin-toast-success .telwin-toast-message { color: #34d399; }
.theme-dark .telwin-toast-error .telwin-toast-title { color: #fca5a5; }
.theme-dark .telwin-toast-error .telwin-toast-message { color: #f87171; }
.theme-dark .telwin-toast-warning .telwin-toast-title { color: #fcd34d; }
.theme-dark .telwin-toast-warning .telwin-toast-message { color: #fbbf24; }
.theme-dark .telwin-toast-info .telwin-toast-title { color: #93c5fd; }
.theme-dark .telwin-toast-info .telwin-toast-message { color: #60a5fa; }
.theme-dark .telwin-toast-question .telwin-toast-title { color: #c4b5fd; }
.theme-dark .telwin-toast-question .telwin-toast-message { color: #a78bfa; }

/* ══════════════════════════════════════════════════════════════
   34. TELWIN FORM SYSTEM — Professional UI/UX
   ══════════════════════════════════════════════════════════════ */

/* ── 34.1 FORM CARD CONTAINER ──────────────────────────────── */
.mud-card {
  border-radius: 16px !important;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.03) !important;
  border: 1px solid #e8edf2 !important;
  overflow: visible !important;
  background: #fff !important;
  transition: box-shadow 0.25s ease !important;
}

.mud-card:hover {
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.04) !important;
}

.mud-card .mudCardContent {
  padding: 28px 32px !important;
}

/* ── 34.2 FORM LABELS ──────────────────────────────────────── */
.mud-typography.mud-typography-subtitle2 {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  letter-spacing: 0.02em !important;
  margin-bottom: 6px !important;
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
}

.mud-typography.mud-typography-subtitle2 span[style*="color: red"],
.mud-typography.mud-typography-subtitle2 span[style*="color:red"] {
  color: #ef4444 !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.form-label .required {
  color: #ef4444;
  margin-left: 2px;
  font-weight: 700;
}

/* ── 34.3 INPUT FIELDS — Enhanced Outlined ─────────────────── */
.mud-input-outlined .mud-input-outlined-border {
  transition: border-color 0.2s ease, box-shadow 0.25s ease !important;
  border-width: 1.5px !important;
  border-color: #d1d9e6 !important;
  border-radius: 10px !important;
}

.mud-input-outlined .mud-input:hover .mud-input-outlined-border {
  border-color: #94a3b8 !important;
}

.mud-input-outlined .mud-input:focus-within .mud-input-outlined-border,
.mud-input-outlined .mud-input.mud-input-focused .mud-input-outlined-border {
  border-color: var(--primary, #0891b2) !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.08) !important;
}

.mud-input-outlined .mud-input-root {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #1e293b !important;
  min-height: 44px !important;
  padding: 12px 16px !important;
  letter-spacing: 0.01em !important;
}

.mud-input-outlined .mud-input-root::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
  font-style: normal !important;
  opacity: 0.8;
}

/* ── 34.4 SELECT DROPDOWN — Enhanced ───────────────────────── */
.mud-select.mud-select-outlined .mud-input-outlined-border {
  transition: border-color 0.2s ease, box-shadow 0.25s ease !important;
  border-width: 1.5px !important;
  border-color: #d1d9e6 !important;
  border-radius: 10px !important;
}

.mud-select.mud-select-outlined:hover .mud-input-outlined-border {
  border-color: #94a3b8 !important;
}

.mud-select.mud-select-outlined .mud-input.mud-input-focused .mud-input-outlined-border,
.mud-select.mud-select-outlined:focus-within .mud-input-outlined-border {
  border-color: var(--primary, #0891b2) !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.08) !important;
}

.mud-select .mud-input-root {
  font-size: 14px !important;
  min-height: 44px !important;
  padding: 12px 16px !important;
}

/* Select dropdown icon */
.mud-select .mud-input-adornment {
  color: #94a3b8 !important;
  transition: color 0.2s ease !important;
}

.mud-select:hover .mud-input-adornment,
.mud-select.mud-select-outlined:focus-within .mud-input-adornment {
  color: var(--primary, #0891b2) !important;
}

/* ── 34.5 DATEPICKER — Enhanced ────────────────────────────── */
.mud-datepicker.mud-select-outlined .mud-input-outlined-border {
  transition: border-color 0.2s ease, box-shadow 0.25s ease !important;
  border-width: 1.5px !important;
  border-color: #d1d9e6 !important;
  border-radius: 10px !important;
}

.mud-datepicker.mud-select-outlined:hover .mud-input-outlined-border {
  border-color: #94a3b8 !important;
}

.mud-datepicker.mud-select-outlined .mud-input.mud-input-focused .mud-input-outlined-border,
.mud-datepicker.mud-select-outlined:focus-within .mud-input-outlined-border {
  border-color: var(--primary, #0891b2) !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.08) !important;
}

/* Date picker button */
.mud-input-adornment .mud-icon-button {
  color: #94a3b8 !important;
  transition: color 0.2s ease !important;
}

.mud-datepicker:hover .mud-input-adornment .mud-icon-button,
.mud-datepicker:focus-within .mud-input-adornment .mud-icon-button {
  color: var(--primary, #0891b2) !important;
}

/* ── 34.6 AUTOCOMPLETE — Enhanced ──────────────────────────── */
.mud-autocomplete.mud-select-outlined .mud-input-outlined-border {
  transition: border-color 0.2s ease, box-shadow 0.25s ease !important;
  border-width: 1.5px !important;
  border-color: #d1d9e6 !important;
  border-radius: 10px !important;
}

.mud-autocomplete.mud-select-outlined:hover .mud-input-outlined-border {
  border-color: #94a3b8 !important;
}

.mud-autocomplete.mud-select-outlined .mud-input.mud-input-focused .mud-input-outlined-border,
.mud-autocomplete.mud-select-outlined:focus-within .mud-input-outlined-border {
  border-color: var(--primary, #0891b2) !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.08) !important;
}

/* ── 34.7 NUMERIC FIELD — Enhanced ─────────────────────────── */
.mud-numeric-field.mud-select-outlined .mud-input-outlined-border {
  transition: border-color 0.2s ease, box-shadow 0.25s ease !important;
  border-width: 1.5px !important;
  border-color: #d1d9e6 !important;
  border-radius: 10px !important;
}

.mud-numeric-field.mud-select-outlined:hover .mud-input-outlined-border {
  border-color: #94a3b8 !important;
}

.mud-numeric-field.mud-select-outlined .mud-input.mud-input-focused .mud-input-outlined-border,
.mud-numeric-field.mud-select-outlined:focus-within .mud-input-outlined-border {
  border-color: var(--primary, #0891b2) !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.08) !important;
}

/* ── 34.8 VALIDATION STATES ────────────────────────────────── */
.mud-input-outlined .mud-input.mud-input-error .mud-input-outlined-border,
.mud-input.mud-input-error .mud-input-outlined-border {
  border-color: #ef4444 !important;
  border-width: 2px !important;
  border-radius: 10px !important;
}

.mud-input-outlined .mud-input.mud-input-error:focus-within .mud-input-outlined-border,
.mud-input.mud-input-error.mud-input-focused .mud-input-outlined-border {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08) !important;
}

.mud-input-helper-text.mud-input-error {
  font-size: 12px !important;
  font-weight: 500 !important;
  margin-top: 6px !important;
  padding-left: 2px !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.mud-input-helper-text.mud-input-error::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ── 34.9 SWITCH — Modern Toggle ───────────────────────────── */
.mud-switch {
  margin: 6px 0 !important;
}

.mud-switch .mud-button-root {
  width: 48px !important;
  height: 28px !important;
  padding: 0 !important;
}

/* Track — force gray when OFF, teal when ON regardless of Color param */
.mud-switch .mud-switch-track svg rect {
  rx: 14 !important;
  ry: 14 !important;
  transition: fill 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* OFF state: always gray */
.mud-switch:not(.mud-checked) .mud-switch-track svg rect {
  fill: #d1d5db !important;
}

/* ON state: always teal (override Color="Success") */
.mud-switch.mud-checked .mud-switch-track svg rect {
  fill: var(--primary, #0891b2) !important;
}

.mud-switch .mud-switch-track {
  overflow: visible !important;
}

/* Thumb — white circle, bigger */
.mud-switch .mud-switch-thumb {
  width: 22px !important;
  height: 22px !important;
  background-color: #fff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.12) !important;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease !important;
}

.mud-switch:hover .mud-switch-thumb {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

.mud-switch.mud-checked .mud-switch-thumb {
  background-color: #fff !important;
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.4), 0 1px 3px rgba(8, 145, 178, 0.2) !important;
}

/* Focus state */
.mud-switch .mud-button-root:focus-visible {
  outline: none !important;
}

.mud-switch .mud-button-root:focus-visible::after {
  content: '' !important;
  position: absolute !important;
  inset: -4px !important;
  border-radius: 18px !important;
  border: 2px solid var(--primary, #0891b2) !important;
  pointer-events: none !important;
}

/* ── 34.10 CHIP — Refined ──────────────────────────────────── */
.mud-chip {
  font-size: 12.5px !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
  height: 30px !important;
  letter-spacing: 0.01em !important;
}

/* ── 34.11 DIVIDER — Section Separator ─────────────────────── */
.mud-divider.mud-divider-fullwidth {
  margin: 20px 0 !important;
  border-top: 1px solid #e8edf2 !important;
}

/* ── 34.12 ALERT / HEADER — Section Title ──────────────────── */
.mud-alert {
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 12px 18px !important;
  letter-spacing: 0.01em !important;
}

.mud-alert.mud-alert-info {
  background: linear-gradient(135deg, #ecfeff 0%, #f0f9ff 100%) !important;
  color: #0e7490 !important;
  border: 1px solid rgba(8, 145, 178, 0.12) !important;
  border-left: 4px solid var(--primary, #0891b2) !important;
}

/* ── 34.13 BUTTONS — Professional ──────────────────────────── */
.mud-button-root.mud-button-filled:not(.mud-pagination-item .mud-button-root):not(.mud-icon-button) {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  border-radius: 10px !important;
  padding: 10px 24px !important;
  min-height: 42px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.2s ease !important;
}

.mud-button-root.mud-button-filled:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-1px) !important;
}

.mud-button-root.mud-button-outlined {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  border-radius: 10px !important;
  padding: 10px 24px !important;
  min-height: 42px !important;
  border-width: 1.5px !important;
  transition: all 0.2s ease !important;
}

/* ── 34.14 PROGRESS CIRCULAR ───────────────────────────────── */
.mud-progress-circular.mud-progress-circular-indeterminate circle {
  stroke-width: 3 !important;
}

/* ── 34.15 DROPDOWN PANELS — Radzen & MudBlazor ────────────── */

/* RadzenDropDown styling */
.RadzenDropDown,
.rz-dropdown {
  border-radius: 10px !important;
  border: 1.5px solid #d1d9e6 !important;
  min-height: 44px !important;
  font-size: 14px !important;
  transition: border-color 0.2s ease, box-shadow 0.25s ease !important;
}

.RadzenDropDown:hover,
.rz-dropdown:hover {
  border-color: #94a3b8 !important;
}

.RadzenDropDown:focus,
.rz-dropdown:focus,
.rz-dropdown-open .rz-dropdown {
  border-color: var(--primary, #0891b2) !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.08) !important;
  outline: none !important;
}

.rz-dropdown-label {
  padding: 10px 16px !important;
  min-height: 44px !important;
  display: flex !important;
  align-items: center !important;
}

.rz-dropdown-panel {
  border-radius: 12px !important;
  border: 1px solid #e8edf2 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
  overflow: hidden !important;
  margin-top: 4px !important;
}

.rz-dropdown-item {
  padding: 10px 16px !important;
  font-size: 13.5px !important;
  transition: background-color 0.15s ease !important;
  border-radius: 0 !important;
}

.rz-dropdown-item:hover {
  background-color: #f0f9ff !important;
  color: #0e7490 !important;
}

.rz-state-highlight .rz-dropdown-item,
.rz-dropdown-item.rz-state-selected {
  background-color: var(--primary, #0891b2) !important;
  color: #fff !important;
}

/* MudBlazor Autocomplete/Select dropdown */
.mud-autocomplete .mud-list,
.mud-select .mud-popover .mud-list {
  border-radius: 12px !important;
  border: 1px solid #e8edf2 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
  padding: 6px !important;
}

.mud-autocomplete .mud-list-item,
.mud-select .mud-list-item {
  border-radius: 8px !important;
  font-size: 13.5px !important;
  padding: 10px 14px !important;
  margin: 2px 0 !important;
  transition: background-color 0.15s ease !important;
}

.mud-autocomplete .mud-list-item:hover,
.mud-select .mud-list-item:hover {
  background-color: #f0f9ff !important;
  color: #0e7490 !important;
}

.mud-autocomplete .mud-list-item.mud-selected,
.mud-select .mud-list-item.mud-selected {
  background-color: var(--primary, #0891b2) !important;
  color: #fff !important;
}

/* ── 34.16 DATEPICKER CALENDAR — Refined ───────────────────── */
.mud-picker {
  border-radius: 14px !important;
}

.mud-picker .mud-picker-calendar-header {
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
}

.mud-picker .mud-picker-calendar-day {
  border-radius: 10px !important;
  font-size: 13px !important;
  width: 36px !important;
  height: 36px !important;
  transition: background-color 0.15s ease !important;
}

.mud-picker .mud-picker-calendar-day:hover {
  background-color: #f0f9ff !important;
}

.mud-picker .mud-picker-calendar-day.mud-selected {
  background-color: var(--primary, #0891b2) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

/* Picker action buttons */
.mud-picker .mud-dialog-actions {
  padding: 8px 12px !important;
  border-top: 1px solid #e8edf2 !important;
}

/* ── 34.17 GRID SPACING — Form Fields ──────────────────────── */
.mud-grid-spacing-2 > .mud-grid-item {
  padding: 4px 8px !important;
}

/* ── 34.18 DARK MODE OVERRIDES ─────────────────────────────── */
.theme-dark .mud-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

.theme-dark .mud-typography.mud-typography-subtitle2 {
  color: #e2e8f0 !important;
}

.theme-dark .mud-input-outlined .mud-input-outlined-border {
  border-color: #475569 !important;
}

.theme-dark .mud-input-outlined .mud-input:hover .mud-input-outlined-border {
  border-color: #64748b !important;
}

.theme-dark .mud-input-outlined .mud-input:focus-within .mud-input-outlined-border,
.theme-dark .mud-input-outlined .mud-input.mud-input-focused .mud-input-outlined-border {
  border-color: var(--primary-light, #22d3ee) !important;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12) !important;
}

.theme-dark .mud-alert.mud-alert-info {
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.1) 0%, rgba(30, 41, 59, 0.8) 100%) !important;
  border-color: rgba(8, 145, 178, 0.2) !important;
  color: #22d3ee !important;
}

.theme-dark .mud-switch .mud-switch-track svg rect {
  transition: fill 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.theme-dark .mud-switch:not(.mud-checked) .mud-switch-track svg rect {
  fill: #475569 !important;
}

.theme-dark .mud-switch.mud-checked .mud-switch-track svg rect {
  fill: var(--primary-light, #22d3ee) !important;
}

.theme-dark .mud-switch .mud-switch-thumb {
  background-color: #e2e8f0 !important;
}

.theme-dark .mud-switch.mud-checked .mud-switch-thumb {
  box-shadow: 0 2px 8px rgba(34, 211, 238, 0.4), 0 1px 3px rgba(34, 211, 238, 0.2) !important;
}

.theme-dark .mud-input-outlined .mud-input-root {
  color: #e2e8f0 !important;
}

.theme-dark .mud-input-outlined .mud-input-root::placeholder {
  color: #64748b !important;
}

.theme-dark .rz-dropdown,
.theme-dark .RadzenDropDown {
  background-color: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

.theme-dark .rz-dropdown-panel {
  background-color: #1e293b !important;
  border-color: #475569 !important;
}

.theme-dark .rz-dropdown-item:hover {
  background-color: rgba(8, 145, 178, 0.1) !important;
  color: #22d3ee !important;
}

/* ══════════════════════════════════════════════════════════════
   35. MUD DATAGRID PAGINATION — Compact & Refined
   ══════════════════════════════════════════════════════════════ */

/* Size all pagination buttons */
.mud-pagination .mud-pagination-item .mud-button-root,
.mud-table-pagination .mud-button-root,
.mud-table-pagination .mud-icon-button {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border-radius: 6px !important;
}

.mud-pagination .mud-pagination-item .mud-button-root .mud-icon-root,
.mud-table-pagination .mud-icon-root {
  font-size: 16px !important;
}

/* ── ACTIVE PAGE — primary fill ─────────────────────────────── */

/* MudBlazor 6.x: selected <li> gets "mud-pagination-item-selected" */
.mud-pagination .mud-pagination-item-selected > .mud-button-root,
.mud-table-pagination .mud-pagination-item-selected > .mud-button-root {
  background-color: var(--primary, #0891b2) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 6px rgba(8, 145, 178, 0.35) !important;
}

/* Active hover — darker */
.mud-pagination .mud-pagination-item-selected > .mud-button-root:hover,
.mud-table-pagination .mud-pagination-item-selected > .mud-button-root:hover {
  background-color: var(--primary-dark, #0e7490) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(8, 145, 178, 0.45) !important;
}

/* ── INACTIVE PAGES ─────────────────────────────────────────── */
.mud-pagination .mud-pagination-item:not(.mud-pagination-item-selected) .mud-button-root,
.mud-table-pagination .mud-pagination-item:not(.mud-pagination-item-selected) .mud-button-root {
  color: #64748b !important;
  background-color: transparent !important;
}

.mud-pagination .mud-pagination-item:not(.mud-pagination-item-selected) .mud-button-root:hover,
.mud-table-pagination .mud-pagination-item:not(.mud-pagination-item-selected) .mud-button-root:hover {
  background-color: #f1f5f9 !important;
  color: var(--primary, #0891b2) !important;
}

/* Disabled arrows */
.mud-pagination .mud-button-root:disabled,
.mud-table-pagination .mud-button-root:disabled {
  color: #cbd5e1 !important;
  opacity: 0.4 !important;
}

.mud-pagination {
  gap: 2px !important;
}

/* Table pagination wrapper */
.mud-table-pagination {
  background: transparent !important;
  border: none !important;
  padding: 6px 4px !important;
  min-height: auto !important;
}

.mud-table-pagination-toolbar {
  background: transparent !important;
  min-height: auto !important;
  padding: 6px 0 !important;
  border-top: 1px solid #f1f5f9 !important;
}

.mud-table-pagination-actions {
  gap: 2px !important;
}

.mud-table-pagination-actions .mud-icon-button {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  color: #64748b !important;
  transition: all 0.15s ease !important;
}

.mud-table-pagination-actions .mud-icon-button:hover {
  background-color: #f1f5f9 !important;
  color: var(--primary, #0891b2) !important;
}

.mud-table-pagination-actions .mud-icon-button:disabled {
  color: #cbd5e1 !important;
  opacity: 0.4 !important;
}

.mud-table-pagination-actions .mud-icon-button .mud-icon-root {
  font-size: 16px !important;
}

.mud-table-pagination-text {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  margin: 0 4px !important;
  white-space: nowrap !important;
}

.mud-table-pagination-caption {
  font-size: 12px !important;
  color: #64748b !important;
}

.mud-table-pager {
  background: transparent !important;
  min-height: auto !important;
}

.mud-table-pager .mud-toolbar {
  background: transparent !important;
  min-height: auto !important;
}

.mud-table-nav {
  align-items: center !important;
  justify-content: flex-end !important;
}

/* Rows per page selector */
.mud-table-pagination-actions .mud-select {
  min-width: 50px !important;
}

.mud-select.mud-pagination-select {
  min-width: 50px !important;
}

.mud-table-pagination-select .mud-input-root {
  min-height: 28px !important;
  height: 28px !important;
  padding: 2px 24px 2px 8px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.mud-table-pagination-select .mud-input-outlined-border {
  border-radius: 6px !important;
}

/* ── 35.1 DARK MODE PAGINATION ──────────────────────────────── */
.theme-dark .mud-table-pagination-toolbar {
  border-top-color: #334155 !important;
}

.theme-dark .mud-table-pagination-actions .mud-icon-button {
  color: #94a3b8 !important;
}

.theme-dark .mud-table-pagination-actions .mud-icon-button:hover {
  background-color: #334155 !important;
  color: #22d3ee !important;
}

.theme-dark .mud-table-pagination-text {
  color: #94a3b8 !important;
}

/* Dark inactive */
.theme-dark .mud-pagination .mud-pagination-item:not(.mud-pagination-item-selected) .mud-button-root,
.theme-dark .mud-table-pagination .mud-pagination-item:not(.mud-pagination-item-selected) .mud-button-root {
  color: #94a3b8 !important;
  background-color: transparent !important;
}

.theme-dark .mud-pagination .mud-pagination-item:not(.mud-pagination-item-selected) .mud-button-root:hover,
.theme-dark .mud-table-pagination .mud-pagination-item:not(.mud-pagination-item-selected) .mud-button-root:hover {
  background-color: #334155 !important;
  color: #22d3ee !important;
}

/* Dark active */
.theme-dark .mud-pagination .mud-pagination-item-selected > .mud-button-root,
.theme-dark .mud-table-pagination .mud-pagination-item-selected > .mud-button-root,
.theme-dark .telwin-pagination .mud-pagination-item-selected > .mud-button-root {
  background-color: var(--primary-light, #22d3ee) !important;
  color: #0e293b !important;
}

.theme-dark .mud-pagination .mud-pagination-item-selected > .mud-button-root:hover,
.theme-dark .mud-table-pagination .mud-pagination-item-selected > .mud-button-root:hover {
  background-color: #06b6d4 !important;
  color: #0e293b !important;
}

/* ═══════════════════════════════════════════════════════════════
   36. CALENDAR COMPONENT (TelwinCalendar)
   Borex-inspired clean calendar design
   ═══════════════════════════════════════════════════════════════ */

/* ── 36.1 Container ──────────────────────────────────────────── */
.telwin-calendar {
  width: 100%;
  background: var(--bg-surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

/* ── 36.2 Toolbar (Borex style) ──────────────────────────────── */
.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  min-height: 52px;
}

.cal-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.cal-toolbar-center {
  flex: 1;
  text-align: center;
}

.cal-toolbar-right {
  display: flex;
  align-items: center;
}

.cal-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.cal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cal-nav-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--primary);
  border-color: var(--primary);
}

.cal-today-btn {
  padding: 4px var(--space-3);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

/* ── 36.3 View Tabs (Borex style) ────────────────────────────── */
.cal-view-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.cal-view-tab {
  padding: 5px var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: none;
  border-right: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cal-view-tab:last-child {
  border-right: none;
}

.cal-view-tab:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

.cal-view-tab.active {
  background: var(--primary);
  color: #fff;
}

/* ── 36.4 Grid (Week/Day View) ───────────────────────────────── */
.cal-grid {
  display: grid;
  width: 100%;
  background: var(--bg-surface);
  overflow-x: auto;
}

.cal-grid-week {
  grid-template-columns: 56px repeat(7, 1fr);
}

.cal-grid-day {
  grid-template-columns: 56px 1fr;
  width: 100%;
}

/* ── 36.5 Day Headers ────────────────────────────────────────── */
.cal-day-header {
  padding: var(--space-2) var(--space-1);
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface);
  border-bottom: 2px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

.cal-day-header.today {
  color: var(--primary);
  background: var(--primary-bg);
  border-bottom-color: var(--primary);
}

.cal-day-header .day-name {
  display: block;
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}

.cal-day-header.today .day-name {
  color: var(--primary);
}

.cal-day-header .day-number {
  display: block;
  font-size: var(--font-size-lg);
  font-weight: 700;
}

.cal-day-header.today .day-number {
  color: var(--primary);
}

.cal-time-gutter {
  background: var(--bg-surface);
  border-bottom: 2px solid var(--border-color);
}

/* ── 36.6 Time Slot ──────────────────────────────────────────── */
.cal-time-slot {
  padding: var(--space-1) var(--space-2);
  font-size: 10px;
  color: var(--text-muted);
  text-align: left;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid #f1f5f9;
  height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ── 36.7 Cells ──────────────────────────────────────────────── */
.cal-cell {
  border-right: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  min-height: 48px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.cal-cell:hover {
  background: #f8fafc;
}

.cal-cell.hour-12 {
  border-bottom: 2px solid var(--border-color);
}

/* ── 36.8 Events (Professional cards) ─────────────────────────── */
.cal-event {
  position: absolute;
  top: 0;
  box-sizing: border-box;
  border-radius: 6px;
  padding: 5px 8px 5px 10px;
  color: #fff;
  cursor: grab;
  overflow: hidden;
  z-index: 1;
  min-height: 20px;
  border-left: 3px solid rgba(255,255,255,0.5);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s ease, transform 0.15s ease, filter 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cal-event:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  transform: translateY(-1px) scale(1.005);
  z-index: 2;
  filter: brightness(1.05);
}

.cal-event.dragging {
  opacity: 0.75;
  cursor: grabbing;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  transform: scale(1.03);
  z-index: 10;
}

.cal-event-title {
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  letter-spacing: 0.1px;
}

.cal-event-subtitle {
  font-size: 10px;
  font-weight: 400;
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.cal-event-time {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.92;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.cal-event-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  margin-top: 2px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  line-height: 1.4;
  width: fit-content;
  backdrop-filter: blur(4px);
  letter-spacing: 0.2px;
}

/* ── 36.8b Day/Week View Event Card ──────────────────────────── */
.cal-event-day-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  box-sizing: border-box;
  border-radius: 6px;
  padding: 6px 8px 6px 10px;
  color: #fff;
  cursor: grab;
  overflow: hidden;
  z-index: 1;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left-style: solid;
  border-left-width: 4px;
  border-left-color: rgba(255,255,255,0.4);
}

.cal-event-day-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-1px);
  z-index: 10;
  filter: brightness(1.08);
}

.cal-event-day-card:active {
  cursor: grabbing;
}

.evt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 18px;
}

.evt-card-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.evt-card-status {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.evt-card-row {
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
}

.evt-card-icon {
  font-size: 13px !important;
  opacity: 0.75;
  flex-shrink: 0;
}

.evt-card-text {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.evt-card-time {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

.evt-card-muted {
  opacity: 0.8;
  font-size: 10px;
}

.evt-card-obs {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.2;
}

.evt-card-obs-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

/* ── 36.9 Month View ─────────────────────────────────────────── */
.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-surface);
  width: 100%;
}

.cal-month-header {
  padding: var(--space-2);
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-secondary);
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cal-month-day {
  min-height: 80px;
  padding: var(--space-1);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background var(--transition-fast);
  overflow: hidden;
}

.cal-month-day:hover {
  background: var(--bg-surface-hover);
}

.cal-month-day.other-month {
  background: var(--bg-body);
  opacity: 0.4;
}

.cal-month-day.today {
  background: var(--primary-bg);
}

.cal-month-day .day-number {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.cal-month-day.today .day-number {
  color: var(--primary);
  font-weight: 700;
}

.cal-event-label {
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  font-weight: 500;
}

.cal-event-more {
  font-size: 9px;
  padding: 1px 4px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── 36.10 List View ─────────────────────────────────────────── */
.cal-list {
  max-height: 600px;
  overflow-y: auto;
}

.cal-list-item {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cal-list-item:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding-left: calc(var(--space-4) + 2px);
}

.cal-list-color {
  width: 4px;
  height: 44px;
  border-radius: 2px;
  margin-right: var(--space-3);
  flex-shrink: 0;
}

.cal-list-body {
  flex: 1;
  min-width: 0;
}

.cal-list-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-list-subtitle {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.cal-list-time {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  font-variant-numeric: tabular-nums;
}

.cal-list-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  margin-top: 4px;
  letter-spacing: 0.2px;
}

.estado-disponible { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.estado-pendiente { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.estado-ocupado { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.estado-asignado { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.estado-default { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

.cal-list-actions {
  flex-shrink: 0;
  margin-left: var(--space-2);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.cal-list-item:hover .cal-list-actions {
  opacity: 1;
}

.cal-list-week-header {
  display: flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  background: var(--primary-bg);
  color: var(--primary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.3px;
}

.cal-list-day {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 2px;
  text-transform: capitalize;
}

/* ── 36.10b Day View (stacked cards) ──────────────────────────── */
.cal-day-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 3px 2px;
}

.cal-day-event-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.cal-day-event-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  border-color: var(--primary);
  transform: translateX(2px);
}

.cal-day-event-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.cal-day-event-title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.cal-day-event-subtitle {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.cal-day-event-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.cal-day-event-sep {
  margin: 0 2px;
  opacity: 0.4;
}

.cal-day-event-notes {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #f1f5f9;
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 36.11 Legend ─────────────────────────────────────────────── */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.cal-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ── 36.12 Empty State ───────────────────────────────────────── */
.cal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-4);
  color: var(--text-muted);
  gap: var(--space-2);
  font-size: var(--font-size-base);
  font-weight: 500;
}

/* ── 36.13 Dark Mode ─────────────────────────────────────────── */
.theme-dark .cal-toolbar { background: #1e293b; border-bottom-color: #334155; }
.theme-dark .cal-title { color: #e2e8f0; }
.theme-dark .cal-nav-btn { background: #1e293b; border-color: #334155; color: #94a3b8; }
.theme-dark .cal-nav-btn:hover { background: #334155; color: #22d3ee; border-color: #22d3ee; }
.theme-dark .cal-view-tab { background: #1e293b; color: #94a3b8; border-right-color: #334155; }
.theme-dark .cal-view-tab:hover { color: #22d3ee; background: #0e293b; }
.theme-dark .cal-view-tab.active { background: #0891b2; color: #fff; }
.theme-dark .cal-day-header { background: #1e293b; border-bottom-color: #334155; color: #e2e8f0; }
.theme-dark .cal-day-header.today { background: #0e293b; color: #22d3ee; border-bottom-color: #22d3ee; }
.theme-dark .cal-time-gutter { background: #1e293b; border-bottom-color: #334155; }
.theme-dark .cal-time-slot { border-right-color: #334155; border-bottom-color: rgba(51,65,85,0.5); color: #64748b; }
.theme-dark .cal-cell { border-right-color: rgba(51,65,85,0.5); border-bottom-color: rgba(51,65,85,0.5); }
.theme-dark .cal-cell:hover { background: #1e293b; }
.theme-dark .cal-month-header { background: #1e293b; border-bottom-color: #334155; color: #94a3b8; }
.theme-dark .cal-month-day { border-color: #334155; }
.theme-dark .cal-month-day:hover { background: #1e293b; }
.theme-dark .cal-month-day.other-month { background: #0f172a; }
.theme-dark .cal-month-day.today { background: #0e293b; }
.theme-dark .cal-list-item { border-bottom-color: #334155; }
.theme-dark .cal-list-item:hover { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); }
.theme-dark .cal-list-actions { opacity: 0; }
.theme-dark .cal-list-item:hover .cal-list-actions { opacity: 1; }
.theme-dark .cal-legend { background: #1e293b; border-top-color: #334155; }
.theme-dark .cal-empty { color: #64748b; }

/* ── Telwin Modal ─────────────────────────────────────── */
.telwin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}

.telwin-modal {
  background: var(--bg-surface);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s ease;
}

.telwin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-color);
}

.telwin-modal-title {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.telwin-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color var(--transition-fast);
}

.telwin-modal-close:hover {
  color: var(--text-primary);
}

.telwin-modal-body {
  padding: var(--space-5);
  overflow-y: auto;
  flex: 1;
}

.telwin-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border-color);
}

/* MudSelect items with multi-line content */
.mud-select .mud-list-item {
  height: auto !important;
  min-height: 36px !important;
  line-height: 1.3 !important;
  overflow: visible !important;
  white-space: normal !important;
}
.mud-select .mud-list-item .d-flex.flex-column {
  width: 100%;
  overflow: visible;
}
.mud-select .mud-list-item .d-flex.flex-column > * {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}
.mud-select .mud-list-item-content {
  height: auto !important;
  min-height: 36px !important;
  line-height: 1.3 !important;
  overflow: visible !important;
  white-space: normal !important;
}

/* MudSelect input display: adapt height to multi-line selected content */
.mud-select .mud-input-content {
  height: auto !important;
  min-height: 20px !important;
  white-space: normal !important;
  line-height: 1.4 !important;
  overflow: visible !important;
  padding: 6px 0 !important;
}
.mud-select .mud-input-slot {
  height: auto !important;
  min-height: 40px !important;
}

/* MudSelect chip mode display */
.mud-select .mud-input-slot {
  height: auto !important;
  min-height: 40px !important;
}
.mud-select .mud-input {
  height: auto !important;
}

/* MudSelectExtended - dias semana */
.telwin-dias-select .mud-input-slot {
  height: auto !important;
  min-height: 44px !important;
  padding: 6px 12px !important;
}
.telwin-dias-select .mud-chip {
  margin: 3px 2px !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
  font-size: 12px !important;
  height: 28px !important;
}
.telwin-dias-select .mud-chip .mud-chip-close {
  margin-left: 4px !important;
  opacity: 0.7 !important;
  transition: opacity 0.15s ease !important;
}
.telwin-dias-select .mud-chip .mud-chip-close:hover {
  opacity: 1 !important;
}

/* MudSelectExtended dropdown */
.telwin-dias-select .mud-popover .mud-list {
  border-radius: 12px !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
  padding: 6px !important;
  max-height: 320px !important;
}
.telwin-dias-select .mud-popover .mud-list-item {
  border-radius: 8px !important;
  font-size: 13.5px !important;
  padding: 10px 14px !important;
  margin: 2px 0 !important;
  transition: background-color 0.15s ease !important;
}
.telwin-dias-select .mud-popover .mud-list-item:hover {
  background-color: var(--bg-surface-hover) !important;
  color: var(--text-primary) !important;
}
.telwin-dias-select .mud-popover .mud-list-item.mud-selected {
  background-color: var(--primary-lighten) !important;
  color: var(--primary) !important;
  font-weight: 500 !important;
}
.telwin-dias-select .mud-popover .mud-list-item.mud-selected:hover {
  background-color: var(--primary-lighten) !important;
}

/* MudSelectExtended search box */
.telwin-dias-select .mud-input-adornment {
  color: var(--text-muted) !important;
}

/* Telwin validation summary */
.telwin-validation-summary {
  border-radius: var(--border-radius) !important;
  padding: 12px 16px !important;
  margin-top: 12px !important;
}
.telwin-validation-summary ul {
  margin: 0 !important;
  padding-left: 20px !important;
}
.telwin-validation-summary li {
  color: #dc2626 !important;
  font-size: var(--font-size-sm) !important;
  line-height: 1.6 !important;
  margin-bottom: 2px !important;
}
.mud-select .mud-input {
  height: auto !important;
}

/* ── Section Title — Clean minimal style ── */
.section-title {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.5rem 0.75rem !important;
  margin-bottom: 0.75rem !important;
  background: var(--primary-bg, #ecfeff) !important;
  border-left: 3px solid var(--primary) !important;
  border-radius: 0 4px 4px 0 !important;
}
.section-title p,
.section-title span {
  color: var(--primary) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  margin: 0 !important;
  line-height: 1.4 !important;
}
.section-title .section-icon {
  color: var(--primary) !important;
  font-size: 1rem !important;
  opacity: 0.7 !important;
}
