/* Live Oman Brand Theme for Investor Application */
/* Based on Official Live Oman Brand Guidelines */

/* ===== BRAND COLOR VARIABLES ===== */
:root {
  /* Primary Brand Colors */
  --oman-green: #33b793;
  --oman-purple: #522953;
  
  /* Complementary Colors */
  --purple-b: #6e1f7d;
  --purple-c: #a15ec2;
  --purple-d: #d7bfec;
  --green-b: #1c3c34;
  --green-c: #00594e;
  --green-d: #6dd0bd;
  --green-e: #a1d6d4;
  
  /* Tints (50%) */
  --oman-green-tint: rgba(51, 183, 147, 0.5);
  --oman-purple-tint: rgba(82, 41, 83, 0.5);
  
  /* Gradients */
  --live-oman-gradient: linear-gradient(135deg, var(--oman-green) 0%, var(--oman-purple) 100%);
  --live-oman-gradient-reverse: linear-gradient(135deg, var(--oman-purple) 0%, var(--oman-green) 100%);
  --live-oman-subtle-gradient: linear-gradient(135deg, rgba(51, 183, 147, 0.1) 0%, rgba(82, 41, 83, 0.1) 100%);
}

/* ===== LOGO STYLING ===== */
.live-oman-logo {
  height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  transition: all 0.3s ease;
  background: transparent !important;
  border-radius: 4px;
}

.live-oman-logo:hover {
  transform: scale(1.05);
}

/* Alternative logo styling for better contrast on colored backgrounds */
.live-oman-logo-white {
  height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  transition: all 0.3s ease;
  filter: brightness(0) invert(1);
  background: transparent !important;
}

.live-oman-logo-white:hover {
  transform: scale(1.05);
}

/* Responsive logo sizing */
@media (max-width: 768px) {
  .live-oman-logo,
  .live-oman-logo-white {
    height: 40px;
    max-width: 150px;
  }
}

@media (max-width: 480px) {
  .live-oman-logo,
  .live-oman-logo-white {
    height: 35px;
    max-width: 120px;
  }
}

/* ===== LAYOUT FIXES ===== */
/* Fix for sidebar overlay issue on direct page loads */
.mud-layout {
  display: flex !important;
  min-height: 100vh;
}

.mud-drawer {
  position: fixed !important;
  z-index: 1200 !important;
  top: 64px !important; /* Below AppBar */
  height: calc(100vh - 64px) !important;
}

.mud-main-content {
  flex: 1 !important;
  margin-left: 240px !important; /* Default drawer width */
  transition: margin-left 0.3s ease !important;
  min-height: 100vh !important;
  padding-top: 64px !important; /* AppBar height */
  position: relative !important;
  width: calc(100% - 240px) !important; /* Ensure proper width calculation */
  max-width: calc(100% - 240px) !important;
  box-sizing: border-box !important;
}

/* RTL Layout adjustments - Target the actual div with dir attribute */
div[dir="rtl"] .mud-main-content,
div[dir="rtl"] .mud-main-content.investor-main-content,
.app-container[dir="rtl"] .mud-main-content,
.app-container.rtl .mud-main-content {
  margin-left: 0 !important;
  margin-right: 240px !important;
  transition: margin-right 0.3s ease !important;
  width: calc(100% - 240px) !important;
  max-width: calc(100% - 240px) !important;
}

/* LTR Layout - Target the actual div with dir attribute */
div[dir="ltr"] .mud-main-content,
div[dir="ltr"] .mud-main-content.investor-main-content,
.app-container[dir="ltr"] .mud-main-content,
.app-container:not(.rtl) .mud-main-content {
  margin-left: 240px !important;
  margin-right: 0 !important;
  transition: margin-left 0.3s ease !important;
}

/* Additional RTL margin fixes with attribute selectors */
.mud-main-content[style*="margin-left"] {
  margin-left: 240px !important;
}

div[dir="rtl"] .mud-main-content[style*="margin-left"],
.app-container[dir="rtl"] .mud-main-content[style*="margin-left"],
.app-container.rtl .mud-main-content[style*="margin-left"] {
  margin-left: 0 !important;
  margin-right: 240px !important;
}

/* Most aggressive RTL override - use CSS specificity hack */
.mud-main-content.mud-main-content.mud-main-content {
  margin-left: 240px !important;
  margin-right: 0 !important;
}

div[dir="rtl"] .mud-main-content.mud-main-content.mud-main-content,
.app-container[dir="rtl"] .mud-main-content.mud-main-content.mud-main-content,
.app-container.rtl .mud-main-content.mud-main-content.mud-main-content {
  margin-left: 0 !important;
  margin-right: 240px !important;
}

/* Ultra-specific override for inline styles */
div[dir="rtl"] .mud-main-content.investor-main-content[style*="margin-left"],
.app-container[dir="rtl"] .mud-main-content.investor-main-content[style*="margin-left"] {
  margin-left: 0 !important;
  margin-right: 240px !important;
}

/* Force override with attribute selector and class combination */
div[dir="rtl"] .mud-layout .mud-main-content.investor-main-content,
.app-container[dir="rtl"] .mud-layout .mud-main-content.investor-main-content {
  margin-left: 0 !important;
  margin-right: 240px !important;
}

/* Maximum specificity override - this should beat any inline style */
html div[dir="rtl"] .mud-layout .mud-main-content.investor-main-content.mud-main-content,
html .app-container[dir="rtl"] .mud-layout .mud-main-content.investor-main-content.mud-main-content {
  margin-left: 0 !important;
  margin-right: 240px !important;
}

/* Fallback with ID-level specificity simulation */
div[dir="rtl"] .mud-main-content.investor-main-content.mud-main-content.mud-main-content,
.app-container[dir="rtl"] .mud-main-content.investor-main-content.mud-main-content.mud-main-content {
  margin-left: 0 !important;
  margin-right: 240px !important;
}

/* Alternative approach - target by drawer position classes */
.mud-drawer-open-responsive-md-right .mud-main-content.investor-main-content {
  margin-left: 0 !important;
  margin-right: 240px !important;
}

.mud-drawer-right-clipped-always ~ .mud-main-content.investor-main-content,
.mud-layout.mud-drawer-right-clipped-always .mud-main-content.investor-main-content {
  margin-left: 0 !important;
  margin-right: 240px !important;
}

/* Force RTL layout when drawer is on the right */
.mud-layout.mud-drawer-open-responsive-md-right .mud-main-content {
  margin-left: 0 !important;
  margin-right: 240px !important;
}

/* RTL Drawer positioning fixes */
div[dir="rtl"] .mud-drawer,
.app-container[dir="rtl"] .mud-drawer,
.app-container.rtl .mud-drawer {
  left: auto !important;
  right: 0 !important;
  top: 64px !important; /* Below AppBar */
  height: calc(100vh - 64px) !important;
}

div[dir="rtl"] .mud-drawer-open-responsive-md-up,
.app-container[dir="rtl"] .mud-drawer-open-responsive-md-up,
.app-container.rtl .mud-drawer-open-responsive-md-up {
  left: auto !important;
  right: 0 !important;
}

/* When drawer is closed */
.mud-drawer-close-responsive-md-up ~ .mud-main-content {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

[dir="rtl"] .mud-drawer-close-responsive-md-up ~ .mud-main-content {
  margin-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Mobile responsiveness */
@media (max-width: 960px) {
  .mud-main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  [dir="rtl"] .mud-main-content {
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Ensure content doesn't overlap on page load */
.investor-main-content {
  min-height: calc(100vh - 64px) !important;
  background: linear-gradient(135deg, #f8fffe 0%, #f0fdf4 100%) !important;
  transition: all 0.3s ease !important;
}

/* Additional fixes for layout initialization */
.mud-layout .mud-drawer + .mud-main-content {
  margin-left: 240px !important;
  width: calc(100% - 240px) !important;
  max-width: calc(100% - 240px) !important;
}

[dir="rtl"] .mud-layout .mud-drawer + .mud-main-content {
  margin-left: 0 !important;
  margin-right: 240px !important;
  width: calc(100% - 240px) !important;
  max-width: calc(100% - 240px) !important;
}

/* Force proper layout when drawer is open */
.mud-drawer-open-responsive-md-up ~ .mud-main-content,
.mud-layout.mud-drawer-open-responsive-md-up .mud-main-content {
  margin-left: 240px !important;
  width: calc(100% - 240px) !important;
  max-width: calc(100% - 240px) !important;
}

[dir="rtl"] .mud-drawer-open-responsive-md-up ~ .mud-main-content,
[dir="rtl"] .mud-layout.mud-drawer-open-responsive-md-up .mud-main-content {
  margin-left: 0 !important;
  margin-right: 240px !important;
  width: calc(100% - 240px) !important;
  max-width: calc(100% - 240px) !important;
}

/* Force proper spacing for RTL layout */
[dir="rtl"] .mud-layout {
  flex-direction: row !important;
}

[dir="rtl"] .mud-layout .mud-main-content {
  margin-left: 0 !important;
  margin-right: 240px !important;
  width: calc(100% - 240px) !important;
  max-width: calc(100% - 240px) !important;
}

/* Simplified layout - works without JavaScript */

/* Debug RTL layout issues */
[dir="rtl"] .mud-drawer-open-responsive-md-up ~ .mud-main-content {
  margin-left: 0 !important;
  margin-right: 240px !important;
}

/* Ensure drawer doesn't overlap content in RTL */
[dir="rtl"] .mud-drawer-container {
  right: 0 !important;
  left: auto !important;
}

/* Additional RTL fixes for MudBlazor components */
[dir="rtl"] .mud-drawer-responsive {
  right: 0 !important;
  left: auto !important;
}

/* Fix for content width in pages with sidebar - Override inline styles */
.mud-main-content .mud-container,
.mud-main-content .mud-container.mud-container-maxwidth-xl,
.mud-main-content .mud-container.mud-container-maxwidth-xxl {
  max-width: 100% !important; /* Use full available width within main content */
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  box-sizing: border-box !important;
}

[dir="rtl"] .mud-main-content .mud-container,
[dir="rtl"] .mud-main-content .mud-container.mud-container-maxwidth-xl,
[dir="rtl"] .mud-main-content .mud-container.mud-container-maxwidth-xxl {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  box-sizing: border-box !important;
}

/* Ensure proper spacing for RTL containers */
[dir="rtl"] .mud-main-content .mud-container {
  padding-right: 24px !important;
  padding-left: 24px !important;
}

[dir="ltr"] .mud-main-content .mud-container {
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* Ensure cards don't extend beyond their container */
.mud-main-content .mud-card {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Fix for specific application card */
.mud-main-content .mud-card.border-left-oman-green {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Additional fixes for nested containers */
.investor-main-content .mud-container {
  width: 100% !important;
  max-width: 100% !important;
}

/* Mobile responsiveness */
@media (max-width: 960px) {
  .mud-main-content .mud-container,
  .mud-main-content .mud-container.mud-container-maxwidth-xl,
  .mud-main-content .mud-container.mud-container-maxwidth-xxl {
    max-width: 100vw !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

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

/* Readex Pro Font Definitions */
@font-face {
    font-family: 'readexpro-bold';
    src: url('../fonts/readex_pro/static/readexpro-bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'readexpro-medium';
    src: url('../fonts/readex_pro/static/readexpro-medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'readexpro-regular';
    src: url('../fonts/readex_pro/static/readexpro-regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'readexpro-semibold';
    src: url('../fonts/readex_pro/static/readexpro-semibold.ttf') format('truetype');
    font-weight: 600;
    font-display: swap;
}

/* Enhanced Typography with Readex Pro */
body, .mud-typography {
  font-family: 'readexpro-regular', 'Inter', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Arabic text support with Readex Pro fallback */
[lang="ar"], [dir="rtl"] {
  font-family: 'Noto Sans Arabic', 'readexpro-regular', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Font weight classes for Readex Pro */
.font-readex-regular { font-family: 'readexpro-regular', sans-serif !important; }
.font-readex-medium { font-family: 'readexpro-medium', sans-serif !important; }
.font-readex-semibold { font-family: 'readexpro-semibold', sans-serif !important; }
.font-readex-bold { font-family: 'readexpro-bold', sans-serif !important; }

/* Enhanced headings with Readex Pro */
h1, h2, h3, h4, h5, h6,
.mud-typography-h1, .mud-typography-h2, .mud-typography-h3,
.mud-typography-h4, .mud-typography-h5, .mud-typography-h6 {
  font-family: 'readexpro-semibold', 'Noto Sans Arabic', sans-serif !important;
}

/* Bold text with Readex Pro */
.mud-typography-subtitle1, .mud-typography-subtitle2 {
  font-family: 'readexpro-medium', 'Noto Sans Arabic', sans-serif !important;
}

/* ===== LAYOUT ENHANCEMENTS ===== */

/* ✅ LIGHT GREEN BODY: Main content area with light green background */
.mud-main-content {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 25%, #f0fdf9 50%, #f8fffe 75%, #f0fdf4 100%) !important;
  min-height: 100vh;
}

.mud-container {
  background: transparent !important;
}

/* Enhanced body background */
body {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 25%, #f0fdf9 50%, #f8fffe 75%, #f0fdf4 100%) !important;
}

/* Enhanced AppBar with Live Oman Branding */
.live-oman-appbar {
  background: var(--live-oman-gradient) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(82, 41, 83, 0.15);
}

.live-oman-appbar .mud-typography {
  color: white !important;
  font-weight: 600;
}

.live-oman-appbar .mud-icon-button {
  color: rgba(255, 255, 255, 0.9) !important;
}

.live-oman-appbar .mud-icon-button:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
}

/* ✅ WHITE SIDEBAR: Clean white background for sidebar */
.live-oman-drawer {
  background: linear-gradient(180deg, #ffffff 0%, #fefefe 50%, #fdfdfd 100%) !important;
  border-right: 1px solid rgba(51, 183, 147, 0.2);
  box-shadow: 4px 0 20px rgba(51, 183, 147, 0.08);
}

/* RTL support for drawer */
[dir="rtl"] .live-oman-drawer {
  border-right: none;
  border-left: 1px solid rgba(51, 183, 147, 0.2);
  box-shadow: -4px 0 20px rgba(51, 183, 147, 0.08);
}

/* RTL Text Alignment Support */
[dir="rtl"] .mud-paper,
[dir="rtl"] .mud-card,
[dir="rtl"] .mud-card-content,
[dir="rtl"] .mud-typography {
  text-align: right !important;
}

[dir="rtl"] .mud-stack-row {
  flex-direction: row-reverse;
}

[dir="rtl"] .mud-grid-item {
  text-align: right;
}

/* Specific RTL fixes for application cards */
[dir="rtl"] .live-oman-page-header-compact .mud-stack-row {
  flex-direction: row-reverse;
}

[dir="rtl"] .live-oman-page-header-compact .mud-stack[style*="align-items: end"] {
  align-items: flex-start !important;
  text-align: right;
}

/* Additional RTL improvements */
[dir="rtl"] .mud-chip {
  direction: rtl;
}

[dir="rtl"] .mud-card-header,
[dir="rtl"] .mud-card-content {
  text-align: right !important;
  direction: rtl;
}

[dir="rtl"] .mud-stack {
  text-align: right;
}

/* Fix for specific components in RTL */
[dir="rtl"] .live-oman-card-header {
  text-align: right !important;
}

[dir="rtl"] .live-oman-card-header .mud-stack {
  text-align: right !important;
}

/* Dashboard RTL Support */
[dir="rtl"] .welcome-card .welcome-content {
  flex-direction: row-reverse !important;
}

[dir="rtl"] .welcome-card .mud-stack {
  text-align: right !important;
}

/* RTL Button positioning - move buttons to bottom left in Arabic */
[dir="rtl"] .welcome-content {
  justify-content: space-between !important;
  align-items: flex-start !important;
}

[dir="rtl"] .welcome-content .mud-stack:last-child {
  align-items: flex-start !important;
  align-self: flex-end !important;
}

[dir="rtl"] .welcome-content .mud-button {
  margin-left: 0 !important;
  margin-right: auto !important;
  align-self: flex-start !important;
}

[dir="rtl"] .recent-applications-card .mud-card-header {
  text-align: right !important;
}

[dir="rtl"] .recent-applications-card .mud-card-header .mud-card-header-content {
  text-align: right !important;
}

[dir="rtl"] .quick-actions-card .mud-card-header {
  text-align: right !important;
}

/* RTL Table Support */
[dir="rtl"] .rtl-table .mud-table-head .mud-table-cell,
[dir="rtl"] .rtl-table .mud-table-body .mud-table-cell {
  text-align: right !important;
}

[dir="rtl"] .rtl-table .mud-table-head .mud-table-cell:first-child,
[dir="rtl"] .rtl-table .mud-table-body .mud-table-cell:first-child {
  text-align: right !important;
}

[dir="rtl"] .rtl-table .mud-table-head .mud-table-cell:last-child,
[dir="rtl"] .rtl-table .mud-table-body .mud-table-cell:last-child {
  text-align: right !important;
}

/* RTL Stats Cards */
[dir="rtl"] .mud-card .mud-stack {
  text-align: right !important;
}

[dir="rtl"] .mud-card .mud-card-content {
  text-align: right !important;
}

.live-oman-drawer-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 2px solid var(--oman-green);
  padding: 24px 16px;
  backdrop-filter: blur(10px);
}

/* Enhanced Navigation Menu */
.live-oman-nav-menu {
  padding: 16px 8px;
}

.live-oman-nav-link {
  border-radius: 12px !important;
  margin: 4px 8px !important;
  transition: all 0.3s ease !important;
  font-weight: 500 !important;
}

.live-oman-nav-link:hover {
  background: rgba(51, 183, 147, 0.1) !important;
  color: var(--oman-green) !important;
  transform: translateX(4px);
}

.live-oman-nav-link.active {
  background: var(--live-oman-gradient) !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(51, 183, 147, 0.3);
}

.live-oman-nav-link.active .mud-icon-root {
  color: white !important;
}

/* Navigation Groups */
.mud-nav-group .mud-nav-group-header {
  border-radius: 8px !important;
  margin: 2px 8px !important;
  font-weight: 600 !important;
  color: var(--oman-purple) !important;
}

.mud-nav-group .mud-nav-group-header:hover {
  background: rgba(82, 41, 83, 0.05) !important;
}

.mud-nav-group .mud-collapse .mud-nav-link {
  margin-left: 24px !important;
  font-size: 0.875rem !important;
}

/* ===== COMPONENT ENHANCEMENTS ===== */

/* ✅ ENHANCED CARDS: White cards on light green background */
.mud-card {
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 20px rgba(51, 183, 147, 0.12) !important;
  border: 1px solid rgba(51, 183, 147, 0.15);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.mud-card:hover {
  background: rgba(255, 255, 255, 1) !important;
  box-shadow: 0 8px 32px rgba(51, 183, 147, 0.2) !important;
  transform: translateY(-4px);
  border-color: rgba(51, 183, 147, 0.3);
}

/* ✅ ENHANCED PAPERS: White papers on light green background */
.mud-paper {
  background: rgba(255, 255, 255, 0.9) !important;
  border-radius: 12px !important;
  border: 1px solid rgba(51, 183, 147, 0.1);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.mud-paper:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 6px 24px rgba(51, 183, 147, 0.15) !important;
}

/* Enhanced Buttons */
.mud-button-filled.mud-button-filled-primary {
  background: var(--live-oman-gradient) !important;
  box-shadow: 0 4px 16px rgba(51, 183, 147, 0.3);
  border: none;
}

.mud-button-filled.mud-button-filled-primary:hover {
  background: var(--live-oman-gradient-reverse) !important;
  box-shadow: 0 6px 20px rgba(51, 183, 147, 0.4);
  transform: translateY(-1px);
}

/* Enhanced Alerts */
.mud-alert {
  border-radius: 12px !important;
  border-left: 4px solid;
}

.mud-alert.mud-alert-filled-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #fef3cd 100%) !important;
  border-left-color: #ff9800 !important;
}

.mud-alert.mud-alert-filled-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
  border-left-color: var(--oman-green) !important;
}

.mud-alert.mud-alert-filled-info {
  background: linear-gradient(135deg, #cce7ff 0%, #b8daff 100%) !important;
  border-left-color: #2196f3 !important;
}

/* Enhanced Form Controls */
.mud-input-control {
  border-radius: 8px !important;
}

.mud-input-control:focus-within {
  border-color: var(--oman-green) !important;
  box-shadow: 0 0 0 2px rgba(51, 183, 147, 0.2) !important;
}

/* Enhanced Chips */
.mud-chip {
  border-radius: 20px !important;
  font-weight: 500 !important;
}

.mud-chip.mud-chip-color-warning {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
  color: white !important;
}

.mud-chip.mud-chip-color-success {
  background: var(--live-oman-gradient) !important;
  color: white !important;
}

/* Enhanced Progress Indicators */
.mud-progress-circular.mud-progress-color-primary .mud-progress-circle-svg {
  color: var(--oman-green) !important;
}

/* Enhanced Stepper */
.mud-stepper .mud-step-completed .mud-step-icon {
  background: var(--oman-green) !important;
}

.mud-stepper .mud-step-active .mud-step-icon {
  background: var(--oman-purple) !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .live-oman-drawer {
    width: 280px !important;
  }
  
  .live-oman-drawer-header {
    padding: 16px 12px;
  }
  
  .live-oman-nav-menu {
    padding: 12px 4px;
  }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
.live-oman-nav-link:focus {
  outline: 2px solid var(--oman-green) !important;
  outline-offset: 2px;
}

.mud-button:focus {
  outline: 2px solid var(--oman-green) !important;
  outline-offset: 2px;
}

/* ===== ANIMATION ENHANCEMENTS ===== */
@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.live-oman-drawer {
  animation: slideInFromLeft 0.3s ease-out;
}

/* Enhanced hover effects */
.mud-card, .mud-button, .live-oman-nav-link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ===== PREMIUM LIVE OMAN BRAND ALERTS ===== */

/* Premium Action Required Alert - Redesigned */
.live-oman-premium-alert {
  position: relative;
  margin: 32px 0;
}

/* Background Pattern */
.alert-background-pattern {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: 
    radial-gradient(circle at 20% 80%, rgba(51, 183, 147, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(82, 41, 83, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(51, 183, 147, 0.08) 0%, transparent 50%);
  filter: blur(1px);
  z-index: -1;
}

/* Premium Action Card */
.live-oman-action-card {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.live-oman-action-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 32px 80px rgba(82, 41, 83, 0.5), 
              0 0 0 1px rgba(51, 183, 147, 0.7), 
              inset 0 1px 0 rgba(255,255,255,0.15) !important;
}

/* Premium Icon Container */
.premium-icon-container {
  transition: all 0.3s ease;
}

.premium-icon-container:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.4) !important;
}

/* Pulse Ring Animation */
@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.3;
  }
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
}

/* Premium Action Button */
.premium-action-button {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.premium-action-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.premium-action-button:hover::before {
  left: 100%;
}

.premium-action-button:hover {
  background: linear-gradient(135deg, var(--green-c) 0%, var(--oman-green) 50%, var(--green-c) 100%) !important;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(51, 183, 147, 0.6), 
              0 0 0 4px rgba(255,255,255,0.4),
              inset 0 1px 0 rgba(255,255,255,0.3) !important;
}

.premium-action-button:active {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 24px rgba(51, 183, 147, 0.5) !important;
}

/* Enhanced Arabic Typography */
.live-oman-premium-alert [lang="ar"], 
.live-oman-premium-alert .arabic-text {
  font-family: 'Noto Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  direction: rtl;
  text-align: right;
}

/* Glassmorphism Effects */
.live-oman-premium-alert .mud-card {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.live-oman-premium-alert .mud-paper {
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .live-oman-premium-alert {
    margin: 16px 0;
  }
  
  .premium-action-button {
    padding: 16px 32px !important;
    font-size: 1rem !important;
    min-height: 56px !important;
  }
  
  .premium-icon-container {
    padding: 16px !important;
  }
}

/* ===== ADMIN PORTAL STYLE CLASSES ===== */

/* Page Headers */
.live-oman-page-header {
  background: var(--live-oman-gradient);
  color: white;
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.live-oman-page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

/* Brand-colored card headers */
.live-oman-card-header {
  background: var(--live-oman-gradient);
  color: white;
  border-radius: 16px 16px 0 0;
  padding: 20px 24px;
}

/* Border accent classes */
.border-left-oman-green {
  border-left: 4px solid var(--oman-green) !important;
}



/* Custom stepper styling */
.custom-stepper {
  background: transparent;
}

.custom-stepper .mud-stepper-header {
  background: linear-gradient(135deg, rgba(51, 183, 147, 0.1) 0%, rgba(82, 41, 83, 0.1) 100%);
  border-radius: 12px;
  margin: 4px;
  transition: all 0.3s ease;
}

.custom-stepper .mud-stepper-header:hover {
  background: linear-gradient(135deg, rgba(51, 183, 147, 0.15) 0%, rgba(82, 41, 83, 0.15) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(51, 183, 147, 0.2);
}

.custom-stepper .mud-stepper-header.mud-stepper-header-active {
  background: var(--live-oman-gradient);
  color: white;
  box-shadow: 0 6px 20px rgba(51, 183, 147, 0.3);
}

.custom-stepper .mud-stepper-header.mud-stepper-header-completed {
  background: linear-gradient(135deg, var(--oman-green) 0%, var(--green-d) 100%);
  color: white;
}

/* ===== RTL STEPPER FIXES (Clean & Effective) ===== */

/* Main RTL Stepper Container */
[dir="rtl"] .custom-stepper,
[dir="rtl"] .mud-stepper {
    direction: rtl !important;
}

/* RTL stepper header alignment */
[dir="rtl"] .mud-stepper .mud-stepper-header,
[dir="rtl"] .custom-stepper .mud-stepper-header {
    text-align: right !important;
    direction: rtl;
}

/* RTL stepper content alignment */
[dir="rtl"] .mud-stepper .mud-stepper-content,
[dir="rtl"] .custom-stepper .mud-stepper-content {
    text-align: right !important;
    direction: rtl;
}

/* RTL stepper step text */
[dir="rtl"] .mud-stepper .mud-stepper-step-text,
[dir="rtl"] .mud-stepper .mud-step-text,
[dir="rtl"] .custom-stepper .mud-stepper-step-text,
[dir="rtl"] .custom-stepper .mud-step-text {
    text-align: right !important;
    direction: rtl;
}

/* RTL stepper icon positioning */
[dir="rtl"] .mud-stepper .mud-stepper-step-icon,
[dir="rtl"] .mud-stepper .mud-step-icon,
[dir="rtl"] .custom-stepper .mud-stepper-step-icon,
[dir="rtl"] .custom-stepper .mud-step-icon {
    margin-left: 8px;
    margin-right: 0;
}

/* RTL stepper line connector */
[dir="rtl"] .mud-stepper .mud-stepper-line,
[dir="rtl"] .custom-stepper .mud-stepper-line {
    direction: rtl;
}

/* RTL stepper navigation buttons */
[dir="rtl"] .mud-stepper .mud-stepper-nav,
[dir="rtl"] .custom-stepper .mud-stepper-nav {
    flex-direction: row-reverse;
    text-align: right;
}

/* RTL stepper button positioning */
[dir="rtl"] .mud-stepper .mud-stepper-nav .mud-button,
[dir="rtl"] .custom-stepper .mud-stepper-nav .mud-button {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .mud-stepper .mud-stepper-nav .mud-button:first-child,
[dir="rtl"] .custom-stepper .mud-stepper-nav .mud-button:first-child {
    margin-left: 0;
}

/* RTL stepper horizontal layout */
[dir="rtl"] .mud-stepper.mud-stepper-horizontal,
[dir="rtl"] .custom-stepper.mud-stepper-horizontal {
    flex-direction: row-reverse;
}

/* RTL stepper steps container - reverse the order of steps */
[dir="rtl"] .mud-stepper .mud-stepper-steps,
[dir="rtl"] .custom-stepper .mud-stepper-steps {
    flex-direction: row-reverse;
}

/* RTL stepper header container - reverse step headers */
[dir="rtl"] .mud-stepper .mud-stepper-headers,
[dir="rtl"] .custom-stepper .mud-stepper-headers {
    flex-direction: row-reverse;
}

/* RTL stepper step wrapper - ensure proper ordering */
[dir="rtl"] .mud-stepper .mud-stepper-step-wrapper,
[dir="rtl"] .custom-stepper .mud-stepper-step-wrapper {
    flex-direction: row-reverse;
}

/* ===== CRITICAL RTL STEPPER STEP ORDERING ===== */
/* Force RTL ordering for MudBlazor stepper components */
[dir="rtl"] .mud-stepper,
[dir="rtl"] .mud-stepper > *,
[dir="rtl"] .custom-stepper,
[dir="rtl"] .custom-stepper > * {
    direction: rtl;
}

/* RTL stepper main container */
[dir="rtl"] .mud-stepper .mud-stepper-content,
[dir="rtl"] .custom-stepper .mud-stepper-content {
    direction: rtl;
    flex-direction: row-reverse;
}

/* RTL stepper step headers - force right-to-left ordering */
[dir="rtl"] .mud-stepper .mud-stepper-header-container,
[dir="rtl"] .custom-stepper .mud-stepper-header-container {
    display: flex;
    flex-direction: row-reverse;
    direction: rtl;
}

/* RTL stepper step items - reverse individual steps */
[dir="rtl"] .mud-stepper .mud-stepper-step-item,
[dir="rtl"] .custom-stepper .mud-stepper-step-item {
    direction: rtl;
}

/* RTL stepper connector lines - adjust for RTL */
[dir="rtl"] .mud-stepper .mud-stepper-connector,
[dir="rtl"] .custom-stepper .mud-stepper-connector {
    direction: rtl;
}

/* RTL stepper step numbers - ensure proper display */
[dir="rtl"] .mud-stepper .mud-stepper-step-number,
[dir="rtl"] .custom-stepper .mud-stepper-step-number {
    direction: ltr; /* Keep numbers in LTR for readability */
}

/* ===== ULTRA HIGH SPECIFICITY RTL STEPPER FIX ===== */
/* Force RTL stepper ordering with maximum CSS specificity */
html body div[dir="rtl"] .mud-stepper.custom-stepper,
html body .app-container[dir="rtl"] .mud-stepper.custom-stepper,
html body .app-container.rtl .mud-stepper.custom-stepper {
    direction: rtl !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Force RTL stepper header row ordering */
html body div[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header,
html body .app-container[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header,
html body .app-container.rtl .mud-stepper.custom-stepper .mud-stepper-header {
    direction: rtl !important;
}

/* Force RTL stepper steps container */
html body div[dir="rtl"] .mud-stepper.custom-stepper > div,
html body .app-container[dir="rtl"] .mud-stepper.custom-stepper > div,
html body .app-container.rtl .mud-stepper.custom-stepper > div {
    direction: rtl !important;
    display: flex !important;
    flex-direction: row-reverse !important;
}

/* Force RTL for all stepper children */
html body div[dir="rtl"] .mud-stepper.custom-stepper *,
html body .app-container[dir="rtl"] .mud-stepper.custom-stepper *,
html body .app-container.rtl .mud-stepper.custom-stepper * {
    direction: rtl !important;
}

/* Keep step numbers readable in LTR */
html body div[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-step-icon,
html body .app-container[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-step-icon,
html body .app-container.rtl .mud-stepper.custom-stepper .mud-stepper-step-icon {
    direction: ltr !important;
}

/* ===== MUDBLAZOR STEPPER RTL WORKAROUND ===== */
/* Since MudBlazor doesn't natively support RTL step ordering, we use CSS transforms */
html body div[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header,
html body .app-container[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header {
    transform: scaleX(-1) !important;
}

/* Reverse the transform on step content to keep text readable */
html body div[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header .mud-stepper-header-content,
html body .app-container[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header .mud-stepper-header-content {
    transform: scaleX(-1) !important;
}

/* Alternative approach: Use CSS order property to reverse steps */
html body div[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header:nth-child(1) { order: 7; }
html body div[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header:nth-child(2) { order: 6; }
html body div[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header:nth-child(3) { order: 5; }
html body div[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header:nth-child(4) { order: 4; }
html body div[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header:nth-child(5) { order: 3; }
html body div[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header:nth-child(6) { order: 2; }
html body div[dir="rtl"] .mud-stepper.custom-stepper .mud-stepper-header:nth-child(7) { order: 1; }

/* RTL stepper step container */
[dir="rtl"] .mud-stepper .mud-stepper-step,
[dir="rtl"] .mud-stepper .mud-step,
[dir="rtl"] .custom-stepper .mud-stepper-step,
[dir="rtl"] .custom-stepper .mud-step {
    text-align: right !important;
    direction: rtl;
}

/* RTL stepper header content */
[dir="rtl"] .mud-stepper .mud-stepper-header-content,
[dir="rtl"] .custom-stepper .mud-stepper-header-content {
    text-align: right !important;
    direction: rtl;
    flex-direction: row-reverse;
}

/* RTL stepper title and subtitle */
[dir="rtl"] .mud-stepper .mud-stepper-title,
[dir="rtl"] .mud-stepper .mud-stepper-subtitle,
[dir="rtl"] .custom-stepper .mud-stepper-title,
[dir="rtl"] .custom-stepper .mud-stepper-subtitle {
    text-align: right !important;
    direction: rtl;
}

/* ===== RTL WIZARD CONTENT SUPPORT ===== */
/* RTL wizard container */
[dir="rtl"] .mud-container {
    direction: rtl;
    text-align: right;
}

/* RTL wizard paper/cards */
[dir="rtl"] .mud-paper {
    text-align: right !important;
    direction: rtl;
}

/* RTL wizard text elements */
[dir="rtl"] .mud-typography {
    text-align: right !important;
    direction: rtl;
}

/* RTL wizard form elements */
[dir="rtl"] .mud-input,
[dir="rtl"] .mud-input-control,
[dir="rtl"] .mud-select,
[dir="rtl"] .mud-textfield {
    text-align: right !important;
    direction: rtl;
}

/* RTL wizard form labels */
[dir="rtl"] .mud-input-label,
[dir="rtl"] .mud-form-item-label {
    text-align: right !important;
    direction: rtl;
}

/* RTL wizard buttons */
[dir="rtl"] .mud-button-group {
    flex-direction: row-reverse;
}

/* RTL wizard navigation buttons */
[dir="rtl"] .wizard-navigation {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .wizard-navigation .mud-button {
    margin-left: 8px;
    margin-right: 0;
}

/* RTL wizard progress indicators */
[dir="rtl"] .mud-progress-linear {
    direction: rtl;
}

/* RTL wizard stack elements */
[dir="rtl"] .mud-stack {
    text-align: right !important;
    direction: rtl;
}

[dir="rtl"] .mud-stack-row {
    flex-direction: row-reverse;
}

/* RTL wizard grid items */
[dir="rtl"] .mud-grid-item {
    text-align: right !important;
    direction: rtl;
}

/* RTL wizard specific overrides for MudBlazor components */
[dir="rtl"] .mud-step {
    text-align: right !important;
    direction: rtl;
}

[dir="rtl"] .mud-step-content {
    text-align: right !important;
    direction: rtl;
}

/* RTL wizard step titles in header */
[dir="rtl"] .mud-step .mud-step-title,
[dir="rtl"] .mud-stepper-step .mud-stepper-step-title {
    text-align: right !important;
    direction: rtl;
}

/* ===== RTL WIZARD NAVIGATION BUTTONS ===== */
/* RTL navigation button container */
[dir="rtl"] .mud-stack-row.mt-6 {
    flex-direction: row-reverse;
}

/* RTL button spacing */
[dir="rtl"] .mud-button .ml-2 {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

/* RTL button icons */
[dir="rtl"] .mud-button-start-icon {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .mud-button-end-icon {
    margin-right: 8px;
    margin-left: 0;
}

/* RTL wizard container alignment */
[dir="rtl"] .mud-container {
    text-align: right;
}

/* RTL wizard paper alignment */
[dir="rtl"] .mud-paper.pa-6 {
    text-align: right;
}

/* RTL wizard header text */
[dir="rtl"] .mud-text.mud-typography-h4 {
    text-align: right !important;
}

/* Disable shimmer animation for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .live-oman-page-header::before {
    animation: none !important;
  }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  /* Keep sidebar white even in dark mode for contrast */
  .live-oman-drawer {
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 50%, #404040 100%) !important;
    border-right-color: rgba(51, 183, 147, 0.3);
  }
  
  .live-oman-drawer-header {
    background: rgba(51, 183, 147, 0.15);
    border-bottom-color: var(--oman-green);
  }
  
  /* Dark green background for main content in dark mode */
  .mud-main-content {
    background: linear-gradient(135deg, #0f1f0f 0%, #1a2e1a 25%, #0d1f0d 50%, #1a2e1a 75%, #0f1f0f 100%) !important;
  }
  
  body {
    background: linear-gradient(135deg, #0f1f0f 0%, #1a2e1a 25%, #0d1f0d 50%, #1a2e1a 75%, #0f1f0f 100%) !important;
  }
  
  .mud-card {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(51, 183, 147, 0.2);
  }
  
  .mud-paper {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(51, 183, 147, 0.15);
  }
}

/* ===== APPLICATION REFERENCE CARD STYLES ===== */
.application-reference-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafffe 100%);
    border: 1px solid #e5f3f0;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(51, 183, 147, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.application-reference-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #33b793 0%, #522953 100%);
}

.application-reference-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(51, 183, 147, 0.12);
}

.reference-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.reference-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reference-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #33b793 0%, #00594e 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 16px rgba(51, 183, 147, 0.3);
}

.reference-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reference-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reference-number {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-review {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.status-approved {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.status-rejected {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.status-action {
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
    color: #5b21b6;
}

.status-draft {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
}

.status-ministry {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
}

.status-processing {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0c4a6e;
}

.reference-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.view-details-btn {
    background: linear-gradient(135deg, #33b793 0%, #00594e 100%) !important;
    color: white !important;
    border-radius: 12px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    box-shadow: 0 4px 16px rgba(51, 183, 147, 0.3) !important;
    transition: all 0.3s ease !important;
}

.view-details-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(51, 183, 147, 0.4) !important;
}

/* RTL Support for Application Reference Card */
[dir="rtl"] .reference-info {
    flex-direction: row-reverse;
}

[dir="rtl"] .reference-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .action-buttons {
    justify-content: flex-start;
}

/* Mobile Responsiveness for Application Reference Card */
@media (max-width: 768px) {
    .application-reference-card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .reference-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .reference-number {
        font-size: 24px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .action-buttons {
        justify-content: stretch;
    }
    
    .view-details-btn {
        width: 100% !important;
    }
}

/* ===== OTP TEST DIALOG STYLES ===== */
.otp-test-dialog {
    min-width: 400px;
    text-align: center;
}

.otp-header {
    margin-bottom: 1rem;
}

.otp-display {
    margin: 1.5rem 0;
}

.letter-spacing-wide {
    letter-spacing: 0.5rem;
    font-family: 'Courier New', monospace;
}

@media (max-width: 600px) {
    .otp-test-dialog {
        min-width: 300px;
    }
    
    .letter-spacing-wide {
        letter-spacing: 0.3rem;
        font-size: 1.8rem !important;
    }
}

/* Language selector buttons - force white color */
.mud-button-group .mud-button,
.mud-button-group .mud-button .mud-button-label,
.mud-button-group .mud-button .mud-icon-root {
    color: white !important;
}

.mud-button-group .mud-button:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* ===== CRITICAL RTL FIX FOR CONTENT OVERLAP ===== */
/* Ultra-high specificity RTL layout fix to prevent content overlap */
html body div[dir="rtl"] .mud-layout .mud-main-content,
html body .app-container[dir="rtl"] .mud-layout .mud-main-content,
html body .app-container.rtl .mud-layout .mud-main-content {
    margin-left: 0 !important;
    margin-right: 240px !important;
    width: calc(100% - 240px) !important;
    max-width: calc(100% - 240px) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Force RTL main content positioning with maximum specificity */
html body div[dir="rtl"] .mud-main-content.investor-main-content,
html body .app-container[dir="rtl"] .mud-main-content.investor-main-content,
html body .app-container.rtl .mud-main-content.investor-main-content {
    margin-left: 0 !important;
    margin-right: 240px !important;
    width: calc(100% - 240px) !important;
    max-width: calc(100% - 240px) !important;
    left: auto !important;
    right: 0 !important;
    position: relative !important;
}

/* Override any inline styles that might be set by JavaScript */
html body div[dir="rtl"] .mud-main-content[style*="margin-left"],
html body .app-container[dir="rtl"] .mud-main-content[style*="margin-left"] {
    margin-left: 0 !important;
    margin-right: 240px !important;
}

/* Ensure drawer is positioned correctly in RTL */
html body div[dir="rtl"] .mud-drawer,
html body .app-container[dir="rtl"] .mud-drawer,
html body .app-container.rtl .mud-drawer {
    left: auto !important;
    right: 0 !important;
    transform: none !important;
}

/* Force container width in RTL to prevent overflow */
html body div[dir="rtl"] .mud-main-content .mud-container,
html body .app-container[dir="rtl"] .mud-main-content .mud-container {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
}

/* ===== CLEAN RTL STEPPER FIXES (FINAL OVERRIDE) ===== */
/* This section provides clean, effective RTL stepper support that overrides all previous complex rules */

/* Main RTL Stepper Container */
[dir="rtl"] .custom-stepper,
[dir="rtl"] .mud-stepper {
    direction: rtl !important;
}

/* RTL Stepper Navigation - Reverse button order */
[dir="rtl"] .custom-stepper .mud-stepper-nav,
[dir="rtl"] .mud-stepper .mud-stepper-nav {
    flex-direction: row-reverse !important;
}

/* RTL Navigation Buttons - Proper ordering for Previous/Next */
[dir="rtl"] .custom-stepper .mud-stepper-button-previous,
[dir="rtl"] .mud-stepper .mud-stepper-button-previous,
[dir="rtl"] .custom-stepper .mud-button:first-child,
[dir="rtl"] .mud-stepper .mud-button:first-child {
    order: 2 !important;
}

[dir="rtl"] .custom-stepper .mud-stepper-button-next,
[dir="rtl"] .mud-stepper .mud-stepper-button-next,
[dir="rtl"] .custom-stepper .mud-button:last-child,
[dir="rtl"] .mud-stepper .mud-button:last-child {
    order: 1 !important;
}

/* RTL Step Headers Container - Reverse step order */
[dir="rtl"] .custom-stepper .mud-stepper-headers,
[dir="rtl"] .mud-stepper .mud-stepper-headers {
    flex-direction: row-reverse !important;
}

/* RTL Individual Step Headers */
[dir="rtl"] .custom-stepper .mud-stepper-header,
[dir="rtl"] .mud-stepper .mud-stepper-header {
    text-align: right !important;
}

/* RTL Step Content */
[dir="rtl"] .custom-stepper .mud-stepper-content,
[dir="rtl"] .mud-stepper .mud-stepper-content {
    text-align: right !important;
    direction: rtl !important;
}

/* RTL Step Text and Titles */
[dir="rtl"] .custom-stepper .mud-stepper-step-text,
[dir="rtl"] .custom-stepper .mud-stepper-title,
[dir="rtl"] .mud-stepper .mud-stepper-step-text,
[dir="rtl"] .mud-stepper .mud-stepper-title {
    text-align: right !important;
}

/* RTL Step Icons - Adjust margins */
[dir="rtl"] .custom-stepper .mud-stepper-step-icon,
[dir="rtl"] .mud-stepper .mud-stepper-step-icon {
    margin-left: 8px !important;
    margin-right: 0 !important;
}

/* RTL Connector Lines */
[dir="rtl"] .custom-stepper .mud-stepper-line,
[dir="rtl"] .mud-stepper .mud-stepper-line {
    transform: scaleX(-1) !important;
}

/* RTL Wizard Navigation Buttons (Custom Implementation) */
[dir="rtl"] .mud-stack-row.mt-6 {
    flex-direction: row-reverse !important;
}

[dir="rtl"] .mud-button .ml-2 {
    margin-left: 0 !important;
    margin-right: 8px !important;
}

[dir="rtl"] .mud-button-start-icon {
    order: 2 !important;
    margin-left: 8px !important;
    margin-right: 0 !important;
}

[dir="rtl"] .mud-button-end-icon {
    order: 0 !important;
    margin-left: 0 !important;
    margin-right: 8px !important;
}

/* High Specificity RTL Overrides */
html[dir="rtl"] .custom-stepper .mud-stepper-headers,
html[dir="rtl"] .mud-stepper .mud-stepper-headers {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .custom-stepper .mud-stepper-nav,
html[dir="rtl"] .mud-stepper .mud-stepper-nav {
    flex-direction: row-reverse !important;
}

/* Ultra High Specificity for Stubborn Elements */
body[dir="rtl"] .custom-stepper .mud-stepper-headers,
body[dir="rtl"] .mud-stepper .mud-stepper-headers {
    flex-direction: row-reverse !important;
}

body[dir="rtl"] .custom-stepper .mud-stepper-nav,
body[dir="rtl"] .mud-stepper .mud-stepper-nav {
    flex-direction: row-reverse !important;
}
 