/* Home frame only; shares the existing dashboard palette and typography. */
.panda-home .home-cockpit {
    --cockpit-bright: #6fdfff;
    --cockpit-line: #176796;
    grid-column: 1 / -1;
    min-width: 0;
    padding: 9px 11px 10px;
    border: 1px solid #149ddb;
    border-radius: 15px;
    background: linear-gradient(165deg, #0d3858 0%, #072742 32%, #041b31 66%, #06304b 100%);
    box-shadow: inset 0 0 15px #05a5e352, 0 0 13px #0399e337;
}
.panda-home .cockpit-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(12px, 1.5vw, 26px);
    min-width: 0;
    padding: 0 2px 9px;
}
.panda-home .cockpit-title,
.panda-home .cockpit-title h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    color: var(--home-ink);
    font-size: 21px;
    font-weight: 750;
    line-height: 1.24;
    white-space: nowrap;
}
.panda-home .cockpit-title i,
.panda-home .cockpit-card-head h3 i {
    color: #9ce7ff;
    filter: drop-shadow(0 0 5px #35c7ff79);
}
.panda-home .cockpit-actions {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: auto repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 7px clamp(6px, 1vw, 15px);
}
.panda-home .cockpit-label,
.panda-home .cockpit-action {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 35px;
    gap: 6px;
    padding: 4px clamp(7px, 1vw, 13px);
    border: 1px solid #1d608d;
    border-radius: 9px;
    background: linear-gradient(180deg, #0b3a5d, #072944);
    color: #e5f6ff;
    font-size: 13px;
    line-height: 1.28;
}
.panda-home .cockpit-label { font-weight: 730; white-space: nowrap; }
.panda-home .cockpit-label i { color: #ffd769; }
.panda-home .cockpit-action:hover:not([aria-disabled="true"]) { border-color: #65dbff; background: #10486b; color: #fff; }
.panda-home .cockpit-action[aria-disabled="true"] { color: #c0d1e1; cursor: default; }
.panda-home .cockpit-action i { flex-shrink: 0; color: #94ddff; font-size: 15px; }
.panda-home .cockpit-action i.fa-triangle-exclamation { color: #ffd36d; }
.panda-home .cockpit-action i:is(.fa-chevron-right,.fa-angle-right) { margin-inline-start: auto; color: #e9f6ff; font-size: 11px; }
.panda-home .cockpit-action span { min-width: 0; }
.panda-home .cockpit-action strong { color: #ff9090; font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums; }
.panda-home .cockpit-action strong[data-empty="true"] { color: var(--home-muted); }
.panda-home .cockpit-panels {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.05fr) minmax(0, 1.05fr);
    align-items: stretch;
    gap: 11px;
}
.panda-home .cockpit-card {
    min-width: 0;
    min-height: 192px;
    padding: 9px 12px;
    border: 1px solid #1683b7;
    border-radius: 12px;
    background: linear-gradient(158deg, #0b2b47, #051d34 55%, #073453);
    box-shadow: inset 0 -4px 13px #0c85ba34;
}
.panda-home .cockpit-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 8px;
    margin: 0 1px 7px;
}
.panda-home .cockpit-card-head h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    margin: 0;
    color: var(--home-ink);
    font-size: 16px;
    font-weight: 735;
    line-height: 1.25;
}
.panda-home .cockpit-card-head .home-more { flex-shrink: 0; font-size: 12px; }
.panda-home .cockpit-table-wrap {
    min-width: 0;
    overflow-x: auto;
    border-radius: 7px;
    scrollbar-width: thin;
    scrollbar-color: #2e688c #061a2e;
}
.panda-home .cockpit-table {
    width: 100%;
    table-layout: fixed;
    margin: 0;
    border-collapse: collapse;
    color: #e4f4ff;
    font-size: 12px;
    line-height: 1.29;
    font-variant-numeric: tabular-nums;
}
.panda-home .cockpit-table :is(th,td) {
    padding: 4px 7px;
    text-align: left;
    overflow-wrap: anywhere;
}
.panda-home .cockpit-table th { background: #0b3452; color: #d6eaf9; font-weight: 650; }
.panda-home .cockpit-table th:first-child { width: 47px; }
.panda-home .cockpit-table th:nth-child(2) { width: 45%; }
.panda-home .cockpit-table :is(th,td):first-child { text-align: center; }
.panda-home .cockpit-table :is(th,td):nth-child(n + 3) { text-align: right; }
.panda-home .cockpit-table td[colspan] { padding-block: 13px; text-align: center; color: var(--home-muted); }
.panda-home .cockpit-table tbody tr:nth-child(odd) { background: #15486b46; }
.panda-home .cockpit-table tbody tr + tr td { border-top: 1px solid #10456778; }
.panda-home .cockpit-rank {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid #3088b9;
    border-radius: 50%;
    background: #0b466d;
    color: #eaf8ff;
    font-weight: 700;
}
.panda-home .cockpit-table tbody tr:nth-child(1) .cockpit-rank { color: #071318; background: #ffd86b; border-color: #ffdb7b; }
.panda-home .cockpit-table tbody tr:nth-child(2) .cockpit-rank { color: #142637; background: #bdd9ec; border-color: #c4e4fa; }
.panda-home .cockpit-table tbody tr:nth-child(3) .cockpit-rank { color: #2f1603; background: #f3a768; border-color: #f3aa70; }

.panda-home .cockpit-kpis {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    min-width: 0;
    margin: 0;
    padding: 5px 4px;
    border: 1px solid #154a6b;
    border-radius: 8px;
    background: #0b3a586b;
}
.panda-home .cockpit-kpis > div { min-width: 0; padding: 1px clamp(5px, .8vw, 11px); }
.panda-home .cockpit-kpis > div + div { border-inline-start: 1px solid #2b5978; }
.panda-home .cockpit-kpis dt { color: #c4deef; font-size: 11px; font-weight: 650; line-height: 1.3; }
.panda-home .cockpit-kpis dd {
    min-width: 0;
    margin: 2px 0 0;
    color: #f1fbff;
    font-size: clamp(16px, 1.2vw, 22px);
    font-weight: 740;
    line-height: 1.22;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.panda-home .cockpit-kpis i { color: #99e7ff; }
.panda-home .cockpit-note {
    min-width: 0;
    margin: 6px 1px 0;
    color: #bed7eb;
    font-size: 11px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.panda-home #cockpitShortcutStatus { margin:0 2px 8px; }
.panda-home #cockpitLogisticsErrors:not([data-empty="true"]) { color:#ff9090; }
.panda-home #cockpitSalesTrend.trend-plot { height: 113px; margin-top: 5px; }
.panda-home .cockpit-empty { color: var(--home-muted); font-size: 12px; line-height: 1.4; }
.panda-home .cockpit-logistics-list {
    display: grid;
    gap: 5px;
    margin: 7px 0 0;
}
.panda-home .cockpit-status-row {
    --status-mark: #40bdf6;
    display: grid;
    grid-template-columns: minmax(55px, auto) minmax(38px, auto) minmax(30px, 1fr);
    align-items: center;
    gap: 6px 9px;
    min-width: 0;
    min-height: 19px;
    color: #e1f3ff;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.panda-home .cockpit-status-row:nth-child(2) { --status-mark: #3de3ed; }
.panda-home .cockpit-status-row:nth-child(3) { --status-mark: #68dc72; }
.panda-home .cockpit-status-row:nth-child(4) { --status-mark: #ff787e; }
.panda-home .cockpit-status-row > :first-child {
    justify-self: start;
    min-width: 0;
    padding: 2px 6px;
    border-radius: 999px;
    background: #0b436b;
    background: color-mix(in srgb, var(--status-mark) 28%, #0a2d48);
    color: #e1f3ff;
    font-weight: 640;
    line-height: 1.2;
}
.panda-home .cockpit-status-row > :nth-child(2) { justify-self: end; text-align: right; overflow-wrap: anywhere; }
.panda-home .cockpit-status-row progress {
    appearance: none;
    display: block;
    min-width: 0;
    width: 100%;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: #2c5c79;
    color: var(--status-mark);
    accent-color: var(--status-mark);
}
.panda-home .cockpit-status-row progress::-webkit-progress-bar { background: #2c5c79; border-radius: 999px; }
.panda-home .cockpit-status-row progress::-webkit-progress-value { background: var(--status-mark); border-radius: 999px; }
.panda-home .cockpit-status-row progress::-moz-progress-bar { background: var(--status-mark); border-radius: 999px; }

@media (max-width: 1095px) {
    .panda-home .cockpit-head { align-items: flex-start; flex-direction: column; gap: 8px; }
    .panda-home .cockpit-actions { width: 100%; }
    .panda-home .cockpit-card { padding-inline: 9px; }
    .panda-home .cockpit-table :is(th,td) { padding-inline: 4px; }
}
@media (max-width: 930px) {
    .panda-home .cockpit-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panda-home .cockpit-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 670px) {
    .panda-home .home-cockpit { padding: 9px; }
    .panda-home .cockpit-title,.panda-home .cockpit-title h2 { font-size: 19px; }
    .panda-home .cockpit-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .panda-home .cockpit-label { grid-column: 1 / -1; min-height: 30px; }
    .panda-home .cockpit-action { min-height: 42px; padding-inline: 7px; }
    .panda-home .cockpit-panels { grid-template-columns: minmax(0, 1fr); gap: 9px; }
    .panda-home .cockpit-card { min-height: auto; padding: 9px 10px; }
    .panda-home .cockpit-table th:first-child { width: 39px; }
    .panda-home .cockpit-kpis dt { font-size: 11px; }
}
@media (forced-colors: active) {
    .panda-home .cockpit-rank { border-color: CanvasText; }
    .panda-home .cockpit-status-row progress { appearance: auto; }
}
