/* Modern ERP Theme Variables */
:root {
    --glass-bg-light: rgba(255, 255, 255, 0.85);
    --glass-border-light: 1px solid rgba(226, 232, 240, 0.8);
    --glass-bg-dark: rgba(15, 23, 42, 0.95);
    --glass-border-dark: 1px solid rgba(71, 85, 105, 0.6);
    --primary-color: var(--mud-palette-primary);
}

/* Glass Panel Effect */
.glass-panel {
    background: var(--glass-bg-light);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border-light);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1rem;
    margin-bottom: 1rem;
    color: var(--mud-palette-text-primary);
}

.mud-theme-dark .glass-panel {
    background: var(--glass-bg-dark) !important;
    border: var(--glass-border-dark);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.mud-theme-dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #475569;
}

/* Typography & Layout overrides */
.modern-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--mud-palette-text-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.section-icon {
    font-size: 1.25rem;
    color: var(--mud-palette-primary);
}

/* Item Grid Styling to match "Clean Table" look */
.item-grid-header {
    background-color: transparent !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: var(--mud-palette-text-secondary) !important;
    border-bottom: 1px solid var(--mud-palette-divider) !important;
    padding: 8px 4px !important;
}

.item-grid-row:hover {
    background-color: rgba(0,0,0,0.02) !important;
}
.mud-theme-dark .item-grid-row:hover {
    background-color: rgba(255,255,255,0.04) !important;
}

/* Item Grid (MudDataGrid) - Forçar fundo transparente */
.item-grid,
.item-grid.mud-data-grid,
.item-grid .mud-table,
.item-grid .mud-table-container,
.item-grid .mud-table-root,
.item-grid .mud-table-head,
.item-grid .mud-table-body,
.item-grid .mud-table-cell,
.item-grid .mud-table-row {
    background-color: transparent !important;
    background: transparent !important;
}

/* Tema escuro - Item Grid */
.mud-theme-dark .item-grid,
.mud-theme-dark .item-grid.mud-data-grid,
.mud-theme-dark .item-grid .mud-table,
.mud-theme-dark .item-grid .mud-table-container,
.mud-theme-dark .item-grid .mud-table-root,
.mud-theme-dark .item-grid .mud-table-head,
.mud-theme-dark .item-grid .mud-table-body,
.mud-theme-dark .item-grid .mud-table-cell,
.mud-theme-dark .item-grid .mud-table-row {
    background-color: transparent !important;
    background: transparent !important;
}

/* =========================================
   Item Grid Column Styles - Responsividade
   ========================================= */

/* Coluna sequência - bem compacta */
.item-col-seq {
    width: 35px !important;
    max-width: 35px !important;
    min-width: 35px !important;
    text-align: center !important;
    padding: 4px !important;
}

/* Coluna unidade - compacta */
.item-col-un {
    width: 45px !important;
    max-width: 45px !important;
    min-width: 45px !important;
    text-align: center !important;
    padding: 4px !important;
}

/* Colunas numéricas - valores */
.item-col-num {
    width: 80px !important;
    max-width: 90px !important;
    min-width: 70px !important;
    text-align: right !important;
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
}

/* Coluna total - destaque */
.item-col-total {
    width: 90px !important;
    max-width: 100px !important;
    min-width: 80px !important;
    text-align: right !important;
    padding: 4px 8px !important;
    font-size: 0.85rem !important;
}

.item-total-value {
    color: var(--mud-palette-primary) !important;
    font-weight: 700 !important;
}

/* Coluna ações - mínima */
.item-col-actions {
    width: 40px !important;
    max-width: 40px !important;
    min-width: 40px !important;
    text-align: center !important;
    padding: 2px !important;
}

/* Nome do produto - destaque */
.product-name {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
    color: var(--mud-palette-text-primary);
}
.mud-theme-dark .product-name {
    color: rgba(255, 255, 255, 0.95);
}

/* Código do produto */
.product-code {
    font-size: 0.7rem;
    color: var(--mud-palette-text-secondary);
    font-family: 'JetBrains Mono', monospace;
}
.mud-theme-dark .product-code {
    color: rgba(255, 255, 255, 0.5);
}

/* Grade do produto (Cor/Tamanho) */
.product-grade {
    font-size: 0.7rem;
    color: var(--mud-palette-info);
    font-weight: 500;
}
.mud-theme-dark .product-grade {
    color: rgba(96, 165, 250, 0.9);
}

/* =========================================
   Item List - Nova estrutura de lista
   ========================================= */

/* Header da lista */
.item-list-header {
    background-color: transparent;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    position: sticky;
    top: 0;
    z-index: 1;
}
.mud-theme-dark .item-list-header {
    background-color: rgba(15, 23, 42, 0.95);
}

/* Linha de item */
.item-row {
    transition: background-color 0.15s ease;
}
.item-row:hover {
    background-color: rgba(0, 0, 0, 0.02);
}
.mud-theme-dark .item-row:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Linha de valores */
.item-values-row {
    padding-left: calc(35px + 0.75rem + 0.5rem); /* item-col-seq width + px-3 + pl-2 */
}

/* Chips de valores */
.item-value-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.04);
    font-size: 0.75rem;
}
.mud-theme-dark .item-value-chip {
    background-color: rgba(255, 255, 255, 0.06);
}

.item-value-label {
    color: var(--mud-palette-text-secondary);
    font-weight: 500;
    font-size: 0.65rem;
}

.item-value-data {
    color: var(--mud-palette-text-primary);
    font-weight: 600;
}
.mud-theme-dark .item-value-data {
    color: rgba(255, 255, 255, 0.9);
}

/* Chip de desconto */
.item-value-discount {
    background-color: rgba(239, 68, 68, 0.1);
}
.item-value-discount .item-value-label,
.item-value-discount .item-value-data {
    color: #dc2626;
}
.mud-theme-dark .item-value-discount {
    background-color: rgba(239, 68, 68, 0.15);
}
.mud-theme-dark .item-value-discount .item-value-label,
.mud-theme-dark .item-value-discount .item-value-data {
    color: #f87171;
}

/* Total do item */
.item-total {
    font-size: 1rem;
    color: var(--mud-palette-primary);
}

/* =========================================
   Items Summary Bar
   ========================================= */
.items-summary-bar {
    background-color: rgba(0, 0, 0, 0.03);
}
.mud-theme-dark .items-summary-bar {
    background-color: rgba(255, 255, 255, 0.03);
}

.items-total-value {
    color: var(--mud-palette-primary);
    font-size: 1.1rem;
}

/* Footer Inputs */
.footer-input-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 0.25rem;
    display: block;
}

.footer-input {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    text-align: right;
}

/* Transitions */
.hover-scale {
    transition: transform 0.2s ease;
}
.hover-scale:hover {
    transform: scale(1.02);
}

/* Helper to hide MudPaper default shadows/borders when using glass-panel */
.no-mud-style {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* Utilities (Tailwind-like mimic) */
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.h-full, .h-100 { height: 100% !important; }
.w-full, .w-100 { width: 100% !important; }
.flex-1 { flex: 1; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.text-white { color: white !important; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.font-medium { font-weight: 500; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

.bg-slate-50 { background-color: #f8fafc; }
.mud-theme-dark .bg-slate-50 { background-color: #1e293b; } /* Dark mode equivalent */

.border-b { border-bottom: 1px solid var(--mud-palette-divider); }
.border-t { border-top: 1px solid var(--mud-palette-divider); }

.rounded-lg { border-radius: 0.5rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-t-md { border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; }
.rounded-circle { border-radius: 50%; }

.pr-1 { padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.pa-0 { padding: 0 !important; }

/* MudBlazor overrides for clean inputs */
.modern-input .mud-input-slot {
    font-size: 0.85rem;
}
.footer-input .mud-input-slot {
    padding: 4px 8px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
}
.mud-theme-dark .footer-input .mud-input-slot {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* =========================================
   PedidoCadastroModal - Theme Adaptations
   ========================================= */

/* Header/Summary section backgrounds */
.section-header-bg {
    background-color: rgba(0, 0, 0, 0.03);
}
.mud-theme-dark .section-header-bg {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Footer label colors - fixed colors that work on both themes */
.label-desconto {
    color: #ef4444 !important;
}
.label-acrescimo {
    color: #22c55e !important;
}
.label-frete {
    color: #f59e0b !important;
}
.mud-theme-dark .label-desconto {
    color: #f87171 !important;
}
.mud-theme-dark .label-acrescimo {
    color: #4ade80 !important;
}
.mud-theme-dark .label-frete {
    color: #fbbf24 !important;
}

/* Total badge header */
.total-badge-header {
    background-color: var(--mud-palette-primary);
    color: white;
    padding: 2px 8px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    width: fit-content;
}

/* Total field highlight */
.total-field-highlight {
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--mud-palette-primary);
}
.total-field-highlight .mud-input-slot {
    border-color: var(--mud-palette-primary) !important;
}

/* =========================================
   MudDataGrid/MudTable dentro de glass-panel
   ========================================= */

/* Forçar fundo transparente para grids dentro de glass-panel */
.glass-panel .mud-table,
.glass-panel .mud-data-grid,
.glass-panel .mud-table-container,
.glass-panel .mud-table-root {
    background-color: transparent !important;
}

.glass-panel .mud-table-head {
    background-color: transparent !important;
}

.glass-panel .mud-table-body {
    background-color: transparent !important;
}

.glass-panel .mud-table-cell {
    background-color: transparent !important;
}

/* Fundo dos inputs dentro de glass-panel */
.glass-panel .mud-input-outlined .mud-input-slot {
    background-color: rgba(255, 255, 255, 0.7) !important;
}
.mud-theme-dark .glass-panel .mud-input-outlined .mud-input-slot {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ProductSearchField container */
.glass-panel .mud-autocomplete .mud-input-slot {
    background-color: rgba(255, 255, 255, 0.7) !important;
}
.mud-theme-dark .glass-panel .mud-autocomplete .mud-input-slot {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* MudExpansionPanel dentro de glass-panel */
.glass-panel.mud-expansion-panel,
.glass-panel .mud-expansion-panel {
    background-color: transparent !important;
}
.mud-theme-dark .glass-panel.mud-expansion-panel,
.mud-theme-dark .glass-panel .mud-expansion-panel {
    background-color: transparent !important;
}

/* MudExpansionPanel header text color */
.glass-panel .mud-expand-panel-header {
    background-color: transparent !important;
}
.mud-theme-dark .glass-panel .mud-expand-panel-header {
    background-color: transparent !important;
}

/* Footer Summary Panel - fundo transparente */
.no-mud-style.mud-paper {
    background-color: transparent !important;
}
.mud-theme-dark .no-mud-style.mud-paper {
    background-color: transparent !important;
}

/* Product Description Box - ProductSearchField */
.product-description-box {
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    padding: 4px 12px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mud-theme-dark .product-description-box {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

/* =========================================
   Global Dark Theme Overrides
   ========================================= */

/* Garantir que todos os textos dentro de glass-panel herdem a cor correta */
.mud-theme-dark .glass-panel,
.mud-theme-dark .glass-panel .mud-text,
.mud-theme-dark .glass-panel .mud-input,
.mud-theme-dark .glass-panel label,
.mud-theme-dark .glass-panel span {
    color: var(--mud-palette-text-primary);
}

/* Garantir que inputs outlined tenham borda visível no tema escuro */
.mud-theme-dark .glass-panel .mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* MudTextField input text no tema escuro */
.mud-theme-dark .glass-panel .mud-input > input,
.mud-theme-dark .glass-panel .mud-input-slot input,
.mud-theme-dark .footer-input .mud-input-slot input {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Labels no tema escuro */
.mud-theme-dark .glass-panel .mud-input-label,
.mud-theme-dark .footer-input-label {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* MudSelect e MudAutocomplete text */
.mud-theme-dark .glass-panel .mud-select-input,
.mud-theme-dark .glass-panel .mud-autocomplete .mud-input-slot {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* bg-slate-50 no tema escuro com melhor contraste */
.mud-theme-dark .bg-slate-50 .mud-input-slot {
    background-color: rgba(30, 41, 59, 0.8) !important;
}
.mud-theme-dark .bg-slate-50 .mud-input-slot input {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* =========================================
   Sub-panel dentro de glass-panel
   ========================================= */
.info-sub-panel {
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    background-color: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
}
.mud-theme-dark .info-sub-panel {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Sub-panel section header */
.info-sub-panel-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
    color: var(--mud-palette-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Status badge - ativo/bloqueado */
.status-badge {
    padding: 0 0.5rem;
    border-radius: 2px;
    font-size: 0.625rem;
    text-transform: uppercase;
    font-weight: 700;
}
.status-badge-success {
    background-color: #d1fae5;
    color: #047857;
}
.status-badge-error {
    background-color: #fee2e2;
    color: #b91c1c;
}
.mud-theme-dark .status-badge-success {
    background-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}
.mud-theme-dark .status-badge-error {
    background-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* =========================================
   Tailwind CSS Utilities - Wizard Pages
   Required for CabecalhoSaidaWizard and similar
   ========================================= */

/* Height utilities */
.h-20 { height: 5rem; }
.h-24 { height: 6rem; }
.h-full, .h-100 { height: 100%; }
.h-screen { height: 100vh; }
.min-h-0 { min-height: 0; }
.min-h-screen { min-height: 100vh; }
.max-h-full { max-height: 100%; }

/* Width utilities */
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-full, .w-100 { width: 100%; }
.w-screen { width: 100vw; }
.w-auto { width: auto; }
.w-fit { width: fit-content; }

/* Flexbox utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-items-center { justify-items: center; }

/* Gap utilities */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Padding utilities */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-12 { padding-left: 3rem; padding-right: 3rem; }
.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-4 { padding-top: 1rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-8 { padding-bottom: 2rem; }
.pl-2 { padding-left: 0.5rem; }
.pl-3 { padding-left: 0.75rem; }
.pl-4 { padding-left: 1rem; }
.pr-2 { padding-right: 0.5rem; }
.pr-4 { padding-right: 1rem; }

/* Margin utilities */
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-4 { margin: 1rem; }
.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-0 { margin-top: 0; margin-bottom: 0; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-auto { margin-top: auto; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }
.ml-auto { margin-left: auto; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }

/* Font size utilities - arbitrary values */
.text-\[10px\] { font-size: 10px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

/* Font weight utilities */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

/* Font family utilities */
.font-serif { font-family: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif; }
.font-sans { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; }

/* Text utilities */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.italic { font-style: italic; }
.not-italic { font-style: normal; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }

/* Color utilities */
.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-transparent { color: transparent; }
.text-current { color: currentColor; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-green-500 { color: #22c55e; }
.text-green-600 { color: #16a34a; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-yellow-500 { color: #eab308; }
.text-orange-500 { color: #f97316; }
.opacity-0 { opacity: 0; }
.opacity-30 { opacity: 0.3; }
.opacity-40 { opacity: 0.4; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }
.opacity-100 { opacity: 1; }

/* Background utilities */
.bg-transparent { background-color: transparent; }
.bg-white { background-color: #ffffff; }
.bg-black { background-color: #000000; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-200 { background-color: #e2e8f0; }
.bg-slate-300 { background-color: #cbd5e1; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-blue-600 { background-color: #2563eb; }
.bg-green-500 { background-color: #22c55e; }
.bg-green-600 { background-color: #16a34a; }
.bg-red-500 { background-color: #ef4444; }
.bg-red-600 { background-color: #dc2626; }
.bg-yellow-500 { background-color: #eab308; }
.bg-success { background-color: #16a34a; }
.bg-warning { background-color: #eab308; }
.bg-error { background-color: #ef4444; }
.bg-primary { background-color: var(--mud-palette-primary); }

/* Background with opacity */
.bg-white\/50 { background-color: rgba(255, 255, 255, 0.5); }
.bg-white\/30 { background-color: rgba(255, 255, 255, 0.3); }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-black\/5 { background-color: rgba(0, 0, 0, 0.05); }
.bg-black\/10 { background-color: rgba(0, 0, 0, 0.1); }
.bg-black\/20 { background-color: rgba(0, 0, 0, 0.2); }
.bg-black\/50 { background-color: rgba(0, 0, 0, 0.5); }

/* Border utilities */
.border { border-width: 1px; border-style: solid; }
.border-0 { border-width: 0; }
.border-2 { border-width: 2px; }
.border-4 { border-width: 4px; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-l { border-left-width: 1px; border-left-style: solid; }
.border-r { border-right-width: 1px; border-right-style: solid; }
.border-white { border-color: #ffffff; }
.border-black { border-color: #000000; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-transparent { border-color: transparent; }
.border-light { border-color: var(--mud-palette-divider); }
.border-current { border-color: currentColor; }

/* Border radius utilities */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: 0.125rem; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t-md { border-top-left-radius: 0.375rem; border-top-right-radius: 0.375rem; }
.rounded-b-md { border-bottom-left-radius: 0.375rem; border-bottom-right-radius: 0.375rem; }
.rounded-t-lg { border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }
.rounded-b-lg { border-bottom-left-radius: 0.5rem; border-bottom-right-radius: 0.5rem; }
.rounded-circle { border-radius: 50%; }

/* Shadow utilities */
.shadow-none { box-shadow: none; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }

/* Overflow utilities */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll { overflow: scroll; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-y-hidden { overflow-y: hidden; }

/* Position utilities */
.static { position: static; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Z-index utilities */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-auto { z-index: auto; }

/* Sizing - Width/Height */
.size-full { width: 100%; height: 100%; }
.size-auto { width: auto; height: auto; }
.size-min { width: min-content; height: min-content; }
.size-max { width: max-content; height: max-content; }

/* Cursor utilities */
.cursor-auto { cursor: auto; }
.cursor-default { cursor: default; }
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-wait { cursor: wait; }

/* Pointer events */
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* Visibility */
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* Transition */
.transition-none { transition: none; }
.transition-all { transition: all 150ms ease-in-out; }
.transition { transition: property duration timing-function; }
.transition-colors { transition: color 150ms ease-in-out, background-color 150ms ease-in-out, border-color 150ms ease-in-out; }
.duration-75 { transition-duration: 75ms; }
.duration-100 { transition-duration: 100ms; }
.duration-150 { transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
.ease-linear { transition-timing-function: linear; }
.ease-in { transition-timing-function: ease-in; }
.ease-out { transition-timing-function: ease-out; }
.ease-in-out { transition-timing-function: ease-in-out; }

/* Transform */
.transform { transform: translateX(var(--tw-translate-x, 0)) translateY(var(--tw-translate-y, 0)) rotate(var(--tw-rotate, 0)) skewX(var(--tw-skew-x, 0)) skewY(var(--tw-skew-y, 0)) scaleX(var(--tw-scale-x, 1)) scaleY(var(--tw-scale-y, 1)); }
.scale-95 { transform: scale(0.95); }
.scale-100 { transform: scale(1); }
.scale-105 { transform: scale(1.05); }
.hover\:scale-105:hover { transform: scale(1.05); }

/* Line height arbitrary */
.leading-\[1\.1\] { line-height: 1.1; }

/* Whitespace */
.whitespace-normal { white-space: normal; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre { white-space: pre; }
.whitespace-pre-line { white-space: pre-line; }
.whitespace-pre-wrap { white-space: pre-wrap; }

/* Word break */
.break-normal { overflow-wrap: normal; word-break: normal; }
.break-words { overflow-wrap: break-word; }
.break-all { word-break: break-all; }

/* User select */
.select-none { -webkit-user-select: none; user-select: none; }
.select-text { -webkit-user-select: text; user-select: text; }
.select-all { -webkit-user-select: all; user-select: all; }
.select-auto { -webkit-user-select: auto; user-select: auto; }

/* Grid utilities (for Step 4) */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Auto-fit grid for responsive */
.grid-cols-none { grid-template-columns: none; }
.auto-cols-fr { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }

/* Grid column span */
.col-span-1 { grid-column: span 1 / span 1; }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-3 { grid-column: span 3 / span 3; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-6 { grid-column: span 6 / span 6; }
.col-span-12 { grid-column: span 12 / span 12; }
.col-auto { grid-column: auto; }

/* Grid row span */
.row-span-1 { grid-row: span 1 / span 1; }
.row-span-2 { grid-row: span 2 / span 2; }
.row-span-3 { grid-row: span 3 / span 3; }
.row-span-auto { grid-row: auto; }

/* Table layout */
.table { display: table; }
.table-auto { table-layout: auto; }
.table-fixed { table-layout: fixed; }
.w-full { width: 100%; }

/* =========================================
   Dark Mode Support for Tailwind utilities
   ========================================= */
.mud-theme-dark .text-white { color: #ffffff; }
.mud-theme-dark .text-slate-400 { color: #94a3b8; }
.mud-theme-dark .text-slate-500 { color: #cbd5e1; }
.mud-theme-dark .text-gray-500 { color: #9ca3af; }
.mud-theme-dark .bg-white { background-color: #1e293b; }
.mud-theme-dark .bg-slate-50 { background-color: #0f172a; }
.mud-theme-dark .bg-slate-100 { background-color: #1e293b; }
.mud-theme-dark .bg-slate-200 { background-color: #334155; }
.mud-theme-dark .bg-slate-300 { background-color: #475569; }
.mud-theme-dark .border-slate-200 { border-color: #334155; }
.mud-theme-dark .border-slate-300 { border-color: #475569; }
.mud-theme-dark .border-gray-200 { border-color: #374151; }
.mud-theme-dark .border-gray-300 { border-color: #4b5563; }
.mud-theme-dark .rounded { border-radius: 0.25rem; }
.mud-theme-dark .rounded-md { border-radius: 0.375rem; }
.mud-theme-dark .rounded-lg { border-radius: 0.5rem; }
.mud-theme-dark .rounded-xl { border-radius: 0.75rem; }
.mud-theme-dark .rounded-2xl { border-radius: 1rem; }
.mud-theme-dark .rounded-3xl { border-radius: 1.5rem; }
.mud-theme-dark .rounded-full { border-radius: 9999px; }
.mud-theme-dark .opacity-50 { opacity: 0.5; }
.mud-theme-dark .opacity-60 { opacity: 0.6; }
.mud-theme-dark .opacity-70 { opacity: 0.7; }
.mud-theme-dark .opacity-80 { opacity: 0.8; }
.mud-theme-dark .bg-white\/50 { background-color: rgba(30, 41, 59, 0.5); }
.mud-theme-dark .bg-white\/30 { background-color: rgba(30, 41, 59, 0.3); }
.mud-theme-dark .bg-white\/20 { background-color: rgba(30, 41, 59, 0.2); }
.mud-theme-dark .bg-white\/10 { background-color: rgba(30, 41, 59, 0.1); }
.mud-theme-dark .bg-white\/5 { background-color: rgba(30, 41, 59, 0.05); }
.mud-theme-dark .bg-black\/5 { background-color: rgba(0, 0, 0, 0.3); }
.mud-theme-dark .bg-black\/10 { background-color: rgba(0, 0, 0, 0.4); }
.mud-theme-dark .bg-black\/20 { background-color: rgba(0, 0, 0, 0.5); }
.mud-theme-dark .border-white\/20 { border-color: rgba(255, 255, 255, 0.2); }
.mud-theme-dark .border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }

/* Border colors for dark mode */
.mud-theme-dark .border-gray-200\/30 { border-color: rgba(255, 255, 255, 0.15); }
