/* Laying Home — vivid violet + yolk gold (distinct from broiler blue/green) */
.home-page-wrapper {
    --home-ink: #2e1065;
    --home-violet: #7c3aed;
    --home-violet-deep: #5b21b6;
    --home-magenta: #c026d3;
    --home-gold: #f59e0b;
    --home-amber: #d97706;
    --home-cream: #faf5ff;
    --home-hero: linear-gradient(132deg, #3b0764 0%, #5b21b6 28%, #7c3aed 58%, #a21caf 86%, #2e1065 100%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-page-container {
    padding-bottom: 2rem;
    overflow: visible;
    background:
        radial-gradient(1100px 460px at 100% -8%, rgba(245, 158, 11, 0.18), transparent 52%),
        radial-gradient(880px 400px at -8% 0%, rgba(124, 58, 237, 0.18), transparent 48%),
        radial-gradient(640px 280px at 50% 110%, rgba(192, 38, 211, 0.1), transparent 55%);
}

.home-hero {
    background: var(--home-hero);
    border-radius: 22px;
    padding: 1.5rem 1.6rem;
    color: #fff;
    box-shadow: 0 22px 48px rgba(76, 29, 149, 0.38);
    position: relative;
    overflow: hidden;
    border: none !important;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: auto -8% -40% auto;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.38), transparent 68%);
    pointer-events: none;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 88% 14%, rgba(251, 191, 36, 0.32), transparent 38%),
        radial-gradient(circle at 8% 86%, rgba(244, 114, 182, 0.22), transparent 42%),
        radial-gradient(circle at 42% 0%, rgba(255,255,255,0.12), transparent 36%);
    pointer-events: none;
}

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

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

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

.home-hero-meta {
    opacity: 0.85;
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.home-hero-pills {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.home-hero-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.2rem;
    min-height: 4.6rem;
    padding: 0.5rem 0.45rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.home-hero-pill--dates {
    padding: 0.5rem 0.45rem;
    background: rgba(255, 255, 255, 0.17);
    border-color: rgba(255, 255, 255, 0.28);
    gap: 0;
}

.home-hero-pill__dates-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
    margin-bottom: 0.35rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.82;
}

.home-hero-pill__dates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.55rem;
    width: 100%;
}

.home-hero-pill__date-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.1rem;
    min-width: 0;
}

.home-hero-pill__date-cell + .home-hero-pill__date-cell {
    padding-inline-start: 0.55rem;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.22);
}

.home-hero-pill__value--date {
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.home-hero-pill--flock {
    padding: 0.5rem 0.45rem;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.26);
    gap: 0;
}

.home-hero-pill__flock-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.55rem;
    width: 100%;
    align-items: center;
}

.home-hero-pill__flock-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.1rem;
    min-width: 0;
}

.home-hero-pill__flock-cell + .home-hero-pill__flock-cell {
    padding-inline-start: 0.55rem;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.22);
}

.home-hero-pill--flock .home-hero-pill__value--primary,
.home-hero-pill--flock .home-hero-pill__value--secondary {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.15;
    margin-top: 0;
}

.home-hero-pill--flock .home-hero-pill__label {
    font-size: 0.58rem;
    opacity: 0.82;
    line-height: 1.2;
}

.home-hero-pill__value--primary {
    font-size: 1.22rem;
    font-weight: 800;
    line-height: 1.15;
    margin-top: 0.1rem;
}

.home-hero-pill__sub {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.08rem;
    width: 100%;
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.home-hero-pill__value--secondary {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    opacity: 0.95;
}

.home-hero-pill__value--negative {
    color: #fecaca !important;
}

.home-hero-pill__value--deficit {
    color: #fde68a !important;
}

.home-hero-pill__value--surplus {
    color: #a7f3d0 !important;
}

.home-hero-pill .mud-icon-root {
    opacity: 0.9;
    font-size: 1rem !important;
}

.home-hero-pill__value,
.home-hero-pill__label {
    text-align: center;
}

.home-hero-pill__value {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.home-hero-pill__label {
    font-size: 0.58rem;
    opacity: 0.88;
    line-height: 1.2;
}

.home-hero-pill--loss .home-hero-pill__label,
.home-hero-pill--age .home-hero-pill__label,
.home-hero-pill--prod .home-hero-pill__label {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-hero-pill--dates .home-hero-pill__label {
    font-size: 0.56rem;
    opacity: 0.8;
    line-height: 1.15;
}

.home-filter-bar {
    background: var(--ps-surface, #fff);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius-lg, 16px);
    padding: 1rem;
    box-shadow: var(--ps-shadow-sm);
}

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

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

.home-hero-greeting {
    font-weight: 800 !important;
}

.home-status-chip {
    font-weight: 700 !important;
    background: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

.home-hero-actions {
    flex-shrink: 0;
}

/* Read-only notice inside management dashboard hero palette */
.home-hero-readonly {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    width: 100%;
    margin-top: 0.15rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 196, 0, 0.22);
    border: 1px solid rgba(255, 236, 179, 0.55);
    backdrop-filter: blur(6px);
    box-sizing: border-box;
}

.home-hero-readonly__icon {
    flex-shrink: 0;
    margin-top: 0.12rem;
    color: #fff8e1 !important;
}

.home-hero-readonly__desc {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 650;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.95);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dashboard-switch-btn {
    font-weight: 700 !important;
    white-space: nowrap;
}

.home-hero .dashboard-switch-btn--chain {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 42%, #7c3aed 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    color: #fff !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em;
    padding: 0.5rem 1.15rem !important;
    border-radius: 12px !important;
    box-shadow:
        0 4px 16px rgba(124, 58, 237, 0.45),
        0 2px 6px rgba(245, 158, 11, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.38);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.home-hero .dashboard-switch-btn--chain:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 38%, #3b82f6 72%, #06b6d4 100%) !important;
    box-shadow:
        0 8px 24px rgba(79, 70, 229, 0.55),
        0 4px 10px rgba(37, 99, 235, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.home-hero .dashboard-switch-btn--chain:active {
    transform: translateY(0);
    box-shadow:
        0 2px 10px rgba(79, 70, 229, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.home-hero .dashboard-switch-btn--chain .mud-icon-root {
    color: #fff !important;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.25));
}

.home-kpi-bar {
    padding: 0.75rem;
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius-lg, 16px);
    background: var(--ps-surface);
    box-shadow: var(--ps-shadow-sm);
}

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

.home-kpi-strip--compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

/* Glance bar */
.home-glance-bar {
    padding: 1rem 1.1rem;
    border: 1px solid color-mix(in srgb, #7c3aed 20%, var(--ps-border));
    border-radius: var(--ps-radius-lg, 16px);
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.1) 0%, rgba(245, 158, 11, 0.1) 48%, var(--ps-surface) 100%);
    box-shadow: var(--ps-shadow-sm);
}

[data-theme="dark"] .home-glance-bar {
    background: linear-gradient(145deg, rgba(167, 139, 250, 0.12) 0%, rgba(245, 158, 11, 0.08) 50%, var(--ps-surface, #1F1230) 100%);
}

.home-glance-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    color: #6d28d9;
}

.home-glance-title {
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    color: var(--theme-text-primary) !important;
}

.home-glance-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.6rem;
}

.home-glance-item {
    --pct-h1: 120;
    --pct-h2: 140;
    --pct-sat: 72%;
    --pct-light: 48%;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--ps-border);
    background: var(--ps-surface);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.home-glance-label {
    font-size: 0.7rem;
    color: var(--theme-text-secondary);
}

.home-glance-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--theme-text-primary);
}

.home-glance-item--survival,
.home-glance-item--remaining {
    border-inline-end-width: 3px;
    border-inline-end-style: solid;
    border-inline-end-color: hsl(var(--pct-h2), var(--pct-sat), var(--pct-light));
}

.home-glance-item--survival .home-glance-value,
.home-glance-item--remaining .home-glance-value {
    color: hsl(var(--pct-h2), var(--pct-sat), calc(var(--pct-light) - 6%));
}

.home-glance-item--placed { border-inline-end: 3px solid #ea580c; }
.home-glance-item--feed { border-inline-end: 3px solid #7c3aed; }
.home-glance-item--sold { border-inline-end: 3px solid #c026d3; }

.home-progress-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--ps-border);
}

.home-progress-row {
    --pct-h1: 120;
    --pct-h2: 140;
    --pct-sat: 72%;
    --pct-light: 48%;
    --pct-glow: 0.35;
}

.home-pct-bar-wrap {
    position: relative;
    padding: 2px;
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--ps-border) 40%, transparent),
        color-mix(in srgb, var(--ps-surface-2, #f1f5f9) 85%, transparent)
    );
    box-shadow:
        inset 0 2px 5px rgba(15, 23, 42, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.65);
}

[data-theme="dark"] .home-pct-bar-wrap {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(255, 255, 255, 0.05));
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.home-pct-widget ::deep .home-pct-mud.mud-progress-linear {
    height: 16px !important;
    border-radius: 999px !important;
    background: transparent !important;
    overflow: hidden;
}

.home-pct-widget ::deep .home-pct-mud .mud-progress-linear-bar {
    border-radius: 999px !important;
    background-color: transparent !important;
    background-image:
        linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.22) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.22) 50%,
            transparent 50%,
            transparent 75%,
            rgba(255, 255, 255, 0.22) 75%,
            transparent 75%,
            transparent
        ),
        linear-gradient(
            90deg,
            hsl(var(--pct-h1), var(--pct-sat), calc(var(--pct-light) - 6%)) 0%,
            hsl(var(--pct-h2), calc(var(--pct-sat) + 6%), var(--pct-light)) 52%,
            hsl(calc(var(--pct-h2) + 10), var(--pct-sat), calc(var(--pct-light) + 8%)) 100%
        ) !important;
    background-size: 1.1rem 1.1rem, 100% 100% !important;
    animation: home-pct-stripes 1.1s linear infinite !important;
    box-shadow:
        0 0 16px hsla(var(--pct-h2), var(--pct-sat), var(--pct-light), var(--pct-glow)),
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12) !important;
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.home-pct-widget ::deep .home-pct-mud .mud-progress-linear-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.06) 45%,
        rgba(0, 0, 0, 0.08) 100%
    );
    pointer-events: none;
}

@keyframes home-pct-stripes {
    from { background-position: 0 0, 0 0; }
    to { background-position: 1.1rem 0, 0 0; }
}

.home-progress-row__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
    font-size: 0.74rem;
}

.home-progress-row__label {
    color: var(--theme-text-secondary);
    font-weight: 600;
}

.home-progress-row__value,
.home-pct-value {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: hsl(var(--pct-h2), var(--pct-sat), calc(var(--pct-light) - 6%));
    text-shadow: 0 0 18px hsla(var(--pct-h2), var(--pct-sat), var(--pct-light), 0.25);
}

.home-survival-caption {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--theme-text-secondary);
}

.home-weight-alert {
    border-radius: var(--ps-radius-lg, 16px) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
}

/* Combined actions panel */
.home-actions-panel {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.05) 0%, rgba(124, 58, 237, 0.04) 48%, var(--ps-surface) 100%);
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: var(--ps-radius-lg, 16px);
    padding: 1rem 1.15rem 1.15rem;
    box-shadow: var(--ps-shadow-sm);
}

[data-theme="dark"] .home-actions-panel {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.08) 45%, var(--ps-surface, #1a2332) 100%);
    border-color: rgba(100, 181, 246, 0.22);
}

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

.home-actions-divider {
    height: 1px;
    background: var(--ps-border);
    margin: 1rem 0 0.85rem;
}

.home-reports-header--inline {
    margin-bottom: 0.65rem;
}

.home-reports-header__icon--sm {
    width: 34px;
    height: 34px;
}

.home-shortcuts-grid--featured {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-start;
    align-items: flex-start;
}

.home-shortcuts-grid--featured .home-shortcut-item {
    flex: 0 0 auto;
    width: 5.85rem;
    height: 5.85rem;
    max-width: 5.85rem;
    max-height: 5.85rem;
    aspect-ratio: 1 / 1;
    min-height: 0;
    padding: 0.4rem 0.2rem;
    border-radius: 12px;
    gap: 0.28rem;
}

.home-shortcuts-grid--featured .home-shortcut-icon-wrap {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 7px var(--shortcut-shadow, rgba(37, 99, 235, 0.16));
}

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

.home-shortcuts-grid--featured .home-shortcut-label {
    font-size: 0.64rem;
    line-height: 1.2;
    font-weight: 700;
    padding: 0 2px;
    -webkit-line-clamp: 2;
}

@media (min-width: 1200px) {
    .home-shortcuts-grid--featured {
        flex-wrap: nowrap;
    }
}

@media (min-width: 1500px) {
    .home-shortcuts-grid--featured {
        gap: 0.45rem;
    }

    .home-shortcuts-grid--featured .home-shortcut-item {
        width: 6.25rem;
        height: 6.25rem;
        max-width: 6.25rem;
        max-height: 6.25rem;
        padding: 0.42rem 0.22rem;
    }

    .home-shortcuts-grid--featured .home-shortcut-icon-wrap {
        width: 2.3rem;
        height: 2.3rem;
    }

    .home-shortcuts-grid--featured .home-shortcut-icon.mud-icon-root {
        font-size: 1.28rem !important;
    }

    .home-shortcuts-grid--featured .home-shortcut-label {
        font-size: 0.66rem;
    }
}

.home-reports-grid--compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-report-card--egg-production { --report-accent: #7c3aed; --report-icon-bg: linear-gradient(145deg, #ddd6fe, #faf5ff); --report-shadow: rgba(124, 58, 237, 0.3); }
.home-report-card--production-conversion { --report-accent: #d97706; --report-icon-bg: linear-gradient(145deg, #fcd34d, #fffbeb); --report-shadow: rgba(217, 119, 6, 0.28); }
.home-report-card--production-comparison { --report-accent: #c026d3; --report-icon-bg: linear-gradient(145deg, #f5d0fe, #fdf4ff); --report-shadow: rgba(192, 38, 211, 0.28); }
.home-report-card--chain-farm { --report-accent: #5b21b6; --report-icon-bg: linear-gradient(145deg, #c4b5fd, #f5f3ff); --report-shadow: rgba(91, 33, 182, 0.28); }
.home-report-card--feed-fcr { --report-accent: #a16207; --report-icon-bg: linear-gradient(145deg, #fde68a, #fffbeb); --report-shadow: rgba(161, 98, 7, 0.28); }
[data-theme="dark"] .home-report-card--egg-production { --report-icon-bg: linear-gradient(145deg, rgba(124, 58, 237, 0.42), rgba(124, 58, 237, 0.12)); }
[data-theme="dark"] .home-report-card--production-conversion { --report-icon-bg: linear-gradient(145deg, rgba(217, 119, 6, 0.42), rgba(217, 119, 6, 0.12)); }
[data-theme="dark"] .home-report-card--production-comparison { --report-icon-bg: linear-gradient(145deg, rgba(192, 38, 211, 0.42), rgba(192, 38, 211, 0.12)); }
[data-theme="dark"] .home-report-card--chain-farm { --report-icon-bg: linear-gradient(145deg, rgba(91, 33, 182, 0.42), rgba(91, 33, 182, 0.12)); }
[data-theme="dark"] .home-report-card--feed-fcr { --report-icon-bg: linear-gradient(145deg, rgba(161, 98, 7, 0.42), rgba(161, 98, 7, 0.12)); }
.home-report-card--daily-comprehensive { --report-accent: #6d28d9; --report-icon-bg: linear-gradient(145deg, #c4b5fd, #f5f3ff); --report-shadow: rgba(109, 40, 217, 0.28); }
[data-theme="dark"] .home-report-card--daily-comprehensive { --report-icon-bg: linear-gradient(145deg, rgba(109, 40, 217, 0.42), rgba(109, 40, 217, 0.12)); }

.home-card-header--sales,
.home-card-header--production { background: linear-gradient(135deg, #6d28d9, #c026d3); }

/* Salon mobile cards */
.home-salon-section-header {
    padding: 0.35rem 0.15rem;
}

.home-salon-cards {
    display: none;
    flex-direction: column;
    gap: 0.65rem;
}

.home-salon-card {
    border: 1px solid var(--ps-border);
    border-radius: 14px;
    background: var(--ps-surface);
    padding: 0.75rem 0.85rem;
    box-shadow: var(--ps-shadow-sm);
}

.home-salon-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.home-salon-card__name {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--theme-text-primary);
}

.home-salon-card__breed {
    font-size: 0.72rem;
    color: var(--theme-text-secondary);
    margin-top: 0.1rem;
}

.home-salon-card__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.home-salon-card__metrics--extended {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-salon-density {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.home-salon-th-density {
    min-width: 88px;
    white-space: normal;
    line-height: 1.25;
    font-size: 0.72rem;
}

.home-salon-card__metric {
    padding: 0.45rem 0.55rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--ps-border) 35%, transparent);
}

.home-salon-card__metric-label {
    display: block;
    font-size: 0.65rem;
    color: var(--theme-text-secondary);
    margin-bottom: 0.1rem;
}

.home-salon-card__metric-value {
    font-size: 0.88rem;
    font-weight: 700;
}

.home-salon-card__weight {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.55rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--ps-border);
    font-size: 0.78rem;
    color: var(--theme-text-secondary);
}

.home-kpi-tile {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--ps-border);
    background: var(--ps-surface);
    min-height: 78px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-kpi-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--ps-shadow-md);
}

.home-kpi-tile__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-kpi-tile__body {
    min-width: 0;
    flex: 1;
}

.home-kpi-label {
    font-size: 0.74rem;
    color: var(--theme-text-secondary);
    line-height: 1.3;
}

.home-kpi-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--theme-text-primary);
    line-height: 1.25;
}

.home-kpi-caption {
    font-size: 0.72rem;
    color: var(--theme-text-secondary);
    margin-top: 0.1rem;
}

.home-kpi-tile--user { border-inline-end: 3px solid #7c3aed; }
.home-kpi-tile--user .home-kpi-tile__icon { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }

.home-kpi-tile--farm { border-inline-end: 3px solid #7c3aed; }
.home-kpi-tile--farm .home-kpi-tile__icon { background: rgba(124, 58, 237, 0.12); color: #7c3aed; }

.home-kpi-tile--role { border-inline-end: 3px solid #16a34a; }
.home-kpi-tile--role .home-kpi-tile__icon { background: rgba(22, 163, 74, 0.12); color: #16a34a; }

.home-kpi-tile--version { border-inline-end: 3px solid #d97706; }
.home-kpi-tile--version .home-kpi-tile__icon { background: rgba(217, 119, 6, 0.14); color: #d97706; }

.home-info-alert {
    border-radius: var(--ps-radius-lg, 16px) !important;
    border: 1px solid rgba(124, 58, 237, 0.22) !important;
}

.home-shortcuts-bar {
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.08) 0%, rgba(245, 158, 11, 0.06) 48%, var(--ps-surface) 100%);
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: var(--ps-radius-lg, 16px);
    padding: 1rem 1.15rem;
    box-shadow: var(--ps-shadow-sm);
}

[data-theme="dark"] .home-shortcuts-bar {
    background: linear-gradient(145deg, rgba(167, 139, 250, 0.14) 0%, rgba(217, 70, 239, 0.08) 45%, var(--ps-surface, #1F1230) 100%);
    border-color: rgba(167, 139, 250, 0.24);
}

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

.home-shortcuts-header__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #7c3aed, #5b21b6);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.38);
}

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

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

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

.home-shortcuts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-start;
}

.home-shortcuts-grid .home-shortcut-item {
    flex: 0 0 auto;
    width: 5.85rem;
    height: 5.85rem;
    max-width: 5.85rem;
    max-height: 5.85rem;
}

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

button.home-shortcut-item,
button.home-report-card {
    appearance: none;
    text-align: inherit;
}

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

.home-shortcut-item:hover,
.home-shortcut-item:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px 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--disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

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

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

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

.home-shortcut-label {
    position: relative;
    z-index: 1;
    font-size: 0.64rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    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--egg { --shortcut-accent: #7c3aed; --shortcut-icon-bg: linear-gradient(145deg, #ddd6fe, #faf5ff); --shortcut-shadow: rgba(124, 58, 237, 0.3); }
.home-shortcut--password { --shortcut-accent: #6d28d9; }
.home-shortcut--users { --shortcut-accent: #7c3aed; }
.home-shortcut--farm { --shortcut-accent: #16a34a; }
.home-shortcut--reports { --shortcut-accent: #ea580c; }
.home-shortcut--warehouse { --shortcut-accent: #0d9488; --shortcut-icon-bg: linear-gradient(145deg, #5eead4, #f0fdfa); --shortcut-shadow: rgba(13, 148, 136, 0.28); }
.home-shortcut--feedmill { --shortcut-accent: #ea580c; --shortcut-icon-bg: linear-gradient(145deg, #fed7aa, #fff7ed); --shortcut-shadow: rgba(234, 88, 12, 0.28); }
.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--sale { --shortcut-accent: #059669; --shortcut-icon-bg: linear-gradient(145deg, #a7f3d0, #ecfdf5); --shortcut-shadow: rgba(5, 150, 105, 0.28); }
.home-shortcut--placement { --shortcut-accent: #ea580c; --shortcut-icon-bg: linear-gradient(145deg, #fed7aa, #fff7ed); --shortcut-shadow: rgba(234, 88, 12, 0.28); }
.home-shortcut--purchase { --shortcut-accent: #0891b2; --shortcut-icon-bg: linear-gradient(145deg, #a5f3fc, #ecfeff); --shortcut-shadow: rgba(8, 145, 178, 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--sanitizer { --shortcut-accent: #0d9488; --shortcut-icon-bg: linear-gradient(145deg, #5eead4, #f0fdfa); --shortcut-shadow: rgba(13, 148, 136, 0.28); }
.home-shortcut--other { --shortcut-accent: #4f46e5; --shortcut-icon-bg: linear-gradient(145deg, #c7d2fe, #eef2ff); --shortcut-shadow: rgba(79, 70, 229, 0.28); }
.home-shortcut--inventory { --shortcut-accent: #6d28d9; --shortcut-icon-bg: linear-gradient(145deg, #ddd6fe, #f5f3ff); --shortcut-shadow: rgba(109, 40, 217, 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--tasks { --shortcut-accent: #0284c7; --shortcut-icon-bg: linear-gradient(145deg, #7dd3fc, #f0f9ff); --shortcut-shadow: rgba(2, 132, 199, 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--sale { --shortcut-icon-bg: linear-gradient(145deg, rgba(5, 150, 105, 0.42), rgba(5, 150, 105, 0.12)); }
[data-theme="dark"] .home-shortcut--placement { --shortcut-icon-bg: linear-gradient(145deg, rgba(234, 88, 12, 0.42), rgba(234, 88, 12, 0.12)); }
[data-theme="dark"] .home-shortcut--purchase { --shortcut-icon-bg: linear-gradient(145deg, rgba(8, 145, 178, 0.42), rgba(8, 145, 178, 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--sanitizer { --shortcut-icon-bg: linear-gradient(145deg, rgba(13, 148, 136, 0.42), rgba(13, 148, 136, 0.12)); }
[data-theme="dark"] .home-shortcut--other { --shortcut-icon-bg: linear-gradient(145deg, rgba(79, 70, 229, 0.42), rgba(79, 70, 229, 0.12)); }
[data-theme="dark"] .home-shortcut--inventory { --shortcut-icon-bg: linear-gradient(145deg, rgba(21, 101, 192, 0.42), rgba(21, 101, 192, 0.12)); }
[data-theme="dark"] .home-shortcut--warehouse { --shortcut-icon-bg: linear-gradient(145deg, rgba(13, 148, 136, 0.42), rgba(13, 148, 136, 0.12)); }
[data-theme="dark"] .home-shortcut--feedmill { --shortcut-icon-bg: linear-gradient(145deg, rgba(234, 88, 12, 0.42), rgba(234, 88, 12, 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--tasks { --shortcut-icon-bg: linear-gradient(145deg, rgba(2, 132, 199, 0.42), rgba(2, 132, 199, 0.12)); }

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

.home-module-body {
    padding: 0.85rem 1rem 1rem;
}

.home-module-list .mud-list-item {
    border-radius: 10px;
    margin-bottom: 0.25rem;
}

.home-module-list .mud-list-item-icon {
    color: var(--theme-primary) !important;
}

@media (max-width: 960px) {
    .home-kpi-strip--compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-shortcuts-grid--featured {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .home-shortcuts-grid--featured .home-shortcut-item {
        flex: 0 0 auto;
        width: 5.4rem;
        height: 5.4rem;
        max-width: 5.4rem;
        max-height: 5.4rem;
        aspect-ratio: 1 / 1;
        min-height: 0;
    }

    .home-reports-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-hero-pills {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .home-hero-readonly {
        padding: 0.5rem 0.65rem;
        gap: 0.45rem;
    }

    .home-hero-readonly__desc {
        font-size: 0.74rem;
    }

    .home-hero-pill--dates,
    .home-hero-pill--flock {
        grid-column: span 1;
    }

    .home-hero-pill {
        min-height: 0;
        padding: 0.4rem 0.35rem;
        border-radius: 10px;
    }

    .home-glance-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .home-kpi-strip,
    .home-kpi-strip--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-shortcuts-grid,
    .home-shortcuts-grid--featured {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem;
        justify-content: flex-start;
    }

    .home-shortcuts-grid--featured .home-shortcut-item {
        flex: 0 0 auto;
        width: 5.05rem;
        height: 5.05rem;
        max-width: 5.05rem;
        max-height: 5.05rem;
        aspect-ratio: 1 / 1;
        min-height: 0;
        padding: 0.36rem 0.16rem;
        gap: 0.22rem;
    }

    .home-shortcuts-grid--featured .home-shortcut-icon-wrap {
        width: 1.95rem;
        height: 1.95rem;
        border-radius: 9px;
    }

    .home-shortcuts-grid--featured .home-shortcut-icon.mud-icon-root {
        font-size: 1.1rem !important;
    }

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

    .home-shortcut-item {
        padding: 0.36rem 0.16rem;
    }

    .home-shortcut-icon-wrap {
        width: 1.95rem;
        height: 1.95rem;
    }

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

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

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

    .home-reports-grid,
    .home-reports-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .home-report-card {
        min-height: 0;
        padding: 0.45rem 0.4rem 0.45rem 0.4rem;
        gap: 0.4rem;
        border-radius: 11px;
        align-items: flex-start;
    }

    .home-report-card::before {
        width: 3px;
        border-radius: 0 11px 11px 0;
    }

    .home-report-card__icon-wrap {
        width: 1.85rem;
        height: 1.85rem;
        border-radius: 9px;
        margin-top: 0.1rem;
    }

    .home-report-card__icon.mud-icon-root {
        font-size: 1.05rem !important;
    }

    .home-report-card__body {
        gap: 0.15rem;
    }

    .home-report-card__title {
        font-size: 0.68rem;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .home-report-card__badge {
        font-size: 0.52rem;
        padding: 0.12rem 0.35rem;
        border-radius: 999px;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .home-report-card__arrow {
        display: none !important;
    }

    .home-hero {
        padding: 0.65rem 0.7rem;
        border-radius: 12px;
    }

    .home-hero-content.mud-stack,
    .home-hero .home-hero-content {
        gap: 0.45rem !important;
    }

    .home-hero-content > .mud-stack {
        gap: 0.4rem !important;
    }

    .home-hero-content > .mud-stack > .mud-stack:first-child > .mud-icon-root {
        font-size: 1.25rem !important;
        width: 1.25rem !important;
        height: 1.25rem !important;
    }

    .home-hero-greeting {
        font-size: 1rem !important;
        line-height: 1.2 !important;
    }

    .home-hero-subtitle {
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .home-hero-meta {
        font-size: 0.68rem;
        margin-top: 0.1rem;
        line-height: 1.35;
    }

    .home-hero-actions {
        width: 100%;
        gap: 0.35rem !important;
        margin-top: 0.15rem;
    }

    .home-hero-actions .mud-chip,
    .home-hero-actions .mud-button-root {
        min-height: 30px !important;
        height: auto !important;
        font-size: 0.72rem !important;
        padding: 0 0.55rem !important;
    }

    .home-hero-actions .mud-chip .mud-chip-content {
        padding: 0 0.15rem !important;
    }

    .home-hero-actions .mud-button-root {
        flex: 1 1 auto;
        min-width: 0;
    }

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

    .home-hero-pills {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .home-hero-readonly {
        padding: 0.45rem 0.55rem;
        border-radius: 10px;
    }

    .home-hero-readonly__title {
        font-size: 0.74rem;
    }

    .home-hero-readonly__desc {
        font-size: 0.68rem;
        line-height: 1.4;
    }

    .home-hero-pill--dates,
    .home-hero-pill--flock {
        grid-column: auto;
    }

    .home-hero-pill {
        min-height: 0;
        padding: 0.35rem 0.3rem;
        border-radius: 9px;
        gap: 0.1rem;
    }

    .home-hero-pill--dates,
    .home-hero-pill--flock {
        padding: 0.35rem 0.3rem;
    }

    .home-hero-pill__dates-head {
        margin-bottom: 0.2rem;
        font-size: 0.52rem;
        gap: 0.2rem;
    }

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

    .home-hero-pill__dates-grid,
    .home-hero-pill__flock-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.2rem 0.35rem;
    }

    .home-hero-pill__date-cell + .home-hero-pill__date-cell,
    .home-hero-pill__flock-cell + .home-hero-pill__flock-cell {
        padding-inline-start: 0.35rem;
        border-inline-start: 1px solid rgba(255, 255, 255, 0.22);
        padding-top: 0;
        border-top: none;
    }

    .home-hero-pill__value--date {
        font-size: 0.72rem;
    }

    .home-hero-pill--flock .home-hero-pill__value--primary,
    .home-hero-pill--flock .home-hero-pill__value--secondary {
        font-size: 0.82rem;
    }

    .home-hero-pill--flock .home-hero-pill__label,
    .home-hero-pill--dates .home-hero-pill__label {
        font-size: 0.5rem;
    }

    .home-hero-pill__value {
        font-size: 0.88rem;
    }

    .home-hero-pill__label {
        font-size: 0.52rem;
    }

    .home-hero-pill--loss .home-hero-pill__label,
    .home-hero-pill--age .home-hero-pill__label {
        white-space: normal;
    }

    .home-status-chip.mud-chip {
        font-size: 0.7rem !important;
    }

    .home-glance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-salon-cards {
        display: flex;
    }

    .home-salon-table-wrap--desktop {
        display: none !important;
    }
}

/* KPI tiles — broiler metrics */
.home-kpi-tile .mud-icon-root { flex-shrink: 0; }
.home-kpi-value--pct { font-size: 0.95rem !important; }

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

.home-kpi-tile--stock { border-inline-end: 3px solid #059669; }
.home-kpi-tile--stock .mud-icon-root { color: #059669 !important; }

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

.home-kpi-tile--cull { border-inline-end: 3px solid #f97316; }
.home-kpi-tile--cull .mud-icon-root { color: #f97316 !important; }

.home-kpi-tile--sold { border-inline-end: 3px solid #c026d3; }
.home-kpi-tile--sold .mud-icon-root { color: #c026d3 !important; }
.home-kpi-tile--eggs { border-inline-end: 3px solid #7c3aed; }
.home-kpi-tile--eggs .mud-icon-root { color: #7c3aed !important; }

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

.home-kpi-tile--loss { border-inline-end: 3px solid #b91c1c; }
.home-kpi-tile--loss .mud-icon-root { color: #b91c1c !important; }

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

.home-kpi-tile--period { border-inline-end: 3px solid #d97706; }
.home-kpi-tile--period .home-kpi-tile__icon { background: rgba(217, 119, 6, 0.14); color: #d97706; }

/* Reports bar */
.home-reports-bar {
    margin-top: 0.85rem;
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.08) 0%, rgba(245, 158, 11, 0.06) 55%, var(--ps-surface) 100%);
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: var(--ps-radius-lg, 16px);
    padding: 1.05rem 1.1rem 1.15rem;
    box-shadow: var(--ps-shadow-sm);
}

[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, #7c3aed, #5b21b6); color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.36);
}
.home-reports-header__icon .mud-icon-root { font-size: 1.3rem !important; }
.home-reports-title { font-size: 0.94rem !important; font-weight: 800 !important; color: var(--theme-text-primary) !important; }
.home-reports-subtitle { font-size: 0.72rem !important; color: var(--theme-text-secondary) !important; }
.home-reports-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 0.6rem; }

.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; 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;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.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 10px 22px 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; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    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--mortality { --report-accent: #dc2626; --report-icon-bg: linear-gradient(145deg, #fecaca, #fff1f2); --report-shadow: rgba(220, 38, 38, 0.28); }
.home-report-card--feed { --report-accent: #7c3aed; --report-icon-bg: linear-gradient(145deg, #ddd6fe, #f5f3ff); --report-shadow: rgba(124, 58, 237, 0.28); }
.home-report-card--weight-fcr { --report-accent: #9333ea; --report-icon-bg: linear-gradient(145deg, #e9d5ff, #faf5ff); --report-shadow: rgba(147, 51, 234, 0.28); }
.home-report-card--vitamin { --report-accent: #65a30d; --report-icon-bg: linear-gradient(145deg, #bef264, #f7fee7); --report-shadow: rgba(101, 163, 13, 0.28); }
.home-report-card--drug { --report-accent: #db2777; --report-icon-bg: linear-gradient(145deg, #fbcfe8, #fdf2f8); --report-shadow: rgba(219, 39, 119, 0.28); }
.home-report-card--vaccine { --report-accent: #0891b2; --report-icon-bg: linear-gradient(145deg, #a5f3fc, #ecfeff); --report-shadow: rgba(8, 145, 178, 0.28); }
.home-report-card--sanitizer { --report-accent: #0d9488; --report-icon-bg: linear-gradient(145deg, #5eead4, #f0fdfa); --report-shadow: rgba(13, 148, 136, 0.28); }
.home-report-card--other { --report-accent: #4f46e5; --report-icon-bg: linear-gradient(145deg, #c7d2fe, #eef2ff); --report-shadow: rgba(79, 70, 229, 0.28); }
.home-report-card--performance-card { --report-accent: #3949ab; --report-icon-bg: linear-gradient(145deg, #c5cae9, #e8eaf6); --report-shadow: rgba(57, 73, 171, 0.28); }
.home-report-card--inventory-transactions { --report-accent: #6d28d9; --report-icon-bg: linear-gradient(145deg, #ddd6fe, #f5f3ff); --report-shadow: rgba(109, 40, 217, 0.28); }
.home-report-card--item-stock { --report-accent: #6d28d9; --report-icon-bg: linear-gradient(145deg, #c4b5fd, #f5f3ff); --report-shadow: rgba(109, 40, 217, 0.28); }

[data-theme="dark"] .home-report-card--mortality { --report-icon-bg: linear-gradient(145deg, rgba(220, 38, 38, 0.42), rgba(220, 38, 38, 0.12)); }
[data-theme="dark"] .home-report-card--feed { --report-icon-bg: linear-gradient(145deg, rgba(124, 58, 237, 0.42), rgba(124, 58, 237, 0.12)); }
[data-theme="dark"] .home-report-card--weight-fcr { --report-icon-bg: linear-gradient(145deg, rgba(147, 51, 234, 0.42), rgba(147, 51, 234, 0.12)); }
[data-theme="dark"] .home-report-card--vitamin { --report-icon-bg: linear-gradient(145deg, rgba(101, 163, 13, 0.42), rgba(101, 163, 13, 0.12)); }
[data-theme="dark"] .home-report-card--drug { --report-icon-bg: linear-gradient(145deg, rgba(219, 39, 119, 0.42), rgba(219, 39, 119, 0.12)); }
[data-theme="dark"] .home-report-card--vaccine { --report-icon-bg: linear-gradient(145deg, rgba(8, 145, 178, 0.42), rgba(8, 145, 178, 0.12)); }
[data-theme="dark"] .home-report-card--sanitizer { --report-icon-bg: linear-gradient(145deg, rgba(13, 148, 136, 0.42), rgba(13, 148, 136, 0.12)); }
[data-theme="dark"] .home-report-card--other { --report-icon-bg: linear-gradient(145deg, rgba(79, 70, 229, 0.42), rgba(79, 70, 229, 0.12)); }
[data-theme="dark"] .home-report-card--performance-card { --report-icon-bg: linear-gradient(145deg, rgba(57, 73, 171, 0.42), rgba(57, 73, 171, 0.12)); }
[data-theme="dark"] .home-report-card--inventory-transactions { --report-icon-bg: linear-gradient(145deg, rgba(109, 40, 217, 0.42), rgba(109, 40, 217, 0.12)); }
[data-theme="dark"] .home-report-card--item-stock { --report-icon-bg: linear-gradient(145deg, rgba(109, 40, 217, 0.42), rgba(109, 40, 217, 0.12)); }

/* Charts */
.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%;
}
.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--flock { background: linear-gradient(135deg, #5b21b6, #7c3aed); }
.home-chart-card__header--loss { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.home-chart-card__header--sales { background: linear-gradient(135deg, #a21caf, #e879f9); }
.home-chart-card__header--weight { background: linear-gradient(135deg, #d97706, #fbbf24); }
.home-chart-card__title { font-size: 0.95rem !important; font-weight: 800 !important; color: #fff !important; }
.home-chart-card__subtitle { font-size: 0.72rem !important; color: rgba(255,255,255,0.88) !important; }
.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; gap: 0.45rem; align-items: center; font-size: 0.74rem; }
.home-chart-legend__swatch { width: 12px; height: 12px; border-radius: 3px; }
.home-chart-legend__num { font-weight: 700; }
.home-chart-legend__pct { color: var(--theme-text-secondary); font-size: 0.7rem; }
.home-chart-empty { text-align: center; color: var(--theme-text-secondary); padding: 1.5rem 0.5rem; }

/* Summary cards + salon table */
.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-summary-header .mud-typography, .home-summary-header .mud-icon-root { color: #fff !important; font-weight: 700; }
.home-summary-body { padding: 0.75rem; }
.home-phase-card { border: 1px solid var(--ps-border); border-radius: 12px; overflow: hidden; height: 100%; }
.home-card-header { padding: 0.65rem 0.85rem; color: #fff; }
.home-card-header--period { background: linear-gradient(135deg, #4c1d95, #7c3aed); }
.home-card-header--flock { background: linear-gradient(135deg, #b45309, #f59e0b); }
.home-card-header--salon { background: linear-gradient(135deg, #9d174d, #db2777); }
.home-card-content { padding: 0.75rem 0.85rem; display: flex; flex-direction: column; gap: 0.45rem; }
.home-stat-row { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; font-size: 0.82rem; }
.home-stat-row--sub {
    padding-inline-start: 0.65rem;
    font-size: 0.76rem;
    border-inline-start: 2px solid var(--ps-border);
    margin-inline-start: 0.15rem;
}
.home-stat-row--sub .home-stat-label { color: var(--theme-text-primary); }
.home-stat-label { color: var(--theme-text-secondary); }
.home-stat-num { font-weight: 700; color: var(--theme-text-primary); }
.home-stat-num--positive { color: #059669; }
.home-stat-num--negative { color: #dc2626; }
.home-stat-num--info { color: #7c3aed; }

.home-salon-table-wrap {
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: clip;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
}
.home-salon-table-wrap--desktop .home-salon-table { min-width: 1180px; }
.home-salon-table .mud-table-root { background: transparent; }
.home-loading-card {
    border: 1px solid var(--ps-border); border-radius: var(--ps-radius-lg);
    background: var(--ps-surface); box-shadow: var(--ps-shadow-sm);
}

.home-deviation--above { color: #059669 !important; }
.home-deviation--below { color: #dc2626 !important; }
.home-deviation--ok { color: var(--theme-text-secondary) !important; }

/* ============================================================
   Home refresh — laying violet mesh (do not fall back to broiler theme-gradient)
   ============================================================ */

.home-page-wrapper {
    gap: 1.15rem;
}

.home-hero {
    background:
        radial-gradient(ellipse 70% 80% at 100% 0%, rgba(251, 191, 36, 0.28), transparent 52%),
        radial-gradient(ellipse 55% 60% at 0% 100%, rgba(244, 114, 182, 0.22), transparent 50%),
        linear-gradient(132deg, #3b0764 0%, #5b21b6 28%, #7c3aed 58%, #a21caf 86%, #2e1065 100%);
    box-shadow:
        0 18px 44px rgba(76, 29, 149, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

[data-theme="dark"] .home-hero {
    box-shadow:
        0 16px 44px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.home-hero-greeting {
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

.home-hero-mark {
    width: 3rem !important;
    height: 3rem !important;
    padding: 0.45rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.home-hero-pill--prod {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.28), rgba(255, 255, 255, 0.12));
    border-color: rgba(251, 191, 36, 0.45);
}

.home-filter-bar {
    border-radius: 18px !important;
    border: 1px solid color-mix(in srgb, #7c3aed 18%, var(--ps-border)) !important;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, #7c3aed 8%, var(--ps-surface)) 0%,
            var(--ps-surface) 55%) !important;
    padding: 0.85rem 1rem !important;
    box-shadow: var(--ps-shadow-sm);
}

[data-theme="dark"] .home-filter-bar {
    background:
        linear-gradient(135deg,
            color-mix(in srgb, #a78bfa 14%, var(--ps-surface, #1F1230)) 0%,
            var(--ps-surface, #1F1230) 60%) !important;
    border-color: rgba(167, 139, 250, 0.24) !important;
}

.home-actions-panel {
    background:
        linear-gradient(155deg,
            color-mix(in srgb, #7c3aed 12%, var(--ps-surface)) 0%,
            color-mix(in srgb, #f59e0b 8%, var(--ps-surface)) 42%,
            var(--ps-surface) 100%);
    border: 1px solid color-mix(in srgb, #7c3aed 22%, var(--ps-border));
    border-radius: 20px;
    padding: 1.1rem 1.2rem 1.25rem;
    box-shadow:
        0 8px 28px color-mix(in srgb, #7c3aed 12%, transparent),
        var(--ps-shadow-sm);
    position: relative;
    overflow: hidden;
}

.home-actions-panel::before {
    content: "";
    position: absolute;
    inset-inline-end: -40px;
    top: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, #f59e0b 24%, transparent), transparent 70%);
    pointer-events: none;
}

[data-theme="dark"] .home-actions-panel {
    background:
        linear-gradient(155deg,
            rgba(124, 58, 237, 0.18) 0%,
            rgba(217, 70, 239, 0.1) 40%,
            var(--ps-surface, #1F1230) 100%);
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

.home-shortcuts-header__icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(145deg, #fbbf24, #d97706);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.34);
}

.home-reports-header__icon {
    background: linear-gradient(145deg, #a78bfa, #6d28d9) !important;
    box-shadow: 0 6px 18px rgba(109, 40, 217, 0.38) !important;
}

.home-actions-divider {
    height: 1px;
    margin: 1.15rem 0 1rem;
    background: linear-gradient(
        90deg,
        transparent,
        color-mix(in srgb, var(--theme-primary, #2563eb) 35%, var(--ps-border)),
        transparent
    );
}

.home-shortcuts-grid--featured {
    gap: 0.4rem;
}

.home-shortcut-item {
    border-radius: 12px;
    box-shadow: 0 1px 3px color-mix(in srgb, var(--shortcut-accent) 8%, transparent);
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    min-height: 0;
}

.home-shortcut-item:hover,
.home-shortcut-item:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px color-mix(in srgb, var(--shortcut-accent) 24%, transparent);
}

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

.home-shortcut-label {
    font-size: 0.64rem;
    font-weight: 700;
}

.home-shortcut--expenses {
    --shortcut-accent: #ca8a04;
    --shortcut-icon-bg: linear-gradient(145deg, #fde68a, #fffbeb);
    --shortcut-shadow: rgba(202, 138, 4, 0.28);
}

.home-shortcut--quality {
    --shortcut-accent: #e11d48;
    --shortcut-icon-bg: linear-gradient(145deg, #fecdd3, #fff1f2);
    --shortcut-shadow: rgba(225, 29, 72, 0.28);
}

[data-theme="dark"] .home-shortcut--expenses {
    --shortcut-icon-bg: linear-gradient(145deg, rgba(202, 138, 4, 0.42), rgba(202, 138, 4, 0.12));
}

[data-theme="dark"] .home-shortcut--quality {
    --shortcut-icon-bg: linear-gradient(145deg, rgba(225, 29, 72, 0.42), rgba(225, 29, 72, 0.12));
}

.home-reports-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.7rem;
}

.home-report-card {
    min-height: 78px;
    border-radius: 16px;
    padding: 0.75rem 0.75rem 0.75rem 0.7rem;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--report-accent) 10%, transparent);
}

.home-report-card:hover,
.home-report-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px color-mix(in srgb, var(--report-accent) 28%, transparent);
}

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

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

.home-report-card__badge {
    font-size: 0.6rem;
    border-radius: 999px;
    padding: 0.22rem 0.5rem;
}

.home-report-card--flock-performance {
    --report-accent: #7c3aed;
    --report-icon-bg: linear-gradient(145deg, #ddd6fe, #faf5ff);
    --report-shadow: rgba(124, 58, 237, 0.28);
}

.home-report-card--bird-sale {
    --report-accent: #059669;
    --report-icon-bg: linear-gradient(145deg, #a7f3d0, #ecfdf5);
    --report-shadow: rgba(5, 150, 105, 0.28);
}

.home-report-card--fcr-comparison {
    --report-accent: #7c3aed;
    --report-icon-bg: linear-gradient(145deg, #ddd6fe, #f5f3ff);
    --report-shadow: rgba(124, 58, 237, 0.28);
}

.home-report-card--mort-cull-comparison {
    --report-accent: #c2410c;
    --report-icon-bg: linear-gradient(145deg, #fdba74, #fff7ed);
    --report-shadow: rgba(194, 65, 12, 0.28);
}

.home-report-card--full-cost {
    --report-accent: #b45309;
    --report-icon-bg: linear-gradient(145deg, #fcd34d, #fffbeb);
    --report-shadow: rgba(180, 83, 9, 0.28);
}

.home-report-card--when-to-sell {
    --report-accent: #0369a1;
    --report-icon-bg: linear-gradient(145deg, #7dd3fc, #f0f9ff);
    --report-shadow: rgba(3, 105, 161, 0.28);
}

.home-report-card--chain {
    --report-accent: #1d4ed8;
    --report-icon-bg: linear-gradient(145deg, #93c5fd, #eff6ff);
    --report-shadow: rgba(29, 78, 216, 0.28);
}

[data-theme="dark"] .home-report-card--flock-performance {
    --report-icon-bg: linear-gradient(145deg, rgba(124, 58, 237, 0.42), rgba(124, 58, 237, 0.12));
}

[data-theme="dark"] .home-report-card--bird-sale {
    --report-icon-bg: linear-gradient(145deg, rgba(5, 150, 105, 0.42), rgba(5, 150, 105, 0.12));
}

[data-theme="dark"] .home-report-card--fcr-comparison {
    --report-icon-bg: linear-gradient(145deg, rgba(124, 58, 237, 0.42), rgba(124, 58, 237, 0.12));
}

[data-theme="dark"] .home-report-card--mort-cull-comparison {
    --report-icon-bg: linear-gradient(145deg, rgba(194, 65, 12, 0.42), rgba(194, 65, 12, 0.12));
}

[data-theme="dark"] .home-report-card--full-cost {
    --report-icon-bg: linear-gradient(145deg, rgba(180, 83, 9, 0.42), rgba(180, 83, 9, 0.12));
}

[data-theme="dark"] .home-report-card--when-to-sell {
    --report-icon-bg: linear-gradient(145deg, rgba(3, 105, 161, 0.42), rgba(3, 105, 161, 0.12));
}

[data-theme="dark"] .home-report-card--chain {
    --report-icon-bg: linear-gradient(145deg, rgba(29, 78, 216, 0.42), rgba(29, 78, 216, 0.12));
}

.home-glance-bar {
    border-radius: 18px !important;
    border: 1px solid color-mix(in srgb, #7c3aed 20%, var(--ps-border)) !important;
    background:
        linear-gradient(145deg,
            color-mix(in srgb, #7c3aed 9%, var(--ps-surface)) 0%,
            color-mix(in srgb, #f59e0b 6%, var(--ps-surface)) 42%,
            var(--ps-surface) 60%) !important;
    padding: 0.9rem 1rem !important;
}

[data-theme="dark"] .home-glance-bar {
    background:
        linear-gradient(145deg,
            rgba(124, 58, 237, 0.16) 0%,
            var(--ps-surface, #1F1230) 60%) !important;
    border-color: rgba(167, 139, 250, 0.26) !important;
}

.home-kpi-bar {
    border-radius: 16px !important;
    padding: 0.75rem !important;
    border: 1px solid var(--ps-border) !important;
    background: var(--ps-surface) !important;
}

.home-kpi-tile {
    border-radius: 14px;
    background: color-mix(in srgb, var(--ps-surface-2, #f8fafc) 80%, transparent);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-kpi-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--ps-shadow-sm);
}

[data-theme="dark"] .home-kpi-tile {
    background: color-mix(in srgb, #243044 70%, transparent);
}

@media (max-width: 1199px) {
    .home-shortcuts-grid--featured {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .home-shortcuts-grid--featured .home-shortcut-item {
        flex: 0 0 auto;
        width: 5.5rem;
        height: 5.5rem;
        max-width: 5.5rem;
        max-height: 5.5rem;
        aspect-ratio: 1 / 1;
        min-height: 0;
    }
}

@media (max-width: 960px) {
    .home-shortcuts-grid--featured .home-shortcut-item {
        width: 5.4rem;
        height: 5.4rem;
        max-width: 5.4rem;
        max-height: 5.4rem;
    }

    .home-reports-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-actions-panel {
        padding: 0.9rem 0.85rem 1rem;
        border-radius: 16px;
    }
}

@media (max-width: 600px) {
    .home-page-wrapper {
        gap: 0.85rem;
    }

    .home-hero {
        padding: 0.65rem 0.7rem;
        border-radius: 12px;
    }

    .home-filter-bar {
        padding: 0.7rem 0.75rem !important;
        border-radius: 14px !important;
    }

    .home-actions-panel {
        margin-inline: 0;
        padding: 0.8rem 0.7rem 0.9rem;
    }

    .home-shortcuts-grid--featured {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem;
        justify-content: flex-start;
    }

    .home-shortcuts-grid--featured .home-shortcut-item {
        flex: 0 0 auto;
        width: 5.05rem;
        height: 5.05rem;
        max-width: 5.05rem;
        max-height: 5.05rem;
        aspect-ratio: 1 / 1;
        min-height: 0;
        border-radius: 12px;
        padding: 0.36rem 0.16rem;
    }

    .home-shortcuts-grid--featured .home-shortcut-icon-wrap {
        width: 1.95rem;
        height: 1.95rem;
        border-radius: 9px;
    }

    .home-shortcuts-grid--featured .home-shortcut-icon.mud-icon-root {
        font-size: 1.1rem !important;
    }

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

    .home-reports-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .home-report-card {
        min-height: 0;
        padding: 0.45rem 0.4rem;
        border-radius: 11px;
        gap: 0.4rem;
    }

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

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

    .home-report-card__arrow {
        display: none !important;
    }

    .home-actions-panel__header,
    .home-reports-header--inline {
        gap: 0.6rem;
        margin-bottom: 0.7rem;
    }

    .home-shortcuts-hint,
    .home-reports-subtitle {
        font-size: 0.68rem !important;
    }
}

@media (max-width: 380px) {
    .home-shortcuts-grid--featured .home-shortcut-item {
        width: 4.65rem;
        height: 4.65rem;
        max-width: 4.65rem;
        max-height: 4.65rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-shortcut-item,
    .home-report-card,
    .home-kpi-tile {
        transition: none;
    }

    .home-shortcut-item:hover,
    .home-report-card:hover,
    .home-kpi-tile:hover {
        transform: none;
    }
}

