/* Shared layout for record-page data tabs: Customer (Job Orders / Sales Orders / Receivables /
   Analytics) and Supplier (Purchase Orders / Payables / Analytics). Global (linked in App.razor) so
   child tab components need no ::deep. */
.cust-tab {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 8px;
}

.cust-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.cust-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 12px;
    align-items: start;
}

.cust-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.cust-panel {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--colorNeutralStroke2, #e6e8eb);
    border-radius: 8px;
    background: var(--colorNeutralBackground1, #ffffff);
}

.cust-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.cust-panel-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--colorNeutralForeground1, #1b1a19);
}

.cust-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cust-grid-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--colorNeutralForeground3, #6b7280);
}

.cust-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent-fill-rest, #0f6cbd);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.cust-num {
    text-align: right;
    white-space: nowrap;
}

.cust-bad { color: #c50f1f; font-weight: 600; }
.cust-warn { color: #b45309; font-weight: 600; }
.cust-muted { color: var(--colorNeutralForeground3, #6b7280); font-size: 12px; }

/* ── activity / list rows (right column) ── */
.cust-list {
    display: flex;
    flex-direction: column;
}

.cust-list-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 9px 0;
    border-bottom: 1px solid var(--colorNeutralStroke3, #f0f1f3);
}

.cust-list-row:last-child {
    border-bottom: 0;
}

.cust-list-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.cust-list-title {
    font-weight: 600;
    font-size: 13px;
}

.cust-list-sub {
    font-size: 12px;
    color: var(--colorNeutralForeground3, #6b7280);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cust-list-aside {
    text-align: right;
    font-size: 12px;
    color: var(--colorNeutralForeground3, #6b7280);
    white-space: nowrap;
}

.cust-list-aside strong {
    display: block;
    color: var(--colorNeutralForeground1, #1b1a19);
    font-size: 13px;
}

.cust-empty {
    padding: 16px 0;
    text-align: center;
    font-size: 13px;
    color: var(--colorNeutralForeground3, #6b7280);
}

.cust-tone-blue   { background: #e8f0fe; color: #1c4f95; }
.cust-tone-green  { background: #e6f6ef; color: #0f7b3f; }
.cust-tone-amber  { background: #fff6dc; color: #9a6700; }
.cust-tone-red    { background: #fdeaea; color: #b42318; }
.cust-tone-purple { background: #f1ebfd; color: #6b3fc4; }
.cust-tone-teal   { background: #e6f4f4; color: #0f6e6a; }

/* ── aging bars ── */
.cust-aging-row {
    display: grid;
    grid-template-columns: 10px 92px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
}

.cust-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.cust-track {
    height: 8px;
    border-radius: 999px;
    background: #eef0f3;
    overflow: hidden;
}

.cust-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.cust-info {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #eef5fd;
    font-size: 13px;
}

@media (max-width: 1100px) {
    .cust-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cust-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
    .cust-stats { grid-template-columns: minmax(0, 1fr); }
}
