/* ── BillingEmailStep — global (component-level CSS) ── */

.step-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.status-panel {
    margin-top: 1rem;
    border-top: 1px solid rgba(78, 100, 122, 0.18);
    padding-top: 1rem;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.status-header h5 {
    margin: 0;
    font-size: 1rem;
    color: #20374e;
}

.status-count {
    margin: 0 0 0.25rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #4e647a;
}

.status-description {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    color: #4e647a;
}

.status-table-wrapper {
    overflow-x: auto;
    border: 1px solid rgba(78, 100, 122, 0.18);
    border-radius: 0.85rem;
}

.status-table {
    min-width: 760px;
    font-size: 0.88rem;
}

.status-table .mud-table-container {
    overflow: visible;
}

.status-th,
.status-td {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid rgba(78, 100, 122, 0.12);
    text-align: left;
}

.status-th {
    background: #f5f8fb;
    font-weight: 700;
    color: #36516d;
}

.status-td {
    color: #20374e;
}

.status-table .mud-table-body .mud-table-row:hover {
    background: rgba(46, 125, 50, 0.05);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.status-new {
    background: #eef3f9;
    color: #35506b;
}

.status-issued {
    background: #fff2cc;
    color: #8a5b00;
}

.status-paid {
    background: #dff3e4;
    color: #1d6b36;
}

.status-overdue {
    background: #fde4cf;
    color: #9a4c00;
}

.status-cancelled,
.status-refunded {
    background: #eceff3;
    color: #5a6a7b;
}

.btn-action {
    min-height: 2.375rem;
}

.result-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2e7d32;
    margin: 0.5rem 0;
}

body.dark .result-label {
    color: #81c784;
}

.step-metadata {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 1rem;
    margin-top: 0.5rem;
}

.step-metadata dt {
    font-weight: 600;
    font-size: 0.88rem;
    color: #4e647a;
}

.step-metadata dd {
    margin: 0;
    font-size: 0.88rem;
    color: #20374e;
}

body.dark .step-metadata dt {
    color: #92aec8;
}

body.dark .step-metadata dd {
    color: #deefff;
}

body.dark .status-panel {
    border-top-color: rgba(146, 174, 200, 0.22);
}

body.dark .status-header h5 {
    color: #deefff;
}

body.dark .status-count,
body.dark .status-description {
    color: #92aec8;
}

body.dark .status-table-wrapper {
    border-color: rgba(146, 174, 200, 0.22);
}

body.dark .status-th {
    background: rgba(146, 174, 200, 0.12);
    color: #deefff;
}

body.dark .status-td {
    color: #deefff;
    border-bottom-color: rgba(146, 174, 200, 0.16);
}

body.dark .status-table .mud-table-body .mud-table-row:hover {
    background: rgba(129, 199, 132, 0.08);
}

body.dark .status-new {
    background: rgba(146, 174, 200, 0.18);
    color: #deefff;
}

body.dark .status-issued {
    background: rgba(198, 152, 0, 0.24);
    color: #ffe8a3;
}

body.dark .status-paid {
    background: rgba(46, 125, 50, 0.28);
    color: #b8f0c3;
}

body.dark .status-overdue {
    background: rgba(191, 99, 0, 0.28);
    color: #ffd1a1;
}

body.dark .status-cancelled,
body.dark .status-refunded {
    background: rgba(90, 106, 123, 0.3);
    color: #d8e6f3;
}

.error {
    color: #d32f2f;
    font-weight: 500;
    font-size: 0.88rem;
}

body.dark .error {
    color: #ff6b6b;
}

.success {
    color: #2e7d32;
    font-weight: 500;
    font-size: 0.88rem;
}

body.dark .success {
    color: #81c784;
}

@media (max-width: 720px) {
    .step-controls {
        flex-direction: column;
    }

    .status-header {
        flex-direction: column;
    }

    .step-controls .btn-action {
        width: 100%;
    }

    .status-header .btn-action {
        width: 100%;
    }
}
