/* =============================================================================
   داشبورد Home — طراحی جدید
   ============================================================================= */

.home-page-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
    position: relative;
}

.home-page-wrapper::before {
    content: "";
    position: fixed;
    inset: 56px 0 auto 0;
    height: 360px;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 82% 12%, rgba(14, 165, 233, 0.16), transparent 34%),
        radial-gradient(circle at 12% 8%, rgba(124, 58, 237, 0.12), transparent 30%);
    filter: blur(2px);
}

.home-initial-loading {
    min-height: 52vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ps-surface, #f1f5f9);
    border-radius: var(--ps-radius-lg, 16px);
    margin: 0.5rem 0 1rem;
}

.home-initial-loading-hint {
    color: #64748b;
    font-size: 0.9rem;
}

.home-hero {
    background:
        linear-gradient(135deg, rgba(14, 116, 144, 0.98) 0%, rgba(37, 99, 235, 0.96) 44%, rgba(91, 33, 182, 0.94) 100%);
    border-radius: 18px;
    padding: clamp(0.72rem, 1.45vw, 1.05rem);
    color: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.11), transparent 42%),
        radial-gradient(circle at 12% 18%, rgba(255,255,255,0.2), transparent 42%);
    pointer-events: none;
    z-index: -1;
}

.home-hero-orb {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.75;
    filter: blur(1px);
}

.home-hero-orb--one {
    width: 150px;
    height: 150px;
    inset: -62px auto auto -44px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.26), transparent 66%);
}

.home-hero-orb--two {
    width: 190px;
    height: 190px;
    inset: auto -72px -118px auto;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.24), transparent 68%);
}

.home-hero-content {
    position: relative;
    z-index: 2;
}

.home-hero .mud-typography,
.home-hero .mud-icon-root {
    color: #fff !important;
}

.home-hero-title-block {
    min-width: min(100%, 320px);
}

.home-hero-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 20px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(12px);
}

.home-hero-icon .mud-icon-root {
    font-size: 1.45rem !important;
}

.home-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.68rem;
    font-weight: 700;
}

.home-hero-title {
    letter-spacing: -0.02em;
    line-height: 1.25 !important;
    font-size: clamp(1.15rem, 2vw, 1.55rem) !important;
}

.home-hero-subtitle {
    opacity: 0.92;
    font-size: 0.82rem;
}

.home-hero-actions {
    justify-content: flex-end;
}

.home-hero-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.home-hero-metric {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "icon label"
        "icon value";
    align-items: center;
    column-gap: 0.62rem;
    min-height: 70px;
    padding: 0.75rem 0.85rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.home-hero-metric .mud-icon-root {
    grid-area: icon;
    width: 38px;
    height: 38px;
    padding: 0.45rem;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.15);
}

.home-hero-metric span {
    grid-area: label;
    font-size: 0.72rem;
    opacity: 0.78;
}

.home-hero-metric strong {
    grid-area: value;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(0.88rem, 1.5vw, 1.05rem);
    font-weight: 900;
}

.home-filter-bar {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.78));
    border: 1px solid rgba(37, 99, 235, 0.13);
    border-radius: 20px;
    padding: 1rem 1.05rem 1.1rem;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
    margin-top: -0.2rem;
}

[data-theme="dark"] .home-filter-bar {
    background:
        linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.86));
    border-color: rgba(96, 165, 250, 0.18);
}

.home-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.home-filter-head .mud-icon-root {
    color: var(--theme-primary, #2563eb) !important;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 14px;
    padding: 0.42rem;
    width: 38px;
    height: 38px;
}

.home-filter-title {
    color: var(--theme-text-primary);
    font-size: 0.96rem;
    font-weight: 900;
}

.home-filter-subtitle {
    color: var(--theme-text-secondary);
    font-size: 0.76rem;
    margin-top: 0.1rem;
}

.home-selection-grid .mud-input-control {
    margin-top: 0 !important;
}

.home-kpi-bar {
    padding: 0.8rem;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 20px;
    background: linear-gradient(145deg, var(--ps-surface, #fff), rgba(248, 250, 252, 0.82));
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .home-kpi-bar {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.88));
    border-color: rgba(96, 165, 250, 0.14);
}

.home-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
    gap: 0.55rem;
}

.home-kpi-tile {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    text-align: right;
    padding: 0.72rem 0.78rem;
    border-radius: 16px;
    border: 1px solid var(--ps-border);
    background: rgba(255, 255, 255, 0.74);
    min-height: 72px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.home-kpi-tile:hover {
    background: var(--mud-palette-action-default-hover, rgba(255, 255, 255, 0.92));
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
}

[data-theme="dark"] .home-kpi-tile {
    background: rgba(30, 41, 59, 0.82);
    border-color: rgba(148, 163, 184, 0.16);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .home-kpi-tile:hover {
    background: rgba(51, 65, 85, 0.88);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.home-kpi-tile__body {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
    flex: 1;
}

.home-kpi-tile .mud-icon-root {
    font-size: 1.55rem !important;
    margin: 0;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    padding: 0.45rem;
    border-radius: 14px;
    background: color-mix(in srgb, currentColor 12%, transparent);
}

.home-kpi-label {
    font-family: 'IRANSans', sans-serif;
    font-size: 0.74rem;
    line-height: 1.25;
    color: var(--theme-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* override ui-enhancements (--ps-num-size-xl) — اعداد KPI خوانا و درشت */
.home-kpi-bar .home-kpi-value {
    font-family: 'IRANSans', sans-serif;
    font-size: clamp(0.95rem, 1.8vw, 1.2rem) !important;
    line-height: 1.2;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums;
    color: var(--theme-primary) !important;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    direction: ltr;
    text-align: right;
    width: 100%;
    letter-spacing: -0.01em;
}

[data-theme="dark"] .home-kpi-bar .home-kpi-value {
    color: var(--theme-primary-light, #64b5f6) !important;
}

.home-kpi-bar .home-kpi-value--date {
    font-size: clamp(0.88rem, 1.5vw, 1.05rem) !important;
    font-weight: 700 !important;
}

.home-kpi-tile--hen { border-right: 3px solid #16a34a; }
.home-kpi-tile--hen .mud-icon-root { color: #16a34a !important; }

.home-kpi-tile--rooster { border-right: 3px solid #2563eb; }
.home-kpi-tile--rooster .mud-icon-root { color: #2563eb !important; }

.home-kpi-tile--egg { border-right: 3px solid #ea580c; }
.home-kpi-tile--egg .mud-icon-root { color: #ea580c !important; }

.home-kpi-tile--mort { border-right: 3px solid #dc2626; }
.home-kpi-tile--mort .mud-icon-root { color: #dc2626 !important; }

.home-kpi-tile--feed { border-right: 3px solid #7c3aed; }
.home-kpi-tile--feed .mud-icon-root { color: #7c3aed !important; }

.home-kpi-tile--status { border-right: 3px solid #0d9488; }
.home-kpi-tile--status .mud-icon-root { color: #0d9488 !important; }

.home-kpi-tile--hatch-sent { border-right: 3px solid #0284c7; }
.home-kpi-tile--hatch-sent .mud-icon-root { color: #0284c7 !important; }

.home-kpi-tile--hatch-chick { border-right: 3px solid #059669; }
.home-kpi-tile--hatch-chick .mud-icon-root { color: #059669 !important; }

.home-kpi-tile--hatch-rate { border-right: 3px solid #d97706; }
.home-kpi-tile--hatch-rate .mud-icon-root { color: #d97706 !important; }

.home-kpi-tile--hatch-sarane { border-right: 3px solid #7c3aed; }
.home-kpi-tile--hatch-sarane .mud-icon-root { color: #7c3aed !important; }

.home-hatchery-card {
    overflow: hidden;
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius-lg, 12px);
}

.home-hatchery-card > .theme-card-header {
    border-radius: var(--ps-radius-lg, 12px) var(--ps-radius-lg, 12px) 0 0;
}

.home-hatchery-header {
    padding: 0.5rem 0.75rem;
}

.home-hatchery-chip {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    max-width: 100%;
}

.home-hatchery-body {
    padding: 0.85rem;
    border-radius: 0 0 var(--ps-radius-lg, 12px) var(--ps-radius-lg, 12px);
}

.home-hatchery-section {
    height: 100%;
    border: 1px solid var(--ps-border);
    border-radius: 10px;
    padding: 0.75rem;
    background: var(--ps-surface);
}

.home-hatchery-section-title {
    display: block;
    margin-bottom: 0.65rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed var(--ps-border);
    color: var(--theme-text-primary);
}

.home-hatchery-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.home-hatchery-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-family: 'IRANSans', sans-serif;
    font-size: 0.78rem;
}

.home-hatchery-metric-label {
    color: var(--theme-text-secondary);
    white-space: nowrap;
}

.home-hatchery-metric-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--theme-text-primary);
    text-align: left;
}

.home-hatchery-metric-value.success { color: #059669; }
.home-hatchery-metric-value.warn { color: #dc2626; }
.home-hatchery-metric-value.accent { color: var(--theme-primary, #2563eb); }

.home-hatchery-pipeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.home-hatchery-pipeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.55rem 0.35rem;
    border-radius: 8px;
    border: 1px solid var(--ps-border);
    font-family: 'IRANSans', sans-serif;
    font-size: 0.72rem;
    text-align: center;
    color: var(--theme-text-primary);
}

.home-hatchery-pipeline-item strong {
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    color: var(--theme-text-primary);
}

.home-hatchery-pipeline-item.cold { background: rgba(2, 132, 199, 0.08); }
.home-hatchery-pipeline-item.setter { background: rgba(217, 119, 6, 0.08); }
.home-hatchery-pipeline-item.hatcher { background: rgba(5, 150, 105, 0.08); }

@media (max-width: 600px) {
    .home-hatchery-pipeline {
        grid-template-columns: 1fr;
    }
}

.home-summary-card {
    border-radius: var(--ps-radius-lg) !important;
    border: 1px solid var(--ps-border) !important;
    overflow: hidden;
    padding: 0 !important;
}

.home-summary-header {
    background: var(--theme-gradient-primary);
    padding: 0.75rem 1rem;
    color: #fff;
}

.home-page-wrapper .home-summary-header .mud-typography,
.home-page-wrapper .home-summary-header .mud-icon-root,
.home-page-wrapper .home-summary-header .mud-icon,
.home-page-wrapper .home-summary-header .mud-svg-icon,
.home-summary-header .mud-typography,
.home-summary-header .mud-icon-root,
.home-summary-header .mud-icon,
.home-summary-header .mud-svg-icon {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    fill: currentColor !important;
}

.home-summary-body {
    padding: 0.75rem;
}

.home-status-chip.mud-chip {
    font-weight: 700 !important;
    min-height: 40px !important;
    border-radius: 999px !important;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
    padding: 0 1rem !important;
}

.home-status-chip.mud-chip .mud-chip-content {
    font-family: 'IRANSans', sans-serif;
    font-size: 0.875rem;
}

.home-hatching-link.mud-button-root {
    background: #fff !important;
    color: var(--theme-primary-dark, #1d4ed8) !important;
    border: 2px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22);
    font-weight: 700 !important;
    border-radius: 12px !important;
    min-height: 42px;
    padding-inline: 1.1rem !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.home-hatching-link.mud-button-root:hover {
    background: #eff6ff !important;
    color: var(--theme-primary-dark, #1e40af) !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.28);
    transform: translateY(-1px);
}

.home-hatching-link .mud-icon-root,
.home-hatching-link .mud-button-label {
    color: var(--theme-primary-dark, #1d4ed8) !important;
}

.home-hatching-link .mud-icon-root {
    color: #ea580c !important;
}

[data-theme="dark"] .home-hatching-link.mud-button-root {
    background: rgba(255, 255, 255, 0.96) !important;
    color: var(--theme-primary-dark, #1e3a8a) !important;
    border-color: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="dark"] .home-hatching-link.mud-button-root:hover {
    background: #fff !important;
}

.home-cost-link.mud-button-root {
    background: #fff !important;
    color: #92400e !important;
    border: 2px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22);
    font-weight: 700 !important;
    border-radius: 12px !important;
    min-height: 42px;
    padding-inline: 1.1rem !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.home-cost-link.mud-button-root:hover {
    background: #fffbeb !important;
    color: #78350f !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.28);
    transform: translateY(-1px);
}

.home-cost-link .mud-icon-root,
.home-cost-link .mud-button-label {
    color: #92400e !important;
}

.home-cost-link .mud-icon-root {
    color: #d97706 !important;
}

[data-theme="dark"] .home-cost-link.mud-button-root {
    background: rgba(255, 255, 255, 0.96) !important;
    color: #78350f !important;
    border-color: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="dark"] .home-cost-link.mud-button-root:hover {
    background: #fff !important;
}

.home-manager-link.mud-button-root {
    background: #fff !important;
    color: #5b21b6 !important;
    border: 2px solid rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22);
    font-weight: 700 !important;
    border-radius: 12px !important;
    min-height: 42px;
    padding-inline: 1.1rem !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.home-manager-link.mud-button-root:hover {
    background: #f5f3ff !important;
    color: #4c1d95 !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.28);
    transform: translateY(-1px);
}

.home-manager-link .mud-icon-root,
.home-manager-link .mud-button-label {
    color: #5b21b6 !important;
}

.home-manager-link .mud-icon-root {
    color: #7c3aed !important;
}

[data-theme="dark"] .home-manager-link.mud-button-root {
    background: rgba(255, 255, 255, 0.96) !important;
    color: #4c1d95 !important;
    border-color: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="dark"] .home-manager-link.mud-button-root:hover {
    background: #fff !important;
}

/* ─── دسترسی سریع ─────────────────────────────────────────────────────────── */
.home-shortcuts-bar {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.07) 0%, rgba(124, 58, 237, 0.05) 48%, var(--ps-surface, #fff) 100%);
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 18px;
    padding: 0.85rem 0.9rem 0.95rem;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}

.home-shortcuts-bar::before {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 70%);
    inset: -120px auto auto -72px;
    pointer-events: none;
}

[data-theme="dark"] .home-shortcuts-bar {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.06) 45%, var(--ps-surface, #1a2332) 100%);
    border-color: rgba(96, 165, 250, 0.18);
}

.home-shortcuts-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    position: relative;
    z-index: 1;
}

.home-shortcuts-header__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.home-shortcuts-header__icon .mud-icon-root {
    font-size: 1.3rem !important;
}

.home-shortcuts-title {
    font-size: 0.94rem !important;
    font-weight: 800 !important;
    line-height: 1.3;
    color: var(--theme-text-primary) !important;
}

.home-shortcuts-hint {
    font-size: 0.72rem !important;
    color: var(--theme-text-secondary) !important;
    margin-top: 2px;
}

.home-shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 96px);
    gap: 0.35rem;
    justify-content: start;
    position: relative;
    z-index: 1;
}

.home-shortcut-item {
    --shortcut-accent: var(--theme-primary, #2563eb);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    width: 96px;
    height: 96px;
    aspect-ratio: 1 / 1;
    padding: 0.4rem 0.25rem;
    box-sizing: border-box;
    border: 1px solid color-mix(in srgb, var(--shortcut-accent) 22%, var(--ps-border));
    border-radius: 12px;
    background: linear-gradient(
        165deg,
        color-mix(in srgb, var(--shortcut-accent) 11%, var(--ps-surface)) 0%,
        var(--ps-surface) 58%
    );
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    isolation: isolate;
}

.home-shortcut-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--shortcut-accent), color-mix(in srgb, var(--shortcut-accent) 55%, #fff));
    opacity: 0.85;
}

.home-shortcut-item:hover,
.home-shortcut-item:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px color-mix(in srgb, var(--shortcut-accent) 28%, transparent);
    outline: none;
    border-color: color-mix(in srgb, var(--shortcut-accent) 45%, transparent);
}

.home-shortcut-item:active {
    transform: translateY(-1px);
}

.home-shortcut-item--blocked,
.home-report-card--blocked {
    opacity: 0.45;
    cursor: not-allowed;
}

.home-shortcut-item--blocked:hover,
.home-report-card--blocked:hover {
    transform: none;
    box-shadow: none;
}

.home-shortcut-icon-wrap {
    position: relative;
    z-index: 1;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--shortcut-icon-bg, linear-gradient(145deg, #e0e7ff, #f8fafc));
    box-shadow: 0 3px 8px var(--shortcut-shadow, rgba(37, 99, 235, 0.18));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.home-shortcut-item:hover .home-shortcut-icon-wrap {
    transform: scale(1.06);
}

.home-shortcut-icon.mud-icon-root {
    font-size: 1.35rem !important;
    color: var(--shortcut-accent) !important;
}

.home-shortcut-label {
    position: relative;
    z-index: 1;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: var(--theme-text-primary);
    padding: 0 2px;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .home-shortcut-item {
    background: linear-gradient(
        165deg,
        color-mix(in srgb, var(--shortcut-accent) 18%, var(--ps-surface, #1a2332)) 0%,
        var(--ps-surface, #1a2332) 62%
    );
}

/* رنگ هر میانبر */
.home-shortcut--mort { --shortcut-accent: #dc2626; --shortcut-icon-bg: linear-gradient(145deg, #fecaca, #fff1f2); --shortcut-shadow: rgba(220, 38, 38, 0.28); }
.home-shortcut--feed { --shortcut-accent: #7c3aed; --shortcut-icon-bg: linear-gradient(145deg, #ddd6fe, #f5f3ff); --shortcut-shadow: rgba(124, 58, 237, 0.28); }
.home-shortcut--weight { --shortcut-accent: #2563eb; --shortcut-icon-bg: linear-gradient(145deg, #bfdbfe, #eff6ff); --shortcut-shadow: rgba(37, 99, 235, 0.28); }
.home-shortcut--production { --shortcut-accent: #ea580c; --shortcut-icon-bg: linear-gradient(145deg, #fed7aa, #fff7ed); --shortcut-shadow: rgba(234, 88, 12, 0.28); }
.home-shortcut--tasks { --shortcut-accent: #1565c0; --shortcut-icon-bg: linear-gradient(145deg, #93c5fd, #eff6ff); --shortcut-shadow: rgba(21, 101, 192, 0.28); }
.home-shortcut--events { --shortcut-accent: #9333ea; --shortcut-icon-bg: linear-gradient(145deg, #e9d5ff, #faf5ff); --shortcut-shadow: rgba(147, 51, 234, 0.28); }
.home-shortcut--vaccine { --shortcut-accent: #0891b2; --shortcut-icon-bg: linear-gradient(145deg, #a5f3fc, #ecfeff); --shortcut-shadow: rgba(8, 145, 178, 0.28); }
.home-shortcut--drug { --shortcut-accent: #db2777; --shortcut-icon-bg: linear-gradient(145deg, #fbcfe8, #fdf2f8); --shortcut-shadow: rgba(219, 39, 119, 0.28); }
.home-shortcut--vitamin { --shortcut-accent: #65a30d; --shortcut-icon-bg: linear-gradient(145deg, #bef264, #f7fee7); --shortcut-shadow: rgba(101, 163, 13, 0.28); }
.home-shortcut--wh-in { --shortcut-accent: #16a34a; --shortcut-icon-bg: linear-gradient(145deg, #86efac, #f0fdf4); --shortcut-shadow: rgba(22, 163, 74, 0.28); }
.home-shortcut--wh-out { --shortcut-accent: #ca8a04; --shortcut-icon-bg: linear-gradient(145deg, #fde047, #fefce8); --shortcut-shadow: rgba(202, 138, 4, 0.28); }
.home-shortcut--wh-tx { --shortcut-accent: #0d9488; --shortcut-icon-bg: linear-gradient(145deg, #5eead4, #f0fdfa); --shortcut-shadow: rgba(13, 148, 136, 0.28); }
.home-shortcut--wh-inv { --shortcut-accent: #4f46e5; --shortcut-icon-bg: linear-gradient(145deg, #c7d2fe, #eef2ff); --shortcut-shadow: rgba(79, 70, 229, 0.28); }
.home-shortcut--egg-wh { --shortcut-accent: #c2410c; --shortcut-icon-bg: linear-gradient(145deg, #fdba74, #fff7ed); --shortcut-shadow: rgba(194, 65, 12, 0.28); }
.home-shortcut--egg-ship { --shortcut-accent: #2e7d32; --shortcut-icon-bg: linear-gradient(145deg, #86efac, #e8f5e9); --shortcut-shadow: rgba(46, 125, 50, 0.28); }

[data-theme="dark"] .home-shortcut--mort { --shortcut-icon-bg: linear-gradient(145deg, rgba(220, 38, 38, 0.42), rgba(220, 38, 38, 0.12)); }
[data-theme="dark"] .home-shortcut--feed { --shortcut-icon-bg: linear-gradient(145deg, rgba(124, 58, 237, 0.42), rgba(124, 58, 237, 0.12)); }
[data-theme="dark"] .home-shortcut--weight { --shortcut-icon-bg: linear-gradient(145deg, rgba(37, 99, 235, 0.42), rgba(37, 99, 235, 0.12)); }
[data-theme="dark"] .home-shortcut--production { --shortcut-icon-bg: linear-gradient(145deg, rgba(234, 88, 12, 0.42), rgba(234, 88, 12, 0.12)); }
[data-theme="dark"] .home-shortcut--tasks { --shortcut-icon-bg: linear-gradient(145deg, rgba(21, 101, 192, 0.42), rgba(21, 101, 192, 0.12)); }
[data-theme="dark"] .home-shortcut--events { --shortcut-icon-bg: linear-gradient(145deg, rgba(147, 51, 234, 0.42), rgba(147, 51, 234, 0.12)); }
[data-theme="dark"] .home-shortcut--vaccine { --shortcut-icon-bg: linear-gradient(145deg, rgba(8, 145, 178, 0.42), rgba(8, 145, 178, 0.12)); }
[data-theme="dark"] .home-shortcut--drug { --shortcut-icon-bg: linear-gradient(145deg, rgba(219, 39, 119, 0.42), rgba(219, 39, 119, 0.12)); }
[data-theme="dark"] .home-shortcut--vitamin { --shortcut-icon-bg: linear-gradient(145deg, rgba(101, 163, 13, 0.42), rgba(101, 163, 13, 0.12)); }
[data-theme="dark"] .home-shortcut--wh-in { --shortcut-icon-bg: linear-gradient(145deg, rgba(22, 163, 74, 0.42), rgba(22, 163, 74, 0.12)); }
[data-theme="dark"] .home-shortcut--wh-out { --shortcut-icon-bg: linear-gradient(145deg, rgba(202, 138, 4, 0.42), rgba(202, 138, 4, 0.12)); }
[data-theme="dark"] .home-shortcut--wh-tx { --shortcut-icon-bg: linear-gradient(145deg, rgba(13, 148, 136, 0.42), rgba(13, 148, 136, 0.12)); }
[data-theme="dark"] .home-shortcut--wh-inv { --shortcut-icon-bg: linear-gradient(145deg, rgba(79, 70, 229, 0.42), rgba(79, 70, 229, 0.12)); }
[data-theme="dark"] .home-shortcut--egg-wh { --shortcut-icon-bg: linear-gradient(145deg, rgba(194, 65, 12, 0.42), rgba(194, 65, 12, 0.12)); }
[data-theme="dark"] .home-shortcut--egg-ship { --shortcut-icon-bg: linear-gradient(145deg, rgba(46, 125, 50, 0.42), rgba(46, 125, 50, 0.12)); }

/* ─── گزارش‌های پرکاربرد ─────────────────────────────────────────────────── */
.home-reports-bar {
    margin-top: 0.85rem;
    background: linear-gradient(145deg, rgba(21, 101, 192, 0.08) 0%, rgba(46, 125, 50, 0.055) 55%, var(--ps-surface, #fff) 100%);
    border: 1px solid rgba(21, 101, 192, 0.16);
    border-radius: 22px;
    padding: 1.05rem 1.1rem 1.15rem;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: visible;
}

[data-theme="dark"] .home-reports-bar {
    background: linear-gradient(145deg, rgba(100, 181, 246, 0.1) 0%, rgba(129, 199, 132, 0.06) 50%, var(--ps-surface, #1a2332) 100%);
    border-color: rgba(100, 181, 246, 0.22);
}

.home-reports-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.home-reports-header__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1565c0, #2563eb);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.32);
}

.home-reports-header__icon .mud-icon-root {
    font-size: 1.3rem !important;
}

.home-reports-title {
    font-size: 0.94rem !important;
    font-weight: 800 !important;
    line-height: 1.3;
    color: var(--theme-text-primary) !important;
}

.home-reports-subtitle {
    font-size: 0.72rem !important;
    color: var(--theme-text-secondary) !important;
    margin-top: 2px;
}

.home-reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
    gap: 0.6rem;
}

.home-report-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.65rem;
}

.home-report-group-menu-wrap {
    width: 100%;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.home-report-group-menu-wrap.mud-menu-open {
    z-index: 20;
}

.home-report-group-menu-wrap .mud-menu-activator {
    width: 100%;
    display: block;
}

.home-report-group {
    --report-accent: var(--theme-primary, #2563eb);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.8rem 0.75rem;
    min-height: 84px;
    border: 1px solid color-mix(in srgb, var(--report-accent) 24%, var(--ps-border));
    border-radius: 16px;
    background: linear-gradient(
        128deg,
        color-mix(in srgb, var(--report-accent) 12%, var(--ps-surface)) 0%,
        var(--ps-surface) 58%
    );
    cursor: pointer;
    text-align: right;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    isolation: isolate;
}

.home-report-group::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--report-accent), color-mix(in srgb, var(--report-accent) 50%, #fff));
    border-radius: 0 16px 16px 0;
}

[data-theme="dark"] .home-report-group {
    background: linear-gradient(
        128deg,
        color-mix(in srgb, var(--report-accent) 18%, var(--ps-surface, #1a2332)) 0%,
        var(--ps-surface, #1a2332) 58%
    );
}

.home-report-group:hover,
.home-report-group:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px color-mix(in srgb, var(--report-accent) 26%, transparent);
    outline: none;
    border-color: color-mix(in srgb, var(--report-accent) 42%, transparent);
}

.home-report-group__icon-wrap {
    position: relative;
    z-index: 1;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--report-icon-bg, linear-gradient(145deg, #dbeafe, #eff6ff));
    box-shadow: 0 4px 12px var(--report-shadow, rgba(37, 99, 235, 0.2));
    transition: transform 0.2s ease;
}

.home-report-group:hover .home-report-group__icon-wrap {
    transform: scale(1.05);
}

.home-report-group__icon.mud-icon-root {
    font-size: 1.5rem !important;
    color: var(--report-accent) !important;
}

.home-report-group__body {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.home-report-group__title {
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--theme-text-primary);
}

.home-report-group__hint {
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--theme-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-report-group__count {
    display: inline-block;
    align-self: flex-start;
    margin-top: 0.15rem;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.18rem 0.42rem;
    border-radius: 6px;
    color: var(--report-accent);
    background: color-mix(in srgb, var(--report-accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--report-accent) 22%, transparent);
}

.home-report-group__chevron {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    font-size: 1.35rem !important;
    color: var(--report-accent) !important;
    opacity: 0.75;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.home-report-group:hover .home-report-group__chevron {
    opacity: 1;
    transform: translateY(2px);
}

.home-report-group--daily { --report-accent: #2563eb; --report-icon-bg: linear-gradient(145deg, #bfdbfe, #eff6ff); --report-shadow: rgba(37, 99, 235, 0.28); }
.home-report-group--hatch { --report-accent: #0891b2; --report-icon-bg: linear-gradient(145deg, #a5f3fc, #ecfeff); --report-shadow: rgba(8, 145, 178, 0.28); }
.home-report-group--weekly-product { --report-accent: #ea580c; --report-icon-bg: linear-gradient(145deg, #fed7aa, #fff7ed); --report-shadow: rgba(234, 88, 12, 0.28); }
.home-report-group--spi { --report-accent: #1565c0; --report-icon-bg: linear-gradient(145deg, #90caf9, #e3f2fd); --report-shadow: rgba(21, 101, 192, 0.28); }
.home-report-group--salon { --report-accent: #00695c; --report-icon-bg: linear-gradient(145deg, #b2dfdb, #e0f2f1); --report-shadow: rgba(0, 105, 92, 0.28); }
.home-report-group--analytics { --report-accent: #7c3aed; --report-icon-bg: linear-gradient(145deg, #ddd6fe, #f5f3ff); --report-shadow: rgba(124, 58, 237, 0.28); }
.home-report-group--farm { --report-accent: #2e7d32; --report-icon-bg: linear-gradient(145deg, #a5d6a7, #e8f5e9); --report-shadow: rgba(46, 125, 50, 0.28); }

[data-theme="dark"] .home-report-group--daily { --report-icon-bg: linear-gradient(145deg, rgba(37, 99, 235, 0.42), rgba(37, 99, 235, 0.12)); }
[data-theme="dark"] .home-report-group--hatch { --report-icon-bg: linear-gradient(145deg, rgba(8, 145, 178, 0.42), rgba(8, 145, 178, 0.12)); }
[data-theme="dark"] .home-report-group--weekly-product { --report-icon-bg: linear-gradient(145deg, rgba(234, 88, 12, 0.42), rgba(234, 88, 12, 0.12)); }
[data-theme="dark"] .home-report-group--spi { --report-icon-bg: linear-gradient(145deg, rgba(21, 101, 192, 0.42), rgba(21, 101, 192, 0.12)); }
[data-theme="dark"] .home-report-group--salon { --report-icon-bg: linear-gradient(145deg, rgba(0, 105, 92, 0.42), rgba(0, 105, 92, 0.12)); }
[data-theme="dark"] .home-report-group--analytics { --report-icon-bg: linear-gradient(145deg, rgba(124, 58, 237, 0.42), rgba(124, 58, 237, 0.12)); }
[data-theme="dark"] .home-report-group--farm { --report-icon-bg: linear-gradient(145deg, rgba(46, 125, 50, 0.42), rgba(46, 125, 50, 0.12)); }

.home-report-group-popover {
    border-radius: 14px !important;
    border: 1px solid rgba(21, 101, 192, 0.14) !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16) !important;
    overflow: hidden;
    min-width: min(360px, 94vw) !important;
    padding: 0.5rem !important;
    font-family: 'IRANSans', Tahoma, sans-serif !important;
}

[data-theme="dark"] .home-report-group-popover {
    border-color: rgba(100, 181, 246, 0.2) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45) !important;
}

.home-report-group-popover .mud-list-item,
.home-report-menu-item-wrap {
    --report-accent: var(--theme-primary, #2563eb);
    padding: 0 !important;
    margin: 0.2rem 0 !important;
    min-height: auto !important;
    border-radius: 12px !important;
}

.home-report-menu-item-wrap:hover {
    background: color-mix(in srgb, var(--report-accent) 8%, transparent) !important;
}

.home-report-menu-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.7rem 0.65rem;
    text-align: right;
}

.home-report-menu-item--blocked {
    opacity: 0.45;
}

.home-report-menu-item__icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--report-icon-bg, linear-gradient(145deg, #dbeafe, #eff6ff));
    box-shadow: 0 2px 8px var(--report-shadow, rgba(37, 99, 235, 0.16));
}

.home-report-menu-item__icon .mud-icon-root {
    color: var(--report-accent) !important;
    font-size: 1.35rem !important;
}

.home-report-menu-item__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.home-report-menu-item__title {
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.45;
    color: var(--theme-text-primary);
    letter-spacing: -0.01em;
}

.home-report-menu-item__badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--report-accent);
    line-height: 1.35;
}

.home-report-menu-item__arrow {
    flex-shrink: 0;
    opacity: 0.4;
    color: var(--report-accent) !important;
    font-size: 1.25rem !important;
}

.home-report-menu-item-wrap:hover .home-report-menu-item__arrow {
    opacity: 0.85;
}

.home-report-card {
    --report-accent: var(--theme-primary, #2563eb);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.7rem 0.7rem 0.65rem;
    min-height: 72px;
    max-width: 100%;
    border: 1px solid color-mix(in srgb, var(--report-accent) 22%, var(--ps-border));
    border-radius: 14px;
    background: linear-gradient(
        118deg,
        color-mix(in srgb, var(--report-accent) 10%, var(--ps-surface)) 0%,
        var(--ps-surface) 52%
    );
    cursor: pointer;
    text-align: right;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    isolation: isolate;
}

.home-report-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--report-accent), color-mix(in srgb, var(--report-accent) 50%, #fff));
    border-radius: 0 14px 14px 0;
}

[data-theme="dark"] .home-report-card {
    background: linear-gradient(
        118deg,
        color-mix(in srgb, var(--report-accent) 16%, var(--ps-surface, #1a2332)) 0%,
        var(--ps-surface, #1a2332) 55%
    );
}

.home-report-card:hover,
.home-report-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px color-mix(in srgb, var(--report-accent) 26%, transparent);
    outline: none;
    border-color: color-mix(in srgb, var(--report-accent) 42%, transparent);
}

.home-report-card:active {
    transform: translateY(-1px);
}

.home-report-card__icon-wrap {
    position: relative;
    z-index: 1;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--report-icon-bg, linear-gradient(145deg, #dbeafe, #eff6ff));
    box-shadow: 0 4px 12px var(--report-shadow, rgba(37, 99, 235, 0.2));
    transition: transform 0.2s ease;
}

.home-report-card:hover .home-report-card__icon-wrap {
    transform: scale(1.05);
}

.home-report-card__icon.mud-icon-root {
    font-size: 1.45rem !important;
    color: var(--report-accent) !important;
}

.home-report-card__body {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.home-report-card__title {
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--theme-text-primary);
}

.home-report-card__badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    color: var(--report-accent);
    background: color-mix(in srgb, var(--report-accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--report-accent) 22%, transparent);
}

.home-report-card__arrow {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    opacity: 0.4;
    font-size: 1.15rem !important;
    color: var(--report-accent) !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.home-report-card:hover .home-report-card__arrow {
    opacity: 1;
    transform: translateX(-4px);
}

.home-report-card--weekly-product { --report-accent: #ea580c; --report-icon-bg: linear-gradient(145deg, #fed7aa, #fff7ed); --report-shadow: rgba(234, 88, 12, 0.28); }
.home-report-card--weekly-hatch { --report-accent: #0891b2; --report-icon-bg: linear-gradient(145deg, #a5f3fc, #ecfeff); --report-shadow: rgba(8, 145, 178, 0.28); }
.home-report-card--daily-hatch-set { --report-accent: #0e7490; --report-icon-bg: linear-gradient(145deg, #67e8f9, #ecfeff); --report-shadow: rgba(14, 116, 144, 0.28); }
.home-report-card--compare { --report-accent: #7c3aed; --report-icon-bg: linear-gradient(145deg, #ddd6fe, #f5f3ff); --report-shadow: rgba(124, 58, 237, 0.28); }
.home-report-card--daily-breed { --report-accent: #2563eb; --report-icon-bg: linear-gradient(145deg, #bfdbfe, #eff6ff); --report-shadow: rgba(37, 99, 235, 0.28); }
.home-report-card--daily-product { --report-accent: #c2410c; --report-icon-bg: linear-gradient(145deg, #fdba74, #fff7ed); --report-shadow: rgba(194, 65, 12, 0.28); }
.home-report-card--feed-sarane { --report-accent: #65a30d; --report-icon-bg: linear-gradient(145deg, #bef264, #f7fee7); --report-shadow: rgba(101, 163, 13, 0.28); }
.home-report-card--salon-pct { --report-accent: #db2777; --report-icon-bg: linear-gradient(145deg, #fbcfe8, #fdf2f8); --report-shadow: rgba(219, 39, 119, 0.28); }
.home-report-card--spi-week { --report-accent: #1565c0; --report-icon-bg: linear-gradient(145deg, #90caf9, #e3f2fd); --report-shadow: rgba(21, 101, 192, 0.28); }
.home-report-card--spi-bydate { --report-accent: #0d9488; --report-icon-bg: linear-gradient(145deg, #99f6e4, #f0fdfa); --report-shadow: rgba(13, 148, 136, 0.28); }
.home-report-card--weekly-weight { --report-accent: #0284c7; --report-icon-bg: linear-gradient(145deg, #7dd3fc, #f0f9ff); --report-shadow: rgba(2, 132, 199, 0.28); }
.home-report-card--bird-summary { --report-accent: #c62828; --report-icon-bg: linear-gradient(145deg, #fecaca, #fef2f2); --report-shadow: rgba(198, 40, 40, 0.28); }
.home-report-card--salon-tech { --report-accent: #00695c; --report-icon-bg: linear-gradient(145deg, #b2dfdb, #e0f2f1); --report-shadow: rgba(0, 105, 92, 0.28); }
.home-report-card--salon-matrix { --report-accent: #5e35b1; --report-icon-bg: linear-gradient(145deg, #d1c4e9, #ede7f6); --report-shadow: rgba(94, 53, 177, 0.28); }

[data-theme="dark"] .home-report-card--weekly-product { --report-icon-bg: linear-gradient(145deg, rgba(234, 88, 12, 0.42), rgba(234, 88, 12, 0.12)); }
[data-theme="dark"] .home-report-card--weekly-hatch { --report-icon-bg: linear-gradient(145deg, rgba(8, 145, 178, 0.42), rgba(8, 145, 178, 0.12)); }
[data-theme="dark"] .home-report-card--daily-hatch-set { --report-icon-bg: linear-gradient(145deg, rgba(14, 116, 144, 0.42), rgba(14, 116, 144, 0.12)); }
[data-theme="dark"] .home-report-card--compare { --report-icon-bg: linear-gradient(145deg, rgba(124, 58, 237, 0.42), rgba(124, 58, 237, 0.12)); }
[data-theme="dark"] .home-report-card--daily-breed { --report-icon-bg: linear-gradient(145deg, rgba(37, 99, 235, 0.42), rgba(37, 99, 235, 0.12)); }
[data-theme="dark"] .home-report-card--daily-product { --report-icon-bg: linear-gradient(145deg, rgba(194, 65, 12, 0.42), rgba(194, 65, 12, 0.12)); }
[data-theme="dark"] .home-report-card--feed-sarane { --report-icon-bg: linear-gradient(145deg, rgba(101, 163, 13, 0.42), rgba(101, 163, 13, 0.12)); }
[data-theme="dark"] .home-report-card--salon-pct { --report-icon-bg: linear-gradient(145deg, rgba(219, 39, 119, 0.42), rgba(219, 39, 119, 0.12)); }
[data-theme="dark"] .home-report-card--spi-week { --report-icon-bg: linear-gradient(145deg, rgba(21, 101, 192, 0.42), rgba(21, 101, 192, 0.12)); }
[data-theme="dark"] .home-report-card--spi-bydate { --report-icon-bg: linear-gradient(145deg, rgba(13, 148, 136, 0.42), rgba(13, 148, 136, 0.12)); }
[data-theme="dark"] .home-report-card--weekly-weight { --report-icon-bg: linear-gradient(145deg, rgba(2, 132, 199, 0.42), rgba(2, 132, 199, 0.12)); }
[data-theme="dark"] .home-report-card--bird-summary { --report-icon-bg: linear-gradient(145deg, rgba(198, 40, 40, 0.42), rgba(198, 40, 40, 0.12)); }
[data-theme="dark"] .home-report-card--salon-tech { --report-icon-bg: linear-gradient(145deg, rgba(0, 105, 92, 0.42), rgba(0, 105, 92, 0.12)); }
[data-theme="dark"] .home-report-card--salon-matrix { --report-icon-bg: linear-gradient(145deg, rgba(94, 53, 177, 0.42), rgba(94, 53, 177, 0.12)); }

@media (max-width: 600px) {
    .home-hero {
        padding: 0.75rem;
        border-radius: 16px;
    }

    .home-hero-title-block {
        align-items: flex-start !important;
    }

    .home-hero-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .home-hero-title {
        font-size: 1.2rem !important;
    }

    .home-hero-actions {
        width: 100%;
        justify-content: stretch;
    }

    .home-hero-actions .mud-button-root,
    .home-hero-actions .mud-chip {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
    }

    .home-filter-head {
        align-items: flex-start;
    }

    .home-reports-grid,
    .home-report-groups-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .home-report-group {
        min-height: 78px;
        padding: 0.75rem 0.8rem;
    }

    .home-report-card {
        min-height: 72px;
        padding: 0.7rem 0.8rem;
    }

    .home-report-card__icon-wrap {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 12px;
    }

    .home-report-card__title {
        font-size: 0.76rem;
    }
}

@media (max-width: 600px) {
    .home-shortcuts-grid {
        grid-template-columns: repeat(auto-fill, 72px);
        gap: 0.25rem;
    }

    .home-shortcut-item {
        width: 72px;
        height: 72px;
        padding: 0.28rem 0.15rem;
        border-radius: 9px;
        gap: 0.2rem;
    }

    .home-shortcut-icon-wrap {
        width: 2.1rem;
        height: 2.1rem;
        border-radius: 9px;
    }

    .home-shortcut-icon.mud-icon-root {
        font-size: 1.2rem !important;
    }

    .home-shortcut-label {
        font-size: 0.58rem;
        line-height: 1.15;
    }

    .home-shortcuts-header__icon {
        width: 36px;
        height: 36px;
    }

    .home-kpi-strip {
        grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
        gap: 0.45rem;
    }

    .home-kpi-bar {
        padding: 0.5rem;
    }

    .home-kpi-tile {
        padding: 0.45rem 0.5rem;
        min-height: 56px;
    }

    .home-kpi-label {
        font-size: 0.68rem;
    }

    .home-kpi-bar .home-kpi-value {
        font-size: 1rem !important;
    }

    .home-kpi-bar .home-kpi-value--date {
        font-size: 0.92rem !important;
    }

}

@media (min-width: 601px) and (max-width: 960px) {
    .home-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ─── آمار کارت‌ها: برچسب / عدد / درصد (تم روشن و تاریک) ───────────────── */
.home-page-wrapper {
    --home-stat-label: var(--theme-text-secondary, #64748b);
    --home-stat-num: var(--theme-text-primary, #0f172a);
    --home-stat-pos: #059669;
    --home-stat-neg: #dc2626;
    --home-stat-info: #0284c7;
    --home-stat-pct: #a21caf;
    --home-stat-sarane: #0891b2;
    --home-stat-ratio: #0d9488;
    --home-stat-date: #b45309;
    --home-stat-feed: #ca8a04;
    --home-stat-accent: #4f46e5;
    --home-stat-neutral: var(--theme-text-primary, #334155);
}

[data-theme="dark"] .home-page-wrapper {
    --home-stat-label: #94a3b8;
    --home-stat-num: #e2e8f0;
    --home-stat-pos: #34d399;
    --home-stat-neg: #f87171;
    --home-stat-info: #38bdf8;
    --home-stat-pct: #e879f9;
    --home-stat-sarane: #38bdf8;
    --home-stat-ratio: #2dd4bf;
    --home-stat-date: #fbbf24;
    --home-stat-feed: #fcd34d;
    --home-stat-accent: #818cf8;
    --home-stat-neutral: #e2e8f0;
}

.home-page-wrapper .home-stat-label,
.home-page-wrapper .home-card-content .home-stat-label {
    color: var(--home-stat-label) !important;
    font-weight: 500;
}

.home-page-wrapper .home-stat-label--positive {
    color: var(--home-stat-pos) !important;
    font-weight: 600;
}

.home-page-wrapper .home-stat-label--info {
    color: var(--home-stat-info) !important;
    font-weight: 600;
}

.home-page-wrapper .home-stat-num {
    font-weight: 700 !important;
}

html body .home-page-wrapper .home-stat-num--positive,
html body .home-page-wrapper .home-card-content .mud-typography.home-stat-num--positive { color: var(--home-stat-pos) !important; }
html body .home-page-wrapper .home-stat-num--negative,
html body .home-page-wrapper .home-card-content .mud-typography.home-stat-num--negative { color: var(--home-stat-neg) !important; }
.home-page-wrapper .home-stat-num--info,
.home-page-wrapper .home-card-content .mud-typography.home-stat-num--info { color: var(--home-stat-info) !important; }
.home-page-wrapper .home-stat-num--date,
.home-page-wrapper .home-card-content .mud-typography.home-stat-num--date { color: var(--home-stat-date) !important; font-weight: 600 !important; }
.home-page-wrapper .home-stat-num--feed,
.home-page-wrapper .home-card-content .mud-typography.home-stat-num--feed { color: var(--home-stat-feed) !important; }
.home-page-wrapper .home-stat-num--accent,
.home-page-wrapper .home-card-content .mud-typography.home-stat-num--accent { color: var(--home-stat-accent) !important; }
.home-page-wrapper .home-stat-num--neutral,
.home-page-wrapper .home-card-content .mud-typography.home-stat-num--neutral { color: var(--home-stat-neutral) !important; }

/* درصد — رنگ و پس‌زمینه متمایز (اولویت بالاتر از body .mud-paper) */
html body .home-page-wrapper .home-stat-pct,
html body .home-page-wrapper .home-card-content .home-stat-pct,
html body .home-page-wrapper .home-phase-card .home-card-content .mud-typography.home-stat-pct,
html body .home-page-wrapper .home-card-content .mud-typography.home-stat-pct,
html body .home-page-wrapper .home-card-content .mud-text.home-stat-pct {
    color: var(--home-stat-pct) !important;
    font-weight: 700 !important;
    font-size: 0.9em !important;
    background: color-mix(in srgb, var(--home-stat-pct) 22%, transparent) !important;
    padding: 0 0.4rem !important;
    border-radius: 5px !important;
    letter-spacing: 0.02em;
}

/* سرانه / نسبت per-bird — آبی-فیروزه‌ای، جدا از درصد */
html body .home-page-wrapper .home-stat-sarane,
html body .home-page-wrapper .home-card-content .home-stat-sarane,
html body .home-page-wrapper .home-phase-card .home-card-content .mud-typography.home-stat-sarane,
html body .home-page-wrapper .home-card-content .mud-typography.home-stat-sarane {
    color: var(--home-stat-sarane) !important;
    font-weight: 600 !important;
    font-size: 0.88em !important;
    background: color-mix(in srgb, var(--home-stat-sarane) 16%, transparent) !important;
    padding: 0 0.35rem !important;
    border-radius: 5px !important;
}

html body .home-page-wrapper .home-stat-ratio,
html body .home-page-wrapper .home-card-content .mud-typography.home-stat-ratio,
html body .home-page-wrapper .home-phase-card .home-card-content .mud-typography.home-stat-ratio {
    color: var(--home-stat-ratio) !important;
    font-weight: 600 !important;
    background: color-mix(in srgb, var(--home-stat-ratio) 14%, transparent) !important;
    padding: 0 0.35rem !important;
    border-radius: 5px !important;
}

.home-page-wrapper .home-stat-label--positive,
.home-page-wrapper .home-card-content .mud-typography.home-stat-label--positive { color: var(--home-stat-pos) !important; font-weight: 600; }
.home-page-wrapper .home-stat-label--info,
.home-page-wrapper .home-card-content .mud-typography.home-stat-label--info { color: var(--home-stat-info) !important; font-weight: 600; }

.home-kpi-value--pct {
    color: var(--home-stat-pct) !important;
}

/* ─── کارت فاز: هدر جدا از بدنه ───────────────────────────────────────────── */
.home-page-wrapper .home-phase-card {
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--ps-surface);
    box-shadow: var(--ps-shadow-sm);
}

.home-page-wrapper .home-phase-card > .theme-card-header.home-card-header {
    display: block;
    width: 100%;
    border-radius: 0;
    margin: 0;
}

.home-page-wrapper .home-salons-table-wrap {
    padding: 0.5rem;
    background: var(--ps-surface);
}

/* جدول سالن‌ها — بدنه با متن تیره در تم روشن */
.home-page-wrapper .home-salons-table-wrap .home-salons-table {
    width: 100%;
    background: var(--ps-surface, #fff);
    color: var(--theme-text-primary, #0f172a);
}

.home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-head,
.home-page-wrapper .home-salons-table-wrap .home-salons-table__head {
    background: linear-gradient(135deg, #475569 0%, #64748b 50%, #94a3b8 100%) !important;
}

.home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-head .mud-table-cell,
.home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-head .mud-th {
    color: #fff !important;
    font-weight: 600;
}

.home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-body .mud-table-cell,
.home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-body .mud-td,
.home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-body .mud-typography,
.home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-body .mud-text {
    color: var(--theme-text-primary, #0f172a) !important;
}

.home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-body tr:nth-of-type(odd) {
    background-color: rgba(15, 23, 42, 0.03);
}

.home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-foot,
.home-page-wrapper .home-salons-table-wrap .home-salons-table__foot {
    background: rgba(71, 85, 105, 0.1) !important;
}

.home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-foot .mud-table-cell,
.home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-foot .mud-typography,
.home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-foot strong {
    color: var(--theme-text-primary, #0f172a) !important;
    font-weight: 600;
}

[data-theme="dark"] .home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-body .mud-table-cell,
[data-theme="dark"] .home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-body .mud-typography,
[data-theme="dark"] .home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-foot .mud-table-cell,
[data-theme="dark"] .home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-foot strong {
    color: var(--theme-text-primary, #f1f5f9) !important;
}

[data-theme="dark"] .home-page-wrapper .home-salons-table-wrap .home-salons-table .mud-table-body tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .home-page-wrapper .home-phase-card,
[data-theme="dark"] .home-page-wrapper .home-salons-table-wrap {
    background: var(--ps-surface, #1a2332);
}

/* ─── هدرهای رنگی کارت‌های خلاصه ─────────────────────────────────────────── */
.home-page-wrapper .home-card-header.theme-card-header,
.home-page-wrapper .home-phase-card > .home-card-header.theme-card-header {
    border-radius: 0;
}

.home-page-wrapper .home-card-header--period {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #6366f1 100%) !important;
    background-color: transparent !important;
}

.home-page-wrapper .home-card-header--hen {
    background: linear-gradient(135deg, #db2777 0%, #ec4899 50%, #f472b6 100%) !important;
    box-shadow: 0 4px 14px rgba(219, 39, 119, 0.3);
}

.home-page-wrapper .home-card-header--rooster {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.home-page-wrapper .home-card-header--rearing {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 55%, #2dd4bf 100%) !important;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.28);
}

.home-page-wrapper .home-card-header--p2 {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%) !important;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.32);
}

.home-page-wrapper .home-card-header--molting {
    background: linear-gradient(135deg, #7e22ce 0%, #a855f7 55%, #c084fc 100%) !important;
    box-shadow: 0 4px 14px rgba(126, 34, 206, 0.3);
}

.home-page-wrapper .home-card-header--p4 {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 50%, #4ade80 100%) !important;
    box-shadow: 0 4px 14px rgba(21, 128, 61, 0.28);
}

.home-page-wrapper .home-card-header--hatchery {
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 45%, #06b6d4 100%) !important;
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.32);
}

.home-page-wrapper .home-card-header--salons {
    background: linear-gradient(135deg, #475569 0%, #64748b 50%, #94a3b8 100%) !important;
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.28);
}

[data-theme="dark"] .home-page-wrapper .home-card-header--period {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%) !important;
}

[data-theme="dark"] .home-page-wrapper .home-card-header--hen {
    background: linear-gradient(135deg, #9d174d 0%, #be185d 100%) !important;
}

[data-theme="dark"] .home-page-wrapper .home-card-header--rooster {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%) !important;
}

[data-theme="dark"] .home-page-wrapper .home-card-header--rearing {
    background: linear-gradient(135deg, #115e59 0%, #0f766e 100%) !important;
}

[data-theme="dark"] .home-page-wrapper .home-card-header--p2 {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%) !important;
}

[data-theme="dark"] .home-page-wrapper .home-card-header--molting {
    background: linear-gradient(135deg, #6b21a8 0%, #7e22ce 100%) !important;
}

[data-theme="dark"] .home-page-wrapper .home-card-header--p4 {
    background: linear-gradient(135deg, #166534 0%, #15803d 100%) !important;
}

[data-theme="dark"] .home-page-wrapper .home-card-header--hatchery {
    background: linear-gradient(135deg, #155e75 0%, #0e7490 100%) !important;
}

[data-theme="dark"] .home-page-wrapper .home-card-header--salons {
    background: linear-gradient(135deg, #334155 0%, #475569 100%) !important;
}

.home-card-content {
    border-radius: 0 0 10px 10px;
}

/* ─── نمودارهای دونات داشبورد ─────────────────────────────────────────────── */
.home-charts-row {
    margin-top: 0.15rem;
}

.home-chart-card {
    border: 1px solid var(--ps-border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--ps-surface);
    box-shadow: var(--ps-shadow-sm);
    height: 100%;
}

[data-theme="dark"] .home-chart-card {
    background: var(--ps-surface, #1a2332);
}

.home-chart-card__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: #fff;
}

.home-chart-card__header .mud-icon-root {
    font-size: 1.75rem !important;
    opacity: 0.95;
}

.home-chart-card__header--egg {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 45%, #fb923c 100%);
}

.home-chart-card__header--chick {
    background: linear-gradient(135deg, #047857 0%, #10b981 50%, #34d399 100%);
}

[data-theme="dark"] .home-chart-card__header--egg {
    background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
}

[data-theme="dark"] .home-chart-card__header--chick {
    background: linear-gradient(135deg, #065f46 0%, #059669 100%);
}

.home-chart-card__title {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    line-height: 1.25;
}

.home-chart-card__subtitle {
    font-size: 0.72rem !important;
    color: rgba(255, 255, 255, 0.88) !important;
    margin-top: 2px;
}

.home-chart-card__body {
    padding: 0.75rem 1rem 1rem;
}

.home-donut-chart {
    max-width: 280px;
    margin: 0 auto;
}

.home-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.65rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--ps-border);
}

.home-chart-legend__row {
    display: grid;
    grid-template-columns: 12px 1fr auto auto;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
}

.home-chart-legend__swatch {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.home-chart-legend__label {
    color: var(--theme-text-secondary);
    font-family: 'IRANSans', sans-serif;
}

.home-chart-legend__num {
    font-weight: 700;
    font-family: 'IRANSans', sans-serif;
    color: var(--theme-text-primary);
    font-variant-numeric: tabular-nums;
}

.home-chart-legend__pct {
    font-weight: 600;
    color: var(--home-stat-pct);
    font-family: 'IRANSans', sans-serif;
    min-width: 3.2rem;
    text-align: left;
}

.home-chart-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--theme-text-secondary) !important;
}

[data-theme="dark"] .home-hatchery-metric-value.success { color: #34d399; }
[data-theme="dark"] .home-hatchery-metric-value.warn { color: #f87171; }
[data-theme="dark"] .home-hatchery-metric-value.accent { color: #a5b4fc; }
