.dmware-proforma-portal {
    --proforma-bg: #141721;
    --proforma-surface: #1b2434;
    --proforma-soft: #202a3b;
    --proforma-line: #354557;
    --proforma-text: #f7f8fa;
    --proforma-muted: #aebdce;
    box-sizing: border-box;
    color: var(--proforma-text);
    font-family: Figtree, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0 auto;
    max-width: 1120px;
    padding: 12px 0 50px;
}

.dmware-proforma-portal *,
.dmware-proforma-portal *::before,
.dmware-proforma-portal *::after { box-sizing: inherit; }

.dmware-proforma-hero {
    background: var(--proforma-bg);
    border: 1px solid var(--proforma-line);
    border-radius: 20px;
    margin-bottom: 18px;
    overflow: hidden;
    padding: 24px 28px 26px;
    position: relative;
}

.dmware-proforma-hero::before {
    background: linear-gradient(90deg, #437ca4 0%, #4e32a8 37%, #d80b57 70%, #ffb24c 100%);
    content: "";
    height: 4px;
    inset: 0 0 auto;
    position: absolute;
}

.dmware-proforma-portal .dmware-proforma-hero h1 {
    color: var(--proforma-text);
    font-size: clamp(30px, 4vw, 42px);
    letter-spacing: -.035em;
    line-height: 1.08;
    margin: 0 0 5px;
}

.dmware-proforma-hero p {
    color: #d7d9e0;
    font-size: 16px;
    line-height: 1.45;
    margin: 0;
}

.dmware-proforma-empty,
.dmware-proforma-table-wrap {
    background: var(--proforma-surface);
    border: 1px solid var(--proforma-line);
    border-radius: 20px;
}

.dmware-proforma-empty { padding: 32px; }
.dmware-proforma-empty h2 { color: var(--proforma-text); margin: 0 0 10px; }
.dmware-proforma-empty p { color: var(--proforma-muted); margin: 0; }

.dmware-proforma-button {
    align-items: center;
    background: #fff;
    border-radius: 999px;
    color: #141721 !important;
    display: inline-flex;
    font-weight: 750;
    margin-top: 18px;
    padding: 12px 19px;
    text-decoration: none !important;
}

.dmware-proforma-table-wrap { overflow: hidden; }
.dmware-proforma-table { border-collapse: collapse; margin: 0 !important; width: 100%; }
.dmware-proforma-table th,
.dmware-proforma-table td {
    border: 0;
    border-bottom: 1px solid var(--proforma-line);
    color: var(--proforma-text);
    padding: 17px 20px;
    text-align: left;
    vertical-align: middle;
}
.dmware-proforma-table th {
    background: var(--proforma-soft);
    color: var(--proforma-muted);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.dmware-proforma-table tbody tr { background: var(--proforma-surface); }
.dmware-proforma-table tbody tr:hover { background: #222c3f; }
.dmware-proforma-table tbody tr:last-child td { border-bottom: 0; }
.dmware-proforma-table td small,
.dmware-proforma-table td strong { display: block; }
.dmware-proforma-table td small { color: var(--proforma-muted); font-size: 12px; margin-bottom: 3px; }

.dmware-proforma-status {
    border: 1px solid #42546d;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    padding: 6px 10px;
    white-space: nowrap;
}
.dmware-proforma-status.is-pending { background: rgba(255,189,89,.09); border-color: rgba(255,189,89,.24); color: #ffcf89; }
.dmware-proforma-status.is-overdue,
.dmware-proforma-status.is-cancelled { background: rgba(201,108,108,.1); border-color: rgba(201,108,108,.25); color: #f4b4b4; }
.dmware-proforma-status.is-paid { background: rgba(93,175,146,.1); border-color: rgba(93,175,146,.25); color: #9ee0c9; }
.dmware-proforma-status.is-refunded { background: rgba(139,177,201,.08); color: #ced8e6; }

.dmware-proforma-open { color: #f7b0d0 !important; font-weight: 750; text-decoration: none !important; white-space: nowrap; }
.dmware-proforma-open:hover { text-decoration: underline !important; }
.dmware-proforma-open:focus-visible,
.dmware-proforma-pagination a:focus-visible,
.dmware-proforma-button:focus-visible { outline: 2px solid #ffbd59; outline-offset: 4px; }

.dmware-proforma-pagination {
    align-items: center;
    color: var(--proforma-muted);
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 20px;
}
.dmware-proforma-pagination a { color: #f7b0d0; font-weight: 700; text-decoration: none; }

@media (max-width: 760px) {
    body.dmware-customer-area :is(.content-area,.content-container,.content-wrap,.entry-content-wrap,.entry-content) {
        margin-right: 0 !important;
        margin-left: 0 !important;
        max-width: none !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        width: 100% !important;
    }
    body.dmware-customer-area .dmware-proforma-portal {
        margin-right: auto;
        margin-left: auto;
        max-width: none;
        width: calc(100% - 24px);
    }
    .dmware-proforma-hero { border-radius: 18px; padding: 22px 20px 24px; }
    .dmware-proforma-empty { border-radius: 16px; padding: 26px 20px; }
    .dmware-proforma-table-wrap { background: transparent; border: 0; border-radius: 0; overflow: visible; }
    .dmware-proforma-table,
    .dmware-proforma-table tbody,
    .dmware-proforma-table tr,
    .dmware-proforma-table td { display: block; width: 100%; }
    .dmware-proforma-table thead { display: none; }
    .dmware-proforma-table tbody { display: grid; gap: 10px; }
    .dmware-proforma-table tbody tr,
    .dmware-proforma-table tbody tr:last-child {
        background: var(--proforma-surface);
        border: 1px solid var(--proforma-line);
        border-radius: 14px;
        overflow: hidden;
        padding: 12px 16px;
    }
    .dmware-proforma-table td {
        align-items: center;
        border-bottom: 1px solid var(--proforma-line);
        display: flex;
        gap: 18px;
        justify-content: space-between;
        padding: 11px 0;
        text-align: right;
    }
    .dmware-proforma-table td::before {
        color: var(--proforma-muted);
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .06em;
        text-align: left;
        text-transform: uppercase;
    }
    .dmware-proforma-table td:first-child { align-items: flex-start; display: block; text-align: left; }
    .dmware-proforma-table td:first-child::before { display: block; margin-bottom: 8px; }
    .dmware-proforma-table td:last-child { border-bottom: 0; }
    .dmware-proforma-pagination { flex-wrap: wrap; }
}

