#status {
    margin-top: 10px;
}

.invoice-actions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.invoice-actions-bar .btn-mini {
    width: auto;
    height: auto;
    padding: 8px 14px;
    border-radius: 999px;
    gap: 8px;
    font-size: 0.82rem;
}

.reminder-card {
    margin-top: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 184, 77, 0.22);
    background: rgba(12, 10, 2, 0.35);
    padding: 12px;
    display: grid;
    gap: 10px;
}

.reminder-title {
    font-size: 0.85rem;
    color: rgba(255, 223, 160, 0.9);
    font-weight: 600;
}

.reminder-list {
    display: grid;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(230, 240, 255, 0.88);
}

.reminder-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 184, 77, 0.2);
    background: rgba(8, 6, 2, 0.5);
}

.reminder-meta {
    display: grid;
    gap: 4px;
}

.reminder-name {
    font-weight: 600;
}

.reminder-sub {
    font-size: 0.72rem;
    color: rgba(154, 164, 193, 0.9);
}

.reminder-amount {
    font-weight: 600;
}

.line-items {
    margin-top: 12px;
}

.line-items-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.line-items-table {
    display: grid;
    gap: 8px;
}

.line-item-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1.4fr) 80px 110px 120px 100px 40px;
    gap: 8px;
    align-items: center;
}

.line-item-row input,
.line-item-row select {
    width: 100%;
}

.line-item-header {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(154, 164, 193, 0.8);
}

.line-item-total {
    text-align: right;
    font-weight: 600;
    color: rgba(230, 240, 255, 0.92);
}

.line-item-remove {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.invoice-summary {
    margin-top: 12px;
    border-radius: 14px;
    border: 1px solid rgba(142, 207, 255, 0.2);
    background: rgba(5, 10, 22, 0.7);
    padding: 10px 12px;
    display: grid;
    gap: 6px;
}

.invoice-summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(230, 240, 255, 0.9);
}

.invoice-summary-total {
    font-weight: 700;
    color: #f7f9fc;
}

.table-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.table-actions .btn-mini {
    width: auto;
    height: auto;
    padding: 6px 10px;
    border-radius: 999px;
    gap: 6px;
    font-size: 0.72rem;
}

.table-actions .btn-mini span {
    font-size: 0.7rem;
}

.table-actions .btn-mini.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.table-empty {
    text-align: center;
    color: rgba(154, 164, 193, 0.9);
    padding: 16px;
}

.grid-table tbody tr.table-empty-row {
    display: table-row;
}

.grid-table tbody tr.table-empty-row td {
    display: table-cell;
}

.doc-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(240, 248, 255, 0.9);
    border: 1px solid rgba(142, 207, 255, 0.2);
    background: rgba(5, 10, 22, 0.75);
}

.doc-cell {
    display: grid;
    gap: 6px;
}

.doc-type {
    font-weight: 700;
    color: rgba(243, 246, 255, 0.98);
}

.customer-cell {
    display: grid;
    gap: 6px;
}

.customer-name {
    font-weight: 600;
    color: rgba(243, 246, 255, 0.95);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.chip-row .status-chip,
.chip-row .meta-chip,
.chip-row .doc-chip {
    font-size: 0.62rem;
    padding: 3px 7px;
}

.th-stack {
    display: grid;
    gap: 6px;
}

.th-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.th-sort {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #f3f6ff;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.th-sort i {
    font-size: 0.7rem;
}

.th-filter {
    width: 100%;
    max-width: 150px;
    padding: 4px 6px;
    border-radius: 8px;
    border: 1px solid rgba(142, 207, 255, 0.25);
    background: rgba(5, 10, 22, 0.85);
    color: rgba(230, 240, 255, 0.92);
    font-size: 0.72rem;
}

.convert-summary {
    border-radius: 12px;
    border: 1px solid rgba(142, 207, 255, 0.2);
    background: rgba(5, 10, 22, 0.7);
    padding: 12px;
    display: grid;
    gap: 8px;
}

.convert-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.85rem;
}

.convert-label {
    color: rgba(154, 164, 193, 0.9);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.convert-value {
    color: rgba(243, 246, 255, 0.95);
    font-weight: 600;
    text-align: right;
}

@media (max-width: 560px) {
    .convert-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .convert-value {
        text-align: left;
    }
}

.status-chip--draft {
    background: rgba(152, 162, 195, 0.35);
    color: #0b1020;
}

.status-chip--sent {
    background: linear-gradient(135deg, #b5e4ff, #6fb6ff);
    color: #021225;
}

.status-chip--partially_paid {
    background: linear-gradient(135deg, #ffe7b0, #ffb84d);
    color: #2a1900;
}

.status-chip--paid {
    background: linear-gradient(135deg, #b6ffe8, #5bffce);
    color: #04170f;
}

.status-chip--overdue {
    background: linear-gradient(135deg, #ffb9c8, #ff6b8b);
    color: #2a0611;
}

.status-chip--void {
    background: rgba(152, 162, 195, 0.35);
    color: #0b1020;
}

.row-type-quote td {
    background: rgba(111, 182, 255, 0.12);
}

.row-type-invoice td {
    background: rgba(91, 255, 206, 0.1);
}

.row-type-receipt td {
    background: rgba(255, 184, 77, 0.12);
}

#tbl-invoices tbody tr.row-type-quote:hover td {
    background: rgba(111, 182, 255, 0.12);
}

#tbl-invoices tbody tr.row-type-invoice:hover td {
    background: rgba(91, 255, 206, 0.1);
}

#tbl-invoices tbody tr.row-type-receipt:hover td {
    background: rgba(255, 184, 77, 0.12);
}

.row-highlight td {
    background: rgba(77, 241, 255, 0.12);
    box-shadow: inset 0 0 0 2px rgba(77, 241, 255, 0.6);
    animation: rowFlash 2.8s ease-out;
}

@keyframes rowFlash {
    0% { background: rgba(77, 241, 255, 0.35); box-shadow: inset 0 0 0 2px rgba(77, 241, 255, 0.85); }
    60% { background: rgba(77, 241, 255, 0.18); box-shadow: inset 0 0 0 2px rgba(77, 241, 255, 0.6); }
    100% { background: transparent; box-shadow: inset 0 0 0 2px rgba(77, 241, 255, 0); }
}

@media (max-width: 960px) {
    .line-item-row {
        grid-template-columns: minmax(0, 1fr);
        padding: 10px;
        border-radius: 12px;
        border: 1px solid rgba(142, 207, 255, 0.15);
        background: rgba(3, 8, 22, 0.65);
    }

    .line-item-row.line-item-header {
        display: none;
    }

    .line-item-row > * {
        text-align: left;
    }

    .line-item-total {
        text-align: left;
    }

    .table-actions .btn-mini {
        width: 32px;
        height: 32px;
        padding: 6px;
        border-radius: 10px;
        justify-content: center;
    }

    .table-actions .btn-mini span {
        display: none;
    }
}

@media (max-width: 820px) {
    .invoice-actions-bar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

@media (max-width: 560px) {
    .invoice-actions-bar {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}
