/* ========================================
   بهینه‌سازی موبایل جهانی برای تمام صفحات
   ======================================== */

 

/* فورس کردن جداول برای نمایش table-mode در موبایل */
.mobile-optimized-table {
    overflow-x: auto !important;
    display: block !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
}

/* فورس override برای MudBlazor */
.mobile-optimized-table .mud-table,
.mobile-optimized-table table {
    display: table !important;
    width: 100% !important;
    min-width: 700px !important;
    table-layout: auto !important;
}

.mobile-optimized-table .mud-table-head,
.mobile-optimized-table thead {
    display: table-header-group !important;
}

.mobile-optimized-table .mud-table-body,
.mobile-optimized-table tbody {
    display: table-row-group !important;
}

.mobile-optimized-table .mud-table-row,
.mobile-optimized-table tr {
    display: table-row !important;
}

.mobile-optimized-table .mud-table-cell,
.mobile-optimized-table th,
.mobile-optimized-table td {
    display: table-cell !important;
    white-space: nowrap !important;
}

/* Override MudBlazor responsive behavior */
.mobile-optimized-table .mud-table-container {
    overflow-x: auto !important;
}

/* Disable card mode for all breakpoints */
@media (max-width: 1920px) {
    .mobile-optimized-table .mud-table-row {
        display: table-row !important;
    }
    
    .mobile-optimized-table .mud-table-cell {
        display: table-cell !important;
    }
}

/* هدرهای Sticky */
.mobile-optimized-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: inherit;
}

/* Container بهینه برای موبایل */
.mobile-page-container {
    max-width: 100% !important;
    padding: 8px;
}

/* اسکرول بار سفارشی */
.mobile-optimized-table::-webkit-scrollbar {
    height: 10px;
}

.mobile-optimized-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.mobile-optimized-table::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #1976d2 0%, #2196f3 100%);
    border-radius: 4px;
}

.mobile-optimized-table::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #1565c0 0%, #1976d2 100%);
}

/* ========================================
   Desktop (> 768px) - فضای کافی
   ======================================== */
@media (min-width: 769px) {
    .mobile-page-container {
        padding: 16px;
    }

    .mobile-optimized-table table {
        min-width: auto;
    }

    .ps-page .mobile-optimized-table .mud-table-head .mud-th,
    .ps-page .mobile-optimized-table .mud-table-body .mud-td {
        padding: 4px 8px !important;
        line-height: 1.3 !important;
    }
}

/* ========================================
   Tablet (< 768px)
   ======================================== */
@media (max-width: 768px) {
    .mobile-page-container {
        max-width: 100% !important;
        padding: 12px 8px;
    }

    .mobile-optimized-table table {
        min-width: 800px;
    }

    .mobile-optimized-table th,
    .mobile-optimized-table td {
        font-size: 0.9rem !important;
        padding: 8px 6px !important;
    }

    /* نشانگر اسکرول */
    .mobile-optimized-table::before {
        /*content: "← رو به چپ و راست بکشید برای دیدن تمام ستون‌ها →";*/
        display: block;
        text-align: center;
        padding: 6px;
        background: linear-gradient(90deg, 
            rgba(25, 118, 210, 0.1) 0%, 
            rgba(25, 118, 210, 0.2) 50%, 
            rgba(25, 118, 210, 0.1) 100%);
        color: #1976d2;
        font-size: 0.75rem;
        font-weight: 600;
        border-radius: 4px;
        margin-bottom: 6px;
        animation: pulse-scroll 2s ease-in-out infinite;
    }

    @keyframes pulse-scroll {
        0%, 100% {
            opacity: 0.7;
        }
        50% {
            opacity: 1;
        }
    }
}

/* ========================================
   Mobile (< 600px)
   ======================================== */
@media (max-width: 600px) {
    .mobile-page-container {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .mobile-optimized-table table {
        min-width: 750px;
    }

    .mobile-optimized-table th,
    .mobile-optimized-table td {
        font-size: 0.85rem !important;
        padding: 6px 4px !important;
    }

    .mobile-optimized-table::-webkit-scrollbar {
        height: 12px;
    }

    /* دکمه‌ها و اکشن‌ها کوچکتر */
    .mobile-optimized-table .mud-button-root {
        padding: 4px 8px !important;
        font-size: 0.8rem !important;
    }

    .mobile-optimized-table .mud-icon-button {
        width: 32px !important;
        height: 32px !important;
    }

    .mobile-optimized-table .mud-icon-root {
        font-size: 1.2rem !important;
    }
}

/* ========================================
   Small Mobile (< 400px)
   ======================================== */
@media (max-width: 400px) {
    .mobile-page-container {
        padding: 4px 2px !important;
    }

    .mobile-optimized-table table {
        min-width: 700px;
    }

    .mobile-optimized-table th,
    .mobile-optimized-table td {
        font-size: 0.8rem !important;
        padding: 4px 3px !important;
    }

    .mobile-optimized-table .mud-button-root {
        padding: 3px 6px !important;
        font-size: 0.75rem !important;
    }

    .mobile-optimized-table .mud-icon-button {
        width: 28px !important;
        height: 28px !important;
    }

    .mobile-optimized-table .mud-icon-root {
        font-size: 1rem !important;
    }
}

/* ========================================
   Dark Mode Support
   ======================================== */
@media (prefers-color-scheme: dark) {
    .mobile-optimized-table::-webkit-scrollbar-track {
        background: #2d3748;
    }

    .mobile-optimized-table::-webkit-scrollbar-thumb {
        background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    }

    .mobile-optimized-table::before {
        background: linear-gradient(90deg, 
            rgba(37, 99, 235, 0.1) 0%, 
            rgba(59, 130, 246, 0.2) 50%, 
            rgba(37, 99, 235, 0.1) 100%);
        color: #60a5fa;
    }
}

.mud-theme-dark .mobile-optimized-table::-webkit-scrollbar-track {
    background: #2d3748;
}

.mud-theme-dark .mobile-optimized-table::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

.mud-theme-dark .mobile-optimized-table::before {
    background: linear-gradient(90deg, 
        rgba(37, 99, 235, 0.1) 0%, 
        rgba(59, 130, 246, 0.2) 50%, 
        rgba(37, 99, 235, 0.1) 100%);
    color: #60a5fa;
}

/* ========================================
   فیلترها و فرم‌ها در موبایل
   ======================================== */
@media (max-width: 768px) {
    /* فیلدهای ورودی */
    .mobile-page-container .mud-input-root {
        font-size: 0.9rem !important;
    }

    .mobile-page-container .mud-input-label {
        font-size: 0.85rem !important;
    }

    /* دکمه‌های اصلی */
    .mobile-page-container .mud-button-root {
        font-size: 0.85rem !important;
        padding: 6px 12px !important;
    }

    /* چیپ‌ها */
    .mobile-page-container .mud-chip {
        font-size: 0.8rem !important;
    }
}

@media (max-width: 600px) {
    .mobile-page-container .mud-input-root {
        font-size: 0.85rem !important;
    }

    .mobile-page-container .mud-input-label {
        font-size: 0.8rem !important;
    }

    .mobile-page-container .mud-button-root {
        font-size: 0.8rem !important;
        padding: 5px 10px !important;
    }

    .mobile-page-container .mud-chip {
        font-size: 0.75rem !important;
    }
}

/* ========================================
   تایپوگرافی در موبایل
   ======================================== */
@media (max-width: 768px) {
    .mobile-page-container .mud-typography-h5 {
        font-size: 1.25rem !important;
    }

    .mobile-page-container .mud-typography-h6 {
        font-size: 1.1rem !important;
    }

    .mobile-page-container .mud-typography-subtitle1 {
        font-size: 0.95rem !important;
    }

    .mobile-page-container .mud-typography-subtitle2 {
        font-size: 0.85rem !important;
    }
}

/* ========================================
   Grid Layout در موبایل
   ======================================== */
@media (max-width: 600px) {
    /* تبدیل grid items به تمام عرض */
    .mobile-page-container .mud-grid-item {
        max-width: 100% !important;
        flex-basis: 100% !important;
    }
}

/* ========================================
   Dialogs در موبایل
   ======================================== */
@media (max-width: 600px) {
    .mud-dialog {
        max-width: 95vw !important;
        margin: 8px !important;
    }

    .mud-dialog-title {
        font-size: 1.1rem !important;
        padding: 12px !important;
    }

    .mud-dialog-content {
        padding: 8px 12px !important;
    }

    .mud-dialog-actions {
        padding: 8px !important;
    }
}

/* ========================================
   Periods Page - Mobile Optimization
   ======================================== */

/* Periods Header Container - Theme Support */
.periods-header-container {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.periods-header-icon {
    color: var(--mud-palette-primary) !important;
}

.periods-header-title {
    color: var(--mud-palette-text-primary) !important;
}

/* Dark mode specific adjustments */
.mud-theme-dark .periods-header-container {
    background: var(--mud-palette-surface) !important;
}

.periods-table-wrapper {
    width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
    display: block !important;
}

/* Force table display mode */
.periods-table-wrapper .mud-table,
.periods-table-wrapper table {
    display: table !important;
    width: 100% !important;
    min-width: 1200px !important;
    table-layout: auto !important;
}

.periods-table-wrapper .mud-table-head,
.periods-table-wrapper thead {
    display: table-header-group !important;
}

.periods-table-wrapper .mud-table-body,
.periods-table-wrapper tbody {
    display: table-row-group !important;
}

.periods-table-wrapper .mud-table-row,
.periods-table-wrapper tr {
    display: table-row !important;
}

.periods-table-wrapper .mud-table-cell,
.periods-table-wrapper th,
.periods-table-wrapper td {
    display: table-cell !important;
    white-space: nowrap !important;
    min-width: 120px;
}

/* Override MudBlazor container */
.periods-table-wrapper .mud-table-container {
    overflow-x: visible !important;
}

/* Disable card mode for all breakpoints */
@media (max-width: 1920px) {
    .periods-table-wrapper .mud-table-row {
        display: table-row !important;
    }
    
    .periods-table-wrapper .mud-table-cell {
        display: table-cell !important;
    }
}

/* Specific widths for certain columns */
.periods-table .periods-header-cell:first-child,
.periods-table .periods-data-cell:first-child {
    min-width: 100px;
}

/* Operations column needs more space */
.periods-table .periods-header-cell:last-child,
.periods-table .periods-data-cell:last-child {
    min-width: 280px;
    position: sticky;
    right: 0;
    background: var(--mud-palette-surface);
    z-index: 1;
}

/* Sticky header for better mobile experience */
.periods-table .mud-table-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--mud-palette-surface);
}

/* Add shadow to show scroll is available */
.periods-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.periods-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.periods-table-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.periods-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile specific adjustments for Periods */
@media (max-width: 768px) {
    .periods-actions-header {
        flex-direction: column !important;
        gap: 12px;
        padding: 16px;
    }

    .periods-actions-header .mud-stack:first-child {
        width: 100%;
        justify-content: center;
    }

    .periods-add-button {
        width: 100%;
    }

    .periods-table-wrapper {
        margin: 8px -16px;
        padding: 0 16px;
        width: calc(100% + 32px) !important;
    }

    /* Force smaller fonts and padding on mobile */
    .periods-table-wrapper .mud-table-cell {
        font-size: 0.85rem !important;
        padding: 6px 8px !important;
    }

    /* Reduce button sizes on mobile */
    .periods-table-wrapper .mud-button-root {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
        min-width: auto !important;
    }

    .periods-table-wrapper .mud-icon-root {
        font-size: 1rem !important;
    }

    /* Table scrollbar indicator */
    .periods-table-wrapper::before {
        /*content: "← رو به چپ و راست بکشید →";*/
        display: block;
        text-align: center;
        padding: 6px;
        background: linear-gradient(90deg, 
            rgba(25, 118, 210, 0.1) 0%, 
            rgba(25, 118, 210, 0.2) 50%, 
            rgba(25, 118, 210, 0.1) 100%);
        color: #1976d2;
        font-size: 0.75rem;
        font-weight: 600;
        border-radius: 4px;
        margin-bottom: 8px;
        animation: pulse-scroll 2s ease-in-out infinite;
    }

    @keyframes pulse-scroll {
        0%, 100% {
            opacity: 0.7;
        }
        50% {
            opacity: 1;
        }
    }

    /* Make sticky column background adapt to striped rows */
    .periods-table tbody tr:nth-child(even) .periods-data-cell:last-child {
        background: var(--mud-palette-table-striped);
    }

    .periods-table tbody tr:nth-child(odd) .periods-data-cell:last-child {
        background: var(--mud-palette-surface);
    }

    .periods-table tbody tr:hover .periods-data-cell:last-child {
        background: var(--mud-palette-action-default-hover);
    }
}

/* Small mobile adjustments */
@media (max-width: 600px) {
    .periods-table-wrapper .mud-table {
        min-width: 1000px !important;
    }

    .periods-table-wrapper .mud-table-cell {
        font-size: 0.8rem !important;
        padding: 4px 6px !important;
    }

    .periods-table-wrapper .mud-button-root {
        padding: 3px 6px !important;
        font-size: 0.7rem !important;
    }
}

/* Tablet adjustments for Periods */
@media (min-width: 769px) and (max-width: 1024px) {
    .periods-table-wrapper .mud-table {
        min-width: 1000px;
    }
}

/* Desktop - no scroll needed for Periods */
@media (min-width: 1025px) {
    .periods-table-wrapper .mud-table {
        min-width: auto;
    }

    .periods-table .periods-data-cell:last-child {
        position: static;
    }
}

/* Additional theme-aware styles for Periods */
.periods-table-container {
    background: var(--mud-palette-surface) !important;
}

.periods-actions-header {
    background: transparent;
}

.periods-farm-icon {
    color: var(--mud-palette-primary) !important;
}

.periods-farm-title {
    color: var(--mud-palette-text-primary) !important;
}

.periods-no-records {
    color: var(--mud-palette-text-secondary) !important;
}

.periods-no-records-icon {
    color: var(--mud-palette-text-disabled) !important;
}

.periods-no-records-title,
.periods-no-records-subtitle {
    color: var(--mud-palette-text-primary) !important;
}

/* ========================================
   ChickParts Page - Mobile Optimization & Theme Support
   ======================================== */

/* ChickParts Header Container - Theme Support */
.chickparts-header-container {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.chickparts-header-icon {
    color: var(--mud-palette-primary) !important;
}

.chickparts-header-title {
    color: var(--mud-palette-text-primary) !important;
}

.chickparts-farm-icon {
    color: var(--mud-palette-primary) !important;
}

.chickparts-farm-title {
    color: var(--mud-palette-text-primary) !important;
}

/* ChickParts Actions Container */
.chickparts-actions-container {
    background: var(--mud-palette-surface) !important;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 8px;
}

.chickparts-list-icon {
    color: var(--mud-palette-primary) !important;
}

.chickparts-list-title {
    color: var(--mud-palette-text-primary) !important;
}

/* ChickParts Content Container */
.chickparts-content-container {
    background: var(--mud-palette-surface) !important;
    padding: 20px;
    border-radius: 8px;
}

/* ChickParts Warning */
.chickparts-warning {
    color: var(--mud-palette-text-secondary) !important;
}

.chickparts-warning-icon {
    color: var(--mud-palette-warning) !important;
}

.chickparts-warning-title,
.chickparts-warning-subtitle {
    color: var(--mud-palette-text-primary) !important;
}

/* ChickParts No Records */
.chickparts-no-records {
    color: var(--mud-palette-text-secondary) !important;
}

.chickparts-no-records-icon {
    color: var(--mud-palette-text-disabled) !important;
}

.chickparts-no-records-title,
.chickparts-no-records-subtitle {
    color: var(--mud-palette-text-primary) !important;
}

/* ChickParts Table Mobile Optimization */
.chickparts-table {
    background: var(--mud-palette-surface) !important;
}

.chickparts-table .chickparts-header-cell,
.chickparts-table .chickparts-data-cell {
    background: inherit;
}

/* Mobile specific adjustments for ChickParts */
@media (max-width: 768px) {
    .chickparts-actions-container {
        padding: 12px;
    }

    .chickparts-actions-container > .mud-stack {
        flex-direction: column !important;
        gap: 12px;
        width: 100%;
        align-items: stretch !important;
    }

    .chickparts-actions-container .mud-stack:first-child {
        justify-content: center !important;
    }

    .chickparts-add-button {
        width: auto !important;
        align-self: center !important;
        padding: 8px 24px !important;
    }

    /* ChickParts Table */
    .chickparts-table .mud-table-cell {
        font-size: 0.85rem !important;
        padding: 6px 8px !important;
    }

    .chickparts-table .mud-button-root {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
        min-width: auto !important;
    }

    .chickparts-table .mud-icon-root {
        font-size: 1rem !important;
    }
}

@media (max-width: 600px) {
    .chickparts-header-container {
        padding: 16px 12px;
    }

    .chickparts-header-title {
        font-size: 1.5rem !important;
    }

    .chickparts-farm-title {
        font-size: 0.95rem !important;
    }

    .chickparts-table .mud-table-cell {
        font-size: 0.8rem !important;
        padding: 4px 6px !important;
    }

    .chickparts-table .mud-button-root {
        padding: 3px 6px !important;
        font-size: 0.7rem !important;
    }
}

/* ========================================
   MasterSalons Page - Mobile Optimization & Theme Support
   ======================================== */

/* MasterSalons Header Container - Theme Support */
.mastersalons-header-container {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.mastersalons-header-icon {
    color: var(--mud-palette-primary) !important;
}

.mastersalons-header-title {
    color: var(--mud-palette-text-primary) !important;
}

.mastersalons-header-subtitle {
    color: var(--mud-palette-text-secondary) !important;
}

/* MasterSalons Action Bar */
.mastersalons-action-bar {
    background: var(--mud-palette-surface) !important;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 8px;
}

/* MasterSalons Table Container */
.mastersalons-table-container {
    background: var(--mud-palette-surface) !important;
    padding: 20px;
    border-radius: 8px;
}

/* MasterSalons Table Wrapper for Mobile */
.mastersalons-table-wrapper {
    width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
    display: block !important;
}

/* Force table display mode */
.mastersalons-table-wrapper .mud-table,
.mastersalons-table-wrapper table {
    display: table !important;
    width: 100% !important;
    min-width: 1200px !important;
    table-layout: auto !important;
}

.mastersalons-table-wrapper .mud-table-head,
.mastersalons-table-wrapper thead {
    display: table-header-group !important;
}

.mastersalons-table-wrapper .mud-table-body,
.mastersalons-table-wrapper tbody {
    display: table-row-group !important;
}

.mastersalons-table-wrapper .mud-table-row,
.mastersalons-table-wrapper tr {
    display: table-row !important;
}

.mastersalons-table-wrapper .mud-table-cell,
.mastersalons-table-wrapper th,
.mastersalons-table-wrapper td {
    display: table-cell !important;
    white-space: nowrap !important;
    min-width: 120px;
}

/* Override MudBlazor container */
.mastersalons-table-wrapper .mud-table-container {
    overflow-x: visible !important;
}

/* Disable card mode for all breakpoints */
@media (max-width: 1920px) {
    .mastersalons-table-wrapper .mud-table-row {
        display: table-row !important;
    }
    
    .mastersalons-table-wrapper .mud-table-cell {
        display: table-cell !important;
    }
}

/* MasterSalons Warning */
.mastersalons-warning {
    color: var(--mud-palette-text-secondary) !important;
}

.mastersalons-warning-icon {
    color: var(--mud-palette-warning) !important;
}

.mastersalons-warning-title,
.mastersalons-warning-subtitle {
    color: var(--mud-palette-text-primary) !important;
}

/* MasterSalons No Records */
.mastersalons-no-records {
    color: var(--mud-palette-text-secondary) !important;
}

.mastersalons-no-records-icon {
    color: var(--mud-palette-text-disabled) !important;
}

.mastersalons-no-records-title,
.mastersalons-no-records-subtitle {
    color: var(--mud-palette-text-primary) !important;
}

/* MasterSalons Table */
.mastersalons-table {
    background: var(--mud-palette-surface) !important;
}

/* Mobile specific adjustments for MasterSalons */
@media (max-width: 768px) {
    .mastersalons-action-bar {
        padding: 12px;
    }

    .mastersalons-action-bar .mud-stack {
        flex-direction: column !important;
        gap: 12px;
        width: 100%;
        align-items: stretch !important;
    }

    .mastersalons-action-bar .mud-button-root {
        width: 100%;
    }

    .mastersalons-table-wrapper {
        margin: 8px -16px;
        padding: 0 16px;
        width: calc(100% + 32px) !important;
    }

    /* Force smaller fonts and padding on mobile */
    .mastersalons-table-wrapper .mud-table-cell {
        font-size: 0.85rem !important;
        padding: 6px 8px !important;
    }

    /* Reduce button sizes on mobile */
    .mastersalons-table-wrapper .mud-button-root {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
        min-width: auto !important;
    }

    .mastersalons-table-wrapper .mud-icon-button {
        width: 32px !important;
        height: 32px !important;
    }

    .mastersalons-table-wrapper .mud-icon-root {
        font-size: 1rem !important;
    }

    .mastersalons-action-buttons {
        display: flex;
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .mastersalons-header-container {
        padding: 16px 12px;
    }

    .mastersalons-header-title {
        font-size: 1.5rem !important;
    }

    .mastersalons-table-wrapper .mud-table {
        min-width: 1000px !important;
    }

    .mastersalons-table-wrapper .mud-table-cell {
        font-size: 0.8rem !important;
        padding: 4px 6px !important;
    }

    .mastersalons-table-wrapper .mud-button-root {
        padding: 3px 6px !important;
        font-size: 0.7rem !important;
    }

    .mastersalons-table-wrapper .mud-icon-button {
        width: 28px !important;
        height: 28px !important;
    }
}

/* ========================================
   PlacementChicks Page - Mobile Optimization & Theme Support
   ======================================== */

/* PlacementChicks Header Container */
.placementchicks-header-container {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.placementchicks-header-icon {
    color: var(--mud-palette-primary) !important;
}

.placementchicks-header-title {
    color: var(--mud-palette-text-primary) !important;
}

.placementchicks-header-subtitle {
    color: var(--mud-palette-text-secondary) !important;
}

/* PlacementChicks Form Container */
.placementchicks-form {
    background: var(--mud-palette-surface) !important;
    border-radius: 8px;
}

/* PlacementChicks Input Fields */
.placementchicks-input {
    color: var(--mud-palette-text-primary) !important;
}

.placementchicks-input .mud-input-slot {
    color: var(--mud-palette-text-primary) !important;
}

.placementchicks-input input {
    color: var(--mud-palette-text-primary) !important;
}

/* MudSelect / Popover: رنگ متن از پالت Mud (جلوگیری از متن سفید روی زمینه روشن پس از تعویض تم) */
.mud-theme-dark .mud-input .mud-input-slot .mud-input-root input,
.mud-theme-dark .mud-input .mud-input-slot .mud-select-input,
.mud-theme-dark .mud-select .mud-input-slot .mud-select-input {
    color: var(--mud-palette-text-primary) !important;
}

/* MudSelect Popover — لیست از پالت تم */
.mud-theme-dark .mud-popover .mud-list {
    background-color: var(--mud-palette-surface) !important;
}

.mud-theme-dark .mud-popover .mud-list .mud-list-item {
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .mud-popover .mud-list .mud-list-item .mud-typography,
.mud-theme-dark .mud-popover .mud-list .mud-list-item .mud-list-item-text {
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .mud-popover .mud-list .mud-list-item:hover {
    background-color: rgba(var(--theme-primary-rgb, 25, 118, 210), 0.08) !important;
}

.mud-theme-dark .mud-popover .mud-list .mud-list-item.mud-selected-item {
    background-color: rgba(var(--theme-primary-rgb, 25, 118, 210), 0.12) !important;
}

.mud-theme-dark .mud-popover .mud-list .mud-list-item.mud-selected-item .mud-typography,
.mud-theme-dark .mud-popover .mud-list .mud-list-item.mud-selected-item .mud-list-item-text {
    color: var(--mud-palette-text-primary) !important;
}

/* PlacementChicks — همان منطق پالت */
.mud-theme-dark .placementchicks-input .mud-input-slot,
.mud-theme-dark .placementchicks-input input,
.mud-theme-dark .placementchicks-input .mud-select-input {
    color: var(--mud-palette-text-primary) !important;
}

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

.mud-theme-dark .placementchicks-input .mud-icon-root {
    color: var(--mud-palette-text-secondary) !important;
}

/* Selected item — بدون سفید ثابت */
.mud-theme-dark .mud-list-item-clickable.mud-ripple.mud-selected-item {
    color: var(--mud-palette-text-primary) !important;
    background-color: rgba(var(--theme-primary-rgb, 25, 118, 210), 0.12) !important;
}

.mud-theme-dark .mud-list-item.mud-selected-item,
.mud-theme-dark .mud-list-item.mud-selected-item .mud-list-item-text,
.mud-theme-dark .mud-list-item.mud-selected-item span,
.mud-theme-dark .mud-list-item.mud-selected-item div,
.mud-theme-dark .mud-list-item.mud-selected-item p {
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .mud-select-item {
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .mud-select-item .mud-typography {
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .mud-list .mud-list-item[aria-selected="true"],
.mud-theme-dark .mud-list .mud-list-item[aria-selected="true"] * {
    color: var(--mud-palette-text-primary) !important;
}

/* PlacementChicks Select Items - Unique Classes */
/* Pen Item (Blue in Light, White in Dark) */
.placement-select-pen {
    color: blue;
}

.mud-theme-dark .placement-select-pen {
    color: white !important;
}

.mud-theme-dark .mud-list-item .placement-select-pen {
    color: white !important;
}

.mud-theme-dark .mud-list-item.mud-selected-item .placement-select-pen {
    color: white !important;
}

.mud-theme-dark .mud-popover .mud-list .mud-list-item .placement-select-pen {
    color: white !important;
}

/* Salon Item (Black in Light, White in Dark) */
.placement-select-salon {
    color: black;
}

.mud-theme-dark .placement-select-salon {
    color: white !important;
}

.mud-theme-dark .mud-list-item .placement-select-salon {
    color: white !important;
}

.mud-theme-dark .mud-list-item.mud-selected-item .placement-select-salon {
    color: white !important;
}

.mud-theme-dark .mud-popover .mud-list .mud-list-item .placement-select-salon {
    color: white !important;
}

/* Part Item (Black in Light, White in Dark) */
.placement-select-part {
    color: black;
}

.mud-theme-dark .placement-select-part {
    color: white !important;
}

.mud-theme-dark .mud-list-item .placement-select-part {
    color: white !important;
}

.mud-theme-dark .mud-list-item.mud-selected-item .placement-select-part {
    color: white !important;
}

.mud-theme-dark .mud-popover .mud-list .mud-list-item .placement-select-part {
    color: white !important;
}

/* PlacementChicks Table Container */
.placementchicks-table-container {
    background: var(--mud-palette-surface) !important;
    border-radius: 8px;
}

/* PlacementChicks Table Wrapper */
.placementchicks-table-wrapper {
    width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
    display: block !important;
}

/* Force table display mode */
.placementchicks-table-wrapper .mud-table,
.placementchicks-table-wrapper table {
    display: table !important;
    width: 100% !important;
    min-width: 1400px !important;
    table-layout: auto !important;
}

.placementchicks-table-wrapper .mud-table-head,
.placementchicks-table-wrapper thead {
    display: table-header-group !important;
}

.placementchicks-table-wrapper .mud-table-body,
.placementchicks-table-wrapper tbody {
    display: table-row-group !important;
}

.placementchicks-table-wrapper .mud-table-row,
.placementchicks-table-wrapper tr {
    display: table-row !important;
}

.placementchicks-table-wrapper .mud-table-cell,
.placementchicks-table-wrapper th,
.placementchicks-table-wrapper td {
    display: table-cell !important;
    white-space: nowrap !important;
    min-width: 100px;
}

/* Override MudBlazor container */
.placementchicks-table-wrapper .mud-table-container {
    overflow-x: visible !important;
}

/* Disable card mode for all breakpoints */
@media (max-width: 1920px) {
    .placementchicks-table-wrapper .mud-table-row {
        display: table-row !important;
    }
    
    .placementchicks-table-wrapper .mud-table-cell {
        display: table-cell !important;
    }
}

/* PlacementChicks Empty State */
.placementchicks-empty {
    padding: 40px;
    text-align: center;
}

.placementchicks-empty-icon {
    color: var(--mud-palette-text-disabled) !important;
}

.placementchicks-empty-text,
.placementchicks-empty-subtext {
    color: var(--mud-palette-text-primary) !important;
}

/* Mobile specific adjustments for PlacementChicks */
@media (max-width: 768px) {
    .placementchicks-form {
        padding: 12px !important;
    }

    .placementchicks-action-bar {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .placementchicks-submit-button,
    .placementchicks-reset-button {
        width: 100% !important;
    }

    .placementchicks-table-wrapper {
        margin: 8px -16px;
        padding: 0 16px;
        width: calc(100% + 32px) !important;
    }

    /* Force smaller fonts and padding on mobile */
    .placementchicks-table-wrapper .mud-table-cell {
        font-size: 0.85rem !important;
        padding: 6px 8px !important;
    }

    /* Reduce button sizes on mobile */
    .placementchicks-table-wrapper .mud-button-root {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
        min-width: auto !important;
    }

    .placementchicks-table-wrapper .mud-icon-button {
        width: 32px !important;
        height: 32px !important;
    }

    .placementchicks-table-wrapper .mud-icon-root {
        font-size: 1rem !important;
    }

    /* Group Header and Total Row Mobile */
    .placementchicks-group-header,
    .placementchicks-total-row {
        font-size: 0.9rem !important;
    }

    .placementchicks-group-chip,
    .placementchicks-total-chip {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 600px) {
    .placementchicks-header-container {
        padding: 16px 12px;
    }

    .placementchicks-header-title {
        font-size: 1.5rem !important;
    }

    .placementchicks-table-wrapper .mud-table {
        min-width: 1200px !important;
    }

    .placementchicks-table-wrapper .mud-table-cell {
        font-size: 0.8rem !important;
        padding: 4px 6px !important;
    }

    .placementchicks-table-wrapper .mud-button-root {
        padding: 3px 6px !important;
        font-size: 0.7rem !important;
    }

    .placementchicks-table-wrapper .mud-icon-button {
        width: 28px !important;
        height: 28px !important;
    }
}

/* =============================================
   BirdTransfer Page Styles
   ============================================= */

/* Header Container */
.birdtransfer-header {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    border-radius: 8px;
    margin-bottom: 16px;
}

.birdtransfer-title {
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600 !important;
}

.birdtransfer-info-chip {
    background: var(--mud-palette-info) !important;
    color: white !important;
}

/* Form Container */
.birdtransfer-form {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    border-radius: 8px;
}

.birdtransfer-input {
    background: var(--mud-palette-background) !important;
}

/* Source and Destination Containers */
.birdtransfer-source,
.birdtransfer-destination {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    border-radius: 8px;
    border: 1px solid var(--mud-palette-divider);
}

.birdtransfer-section-title {
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600 !important;
}

/* Selected Row Highlighting */
.birdtransfer-selected-row {
    background-color: var(--mud-palette-action-default-hover) !important;
    border: 2px solid var(--mud-palette-primary) !important;
}

.mud-theme-dark .birdtransfer-selected-row {
    background-color: rgba(144, 202, 249, 0.16) !important;
}

/* Table Wrappers for Mobile Optimization */
.birdtransfer-source-table-wrapper,
.birdtransfer-dest-table-wrapper,
.birdtransfer-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 300px;
    -webkit-overflow-scrolling: touch;
    border-radius: 4px;
    border: 1px solid var(--mud-palette-divider);
}

.birdtransfer-table-wrapper {
    max-height: 500px;
}

/* Custom Scrollbar */
.birdtransfer-source-table-wrapper::-webkit-scrollbar,
.birdtransfer-dest-table-wrapper::-webkit-scrollbar,
.birdtransfer-table-wrapper::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.birdtransfer-source-table-wrapper::-webkit-scrollbar-track,
.birdtransfer-dest-table-wrapper::-webkit-scrollbar-track,
.birdtransfer-table-wrapper::-webkit-scrollbar-track {
    background: var(--mud-palette-background-grey);
    border-radius: 4px;
}

.birdtransfer-source-table-wrapper::-webkit-scrollbar-thumb,
.birdtransfer-dest-table-wrapper::-webkit-scrollbar-thumb,
.birdtransfer-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--mud-palette-primary);
    border-radius: 4px;
}

.birdtransfer-source-table-wrapper::-webkit-scrollbar-thumb:hover,
.birdtransfer-dest-table-wrapper::-webkit-scrollbar-thumb:hover,
.birdtransfer-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--mud-palette-primary-darken);
}

/* Table Styling */
.birdtransfer-selection-table,
.birdtransfer-table {
    min-width: 800px !important;
    background: var(--mud-palette-surface) !important;
}

.birdtransfer-selection-table .mud-table-head,
.birdtransfer-table .mud-table-head {
    background: var(--mud-palette-table-lines) !important;
}

.birdtransfer-selection-table .mud-table-head .mud-table-cell,
.birdtransfer-table .mud-table-head .mud-table-cell {
    font-weight: 600 !important;
    color: var(--mud-palette-text-primary) !important;
    background: var(--mud-palette-table-hover) !important;
    position: sticky;
    top: 0;
    z-index: 10;
}

.birdtransfer-selection-table .mud-table-cell,
.birdtransfer-table .mud-table-cell {
    color: var(--mud-palette-text-primary) !important;
    border-bottom: 1px solid var(--mud-palette-divider) !important;
}

/* Table Container */
.birdtransfer-table-container {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    border-radius: 8px;
}

.birdtransfer-table-title {
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600 !important;
}

.birdtransfer-table-count {
    color: var(--mud-palette-text-secondary) !important;
}

/* Buttons */
.birdtransfer-submit-btn,
.birdtransfer-reset-btn {
    min-width: 150px;
}

/* Chips */
.birdtransfer-type-chip,
.birdtransfer-female-chip,
.birdtransfer-male-chip,
.birdtransfer-sex-chip {
    border-radius: 4px;
}

/* Dark Mode Specific */
.mud-theme-dark .birdtransfer-header,
.mud-theme-dark .birdtransfer-form,
.mud-theme-dark .birdtransfer-source,
.mud-theme-dark .birdtransfer-destination,
.mud-theme-dark .birdtransfer-table-container {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .birdtransfer-selection-table,
.mud-theme-dark .birdtransfer-table {
    background: var(--mud-palette-surface) !important;
}

.mud-theme-dark .birdtransfer-selection-table .mud-table-cell,
.mud-theme-dark .birdtransfer-table .mud-table-cell {
    color: var(--mud-palette-text-primary) !important;
}

/* Header Row Responsive */
.birdtransfer-header-row {
    flex-wrap: wrap;
    gap: 8px;
}

.birdtransfer-table-title {
    flex: 1 1 auto;
    min-width: 200px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .birdtransfer-source-table-wrapper .mud-table,
    .birdtransfer-dest-table-wrapper .mud-table {
        min-width: 900px !important;
    }

    .birdtransfer-table-wrapper .mud-table {
        min-width: 1000px !important;
    }

    .birdtransfer-selection-table .mud-table-cell,
    .birdtransfer-table .mud-table-cell {
        font-size: 0.85rem !important;
        padding: 6px 8px !important;
    }

    .birdtransfer-type-chip,
    .birdtransfer-female-chip,
    .birdtransfer-male-chip,
    .birdtransfer-sex-chip {
        font-size: 0.7rem !important;
        height: 24px !important;
    }

    .birdtransfer-table-count {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 600px) {
    .birdtransfer-header {
        padding: 12px;
    }

    .birdtransfer-title {
        font-size: 1.25rem !important;
    }

    .birdtransfer-table-title {
        font-size: 1rem !important;
    }

    .birdtransfer-header-row {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .birdtransfer-header-row .mud-icon-button {
        align-self: flex-end;
        position: absolute;
        top: 12px;
        left: 12px;
    }

    .birdtransfer-source-table-wrapper .mud-table,
    .birdtransfer-dest-table-wrapper .mud-table {
        min-width: 800px !important;
    }

    .birdtransfer-table-wrapper .mud-table {
        min-width: 900px !important;
    }

    .birdtransfer-selection-table .mud-table-cell,
    .birdtransfer-table .mud-table-cell {
        font-size: 0.75rem !important;
        padding: 4px 6px !important;
    }

    .birdtransfer-submit-btn,
    .birdtransfer-reset-btn {
        min-width: 120px;
        font-size: 0.85rem !important;
    }

    .birdtransfer-table-count {
        font-size: 0.8rem !important;
        margin-top: 8px !important;
    }

    .birdtransfer-search {
        width: 100% !important;
    }
}

/* =============================================
   BirdSale Page Styles
   ============================================= */

/* Header and Content */
.birdsale-header,
.birdsale-actions,
.birdsale-content {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
}

/* Table Wrappers */
.birdsale-table-wrapper,
.birdsale-details-table-wrapper,
.birdsale-dialog-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 600px;
    -webkit-overflow-scrolling: touch;
    border-radius: 4px;
    border: 1px solid var(--mud-palette-divider);
}

.birdsale-details-table-wrapper {
    max-height: 400px;
}

.birdsale-dialog-table-wrapper {
    max-height: 400px;
}

/* Custom Scrollbar */
.birdsale-table-wrapper::-webkit-scrollbar,
.birdsale-details-table-wrapper::-webkit-scrollbar,
.birdsale-dialog-table-wrapper::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.birdsale-table-wrapper::-webkit-scrollbar-track,
.birdsale-details-table-wrapper::-webkit-scrollbar-track,
.birdsale-dialog-table-wrapper::-webkit-scrollbar-track {
    background: var(--mud-palette-background-grey);
    border-radius: 4px;
}

.birdsale-table-wrapper::-webkit-scrollbar-thumb,
.birdsale-details-table-wrapper::-webkit-scrollbar-thumb,
.birdsale-dialog-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--mud-palette-primary);
    border-radius: 4px;
}

.birdsale-table-wrapper::-webkit-scrollbar-thumb:hover,
.birdsale-details-table-wrapper::-webkit-scrollbar-thumb:hover,
.birdsale-dialog-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--mud-palette-primary-darken);
}

/* Table Styling */
.birdsale-table,
.birdsale-details-table,
.birdsale-salons-table {
    min-width: 1000px !important;
    background: var(--mud-palette-surface) !important;
}

.birdsale-table .mud-table-head,
.birdsale-details-table .mud-table-head,
.birdsale-salons-table .mud-table-head {
    background: var(--mud-palette-table-lines) !important;
}

.birdsale-table .mud-table-head .mud-table-cell,
.birdsale-details-table .mud-table-head .mud-table-cell,
.birdsale-salons-table .mud-table-head .mud-table-cell {
    font-weight: 600 !important;
    color: var(--mud-palette-text-primary) !important;
    background: var(--mud-palette-table-hover) !important;
}

.birdsale-th,
.birdsale-td,
.birdsale-details-th,
.birdsale-details-td,
.birdsale-salons-th,
.birdsale-salons-td {
    color: var(--mud-palette-text-primary) !important;
    border-bottom: 1px solid var(--mud-palette-divider) !important;
}

/* Dark Mode */
.mud-theme-dark .birdsale-header,
.mud-theme-dark .birdsale-actions,
.mud-theme-dark .birdsale-content {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .birdsale-table,
.mud-theme-dark .birdsale-details-table,
.mud-theme-dark .birdsale-salons-table {
    background: var(--mud-palette-surface) !important;
}

.mud-theme-dark .birdsale-th,
.mud-theme-dark .birdsale-td,
.mud-theme-dark .birdsale-details-th,
.mud-theme-dark .birdsale-details-td,
.mud-theme-dark .birdsale-salons-th,
.mud-theme-dark .birdsale-salons-td {
    color: var(--mud-palette-text-primary) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .birdsale-table-wrapper .mud-table,
    .birdsale-details-table-wrapper .mud-table {
        min-width: 1200px !important;
    }

    .birdsale-dialog-table-wrapper .mud-table {
        min-width: 1100px !important;
    }

    .birdsale-th,
    .birdsale-td,
    .birdsale-details-th,
    .birdsale-details-td,
    .birdsale-salons-th,
    .birdsale-salons-td {
        font-size: 0.85rem !important;
        padding: 6px 8px !important;
    }

    .birdsale-search-input {
        max-width: 200px;
    }

    .birdsale-form-header .mud-grid-item {
        padding: 8px !important;
    }

    .birdsale-buyer-input {
        width: 100% !important;
    }
}

@media (max-width: 600px) {
    .birdsale-header {
        padding: 16px !important;
    }

    .birdsale-header-title {
        font-size: 1.5rem !important;
    }

    .birdsale-table-wrapper .mud-table,
    .birdsale-details-table-wrapper .mud-table {
        min-width: 1000px !important;
    }

    .birdsale-dialog-table-wrapper .mud-table {
        min-width: 900px !important;
    }

    .birdsale-th,
    .birdsale-td,
    .birdsale-details-th,
    .birdsale-details-td,
    .birdsale-salons-th,
    .birdsale-salons-td {
        font-size: 0.75rem !important;
        padding: 4px 6px !important;
    }

    .birdsale-search-input {
        max-width: 150px;
    }

    .birdsale-add-button {
        font-size: 0.85rem !important;
        padding: 8px 16px !important;
    }

    .birdsale-buyer-input {
        flex: 1;
        min-width: 0 !important;
    }

    .birdsale-date-picker {
        flex: 1;
        min-width: 150px !important;
    }
}

/* =============================================
   Orders Page Styles
   ============================================= */

.orders-filter-container {
    background: var(--mud-palette-surface) !important;
    border-radius: 8px;
}

.orders-filter-grid .mud-grid-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.orders-filter-field {
    color: var(--mud-palette-text-secondary) !important;
}

.orders-filter-icon {
    color: var(--mud-palette-primary) !important;
}

.orders-filter-input {
    width: 100%;
}

.orders-filter-button {
    width: 100%;
    min-height: 44px;
}

.orders-table-wrapper,
.orders-details-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
    border: 1px solid var(--mud-palette-divider);
    margin-bottom: 16px;
}

.orders-table {
    min-width: 900px !important;
}

.orders-details-table-wrapper .mud-table {
    min-width: 600px !important;
}

.orders-table .mud-table-head .mud-table-cell {
    font-weight: 600 !important;
}

.orders-table .mud-table-cell {
    border-bottom: 1px solid var(--mud-palette-divider) !important;
}

.mud-theme-dark .orders-filter-container {
    background: var(--mud-palette-surface) !important;
}

.mud-theme-dark .orders-table-wrapper,
.mud-theme-dark .orders-details-table-wrapper {
    border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 768px) {
    .orders-filter-button {
        width: 100%;
    }

    .orders-table {
        min-width: 1000px !important;
    }

    .orders-filter-grid .mud-grid-item {
        padding: 4px 0 !important;
    }
}

@media (max-width: 600px) {
    .orders-filter-container {
        padding: 12px !important;
    }

    .orders-table {
        min-width: 950px !important;
    }

    .orders-details-table-wrapper .mud-table {
        min-width: 700px !important;
    }

.orders-out-filter-container {
    background: var(--mud-palette-surface) !important;
    border-radius: 8px;
}

.mud-theme-dark .orders-out-filter-container {
    background: var(--mud-palette-surface) !important;
}
}

/* =============================================
   Orders Dialog Styles
   ============================================= */

.orders-dialog-grid .mud-grid-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.orders-dialog-input {
    width: 100%;
}

.orders-dialog-details {
    background: var(--mud-palette-surface) !important;
}

.orders-dialog-details-header {
    flex-wrap: wrap;
    gap: 8px;
}

.orders-dialog-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 6px;
    border: 1px solid var(--mud-palette-divider);
}

.orders-dialog-table-wrapper .mud-table {
    min-width: 700px !important;
}

.mud-theme-dark .orders-dialog-details {
    background: var(--mud-palette-surface) !important;
}

.mud-theme-dark .orders-dialog-table-wrapper {
    border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 768px) {
    .orders-dialog-grid .mud-grid-item {
        padding: 4px 0 !important;
    }

    .orders-dialog-table-wrapper .mud-table {
        min-width: 900px !important;
    }
}

@media (max-width: 600px) {
    .orders-dialog-table-wrapper .mud-table {
        min-width: 850px !important;
    }
}

/* Warehouse filters and tables */
.warehouse-filter-container {
    background: var(--mud-palette-surface) !important;
    border-radius: 8px;
}

.warehouse-filter-grid .mud-grid-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.warehouse-filter-field {
    color: var(--mud-palette-text-secondary) !important;
}

.warehouse-filter-icon {
    color: var(--mud-palette-primary) !important;
}

.warehouse-filter-label {
    color: var(--mud-palette-text-primary) !important;
}

.warehouse-filter-input {
    width: 100%;
}

.warehouse-filter-button {
    width: 100%;
    min-height: 44px;
}

.warehouse-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 6px;
    border: 1px solid var(--mud-palette-divider);
    margin-bottom: 16px;
}

.warehouse-table-wrapper .mud-table {
    min-width: 1000px !important;
}

.mud-theme-dark .warehouse-filter-container {
    background: var(--mud-palette-surface) !important;
}

.mud-theme-dark .warehouse-table-wrapper {
    border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 768px) {
    .warehouse-filter-grid .mud-grid-item {
        padding: 4px 0 !important;
    }

    .warehouse-filter-button {
        width: 100%;
    }

    .warehouse-table-wrapper .mud-table {
        min-width: 1100px !important;
    }
}

@media (max-width: 600px) {
    .warehouse-filter-container {
        padding: 12px !important;
    }

    .warehouse-table-wrapper .mud-table {
        min-width: 950px !important;
    }
}

/* =============================================
   Mortality Register Opti Styles
   ============================================= */

.mortality-opt-header-card,
.mortality-opt-date-card,
.mortality-opt-action-card,
.mortality-opt-table-card,
.mortality-opt-loading-card,
.mortality-opt-error-card,
.mortality-opt-empty-card {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    border-radius: 12px;
}

.mortality-opt-header-icon {
    color: var(--mud-palette-primary) !important;
}

.mortality-opt-header-title {
    font-weight: 600;
}

.mortality-opt-period-chip {
    font-weight: 500;
}

.mortality-opt-date-grid .mud-grid-item,
.mortality-opt-action-grid .mud-grid-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mortality-opt-date-btn,
.mortality-opt-date-picker,
.mortality-opt-action-button,
.mortality-opt-retry-btn {
    width: 100%;
}

.mortality-opt-date-picker .mud-input-input,
.mortality-opt-input .mud-input-input {
    text-align: center;
}

.mortality-opt-loading-card,
.mortality-opt-error-card,
.mortality-opt-empty-card {
    text-align: center;
}

.mortality-opt-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 400px);
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--mud-palette-divider);
    background: var(--mud-palette-surface) !important;
    position: relative;
}

.mortality-opt-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
}

.mortality-opt-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--mud-palette-surface) !important;
    display: table-header-group;
}

.mortality-opt-table thead th,
.mortality-opt-table tbody td,
.mortality-opt-table tfoot td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--mud-palette-divider);
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
}

.mortality-opt-header-row th {
    position: sticky;
    top: 0;
    z-index: 11;
    background: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 48px;
    min-height: 48px;
}

.mortality-opt-subheader-row th {
    position: sticky;
    top: 48px; /* ارتفاع ردیف اول هدر */
    z-index: 10;
    background: var(--mud-palette-table-lines) !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 40px;
    min-height: 40px;
    max-height: 40px;
}

/* محاسبه ارتفاع دقیق header برای هماهنگی ستون سالن */
.mortality-opt-table thead {
    height: auto;
}

.mortality-opt-header-row .mortality-opt-header-female {
    background: rgba(63, 81, 181, 0.85) !important;
    color: var(--mud-palette-primary-text) !important;
}

.mortality-opt-header-row .mortality-opt-header-male {
    background: rgba(66, 66, 66, 0.85) !important;
    color: var(--mud-palette-primary-text) !important;
}

.mortality-opt-subheader-row {
    background: var(--mud-palette-table-lines) !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

/* تنظیم دقیق‌تر برای sticky header */
.mortality-opt-table thead tr:first-child th {
    top: 0;
}

.mortality-opt-table thead tr:last-child th {
    top: 48px; /* ارتفاع تقریبی ردیف اول */
}


.mortality-opt-row:nth-child(even) {
    background: var(--mud-palette-table-hover) !important;
}

/* MudDataGrid برای mortality-opt */
.mortality-opt-data-grid {
    height: calc(100vh - 300px);
    min-height: 400px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: auto;
    padding: 0 !important;
    margin: 0 !important;
}

.mortality-opt-data-grid ::deep .mud-data-grid-root {
    padding: 0 !important;
    margin: 0 !important;
}

.mortality-opt-data-grid ::deep .mud-table-container {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: auto !important;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
}

.mortality-opt-data-grid ::deep .mud-table-wrapper {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: auto !important;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
}

.mortality-opt-data-grid ::deep .mud-table-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: var(--mud-palette-surface) !important;
    padding: 0 !important;
}

.mortality-opt-data-grid ::deep .mud-table-head th {
    background: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
    font-weight: 600;
    padding: 0 !important;
    border-bottom: 2px solid var(--mud-palette-divider);
}

.mortality-opt-data-grid ::deep .mud-table-body tr {
    transition: background-color 0.2s ease;
}

.mortality-opt-data-grid ::deep .mud-table-body tr:hover {
    background-color: var(--mud-palette-table-hover) !important;
}

.mortality-opt-data-grid ::deep .mud-table-body tr:nth-child(even) {
    background-color: var(--mud-palette-table-hover) !important;
}

.mortality-opt-data-grid ::deep .mud-table-body td {
    padding: 0 !important;
    border-bottom: 1px solid var(--mud-palette-divider);
    text-align: center;
    vertical-align: middle;
}

.mortality-opt-data-grid ::deep .mud-data-grid-footer {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    background: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
    font-weight: 600;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    display: table-footer-group !important;
    padding: 0 !important;
}

.mortality-opt-data-grid ::deep .mud-data-grid-footer tr {
    display: table-row !important;
}

.mortality-opt-data-grid ::deep .mud-data-grid-footer td {
    padding: 0 !important;
    border-top: 2px solid var(--mud-palette-divider) !important;
    text-align: center !important;
    background: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
    font-weight: 600 !important;
    display: table-cell !important;
}

.mortality-opt-data-grid ::deep .mortality-opt-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.mortality-opt-data-grid ::deep .mortality-opt-detail-btn {
    margin-right: 4px;
}

/* حذف حاشیه از آیکون */
.mortality-icon {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: auto !important;
    width: auto !important;
    height: auto !important;
    background-color: transparent !important;
    background: transparent !important;
    border-radius: 0 !important;
}

.mortality-icon ::deep .mud-button-root {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: auto !important;
    width: auto !important;
    height: auto !important;
    background-color: transparent !important;
    background: transparent !important;
    border-radius: 0 !important;
}

.mortality-icon ::deep .mud-button-root::before,
.mortality-icon ::deep .mud-button-root::after {
    display: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* حذف background در تم تاریک */
.mud-theme-dark .mortality-icon,
.mud-theme-dark .mortality-icon ::deep .mud-button-root,
.mud-theme-dark .mortality-icon ::deep .mud-button-root::before,
.mud-theme-dark .mortality-icon ::deep .mud-button-root::after {
    background-color: transparent !important;
    background: transparent !important;
}

.mud-theme-dark .mortality-icon:hover,
.mud-theme-dark .mortality-icon:hover ::deep .mud-button-root,
.mud-theme-dark .mortality-icon:hover ::deep .mud-button-root::before,
.mud-theme-dark .mortality-icon:hover ::deep .mud-button-root::after {
    background-color: transparent !important;
    background: transparent !important;
}

.mortality-icon ::deep .mud-ripple {
    display: none !important;
}

/* دکمه با جزئیات - آبی */
.mortality-icon.mortality-has .mud-icon-root {
    color: #1976d2 !important;
}

.mortality-icon.mortality-has:hover .mud-icon-root {
    color: #1565c0 !important;
}

.mortality-icon.mortality-has:hover {
    background-color: transparent !important;
}

/* دکمه بدون جزئیات - خاکستری */
.mortality-icon.mortality-empty .mud-icon-root {
    color: #757575 !important;
}

.mortality-icon.mortality-empty:hover .mud-icon-root {
    color: #616161 !important;
}

.mortality-icon.mortality-empty:hover {
    background-color: transparent !important;
}

/* Dark theme adjustments */
.mud-theme-dark .mortality-icon.mortality-has .mud-icon-root {
    color: #64b5f6 !important;
}

.mud-theme-dark .mortality-icon.mortality-empty .mud-icon-root {
    color: #9e9e9e !important;
}

.mortality-opt-data-grid ::deep .mortality-opt-total-cell {
    font-weight: 600;
    background: rgba(255, 236, 239, 0.8); /* صورتی خیلی ملایم */
    color: #b71c1c; /* متن قرمز تیره و خوانا */
}

/* اطمینان از نمایش table mode در موبایل - مشابه دسکتاپ */
@media (max-width: 960px) {
    .mortality-opt-data-grid,
    .weight-report-grid {
        width: 100% !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* اجبار MudDataGrid به نمایش table mode */
    .mortality-opt-data-grid ::deep .mud-data-grid,
    .weight-report-grid ::deep .mud-data-grid {
        display: block !important;
        width: 100% !important;
    }

    .mortality-opt-data-grid ::deep .mud-table-container,
    .weight-report-grid ::deep .mud-table-container {
        display: block !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    .mortality-opt-data-grid ::deep .mud-table-wrapper,
    .weight-report-grid ::deep .mud-table-wrapper {
        display: block !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    .mortality-opt-data-grid ::deep .mud-table,
    .weight-report-grid ::deep .mud-table {
        display: table !important;
        width: 100% !important;
        min-width: max-content !important;
        table-layout: auto !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    .mortality-opt-data-grid ::deep .mud-table-head,
    .weight-report-grid ::deep .mud-table-head {
        display: table-header-group !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
        background-color: var(--mud-palette-background) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }

    .mortality-opt-data-grid ::deep .mud-table-body,
    .weight-report-grid ::deep .mud-table-body {
        display: table-row-group !important;
    }

    .mortality-opt-data-grid ::deep .mud-table-row,
    .weight-report-grid ::deep .mud-table-row {
        display: table-row !important;
    }

    .mortality-opt-data-grid ::deep .mud-table-cell,
    .weight-report-grid ::deep .mud-table-cell {
        display: table-cell !important;
        white-space: nowrap !important;
    }

    /* جلوگیری از card mode در موبایل */
    .mortality-opt-data-grid ::deep .mud-data-grid-row-group,
    .weight-report-grid ::deep .mud-data-grid-row-group {
        display: none !important;
    }

    .mortality-opt-data-grid ::deep .mud-data-grid-row-group-header,
    .weight-report-grid ::deep .mud-data-grid-row-group-header {
        display: none !important;
    }

    /* اطمینان از اینکه هیچ card mode فعال نیست */
    .mortality-opt-data-grid ::deep [class*="card"],
    .weight-report-grid ::deep [class*="card"] {
        display: none !important;
    }

    /* حفظ sticky header در موبایل */
    .mortality-opt-data-grid ::deep .mud-table-head,
    .weight-report-grid ::deep .mud-table-head {
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
    }

    /* حفظ sticky footer در موبایل */
    .mortality-opt-data-grid ::deep .mud-data-grid-footer,
    .weight-report-grid ::deep .mud-data-grid-footer {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 10 !important;
        display: table-footer-group !important;
    }
}

.mortality-opt-loading-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1000 !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.mud-theme-dark .mortality-opt-loading-overlay {
    background-color: rgba(30, 30, 30, 0.8) !important;
}

/* Dark theme adjustments */
.mud-theme-dark .mortality-opt-data-grid ::deep .mud-table-head th {
    background: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
}

.mud-theme-dark .mortality-opt-data-grid ::deep .mud-data-grid-footer td {
    background: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
}

.mortality-opt-cell {
    font-size: 0.95rem;
}

.mortality-opt-cell:first-child {
    min-width: 150px;
    white-space: normal;
    font-weight: 600;
}

.mortality-opt-pen-cell {
    font-weight: 600;
}

.mortality-opt-female-cell {
    background: rgba(255, 236, 239, 0.8)!important; /* صورتی خیلی ملایم */
    color: #b71c1c!important; /* متن قرمز تیره و خوانا */
}
.mortality-opt-male-cell {
    background: rgba(232, 245, 255, 0.85)!important; /* آبی خیلی ملایم */
    color: #0d47a1!important; /* متن آبی تیره */
}

.mortality-opt-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mortality-opt-input {
    width: 90px;
}

.mortality-opt-detail-btn {
    border-radius: 50%;
}

.mortality-opt-total-row {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 13 !important;
    background: var(--mud-palette-primary) !important;
    color: var(--mud-palette-primary-text) !important;
    font-weight: 600;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1) !important;
}

.mortality-opt-table tfoot {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 13 !important;
    background: var(--mud-palette-primary) !important;
}

.mortality-opt-total-cell {
    padding: 10px;
}

    .mortality-opt-total-cell.mortality-opt-female-cell {
        background: rgba(255, 236, 239, 0.8); /* صورتی خیلی ملایم */
        color: #b71c1c; /* متن قرمز تیره و خوانا */
    }

    .mortality-opt-total-cell.mortality-opt-male-cell {
        background: rgba(232, 245, 255, 0.85); /* آبی خیلی ملایم */
        color: #0d47a1; /* متن آبی تیره */
    }

.mortality-opt-table-header {
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.mortality-opt-save-btn {
    box-shadow: none;
}

.mortality-opt-action-btn,
.mortality-opt-retry-btn,
.mortality-opt-date-btn {
    box-shadow: none;
}

@media (max-width: 992px) {
    .mortality-opt-table {
        min-width: 1250px;
    }

    .mortality-opt-input {
        width: 80px;
    }
}

@media (max-width: 768px) {
    .mortality-opt-table {
        min-width: 1350px;
    }

    .mortality-opt-cell {
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .mortality-opt-header-title {
        font-size: 1.35rem !important;
    }

    .mortality-opt-table {
        min-width: 1450px;
    }

    .mortality-opt-input {
        width: 72px;
    }

    .mortality-opt-action-card,
    .mortality-opt-date-card {
        padding: 16px !important;
    }
}

.mud-theme-dark .mortality-opt-header-card,
.mud-theme-dark .mortality-opt-date-card,
.mud-theme-dark .mortality-opt-action-card,
.mud-theme-dark .mortality-opt-table-card,
.mud-theme-dark .mortality-opt-loading-card,
.mud-theme-dark .mortality-opt-error-card,
.mud-theme-dark .mortality-opt-empty-card {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
}

/* =============================================
   WeightMeasurement Page Styles
   ============================================= */

.weightmeasure-header-card,
.weightmeasure-date-card,
.weightmeasure-action-card,
.weightmeasure-table-card,
.weightmeasure-loading-card,
.weightmeasure-error-card,
.weightmeasure-empty-card {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    border-radius: 12px;
}

.weightmeasure-header-icon {
    color: var(--mud-palette-primary) !important;
}

.weightmeasure-header-title {
    color: var(--mud-palette-primary) !important;
    font-weight: 600 !important;
}

.weightmeasure-table-header {
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.weightmeasure-period-chip {
    background: var(--mud-palette-secondary) !important;
    color: var(--mud-palette-text-light) !important;
    font-weight: 500;
}

.weightmeasure-date-grid .mud-grid-item,
.weightmeasure-action-grid .mud-grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.weightmeasure-date-btn,
.weightmeasure-date-picker,
.weightmeasure-action-button,
.weightmeasure-retry-btn {
    width: 100%;
}

.weightmeasure-date-picker .mud-input-input {
    text-align: center;
}

.weightmeasure-loading-card,
.weightmeasure-error-card,
.weightmeasure-empty-card {
    text-align: center;
}

.weightmeasure-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 600px;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--mud-palette-divider);
}

.weightmeasure-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
}

.weightmeasure-table thead th,
.weightmeasure-table tbody td,
.weightmeasure-table tfoot td {
    padding: 8px 12px;
    border: 1px solid var(--mud-palette-divider);
    text-align: center;
    color: var(--mud-palette-text-primary);
    vertical-align: middle;
    white-space: nowrap;
}

.weightmeasure-header-row {
    background-color: var(--mud-palette-table-lines) !important;
    font-weight: 600;
}

.weightmeasure-header-cell {
    color: var(--mud-palette-text-primary);
}

.weightmeasure-header-female {
    background-color: var(--mud-palette-primary-lighten) !important;
    color: var(--mud-palette-text-light) !important;
}

.weightmeasure-header-male {
    background-color: var(--mud-palette-secondary-lighten) !important;
    color: var(--mud-palette-text-light) !important;
}

.weightmeasure-subheader-row {
    background-color: var(--mud-palette-table-hover) !important;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 5;
}

.weightmeasure-subheader-cell {
    color: var(--mud-palette-text-primary);
}

.weightmeasure-column-phase {
    width: 140px;
}

.weightmeasure-row:nth-child(even) {
    background-color: var(--mud-palette-action-hover);
}

.weightmeasure-cell {
    color: var(--mud-palette-text-primary);
}

.weightmeasure-pen-cell {
    background-color: var(--mud-palette-info-lighten) !important;
}

.weightmeasure-female-cell {
    background-color: var(--mud-palette-primary-lightest) !important;
}

.weightmeasure-male-cell {
    background-color: var(--mud-palette-secondary-lightest) !important;
}

.weightmeasure-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.weightmeasure-input {
    width: 80px;
    min-width: 0;
}

.weightmeasure-text {
    font-weight: 600;
}

.weightmeasure-total-row {
    background-color: var(--mud-palette-table-hover) !important;
    font-weight: 700;
    position: sticky;
    bottom: 0;
    z-index: 4;
}

.weightmeasure-total-cell {
    font-size: 1.05rem;
}

.mud-theme-dark .weightmeasure-header-card,
.mud-theme-dark .weightmeasure-date-card,
.mud-theme-dark .weightmeasure-action-card,
.mud-theme-dark .weightmeasure-table-card,
.mud-theme-dark .weightmeasure-loading-card,
.mud-theme-dark .weightmeasure-error-card,
.mud-theme-dark .weightmeasure-empty-card {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .weightmeasure-table thead th,
.mud-theme-dark .weightmeasure-table tbody td,
.mud-theme-dark .weightmeasure-table tfoot td {
    color: var(--mud-palette-text-primary);
}

.mud-theme-dark .weightmeasure-header-row {
    background-color: var(--mud-palette-table-lines) !important;
}

.mud-theme-dark .weightmeasure-header-female {
    background-color: var(--mud-palette-primary-darken) !important;
}

.mud-theme-dark .weightmeasure-header-male {
    background-color: var(--mud-palette-secondary-darken) !important;
}

.mud-theme-dark .weightmeasure-subheader-row {
    background-color: var(--mud-palette-table-hover) !important;
}

.mud-theme-dark .weightmeasure-row:nth-child(even) {
    background-color: var(--mud-palette-action-hover);
}

.mud-theme-dark .weightmeasure-pen-cell {
    background-color: var(--mud-palette-info-darken) !important;
}

.mud-theme-dark .weightmeasure-female-cell {
    background-color: var(--mud-palette-primary-darkest) !important;
}

.mud-theme-dark .weightmeasure-male-cell {
    background-color: var(--mud-palette-secondary-darkest) !important;
}

.mud-theme-dark .weightmeasure-total-row {
    background-color: var(--mud-palette-table-hover) !important;
}

.mud-theme-dark .weightmeasure-total-cell {
    color: var(--mud-palette-text-primary);
}

@media (max-width: 768px) {
    .weightmeasure-table {
        min-width: 1250px;
    }

    .weightmeasure-table thead th,
    .weightmeasure-table tbody td,
    .weightmeasure-table tfoot td {
        padding: 6px 8px;
        font-size: 0.85rem;
    }

    .weightmeasure-input {
        width: 72px;
    }

    .weightmeasure-date-btn,
    .weightmeasure-date-picker,
    .weightmeasure-action-button,
    .weightmeasure-retry-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

@media (max-width: 600px) {
    .weightmeasure-table {
        min-width: 1350px;
    }

    .weightmeasure-table thead th,
    .weightmeasure-table tbody td,
    .weightmeasure-table tfoot td {
        padding: 4px 6px;
        font-size: 0.75rem;
    }

    .weightmeasure-column-phase {
        width: 110px;
        white-space: normal;
    }

    .weightmeasure-input {
        width: 64px;
    }

    .weightmeasure-header-title {
        font-size: 1.4rem !important;
    }

    .weightmeasure-date-btn,
    .weightmeasure-date-picker,
    .weightmeasure-action-button,
    .weightmeasure-retry-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* =============================================
   FeedUse Page Styles
   ============================================= */

.feeduse-header-card,
.feeduse-date-card,
.feeduse-action-card,
.feeduse-select-card,
.feeduse-table-card,
.feeduse-loading-card,
.feeduse-error-card,
.feeduse-empty-card {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    border-radius: 12px;
}

.feeduse-header-icon {
    color: var(--mud-palette-text-light) !important;
}

.feeduse-header-title {
    font-weight: 600 !important;
    color: var(--mud-palette-primary) !important;
}

.feeduse-period-chip {
    background: var(--mud-palette-secondary) !important;
    color: var(--mud-palette-text-light) !important;
    font-weight: 500;
}

.feeduse-date-grid .mud-grid-item,
.feeduse-action-grid .mud-grid-item,
.feeduse-select-grid .mud-grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.feeduse-date-btn,
.feeduse-date-picker,
.feeduse-action-button,
.feeduse-retry-btn,
.feeduse-select {
    width: 100%;
}

.feeduse-date-picker .mud-input-input {
    text-align: center;
}

.feeduse-loading-card,
.feeduse-error-card,
.feeduse-empty-card {
    text-align: center;
}

.feeduse-action-button {
    min-height: 40px;
}

.feeduse-table-header {
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.feeduse-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 600px;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--mud-palette-divider);
    background: var(--mud-palette-surface) !important;
}

.feeduse-table {
    width: 100%;
    min-width: 1150px;
    border-collapse: collapse;
}

.feeduse-table thead th,
.feeduse-table tbody td {
    border: 1px solid var(--mud-palette-divider);
    padding: 8px 12px;
    text-align: center;
    vertical-align: middle;
    color: var(--mud-palette-text-primary);
    white-space: nowrap;
}

.feeduse-table thead th {
    background: var(--mud-palette-table-lines) !important;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 5;
}
    .feeduse-table thead th:nth-child(1),
    .feeduse-table thead th:nth-child(2),
    .feeduse-table thead th:nth-child(3),
    .feeduse-table thead th:nth-child(4),
    .feeduse-table thead th:nth-child(5),
    .feeduse-table thead th:nth-child(6) {
        background-color: var(--mud-palette-warning) !important;
        color: var(--mud-palette-text-dark) !important;
    }
    .feeduse-table thead th:nth-child(7),
    .feeduse-table thead th:nth-child(8),
    .feeduse-table thead th:nth-child(9) {
        background-color: var(--mud-palette-info) !important;
        color: var(--mud-palette-text-dark) !important;
    }
    



 

.feeduse-table thead th:nth-child(10),
.feeduse-table thead th:nth-child(11),
.feeduse-table thead th:nth-child(12) {
    background-color: var(--mud-palette-secondary) !important;
    color: var(--mud-palette-text-light) !important;
}

   

    .feeduse-table tbody td:nth-child(10),
    .feeduse-table tbody td:nth-child(11),
    .feeduse-table tbody td:nth-child(12) {
        background-color: var(--mud-palette-secondary-lightest) !important;
        color: var(--mud-palette-text-light) !important;
    }

.feeduse-data-row:nth-child(even) {
    background-color: var(--mud-palette-action-hover);
}

.feeduse-pen-cell {
    background-color: var(--mud-palette-info-lighten) !important;
}

.feeduse-input {
    min-width: 0;
    width: 100%;
}

.feeduse-cell-stack {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.feeduse-cell-stack-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.feeduse-detail-row {
    background: rgba(0, 0, 0, 0.02);
}

.feeduse-detail-row.female {
    background: var(--mud-palette-primary-lightest) !important;
}

.feeduse-detail-row.male {
    background: var(--mud-palette-secondary-lightest) !important;
}

.text-success,
.text-success * {
    color: var(--mud-palette-success) !important;
    font-weight: 600 !important;
}

.text-error,
.text-error * {
    color: var(--mud-palette-error) !important;
    font-weight: 600 !important;
}
.feeduse-select-grid .mud-select {
    width: 100%;
    min-width: 0;
}
.mud-theme-dark .feeduse-header-card,
.mud-theme-dark .feeduse-date-card,
.mud-theme-dark .feeduse-action-card,
.mud-theme-dark .feeduse-select-card,
.mud-theme-dark .feeduse-table-card,
.mud-theme-dark .feeduse-loading-card,
.mud-theme-dark .feeduse-error-card,
.mud-theme-dark .feeduse-empty-card {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .feeduse-table thead th,
.mud-theme-dark .feeduse-table tbody td {
    color: var(--mud-palette-text-primary);
}

.mud-theme-dark .feeduse-table tbody td:nth-child(7),
.mud-theme-dark .feeduse-table tbody td:nth-child(8),
.mud-theme-dark .feeduse-table tbody td:nth-child(9) {
    background-color: var(--mud-palette-primary-darkest) !important;
}

.mud-theme-dark .feeduse-table tbody td:nth-child(10),
.mud-theme-dark .feeduse-table tbody td:nth-child(11),
.mud-theme-dark .feeduse-table tbody td:nth-child(12) {
    background-color: var(--mud-palette-secondary-darkest) !important;
}

.mud-theme-dark .feeduse-detail-row {
    background: rgba(255, 255, 255, 0.04);
}

.mud-theme-dark .feeduse-detail-row.female {
    background: var(--mud-palette-primary-darkest) !important;
}

.mud-theme-dark .feeduse-detail-row.male {
    background: var(--mud-palette-secondary-darkest) !important;
}

@media (max-width: 768px) {
    .feeduse-table {
        min-width: 1250px;
    }

    .feeduse-table thead th,
    .feeduse-table tbody td {
        padding: 6px 8px;
        font-size: 0.85rem;
    }

    .feeduse-date-btn,
    .feeduse-date-picker,
    .feeduse-action-button,
    .feeduse-select {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

@media (max-width: 600px) {
    .feeduse-table {
        min-width: 1350px;
    }

    .feeduse-table thead th,
    .feeduse-table tbody td {
        padding: 4px 6px;
        font-size: 0.75rem;
    }

    .feeduse-header-title {
        font-size: 1.4rem !important;
    }

    .feeduse-date-btn,
    .feeduse-date-picker,
    .feeduse-action-button,
    .feeduse-select,
    .feeduse-retry-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* =============================================
   /* EggProduction Page Styles - Optimized */
  
  /* Loading Overlay */
  .eggproduction-loading-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
  }
   ============================================= */

.eggproduction-container {
    max-width: 98% !important;
}

.eggproduction-header-card,
.eggproduction-date-card,
.eggproduction-action-card,
.eggproduction-table-card,
.eggproduction-loading-card,
.eggproduction-error-card,
.eggproduction-empty-card {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    border-radius: 12px;
}

.eggproduction-header-icon {
    color: var(--mud-palette-primary) !important;
}

.eggproduction-header-title {
    font-weight: 600 !important;
    color: var(--mud-palette-primary) !important;
}

.eggproduction-period-chip {
    background: var(--mud-palette-secondary) !important;
    color: var(--mud-palette-text-light) !important;
    font-weight: 500;
}

.eggproduction-date-grid .mud-grid-item,
.eggproduction-action-grid .mud-grid-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.eggproduction-date-btn,
.eggproduction-date-picker,
.eggproduction-action-button,
.eggproduction-retry-btn {
    width: 100%;
}

.eggproduction-date-picker .mud-input-input {
    text-align: center;
}

.eggproduction-loading-card,
.eggproduction-error-card,
.eggproduction-empty-card {
    text-align: center;
}

.eggproduction-table-header {
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.eggproduction-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 600px;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 8px;
    background: var(--mud-palette-surface) !important;
}

.eggproduction-table {
    width: 100%;
    min-width: 1400px;
    border-collapse: collapse;
}

/* MudDataGrid Styles for EggProduction */
.eggproduction-data-grid {
    height: calc(100vh - 400px) !important;
    min-height: 400px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: auto;
}

.eggproduction-data-grid ::deep .mud-table-container {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: auto !important;
    position: relative;
}

.eggproduction-data-grid ::deep .mud-table-wrapper {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: auto !important;
    position: relative;
}

.eggproduction-data-grid ::deep .mud-data-grid-root {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: auto !important;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.eggproduction-data-grid ::deep .mud-table-head {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--mud-palette-background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mud-theme-dark .eggproduction-data-grid ::deep .mud-table-head {
    background: var(--mud-palette-background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.eggproduction-data-grid ::deep .mud-data-grid-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: var(--mud-palette-background);
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    display: table-footer-group !important;
}

.eggproduction-data-grid ::deep .mud-data-grid-footer tr {
    display: table-row !important;
}

.eggproduction-data-grid ::deep .mud-data-grid-footer td {
    display: table-cell !important;
    padding: 8px 16px;
    border-top: 2px solid var(--mud-palette-divider);
    text-align: center;
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    font-weight: 600;
}

.mud-theme-dark .eggproduction-data-grid ::deep .mud-data-grid-footer {
    background: var(--mud-palette-background);
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.eggproduction-data-grid ::deep .mud-table-row:hover {
    background-color: var(--mud-palette-action-hover) !important;
}

/* Mobile Display */
@media (max-width: 960px) {
    .eggproduction-data-grid ::deep .mud-data-grid {
        display: block !important;
        width: 100% !important;
    }

    .eggproduction-data-grid ::deep .mud-table-container {
        display: block !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    .eggproduction-data-grid ::deep .mud-table-wrapper {
        display: block !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    .eggproduction-data-grid ::deep .mud-table {
        display: table !important;
        width: 100% !important;
        min-width: max-content !important;
        table-layout: auto !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    .eggproduction-data-grid ::deep .mud-table-head {
        display: table-header-group !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
        background-color: var(--mud-palette-background) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }

    .mud-theme-dark .eggproduction-data-grid ::deep .mud-table-head {
        background-color: var(--mud-palette-background) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    }

    .eggproduction-data-grid ::deep .mud-table-head th,
    .eggproduction-data-grid ::deep .mud-table-head .mud-table-cell {
        position: sticky !important;
        top: 0 !important;
        z-index: 11 !important;
        background-color: inherit !important;
    }

    .eggproduction-data-grid ::deep .mud-table-body {
        display: table-row-group !important;
    }

    .eggproduction-data-grid ::deep .mud-table-row {
        display: table-row !important;
    }

    .eggproduction-data-grid ::deep .mud-table-cell {
        display: table-cell !important;
        white-space: nowrap !important;
    }

    .eggproduction-data-grid ::deep .mud-data-grid-row-group {
        display: none !important;
    }

    .eggproduction-data-grid ::deep [class*="card"] {
        display: none !important;
    }
}

.eggproduction-table thead th,
.eggproduction-table tbody td,
.eggproduction-table tfoot td {
    border: 1px solid var(--mud-palette-divider);
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.eggproduction-header-cell {
    background: var(--mud-palette-table-lines) !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 10px;
}

.eggproduction-cell {
    font-size: 0.85rem;
    padding: 8px 10px;
}

.eggproduction-total-cell,
.eggproduction-total-header {
    background: var(--mud-palette-primary-lightest) !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 10px;
}

.eggproduction-average-cell,
.eggproduction-average-header {
    background: var(--mud-palette-info-lighten) !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 10px;
}

.eggproduction-input,
.eggproduction-input .mud-input-input {
    text-align: end;
}

.eggproduction-input {
    width: 90px;
    min-width: 0;
}

.eggproduction-input-small {
    width: 70px;
    min-width: 0;
}

.eggproduction-input .mud-input-input,
.eggproduction-input-small .mud-input-input {
    font-size: 0.85rem;
    padding: 0;
}

.eggproduction-diff-text {
    font-size: 0.75rem;
    font-weight: 600;
}

.eggproduction-footer-title {
    font-weight: 600;
    font-size: 0.85rem;
}

.eggproduction-footer-total {
    background: var(--mud-palette-primary-lighten) !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.eggproduction-footer-average {
    background: var(--mud-palette-info-lighten) !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.eggproduction-footer-hatch {
    background: rgba(76, 175, 80, 0.2);
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.eggproduction-footer-cons {
    background: rgba(255, 152, 0, 0.2);
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.eggproduction-footer-waste {
    background: rgba(244, 67, 54, 0.18);
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.eggproduction-footer-generic {
    background: rgba(158, 158, 158, 0.16);
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.eggproduction-cat-hatch-header,
.eggproduction-cat-hatch-total-header {
    background: rgba(76, 175, 80, 0.25) !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.eggproduction-cat-cons-header,
.eggproduction-cat-cons-total-header {
    background: rgba(255, 152, 0, 0.25) !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.eggproduction-cat-waste-header,
.eggproduction-cat-waste-total-header {
    background: rgba(244, 67, 54, 0.22) !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.eggproduction-cat-generic-header,
.eggproduction-cat-generic-total-header {
    background: rgba(158, 158, 158, 0.18) !important;
    color: var(--mud-palette-text-primary) !important;
    font-weight: 600;
}

.eggproduction-cat-hatch-cell {
    background: rgba(76, 175, 80, 0.18) !important;
}

.eggproduction-cat-cons-cell {
    background: rgba(255, 152, 0, 0.18) !important;
}

.eggproduction-cat-waste-cell {
    background: rgba(244, 67, 54, 0.15) !important;
}

.eggproduction-cat-generic-cell {
    background: rgba(158, 158, 158, 0.12) !important;
}

.eggproduction-cat-hatch-total-cell {
    background: rgba(76, 175, 80, 0.25) !important;
    font-weight: 600;
}

.eggproduction-cat-cons-total-cell {
    background: rgba(255, 152, 0, 0.25) !important;
    font-weight: 600;
}

.eggproduction-cat-waste-total-cell {
    background: rgba(244, 67, 54, 0.2) !important;
    font-weight: 600;
}

.eggproduction-cat-generic-total-cell {
    background: rgba(158, 158, 158, 0.18) !important;
    font-weight: 600;
}

.mud-theme-dark .eggproduction-header-card,
.mud-theme-dark .eggproduction-date-card,
.mud-theme-dark .eggproduction-action-card,
.mud-theme-dark .eggproduction-table-card,
.mud-theme-dark .eggproduction-loading-card,
.mud-theme-dark .eggproduction-error-card,
.mud-theme-dark .eggproduction-empty-card {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .eggproduction-table thead th,
.mud-theme-dark .eggproduction-table tbody td,
.mud-theme-dark .eggproduction-table tfoot td {
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .eggproduction-cat-hatch-header,
.mud-theme-dark .eggproduction-cat-hatch-total-header,
.mud-theme-dark .eggproduction-cat-hatch-cell,
.mud-theme-dark .eggproduction-cat-hatch-total-cell,
.mud-theme-dark .eggproduction-footer-hatch {
    background: rgba(76, 175, 80, 0.35) !important;
}

.mud-theme-dark .eggproduction-cat-cons-header,
.mud-theme-dark .eggproduction-cat-cons-total-header,
.mud-theme-dark .eggproduction-cat-cons-cell,
.mud-theme-dark .eggproduction-cat-cons-total-cell,
.mud-theme-dark .eggproduction-footer-cons {
    background: rgba(255, 152, 0, 0.35) !important;
}

.mud-theme-dark .eggproduction-cat-waste-header,
.mud-theme-dark .eggproduction-cat-waste-total-header,
.mud-theme-dark .eggproduction-cat-waste-cell,
.mud-theme-dark .eggproduction-cat-waste-total-cell,
.mud-theme-dark .eggproduction-footer-waste {
    background: rgba(244, 67, 54, 0.35) !important;
}

.mud-theme-dark .eggproduction-cat-generic-header,
.mud-theme-dark .eggproduction-cat-generic-total-header,
.mud-theme-dark .eggproduction-cat-generic-cell,
.mud-theme-dark .eggproduction-cat-generic-total-cell,
.mud-theme-dark .eggproduction-footer-generic {
    background: rgba(158, 158, 158, 0.3) !important;
}

.mud-theme-dark .eggproduction-total-cell,
.mud-theme-dark .eggproduction-total-header {
    background: rgba(103, 58, 183, 0.35) !important;
}

.mud-theme-dark .eggproduction-average-cell,
.mud-theme-dark .eggproduction-average-header {
    background: rgba(3, 169, 244, 0.35) !important;
}

.mud-theme-dark .eggproduction-footer-total {
    background: rgba(103, 58, 183, 0.4) !important;
}

.mud-theme-dark .eggproduction-footer-average {
    background: rgba(3, 169, 244, 0.4) !important;
}

@media (max-width: 768px) {
    .eggproduction-table {
        min-width: 1500px;
    }

    .eggproduction-table thead th,
    .eggproduction-table tbody td,
    .eggproduction-table tfoot td {
        font-size: 0.8rem;
        padding: 6px 8px;
    }

    .eggproduction-input {
        width: 80px;
    }

    .eggproduction-input-small {
        width: 64px;
    }

    .eggproduction-date-btn,
    .eggproduction-date-picker,
    .eggproduction-action-button,
    .eggproduction-retry-btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

@media (max-width: 600px) {
    .eggproduction-table {
        min-width: 1650px;
    }

    .eggproduction-table thead th,
    .eggproduction-table tbody td,
    .eggproduction-table tfoot td {
        font-size: 0.75rem;
        padding: 4px 6px;
    }

    .eggproduction-header-title {
        font-size: 1.35rem !important;
    }

    .eggproduction-input {
        width: 72px;
    }

    .eggproduction-input-small {
        width: 58px;
    }

    .eggproduction-date-btn,
    .eggproduction-date-picker,
    .eggproduction-action-button,
    .eggproduction-retry-btn {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* =============================================
   ItemUse Shared Styles
   ============================================= */

.itemuse-loading-card {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
    text-align: center;
    border-radius: 12px;
}

.item-use-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--mud-palette-divider);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
    margin-top: 12px;
}

.item-use-table-wrapper .mud-table {
    min-width: 900px;
}

.mud-theme-dark .itemuse-loading-card {
    background: var(--mud-palette-surface) !important;
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .item-use-table-wrapper {
    border-color: rgba(255, 255, 255, 0.12);
}

.mud-theme-dark .item-use-table-wrapper .mud-table {
    min-width: 900px;
}

/* =============================================
   PWA Install Banner
   ============================================= */

.pwa-install-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 16px;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0 16px;
    z-index: 6000;
    pointer-events: none;
}

.pwa-install-banner.show {
    display: flex;
    pointer-events: auto;
}

.pwa-install-card {
    width: 100%;
    max-width: 380px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    padding: 20px 22px 18px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.pwa-install-logo {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    margin: 0 auto 12px;
    object-fit: contain;
    background: var(--mud-palette-background);
    padding: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.pwa-install-title {
    font-size: 1.05rem;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--mud-palette-primary);
}

.pwa-install-text {
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0 auto 14px;
    max-width: 92%;
    color: var(--mud-palette-text-primary);
}

.pwa-install-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 6px;
    flex-wrap: wrap;
}

.pwa-install-btn {
    flex: 1 1 120px;
    min-width: 120px;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pwa-install-btn.primary {
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    box-shadow: 0 8px 18px rgba(56, 142, 60, 0.25);
}

.pwa-install-btn.secondary {
    background: transparent;
    color: var(--mud-palette-text-secondary);
    border: 1px solid var(--mud-palette-divider);
}

.pwa-install-btn:hover {
    transform: translateY(-1px);
}

.pwa-install-btn.primary:hover {
    box-shadow: 0 10px 20px rgba(56, 142, 60, 0.32);
}

.pwa-install-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.04);
}

.pwa-install-ios {
    display: none;
    font-size: 0.84rem;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 10px;
}

.pwa-install-banner.ios-mode .pwa-install-ios {
    display: block;
}

.pwa-install-banner.ios-mode .pwa-install-btn.primary {
    background: var(--mud-palette-secondary);
    color: var(--mud-palette-secondary-text);
}

@media (max-width: 480px) {
    .pwa-install-card {
        margin: 0 auto;
        padding: 18px 16px 16px;
        border-radius: 16px;
    }

    .pwa-install-title {
        font-size: 1rem;
    }

    .pwa-install-text {
        font-size: 0.85rem;
    }

    .pwa-install-actions {
        flex-direction: column;
    }

    .pwa-install-btn {
        width: 100%;
    }
}

.mud-theme-dark .pwa-install-card {
    background: var(--mud-palette-background);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mud-theme-dark .pwa-install-btn.secondary {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--mud-palette-text-primary);
}

.home-page-container {
    padding-inline: clamp(8px, 2vw, 16px);
    overflow-x: hidden;
}

.home-page-wrapper {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vw, 20px);
}

.home-header-card {
    background-color: var(--mud-palette-background);
    border-radius: 12px;
    box-shadow: var(--mud-elevation-3);
}

.mud-theme-dark .home-header-card {
    background-color: var(--mud-palette-surface);
}

.home-header-content .mud-icon {
    color: var(--mud-palette-primary);
}

.home-selection-grid {
    margin-inline: 0;
}

.home-selection-grid .mud-grid-item {
    padding-inline: clamp(4px, 1vw, 8px);
}

.home-selection-grid .mud-select {
    width: 100%;
}

.home-summary-card {
    background-color: var(--mud-palette-background);
    border-radius: 12px;
    padding: clamp(12px, 2vw, 20px);
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vw, 20px);
}

.mud-theme-dark .home-summary-card {
    background-color: var(--mud-palette-surface);
}

.home-summary-header {
    padding-inline: clamp(4px, 1vw, 8px);
}

.home-summary-header .mud-icon,
.home-summary-header .mud-typography {
    font-weight: 700;
}

.home-summary-header .mud-typography {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
}

.home-card-item {
    min-width: 0;
    padding: clamp(4px, 1vw, 8px);
}

.home-card-item .theme-card-header {
    border-radius: 10px;
    overflow: hidden;
}

.home-card-content {
    background-color: var(--mud-palette-surface);
    border-radius: 8px;
    min-height: 100%;
    gap: clamp(6px, 1.5vw, 10px) !important;
}

.mud-theme-dark .home-card-content {
    background-color: rgba(255, 255, 255, 0.05);
}

.home-card-header-stack {
    padding: clamp(8px, 1.5vw, 12px);
}

.home-card-content .mud-stack {
    flex-wrap: wrap;
    gap: 6px !important;
}

.home-card-content .mud-stack .mud-typography {
    white-space: nowrap;
}

.home-card-content .mud-icon {
    color: var(--mud-palette-primary);
}

.home-card-content .mud-typography[style*="color:white"] {
    color: var(--mud-palette-text-primary) !important;
}

.home-salons-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    background: var(--mud-palette-surface);
    padding: clamp(8px, 1.5vw, 12px);
}

.mud-theme-dark .home-salons-table-wrapper {
    background: rgba(255, 255, 255, 0.05);
}

.home-salons-table {
    min-width: 640px;
    border-collapse: separate;
    border-spacing: 0;
}

.home-salons-table .mud-table-head,
.home-salons-table .mud-table-foot {
    background-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}

.home-salons-table .mud-table-foot {
    background-color: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
}

.home-salons-table .mud-table-foot strong {
    color: var(--mud-palette-text-primary);
}

.mud-theme-dark .home-salons-table .mud-table-foot {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--mud-palette-text-primary);
}

.mud-theme-dark .home-salons-table .mud-table-foot strong {
    color: var(--mud-palette-text-primary);
}

.home-salons-table .mud-table-head th {
    font-weight: 600;
}

.home-salons-table .mud-table-body tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.mud-theme-dark .home-salons-table .mud-table-body tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.04);
}

.home-salons-table .mud-table-body td {
    white-space: nowrap;
    font-size: clamp(0.85rem, 1.6vw, 0.95rem);
}

.home-salons-table .mud-table-foot td {
    font-weight: 600;
}

.home-salons-table .mud-icon {
    color: var(--mud-palette-secondary);
}

@media (max-width: 1280px) {
    .home-summary-card {
        padding: 12px;
    }

    .home-card-item .theme-card-header {
        min-height: 100%;
    }
}

@media (max-width: 960px) {
    .home-header-card {
        padding: 16px;
    }

    .home-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .home-selection-grid {
        gap: 8px;
    }

    .home-summary-card {
        padding: 12px;
    }

    .home-summary-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .home-card-content .mud-stack .mud-typography {
        font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    }

    .home-salons-table {
        min-width: 560px;
    }
}

@media (max-width: 600px) {
    .home-salons-table-wrapper {
        padding: 1px;
        overflow-x: auto;
    }

    .home-salons-table {
        min-width: 100%;
        width: auto;
        table-layout: fixed; /* 👈 ثابت تا جدول از صفحه بیرون نزنه */
        border-collapse: collapse;
    }

        .home-salons-table .mud-table-head th,
        .home-salons-table .mud-table-body td,
        .home-salons-table .mud-table-foot td {
            padding: 1px 1px;
           
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

            .home-salons-table .mud-table-head th:nth-child(1),
            .home-salons-table .mud-table-body td:nth-child(1),
            .home-salons-table .mud-table-foot td:nth-child(1) {
                width: auto; /* 👈 اسم سالن */
            }

            .home-salons-table .mud-table-head th:nth-child(2),
            .home-salons-table .mud-table-body td:nth-child(2),
            .home-salons-table .mud-table-foot td:nth-child(2) {
                width: auto; /* سن */
            }

            .home-salons-table .mud-table-head th:nth-child(3),
            .home-salons-table .mud-table-body td:nth-child(3),
            .home-salons-table .mud-table-foot td:nth-child(3) {
                width: 80px; /* مرغ */
            }

            .home-salons-table .mud-table-head th:nth-child(4),
            .home-salons-table .mud-table-body td:nth-child(4),
            .home-salons-table .mud-table-foot td:nth-child(4) {
                width: 80px; /* خروس */
            }
}

/* =============================================
   Weight Report Salon Page Styles
   ============================================= */

/* استایل هدر صفحه - کوچک و جمع */
.page-header {
    margin-bottom: 12px !important;
    padding: 8px 12px !important;
}

.title-section {
    gap: 8px !important;
}

.page-icon {
    font-size: 1.25rem !important;
}

.page-title {
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    margin: 0 !important;
}

.selection-info-container {
    margin-bottom: 0 !important;
    padding: 6px 10px !important;
}

.selection-info {
    gap: 6px !important;
    padding: 0 !important;
    margin-top: 0 !important;
}

.selection-icon {
    font-size: 1rem !important;
}

.selection-details {
    gap: 4px !important;
}

.selection-label {
    font-size: 0.75rem !important;
}

.selection-value {
    font-size: 0.75rem !important;
    padding: 1px 6px !important;
}

/* استایل بخش Filters - کوچک و جمع */
.pa-1.mb-1,
.pa-2.mb-2 {
    padding: 8px !important;
    margin-bottom: 8px !important;
}

.pa-1.mb-1 .mud-stack,
.pa-2.mb-2 .mud-stack {
    gap: 8px !important;
}

.pa-1.mb-1 .mud-item,
.pa-2.mb-2 .mud-item {
    padding: 4px !important;
}

.pa-1.mb-1 .mud-select,
.pa-1.mb-1 .mud-slider,
.pa-2.mb-2 .mud-select,
.pa-2.mb-2 .mud-slider {
    margin: 4px 0 !important;
}

.pa-1.mb-1 .mud-button,
.pa-2.mb-2 .mud-button {
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
    min-height: 32px !important;
}

.pa-1.mb-1 .mud-icon-button,
.pa-2.mb-2 .mud-icon-button {
    padding: 6px !important;
    width: 32px !important;
    height: 32px !important;
}

.pa-1.mb-1 .mud-icon-button .mud-icon-root,
.pa-2.mb-2 .mud-icon-button .mud-icon-root {
    font-size: 1.2rem !important;
}

.pa-1.mb-1 .mud-text,
.pa-2.mb-2 .mud-text {
    font-size: 0.8rem !important;
    margin: 2px 0 !important;
}

.pa-1.mb-1 .mud-slider,
.pa-2.mb-2 .mud-slider {
    padding: 8px 0 !important;
}

/* استایل MudDataGrid برای گزارش وزن */
.weight-report-grid:not(.egg-report-scroll-grid) {
    height: calc(100vh - 300px);
    min-height: 400px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: auto;
    padding: 0 !important;
    margin: 0 !important;
}

/* گزارش وزن/EggMass هفتگی — اسکرول از طریق Height روی MudDataGrid */
.egg-report-scroll-grid.weight-report-grid {
    height: auto !important;
    min-height: 280px !important;
    max-height: none !important;
    overflow: visible !important;
}

.egg-report-scroll-grid ::deep .mud-data-grid-root {
    min-height: 0 !important;
    max-height: 100% !important;
}

.egg-report-scroll-grid ::deep .mud-table-container {
    height: auto !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.egg-report-scroll-grid ::deep .mud-table-wrapper {
    height: auto !important;
    overflow: visible !important;
}

.weight-report-grid ::deep .mud-data-grid-root {
    padding: 0 !important;
    margin: 0 !important;
}

.weight-report-grid ::deep .mud-table-container {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: auto !important;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
}

.weight-report-grid ::deep .mud-table-wrapper {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: auto !important;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
}

/* غیرفعال کردن صفحه‌بندی */
.weight-report-grid .mud-data-grid-pager {
    display: none !important;
}

/* اطمینان از sticky بودن در ردیف‌های رنگی */
.weight-report-grid .mud-table-body .mud-table-row.weight-row-average .mud-table-cell:first-child,
.weight-report-grid .mud-table-body .mud-table-row.weight-row-average .mud-table-cell:nth-child(2),
.weight-report-grid .mud-table-body .mud-table-row.weight-row-standard .mud-table-cell:first-child,
.weight-report-grid .mud-table-body .mud-table-row.weight-row-standard .mud-table-cell:nth-child(2) {
    position: sticky !important;
    z-index: 51 !important;
}

.weight-report-grid .mud-table-body .mud-table-row.weight-row-average .mud-table-cell:first-child {
    left: 0 !important;
    background-color: #4a90e2 !important;
}

.weight-report-grid .mud-table-body .mud-table-row.weight-row-average .mud-table-cell:nth-child(2) {
    left: 50px !important;
    background-color: #4a90e2 !important;
}

.weight-report-grid .mud-table-body .mud-table-row.weight-row-standard .mud-table-cell:first-child {
    left: 0 !important;
    background-color: #e74c3c !important;
}

.weight-report-grid .mud-table-body .mud-table-row.weight-row-standard .mud-table-cell:nth-child(2) {
    left: 50px !important;
    background-color: #e74c3c !important;
}

/* استایل برای ردیف میانگین فارم - استفاده از selector قوی‌تر */
.weight-report-grid ::deep .mud-table-body .mud-table-row.weight-row-average,
.weight-report-grid .mud-table-body .mud-table-row.weight-row-average {
    background-color: #4a90e2 !important;
}

.weight-report-grid ::deep .mud-table-body .mud-table-row.weight-row-average:hover,
.weight-report-grid .mud-table-body .mud-table-row.weight-row-average:hover {
    background-color: #4a90e2 !important;
}

.weight-report-grid ::deep .mud-table-body .mud-table-row.weight-row-average .mud-table-cell,
.weight-report-grid .mud-table-body .mud-table-row.weight-row-average .mud-table-cell {
    background-color: #4a90e2 !important;
    color: #ffffff !important;
}

.weight-report-grid ::deep .mud-table-body .mud-table-row.weight-row-average:hover .mud-table-cell,
.weight-report-grid .mud-table-body .mud-table-row.weight-row-average:hover .mud-table-cell {
    background-color: #4a90e2 !important;
    color: #ffffff !important;
}

/* استایل برای ردیف درصد استاندارد - استفاده از selector قوی‌تر */
.weight-report-grid ::deep .mud-table-body .mud-table-row.weight-row-standard,
.weight-report-grid .mud-table-body .mud-table-row.weight-row-standard {
    background-color: #e74c3c !important;
}

.weight-report-grid ::deep .mud-table-body .mud-table-row.weight-row-standard:hover,
.weight-report-grid .mud-table-body .mud-table-row.weight-row-standard:hover {
    background-color: #e74c3c !important;
}

.weight-report-grid ::deep .mud-table-body .mud-table-row.weight-row-standard .mud-table-cell,
.weight-report-grid .mud-table-body .mud-table-row.weight-row-standard .mud-table-cell {
    background-color: #e74c3c !important;
    color: #ffffff !important;
}

.weight-report-grid ::deep .mud-table-body .mud-table-row.weight-row-standard:hover .mud-table-cell,
.weight-report-grid .mud-table-body .mud-table-row.weight-row-standard:hover .mud-table-cell {
    background-color: #e74c3c !important;
    color: #ffffff !important;
}

/* CSS قوی‌تر برای اطمینان از اعمال رنگ - استفاده از attribute selector */
.weight-report-grid [class*="weight-row-average"],
.weight-report-grid ::deep [class*="weight-row-average"] {
    background-color: #4a90e2 !important;
}

.weight-report-grid [class*="weight-row-average"] .mud-table-cell,
.weight-report-grid ::deep [class*="weight-row-average"] .mud-table-cell {
    background-color: #4a90e2 !important;
    color: #ffffff !important;
}

.weight-report-grid [class*="weight-row-standard"],
.weight-report-grid ::deep [class*="weight-row-standard"] {
    background-color: #e74c3c !important;
}

.weight-report-grid [class*="weight-row-standard"] .mud-table-cell,
.weight-report-grid ::deep [class*="weight-row-standard"] .mud-table-cell {
    background-color: #e74c3c !important;
    color: #ffffff !important;
}

/* استایل برای ردیف‌های میانگین و استاندارد */
.weight-report-grid .mud-table-row:nth-last-child(2),
.weight-report-grid .mud-table-row:last-child {
    border-top: 3px solid rgba(0, 0, 0, 0.1) !important;
}

/* بهبود ظاهر کلی */
/* افزایش padding و spacing برای ستون‌ها - override CSS قبلی */
.weight-report-grid ::deep .mud-table-cell {
    padding: 0 !important;
    font-size: 0.9rem !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell {
    padding: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    background: var(--theme-gradient-primary) !important;
    background-color: var(--theme-primary) !important;
}

/* رنگ متن سفید برای هدر جدول - override theme */
.weight-report-grid.white-header-text .mud-table-head .mud-table-cell,
.weight-report-grid .white-header-text.mud-table-head .mud-table-cell,
.weight-report-grid .mud-table-head .white-header-text.mud-table-cell,
.weight-report-grid.white-header-text ::deep .mud-table-head .mud-table-cell,
.weight-report-grid ::deep .white-header-text.mud-table-head .mud-table-cell,
.weight-report-grid ::deep .mud-table-head .white-header-text.mud-table-cell {
    color: #ffffff !important;
}

/* اطمینان از اعمال رنگ سفید در تمام حالات - override theme */
.weight-report-grid.white-header-text ::deep .mud-table-head th,
.weight-report-grid.white-header-text ::deep .mud-table-head .mud-table-cell,
.weight-report-grid.white-header-text ::deep .mud-table-head .mud-table-cell *,
.weight-report-grid.white-header-text ::deep .mud-table-head .mud-table-cell span,
.weight-report-grid.white-header-text ::deep .mud-table-head .mud-table-cell div,
.weight-report-grid.white-header-text ::deep .mud-table-head .mud-table-cell strong {
    color: #ffffff !important;
}

/* Override theme colors برای هدرهای رنگی */
.weight-report-grid ::deep .mud-table-head .mud-table-cell[style*="color: white"],
.weight-report-grid ::deep .mud-table-head .mud-table-cell[style*="color: #ffffff"],
.weight-report-grid ::deep .mud-table-head .mud-table-cell[style*="color:white"] {
    color: #ffffff !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell[style*="color: white"] *,
.weight-report-grid ::deep .mud-table-head .mud-table-cell[style*="color: #ffffff"] *,
.weight-report-grid ::deep .mud-table-head .mud-table-cell[style*="color:white"] * {
    color: #ffffff !important;
}

/* افزایش فاصله بین ستون‌ها */
.weight-report-grid ::deep .mud-table {
    border-collapse: separate !important;
    border-spacing: 0 0px !important;
}

.weight-report-grid ::deep .mud-table-cell {
    border-left: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.weight-report-grid ::deep .mud-table-cell:first-child {
    border-left: none !important;
}

/* تنظیم Width و Align برای ستون‌های خاص - استفاده از nth-child برای WeeklyProductByWeekTotWeekPeriod */
.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(1),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(1) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(2),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(2) {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(3),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(3) {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(4),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(4) {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(5),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(5) {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(6),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(6) {
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(7),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(7) {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(8),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(8) {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(9),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(9) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(10),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(10) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(11),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(11) {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(12),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(12) {
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(13),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(13) {
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px !important;
    text-align: center !important;
}

.weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(14),
.weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(14) {
    width: 170px !important;
    min-width: 170px !important;
    max-width: 170px !important;
    text-align: center !important;
}

/* اطمینان از اعمال رنگ سفید در HeaderTemplate - override theme */
.weight-report-grid ::deep .col-header-cell {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 14px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.weight-report-grid ::deep .col-header-cell strong {
    color: inherit !important;
}

.weight-report-grid ::deep .col-header-cell[style*="color: #ffffff"] strong,
.weight-report-grid ::deep .col-header-cell[style*="color:#ffffff"] strong,
.weight-report-grid ::deep .col-header-cell[style*="color: white"] strong,
.weight-report-grid ::deep .col-header-cell[style*="color:white"] strong {
    color: #ffffff !important;
}

/* اطمینان از اعمال رنگ هدر ستون‌های هفته */
.weight-report-grid .mud-table-head .mud-table-cell {
    padding: 0 !important;
}

.weight-report-grid ::deep .mud-table-head {
    padding: 0 !important;
    margin: 0 !important;
}

.weight-report-grid ::deep .mud-table-head th {
    padding: 0 !important;
    margin: 0 !important;
}

.weight-report-grid .mud-table-head .mud-table-cell .week-header-cell {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    min-height: 48px !important;
}

/* استایل برای موبایل - جلوگیری از شکستن جدول */
@media (max-width: 960px) {
    .weight-report-grid {
        width: 100% !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

        /* اجبار MudDataGrid به نمایش table mode */
        .weight-report-grid ::deep .mud-data-grid {
            display: block !important;
            width: 100% !important;
        }

        .weight-report-grid ::deep .mud-table-container {
            display: block !important;
            overflow-x: auto !important;
            overflow-y: auto !important;
            width: 100% !important;
            -webkit-overflow-scrolling: touch;
        }

        .weight-report-grid ::deep .mud-table-wrapper {
            display: block !important;
            overflow-x: auto !important;
            overflow-y: auto !important;
            width: 100% !important;
            -webkit-overflow-scrolling: touch;
        }

        .weight-report-grid ::deep .mud-table {
            display: table !important;
            width: 100% !important;
            min-width: max-content !important;
            table-layout: auto !important;
            border-collapse: separate !important;
            border-spacing: 0 !important;
        }

        .weight-report-grid ::deep .mud-table-head {
            display: table-header-group !important;
            position: sticky !important;
            top: 0 !important;
            z-index: 10 !important;
            background-color: var(--mud-palette-background) !important;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
            padding: 0 !important;
            margin: 0 !important;
        }

    .mud-theme-dark .weight-report-grid ::deep .mud-table-head {
        background-color: var(--mud-palette-background) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    }

    .weight-report-grid ::deep .mud-table-head th,
    .weight-report-grid ::deep .mud-table-head .mud-table-cell {
        position: sticky !important;
        top: 0 !important;
        z-index: 11 !important;
        background-color: inherit !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .weight-report-grid ::deep .mud-table-body {
        display: table-row-group !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .weight-report-grid ::deep .mud-table-row {
        display: table-row !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .weight-report-grid ::deep .mud-table-cell {
        display: table-cell !important;
        white-space: nowrap !important;
        padding: 0 !important;
    }

    /* حفظ عرض ستون‌ها در موبایل */
    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(1),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(1) {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(2),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(2) {
        width: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(3),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(3) {
        width: 120px !important;
        min-width: 120px !important;
        max-width: 120px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(4),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(4) {
        width: 110px !important;
        min-width: 110px !important;
        max-width: 110px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(5),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(5) {
        width: 120px !important;
        min-width: 120px !important;
        max-width: 120px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(6),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(6) {
        width: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(7),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(7) {
        width: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(8),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(8) {
        width: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(9),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(9) {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(10),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(10) {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(11),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(11) {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(12),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(12) {
        width: 160px !important;
        min-width: 160px !important;
        max-width: 160px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(13),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(13) {
        width: 160px !important;
        min-width: 160px !important;
        max-width: 160px !important;
    }

    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(14),
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell:nth-child(14) {
        width: 170px !important;
        min-width: 170px !important;
        max-width: 170px !important;
    }

    /* حفظ sticky header در موبایل */
    .weight-report-grid ::deep .mud-table-head {
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
    }

    /* حفظ sticky column در موبایل */
    .weight-report-grid ::deep .mud-table-cell[style*="sticky"],
    .weight-report-grid ::deep .mud-table-cell[class*="sticky"] {
        position: sticky !important;
        z-index: 9 !important;
    }

    /* جلوگیری از card mode در موبایل */
    .weight-report-grid ::deep .mud-data-grid-row-group {
        display: none !important;
    }

    .weight-report-grid ::deep .mud-data-grid-row-group-header {
        display: none !important;
    }

    /* اطمینان از اینکه هیچ card mode فعال نیست */
    .weight-report-grid ::deep [class*="card"] {
        display: none !important;
    }

    /* Sticky column for salon name in WeeklyProductReportByAgeWeek and WeeklyProductReportByAgeDate */
    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(1).sticky-salon-name,
    .weight-report-grid ::deep .mud-table-head .mud-table-cell:nth-child(2).sticky-salon-name,
    .weight-report-grid ::deep .mud-table-body .mud-table-row .mud-table-cell.sticky-salon-name,
    .weight-report-grid ::deep .mud-table-footer .mud-table-cell.sticky-salon-name,
    .weight-report-grid ::deep .sticky-salon-name {
        position: sticky !important;
        right: 0 !important;
        padding: 0 0px!important;
        z-index: 8 !important;
        background-color: var(--mud-palette-background) !important;
        box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1) !important;
    }

    /* Ensure footer sticky column has correct background */
    .weight-report-grid ::deep .mud-table-footer .mud-table-cell.sticky-salon-name {
        background-color: #424242 !important;
        padding: 0 !important;
    }

    .mud-theme-dark .weight-report-grid ::deep .mud-table-footer .mud-table-cell.sticky-salon-name {
        background-color: #616161 !important;
        padding: 0 !important;
    }

    /* Footer row styling for dark theme compatibility */
    .weight-report-grid ::deep .mud-table-footer .mud-table-cell {
        background-color: #424242 !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        padding: 0 !important;
    }

    /* Dark theme footer */
    .mud-theme-dark .weight-report-grid ::deep .mud-table-footer .mud-table-cell {
        background-color: #616161 !important;
        color: #ffffff !important;
        padding: 0 !important;
    }

    /* Light theme footer */
    .mud-theme-light .weight-report-grid ::deep .mud-table-footer .mud-table-cell {
        background-color: #424242 !important;
        color: #ffffff !important;
        padding: 0 !important;
    }

    /* اطمینان از نمایش صحیح footer در موبایل */
    .weight-report-grid ::deep .mud-table-foot {
        display: table-footer-group !important;
        padding: 0 !important;
    }

        .weight-report-grid ::deep .mud-table-foot .mud-table-cell {
            display: table-cell !important;
            white-space: nowrap !important;
            padding: 0 !important;
            font-weight: 600 !important;
        }

    /* MudDataGrid Footer Styling */
    .weight-report-grid ::deep .mud-data-grid-footer {
        padding: 0 !important;
        margin: 0 !important;
    }

    .weight-report-grid ::deep .mud-data-grid-footer .mud-table-cell,
    .weight-report-grid ::deep .mud-data-grid-footer .mud-table-cell > div {
        background-color: #424242 !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .mud-theme-dark .weight-report-grid ::deep .mud-data-grid-footer .mud-table-cell,
    .mud-theme-dark .weight-report-grid ::deep .mud-data-grid-footer .mud-table-cell > div {
        background-color: #616161 !important;
        color: #ffffff !important;
    }

    /* MudDataGrid Sticky Column */
    .weight-report-grid ::deep .mud-data-grid .mud-table-head .mud-table-cell.sticky-salon-name,
    .weight-report-grid ::deep .mud-data-grid .mud-table-body .mud-table-row .mud-table-cell.sticky-salon-name,
    .weight-report-grid ::deep .mud-data-grid .mud-data-grid-footer .mud-table-cell.sticky-salon-name {
        position: sticky !important;
        right: 0 !important;
        z-index: 8 !important;
        background-color: var(--mud-palette-background) !important;
        box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1) !important;
    }

    .weight-report-grid ::deep .mud-data-grid .mud-data-grid-footer .mud-table-cell.sticky-salon-name {
        background-color: #424242 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .mud-theme-dark .weight-report-grid ::deep .mud-data-grid .mud-data-grid-footer .mud-table-cell.sticky-salon-name {
        background-color: #616161 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Footer styling for nested MudTable in ChildRowContent */
    .weight-report-grid ::deep .mud-table .mud-table-footer .mud-table-cell {
        background-color: #424242 !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .mud-theme-dark .weight-report-grid ::deep .mud-table .mud-table-footer .mud-table-cell {
        background-color: #616161 !important;
        color: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
    }

/* ========================================
   کپی کامل weight-report-grid با نام general-grid-class
   ======================================== */


      
 

   
 

    /* ========================================
       استایل‌های جدول استانداردها (ViewStandardsPage)
       ======================================== */

    /* Container برای جدول استانداردها */
    .standards-table-container {
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        position: relative !important;
    }

    /* جدول استانداردها با اسکرول - فقط یک اسکرول افقی */
    .standards-table {
        flex: 1 !important;
        overflow: hidden !important;
        position: relative !important;
    }

        /* Container داخلی MudDataGrid - فقط اینجا اسکرول */
        .standards-table ::deep .mud-table-container {
            overflow-y: auto !important;
            overflow-x: auto !important;
            height: calc(100vh - 200px) !important;
            max-height: calc(100vh - 200px) !important;
            -webkit-overflow-scrolling: touch !important;
            position: relative !important;
        }

        /* حذف اسکرول از wrapper */
        .standards-table ::deep .mud-table-wrapper {
            overflow: visible !important;
        }

        /* حذف اسکرول از data-grid */
        .standards-table ::deep .mud-data-grid {
            overflow: visible !important;
        }

        /* هدرهای sticky - تقویت شده */
        .standards-table ::deep .mud-table-head {
            position: sticky !important;
            top: 0 !important;
            z-index: 10 !important;
            background-color: var(--mud-palette-background) !important;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        }

    /* هدرهای sticky در تم مشکی */
    .mud-theme-dark .standards-table ::deep .mud-table-head {
        background-color: var(--mud-palette-background) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    }

    /* اطمینان از sticky بودن هدرها */
    .standards-table ::deep .mud-table-head th {
        position: sticky !important;
        top: 0 !important;
        z-index: 11 !important;
        background-color: inherit !important;
    }

    /* حذف اسکرول از data-grid-root */
    .standards-table ::deep .mud-data-grid-root {
        overflow: visible !important;
    }

    /* Container برای صفحه استانداردها - جلوگیری از اسکرول کل صفحه */
    .standards-page-container {
        height: 100vh !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
    }

    /* هدر صفحه - ثابت */
    .standards-page-header {
        flex-shrink: 0 !important;
    }

    /* اطلاعات نسخه - ثابت */
    .standards-page-info {
        flex-shrink: 0 !important;
    }

    /* Container جدول - اسکرول در اینجا */
    .standards-page-table-container {
        flex: 1 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* استایل MudDataGrid برای ViewStandardsPage */
    .standards-data-grid {
        flex: 1 !important;
        min-height: 0 !important;
        overflow: hidden !important;
        position: relative;
        display: block !important;
    }

        .standards-data-grid ::deep .mud-data-grid {
            height: 100% !important;
            display: block !important;
            overflow: hidden !important;
            position: relative !important;
        }

        .standards-data-grid ::deep .mud-data-grid-root {
            height: 100% !important;
            display: flex !important;
            flex-direction: column !important;
            overflow: hidden !important;
        }

        .standards-data-grid ::deep .mud-table-container {
            flex: 1 !important;
            min-height: 0 !important;
            height: 100% !important;
            max-height: 100% !important;
            overflow-y: auto !important;
            overflow-x: auto !important;
            position: relative !important;
            -webkit-overflow-scrolling: touch !important;
        }

        .standards-data-grid ::deep .mud-table-wrapper {
            height: auto !important;
            overflow: visible !important;
            position: relative;
        }

        /* هدرهای sticky برای standards-data-grid */
        .standards-data-grid ::deep .mud-table-head {
            position: sticky !important;
            top: 0 !important;
            z-index: 10 !important;
            background-color: var(--mud-palette-background) !important;
            color: var(--mud-palette-background) !important;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        }

    .mud-theme-dark .standards-data-grid ::deep .mud-table-head {
        background-color: var(--mud-palette-background) !important;
        color: var(--mud-palette-background) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    }

    .mud-theme-dark .standards-data-grid .mud-table-head {
        background-color: var(--mud-palette-background) !important;
        color: var(--mud-palette-background) !important;
    }

    .standards-data-grid ::deep .mud-table-head th,
    .standards-data-grid ::deep .mud-table-head .mud-table-cell {
        position: sticky !important;
        top: 0 !important;
        z-index: 11 !important;
        background-color: inherit !important;
        padding: 6px 2px !important;
        font-size: 0.7rem !important;
    }


    .standards-data-grid ::deep .mud-table-cell {
        padding: 2px !important;
        font-size: 0.7rem !important;
    }

    /* تنظیم عرض ستون‌ها برای جدول استانداردها */
    .standards-data-grid ::deep .mud-table-head th:nth-child(1),
    .standards-data-grid ::deep .mud-table-body td:nth-child(1) {
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
    }

    .standards-data-grid ::deep .mud-table-head th:nth-child(2),
    .standards-data-grid ::deep .mud-table-body td:nth-child(2) {
        width: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
    }

    .standards-data-grid ::deep .mud-table-head th:nth-child(n+3),
    .standards-data-grid ::deep .mud-table-body td:nth-child(n+3) {
        width: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
    }

    /* استایل‌های standards-page-container - بدون media query برای نمایش یکسان در موبایل و دسکتاپ */
    .standards-page-container {
        height: 100vh !important;
        overflow: hidden !important;
    }

    .standards-page-table-container {
        flex: 1 !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .standards-data-grid {
        flex: 1 !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .standards-data-grid ::deep .mud-data-grid {
        display: block !important;
        width: 100% !important;
        overflow: hidden !important;
        height: 100% !important;
    }

    .standards-data-grid ::deep .mud-table-container {
        display: block !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        -webkit-overflow-scrolling: touch !important;
        position: relative !important;
    }

    .standards-data-grid ::deep .mud-table-body {
        display: table-row-group !important;
        height: auto !important;
    }

    .standards-data-grid ::deep .mud-table-container .mud-table-head {
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
        background-color: var(--mud-palette-background) !important;
    }

    .standards-data-grid ::deep .mud-table-container .mud-table-head th,
    .standards-data-grid ::deep .mud-table-container .mud-table-head .mud-table-cell {
        position: sticky !important;
        top: 0 !important;
        z-index: 11 !important;
        background-color: inherit !important;
    }

    /* استایل MudDataGrid برای PerformanceStandardsVersions */
    .versions-data-grid ::deep .mud-table-head th,
    .versions-data-grid ::deep .mud-table-head .mud-table-cell {
        background-color: #795548 !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        padding: 14px 16px !important;
    }

    .versions-data-grid ::deep .mud-table-head th *,
    .versions-data-grid ::deep .mud-table-head .mud-table-cell * {
        color: #ffffff !important;
    }

    /* استایل auto-size-input برای input های استانداردها */
    .auto-size-input {
        width: auto !important;
        min-width: 1ch !important;
        max-width: 6ch !important;
        padding: 2px 4px !important;
        font-size: 13px !important;
        box-sizing: content-box !important;
    }

    /* استایل input های قابل ویرایش - تم روشن */
    input.standards-input:not(:disabled):not(.disabled-week) {
        background-color: #f5f5f5 !important;
        border: 1.5px solid #1976d2 !important;
        box-shadow: 0 0 0 0.5px rgba(25, 118, 210, 0.1) !important;
        transition: all 0.2s ease !important;
    }

    input.standards-input:not(:disabled):not(.disabled-week):hover {
        background-color: #eeeeee !important;
        border-color: #1565c0 !important;
        box-shadow: 0 0 0 1px rgba(25, 118, 210, 0.2) !important;
    }

    input.standards-input:not(:disabled):not(.disabled-week):focus {
        background-color: #ffffff !important;
        border-color: #1976d2 !important;
        box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.3) !important;
        outline: none !important;
    }

    /* استایل input های تم تاریک */
    .mud-theme-dark input.standards-input:not(:disabled):not(.disabled-week),
    .mud-theme-dark input[type="number"].standards-input:not(:disabled):not(.disabled-week),
    html[data-theme="dark"] input.standards-input:not(:disabled):not(.disabled-week),
    html[data-theme="dark"] input[type="number"].standards-input:not(:disabled):not(.disabled-week),
    body.mud-theme-dark input.standards-input:not(:disabled):not(.disabled-week),
    body.mud-theme-dark input[type="number"].standards-input:not(:disabled):not(.disabled-week),
    [data-theme="dark"] input.standards-input:not(:disabled):not(.disabled-week),
    [data-theme="dark"] input[type="number"].standards-input:not(:disabled):not(.disabled-week) {
        background-color: #2d2d2d !important;
        color: rgba(255, 255, 255, 0.87) !important;
        border: 1.5px solid #64b5f6 !important;
        box-shadow: 0 0 0 0.5px rgba(100, 181, 246, 0.2) !important;
    }

    .mud-theme-dark input.standards-input:not(:disabled):not(.disabled-week):hover,
    html[data-theme="dark"] input.standards-input:not(:disabled):not(.disabled-week):hover,
    body.mud-theme-dark input.standards-input:not(:disabled):not(.disabled-week):hover,
    [data-theme="dark"] input.standards-input:not(:disabled):not(.disabled-week):hover {
        background-color: #3d3d3d !important;
        border-color: #90caf9 !important;
        box-shadow: 0 0 0 1px rgba(100, 181, 246, 0.3) !important;
    }

    .mud-theme-dark input.standards-input:not(:disabled):not(.disabled-week):focus,
    html[data-theme="dark"] input.standards-input:not(:disabled):not(.disabled-week):focus,
    body.mud-theme-dark input.standards-input:not(:disabled):not(.disabled-week):focus,
    [data-theme="dark"] input.standards-input:not(:disabled):not(.disabled-week):focus {
        background-color: #1e1e1e !important;
        color: rgba(255, 255, 255, 0.87) !important;
        border-color: #64b5f6 !important;
        box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.4) !important;
        outline: none !important;
    }

    /* استایل input های استانداردها */
    .standards-input {
        width: 100%;
        font-size: 0.875rem;
        font-family: 'IRANSans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

    .standards-input:focus {
        outline: none;
        border-color: var(--mud-palette-primary) !important;
        box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), 0.2) !important;
    }

    .standards-input:disabled {
        cursor: not-allowed;
        opacity: 0.6;
    }

    .mud-theme-dark .standards-input {
        background-color: var(--mud-palette-background);
        color: var(--mud-palette-text-primary);
        border-color: rgba(255, 255, 255, 0.12);
    }

    .mud-theme-dark .standards-input:focus {
        border-color: var(--mud-palette-primary) !important;
        box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), 0.3) !important;
    }

    .mud-theme-dark .standards-input:disabled {
        background-color: rgba(0, 0, 0, 0.2);
        color: rgba(255, 255, 255, 0.38);
    }

    /* استایل input های جدول استانداردها - تم روشن */
    .standards-input {
        width: 60px !important;
        max-width: 60px !important;
        padding: 1px 2px !important;
        border: 1px solid rgba(0, 0, 0, 0.23) !important;
        border-radius: 3px !important;
        -moz-appearance: textfield !important;
        font-size: 0.7rem !important;
        font-family: 'IRANSans', sans-serif !important;
        text-align: center !important;
        background-color: #ffffff !important;
        color: rgba(0, 0, 0, 0.87) !important;
        transition: all 0.2s ease !important;
    }

    /* استایل input های در تم تاریک - با specificity بالا */
    .mud-theme-dark .standards-input,
    .mud-theme-dark input.standards-input {
        background-color: #1e1e1e !important;
        color: rgba(255, 255, 255, 0.87) !important;
        border-color: rgba(255, 255, 255, 0.23) !important;
    }

    .mud-theme-dark .standards-input:not(:disabled):not(.disabled-week),
    .mud-theme-dark input.standards-input:not(:disabled):not(.disabled-week) {
        background-color: #1e1e1e !important;
        color: rgba(255, 255, 255, 0.87) !important;
        border-color: rgba(255, 255, 255, 0.23) !important;
    }

    .standards-input::-webkit-outer-spin-button,
    .standards-input::-webkit-inner-spin-button {
        -webkit-appearance: none !important;
        margin: 0 !important;
    }

    .standards-input:focus {
        outline: none !important;
        border-color: var(--mud-palette-primary) !important;
        box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), 0.2) !important;
    }

    /* استایل focus در تم تاریک */
    .mud-theme-dark .standards-input:focus,
    .mud-theme-dark input.standards-input:focus {
        background-color: #1e1e1e !important;
        color: rgba(255, 255, 255, 0.87) !important;
        border-color: var(--mud-palette-primary) !important;
        box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), 0.3) !important;
    }

    /* استایل input های disable شده در تم روشن */
    .standards-input:disabled {
        background-color: #f5f5f5 !important;
        color: #999 !important;
        cursor: not-allowed !important;
        opacity: 0.7 !important;
    }

    /* استایل input های در تم تاریک - با specificity بالاتر */
    .mud-theme-dark input.standards-input,
    .mud-theme-dark .standards-input {
        background-color: #1e1e1e !important;
        color: rgba(255, 255, 255, 0.87) !important;
        border-color: rgba(255, 255, 255, 0.23) !important;
    }

    .mud-theme-dark input.standards-input:not(:disabled):not(.disabled-week),
    .mud-theme-dark .standards-input:not(:disabled):not(.disabled-week) {
        background-color: #1e1e1e !important;
        color: rgba(255, 255, 255, 0.87) !important;
        border-color: rgba(255, 255, 255, 0.23) !important;
    }

    /* استایل input های disable شده در تم روشن */
    .standards-input.disabled-week {
        background-color: rgba(0, 0, 0, 0.05) !important;
        color: rgba(0, 0, 0, 0.38) !important;
    }

    /* استایل input های disable شده در تم تاریک */
    .mud-theme-dark .standards-input.disabled-week {
        background-color: rgba(255, 255, 255, 0.08) !important;
        color: rgba(255, 255, 255, 0.6) !important;
        border-color: rgba(255, 255, 255, 0.12) !important;
    }

    /* استایل input های disable شده در تم مشکی - سفید و زیبا */
    .mud-theme-dark .standards-input:disabled {
        background-color: rgba(255, 255, 255, 0.08) !important;
        color: rgba(255, 255, 255, 0.6) !important;
        border-color: rgba(255, 255, 255, 0.12) !important;
        cursor: not-allowed !important;
        opacity: 1 !important;
    }

    /* استایل MudTextField های disable شده در تم مشکی - سفید و زیبا */
    .mud-theme-dark .standards-textfield.mud-input-root.mud-input-disabled .mud-input-control,
    .mud-theme-dark .standards-textfield.mud-input-root.mud-input-disabled .mud-input-control input,
    .mud-theme-dark .standards-textfield.mud-input-root.mud-input-disabled .mud-input-control textarea {
        background-color: rgba(255, 255, 255, 0.08) !important;
        color: rgba(255, 255, 255, 0.6) !important;
        -webkit-text-fill-color: rgba(255, 255, 255, 0.6) !important;
    }

    .mud-theme-dark .standards-textfield.mud-input-root.mud-input-disabled .mud-input-outlined {
        border-color: rgba(255, 255, 255, 0.12) !important;
    }

    .mud-theme-dark .standards-textfield.mud-input-root.mud-input-disabled .mud-input-label {
        color: rgba(255, 255, 255, 0.5) !important;
    }

    /* استایل input های فعال در تم مشکی */
    .mud-theme-dark input.standards-input:not(:disabled),
    .mud-theme-dark .standards-input:not(:disabled) {
        background-color: #1e1e1e !important;
        color: rgba(255, 255, 255, 0.87) !important;
        border-color: rgba(255, 255, 255, 0.23) !important;
    }

    .mud-theme-dark input.standards-input:not(:disabled):focus,
    .mud-theme-dark .standards-input:not(:disabled):focus {
        background-color: #1e1e1e !important;
        border-color: var(--mud-palette-primary) !important;
        color: rgba(255, 255, 255, 0.87) !important;
    }

    /* بهبود اسکرول بار در تم مشکی */
    .mud-theme-dark .standards-table ::deep .mud-table-container::-webkit-scrollbar {
        width: 8px !important;
        height: 8px !important;
    }

    .mud-theme-dark .standards-table ::deep .mud-table-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 4px !important;
    }

    .mud-theme-dark .standards-table ::deep .mud-table-container::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2) !important;
        border-radius: 4px !important;
    }

    .mud-theme-dark .standards-table ::deep .mud-table-container::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3) !important;
    }

    /* استایل نهایی برای input های تم تاریک - با بالاترین specificity */
    .mud-theme-dark input[type="number"].standards-input,
    .mud-theme-dark input.standards-input.iransans {
        background-color: #1e1e1e !important;
        color: rgba(255, 255, 255, 0.87) !important;
        border-color: rgba(255, 255, 255, 0.23) !important;
    }

    .mud-theme-dark input[type="number"].standards-input:not(:disabled):not(.disabled-week),
    .mud-theme-dark input.standards-input.iransans:not(:disabled):not(.disabled-week) {
        background-color: #1e1e1e !important;
        color: rgba(255, 255, 255, 0.87) !important;
        border-color: rgba(255, 255, 255, 0.23) !important;
    }
}

/* ========================================
   Period Weekly Mortality Grid Styles
   ======================================== */

.period-weekly-mortality-grid {
    height: calc(100vh - 500px) !important;
    min-height: 400px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    overflow-x: auto;
}

.period-weekly-mortality-grid ::deep .mud-table-container {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: auto !important;
    position: relative;
}

.period-weekly-mortality-grid ::deep .mud-table-wrapper {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: auto !important;
    position: relative;
}

.period-weekly-mortality-grid ::deep .mud-data-grid-root {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: auto !important;
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.period-weekly-mortality-grid ::deep .mud-table-head {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--mud-palette-background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mud-theme-dark .period-weekly-mortality-grid ::deep .mud-table-head {
    background: var(--mud-palette-background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.period-weekly-mortality-grid ::deep .mud-table-head th,
.period-weekly-mortality-grid ::deep .mud-table-head .mud-table-cell {
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
    font-size: 0.875rem !important;
    white-space: nowrap;
}

.period-weekly-mortality-grid ::deep .mud-table-body td,
.period-weekly-mortality-grid ::deep .mud-table-body .mud-table-cell {
    padding: 4px 8px !important;
    text-align: center !important;
    vertical-align: middle !important;
    font-size: 0.875rem !important;
}

@media screen {
    .period-weekly-mortality-grid ::deep .mud-data-grid-footer {
        position: sticky;
        bottom: 0;
        z-index: 10;
        background: var(--mud-palette-surface) !important;
        box-shadow: 0 -2px 4px color-mix(in srgb, var(--mud-palette-text-primary) 8%, transparent);
        display: table-footer-group !important;
    }

    .period-weekly-mortality-grid ::deep .mud-data-grid-footer tr {
        display: table-row !important;
        background: var(--mud-palette-surface) !important;
    }

    .period-weekly-mortality-grid ::deep .mud-data-grid-footer td,
    .period-weekly-mortality-grid ::deep .mud-data-grid-footer .mud-table-cell {
        display: table-cell !important;
        padding: 8px 12px !important;
        border-top: 2px solid var(--mud-palette-table-lines, var(--mud-palette-divider));
        text-align: center;
        background: color-mix(in srgb, var(--mud-palette-error) 6%, var(--mud-palette-surface)) !important;
        color: var(--mud-palette-text-primary) !important;
        font-weight: 600;
    }

    .period-weekly-mortality-grid ::deep .mud-data-grid-footer .mud-typography,
    .period-weekly-mortality-grid ::deep .mud-data-grid-footer .pwm-footer-num {
        color: var(--mud-palette-text-primary) !important;
    }

    html[data-theme="dark"] .period-weekly-mortality-grid ::deep .mud-data-grid-footer,
    .mud-theme-dark .period-weekly-mortality-grid ::deep .mud-data-grid-footer {
        background: var(--mud-palette-surface) !important;
        box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
    }

    html[data-theme="dark"] .period-weekly-mortality-grid ::deep .mud-data-grid-footer tr,
    .mud-theme-dark .period-weekly-mortality-grid ::deep .mud-data-grid-footer tr {
        background: var(--mud-palette-surface) !important;
    }

    html[data-theme="dark"] .period-weekly-mortality-grid ::deep .mud-data-grid-footer td,
    html[data-theme="dark"] .period-weekly-mortality-grid ::deep .mud-data-grid-footer .mud-table-cell,
    .mud-theme-dark .period-weekly-mortality-grid ::deep .mud-data-grid-footer td,
    .mud-theme-dark .period-weekly-mortality-grid ::deep .mud-data-grid-footer .mud-table-cell {
        background: color-mix(in srgb, var(--mud-palette-error) 8%, var(--mud-palette-surface)) !important;
        color: var(--mud-palette-text-primary) !important;
    }
}

.period-weekly-mortality-grid ::deep .mud-table-row:hover {
    background-color: var(--mud-palette-action-hover) !important;
}

/* Mobile Display */
@media (max-width: 960px) {
    .period-weekly-mortality-grid {
        height: calc(100vh - 550px) !important;
    }

    .period-weekly-mortality-grid ::deep .mud-data-grid {
        display: block !important;
        width: 100% !important;
    }

    .period-weekly-mortality-grid ::deep .mud-table-container {
        display: block !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    .period-weekly-mortality-grid ::deep .mud-table-wrapper {
        display: block !important;
        overflow-x: auto !important;
        overflow-y: auto !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    .period-weekly-mortality-grid ::deep .mud-table {
        display: table !important;
        width: 100% !important;
        min-width: max-content !important;
        table-layout: auto !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    .period-weekly-mortality-grid ::deep .mud-table-head {
        display: table-header-group !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
        background-color: var(--mud-palette-background) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }

    .mud-theme-dark .period-weekly-mortality-grid ::deep .mud-table-head {
        background-color: var(--mud-palette-background) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    }

    .period-weekly-mortality-grid ::deep .mud-table-head th,
    .period-weekly-mortality-grid ::deep .mud-table-head .mud-table-cell {
        position: sticky !important;
        top: 0 !important;
        z-index: 11 !important;
        background-color: inherit !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 0.75rem !important;
    }

    .period-weekly-mortality-grid ::deep .mud-table-body {
        display: table-row-group !important;
    }

    .period-weekly-mortality-grid ::deep .mud-table-row {
        display: table-row !important;
    }

    .period-weekly-mortality-grid ::deep .mud-table-cell {
        display: table-cell !important;
        white-space: nowrap !important;
        padding: 4px 6px !important;
        font-size: 0.75rem !important;
    }

    .period-weekly-mortality-grid ::deep .mud-data-grid-row-group {
        display: none !important;
    }

    .period-weekly-mortality-grid ::deep [class*="card"] {
        display: none !important;
    }
}

/* Chart Dialog Print Styles */
.chart-header-print {
    display: none;
}

@media print {
    .chart-header-print {
        display: block !important;
    }

    .mud-dialog-actions,
    .mud-dialog-title .mud-icon-button {
        display: none !important;
    }
}

/* دستیار هوش مصنوعی — تمام‌صفحه موبایل و نوار ورودی ثابت */
@media (max-width: 768px) {
    .ai-dialog-backdrop .mud-dialog-container {
        align-items: stretch !important;
        padding: 0 !important;
        max-height: 100dvh !important;
    }

    .ai-dialog-backdrop .mud-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .ai-dialog-backdrop .mud-dialog-content {
        padding: 0 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
    }
}

