/* =========================================================
   PROJECTKART — Admin Billing / Invoice
   ========================================================= */

:root {
    --bill-navy: #0b1f3a;
    --bill-navy-2: #123056;
    --bill-gold: #d4a017;
    --bill-gold-soft: #f3d27a;
    --bill-line: #d7dee8;
    --bill-muted: #5b6b7c;
    --bill-paper: #ffffff;
}

/* Keep billing pages inside admin shell — never under sidebar/header */
.billing-page,
.bills-page {
    overflow-x: hidden;
}

.billing-page .admin-app,
.bills-page .admin-app {
    position: relative;
    overflow-x: hidden;
}

.billing-page .admin-main,
.bills-page .admin-main {
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow-x: hidden;
}

.billing-page .admin-sidebar,
.bills-page .admin-sidebar {
    z-index: 100;
}

.billing-page .admin-header,
.bills-page .admin-header {
    z-index: 60;
}

.billing-page .admin-content {
    background: #e8eef5;
    color: #122033;
    min-width: 0;
}

.bills-page .admin-content {
    min-width: 0;
}

.billing-page .admin-header h1,
.bills-page .admin-header h1 {
    margin: 4px 0 0;
    color: #fff;
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.billing-page .admin-menu-toggle,
.bills-page .admin-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

@media (max-width: 980px) {
    .billing-page .admin-menu-toggle,
    .bills-page .admin-menu-toggle {
        display: inline-flex;
    }
}

.billing-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.billing-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.billing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
}

.billing-admin-panel {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 12px;
}

.billing-admin-card {
    padding: 16px;
    border: 1px solid rgba(11, 31, 58, 0.12);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(11, 31, 58, 0.06);
}

.billing-admin-card h3 {
    margin: 0 0 8px;
    color: var(--bill-navy);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.billing-admin-card p,
.billing-admin-card label,
.billing-admin-card small {
    color: var(--bill-muted);
    font-size: 13px;
}

.billing-admin-stat {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(11, 31, 58, 0.1);
    color: var(--bill-navy);
    font-size: 14px;
    font-weight: 700;
}

.billing-admin-stat:last-child {
    border-bottom: 0;
}

.billing-admin-stat--profit strong {
    color: #0f8a4b;
}

.billing-admin-card input,
.billing-admin-card select,
.billing-admin-card textarea {
    width: 100%;
    margin-top: 6px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--bill-line);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--bill-navy);
    font: inherit;
}

/* Invoice paper */
.invoice-sheet {
    width: min(100%, 820px);
    margin: 0 auto;
    padding: 28px 30px 24px;
    border: 2px solid var(--bill-navy);
    background: var(--bill-paper);
    color: #122033;
    box-shadow: 0 18px 40px rgba(11, 31, 58, 0.12);
    overflow: hidden;
    box-sizing: border-box;
}

.invoice-sheet__top {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 3px solid var(--bill-gold);
}

.invoice-sheet__logo {
    width: 110px;
    height: auto;
    object-fit: contain;
}

.invoice-sheet__biz h1 {
    margin: 0 0 6px;
    color: var(--bill-navy);
    font-size: 28px;
    font-weight: 850;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.invoice-sheet__biz .tagline {
    margin: 0 0 10px;
    color: var(--bill-gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
}

.invoice-sheet__biz p {
    margin: 2px 0;
    color: var(--bill-muted);
    font-size: 12.5px;
    line-height: 1.45;
}

.invoice-meta {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bill-line);
}

.invoice-meta > div:first-child {
    flex: 1 1 55%;
    min-width: 0;
}

.invoice-meta > div:last-child {
    flex: 0 0 36%;
    min-width: 200px;
    padding-left: 16px;
    border-left: 1px solid var(--bill-line);
}

.invoice-meta h2 {
    margin: 0 0 8px;
    color: var(--bill-navy);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.invoice-field {
    display: grid;
    gap: 3px;
    margin-bottom: 6px;
}

.invoice-field label {
    color: var(--bill-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.invoice-field input,
.invoice-field textarea,
.invoice-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--bill-line);
    border-radius: 8px;
    background: #fcfdff;
    color: var(--bill-navy);
    font: inherit;
    font-size: 13px;
}

.invoice-field textarea {
    min-height: 64px;
    resize: vertical;
}

.invoice-readonly {
    padding: 8px 0;
    color: var(--bill-navy);
    font-size: 14px;
    font-weight: 700;
}

.invoice-table-wrap {
    margin-top: 16px;
    overflow-x: auto;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.invoice-table th,
.invoice-table td {
    padding: 10px 8px;
    border: 1px solid var(--bill-line);
    vertical-align: middle;
    text-align: center;
    font-size: 13px;
}

.invoice-table th {
    background: var(--bill-navy);
    color: #fff;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
}

.invoice-table td:nth-child(1),
.invoice-table th:nth-child(1) { width: 54px; text-align: center; }
.invoice-table td:nth-child(2),
.invoice-table th:nth-child(2) { text-align: center; }
.invoice-table td:nth-child(3),
.invoice-table th:nth-child(3) { width: 110px; text-align: center; }
.invoice-table td:nth-child(4),
.invoice-table th:nth-child(4) { width: 90px; text-align: center; }
.invoice-table td:nth-child(5),
.invoice-table th:nth-child(5) { width: 110px; text-align: center; }
.invoice-table td:nth-child(6),
.invoice-table th:nth-child(6) { width: 54px; text-align: center; }

.invoice-table tbody tr:nth-child(even) td {
    background: #f3f7fb;
}

.invoice-table input[type="number"] {
    width: 72px;
    padding: 6px 8px;
    border: 1px solid var(--bill-line);
    border-radius: 8px;
    text-align: center;
    font: inherit;
}

.invoice-empty {
    padding: 28px 12px;
    color: var(--bill-muted);
    text-align: center;
    font-size: 13px;
}

.invoice-remove {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: #fee2e2;
    color: #b91c1c;
    cursor: pointer;
    font-size: 16px;
}

.invoice-summary {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 18px;
    margin-top: 16px;
    align-items: start;
}

.invoice-qr {
    display: flex;
    align-items: center;
    gap: 12px;
}

.invoice-qr h3 {
    margin: 0 0 4px;
    color: var(--bill-navy);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.invoice-qr img {
    width: 108px;
    height: 108px;
    object-fit: contain;
    border: 2px solid #f5c518;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    flex: 0 0 auto;
}

.invoice-qr .muted {
    color: var(--bill-muted);
    font-size: 12px;
}

.invoice-qr__copy {
    display: grid;
    gap: 4px;
}

.invoice-qr__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.invoice-qr__badge {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 4px;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
}

.invoice-qr__badge--upi { background: #0b1f3a; }
.invoice-qr__badge--phonepe { background: #5f259f; }
.invoice-qr__badge--gpay { background: #4285f4; }

.invoice-total-box {
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

.invoice-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    background: transparent;
    color: var(--bill-navy);
    font-size: 18px;
    font-weight: 800;
}

.invoice-total-row span:last-child {
    display: inline-block;
    min-width: 120px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #f5c518;
    color: #0b1f3a;
    text-align: center;
    line-height: 1.2;
}

.invoice-pay-block {
    display: grid;
    gap: 12px;
}

.invoice-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--bill-line);
}

.invoice-terms h3 {
    margin: 0 0 8px;
    color: var(--bill-navy);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.invoice-terms ol {
    margin: 0;
    padding-left: 18px;
    color: var(--bill-muted);
    font-size: 12px;
    line-height: 1.55;
}

.invoice-thanks {
    color: var(--bill-navy);
    font-size: 15px;
    font-style: italic;
    font-weight: 700;
}

.invoice-sign-line {
    min-width: 160px;
    margin-top: 28px;
    border-top: 1px solid var(--bill-navy);
    padding-top: 6px;
    color: var(--bill-navy);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.invoice-bottom-note {
    margin: 16px 0 0;
    padding: 10px 18px;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: var(--bill-navy);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}

/* Floating add */
.billing-fab {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #1a3d6d, #0b1f3a);
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    box-shadow: 0 14px 30px rgba(11, 31, 58, 0.35);
    cursor: pointer;
}

.billing-fab span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bill-gold);
    color: #1a1400;
    font-size: 20px;
    font-weight: 800;
}

/* Item picker modal */
.billing-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    place-items: center;
    padding: 20px;
}

.billing-modal.is-open {
    display: grid;
}

.billing-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 12, 20, 0.55);
}

.billing-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(86vh, 760px);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto 1fr;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.billing-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--bill-line);
}

.billing-modal__header h2 {
    margin: 0;
    color: var(--bill-navy);
    font-size: 18px;
}

.billing-modal__close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #eef2f7;
    color: var(--bill-navy);
    font-size: 20px;
    cursor: pointer;
}

.billing-modal__tools {
    display: grid;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--bill-line);
}

.billing-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: #eef2f7;
}

.billing-tabs button {
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--bill-muted);
    font-weight: 700;
    cursor: pointer;
}

.billing-tabs button.is-active {
    background: #fff;
    color: var(--bill-navy);
    box-shadow: 0 4px 12px rgba(11, 31, 58, 0.08);
}

.billing-modal__tools input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--bill-line);
    border-radius: 10px;
    font: inherit;
}

.billing-modal__list {
    overflow: auto;
    padding: 10px;
}

.billing-pick-item {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    margin: 0 0 8px;
    padding: 10px;
    border: 1px solid var(--bill-line);
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.billing-pick-item:hover {
    border-color: rgba(11, 31, 58, 0.35);
    background: #f7faff;
}

.billing-pick-item img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 10px;
    background: #eef2f7;
}

.billing-pick-item strong {
    display: block;
    color: var(--bill-navy);
    font-size: 14px;
}

.billing-pick-item span {
    color: var(--bill-muted);
    font-size: 12px;
}

.billing-pick-item em {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--bill-navy);
    font-size: 10px;
    font-style: normal;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.billing-pick-item .price {
    color: var(--bill-navy);
    font-size: 14px;
    font-weight: 800;
}

/* Bills history / analytics */
.bills-content {
    display: grid;
    gap: 20px;
}

.bills-section__head {
    margin-bottom: 12px;
}

.bills-section__title {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.bills-section__subtitle {
    margin: 4px 0 0;
    color: #8b97ab;
    font-size: 13px;
}

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

.bills-stat {
    padding: 18px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, #121821, #0c1118);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.bills-stat__label,
.bills-stat span {
    display: block;
    color: #8b97ab;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bills-stat__value,
.bills-stat strong {
    display: block;
    margin-top: 10px;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
}

.bills-stat--profit .bills-stat__value {
    color: #48c98b;
}

.bills-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.bills-chart-card {
    padding: 18px;
    border-radius: 16px;
    background: #0c1118;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.bills-chart-card h3 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 750;
}

.bills-chart {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(28px, 1fr);
    align-items: end;
    gap: 8px;
    height: 180px;
    padding: 8px 4px 0;
}

.bills-chart__col {
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: end;
    gap: 6px;
    height: 100%;
}

.bills-chart__bar {
    width: 100%;
    min-height: 4px;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #3b86ff, #1768ed);
}

.bills-chart__bar--gold {
    background: linear-gradient(180deg, #f0c94d, #d4a017);
}

.bills-chart__label {
    color: #7d8aa0;
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
}

.bills-chart-empty {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    min-height: 140px;
    color: #8b97ab;
    font-size: 13px;
}

.bills-history-card {
    border-radius: 18px;
    background: #0c1118;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.bills-history-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bills-history-card__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.bills-search input {
    width: min(280px, 70vw);
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: #151b24;
    color: #fff;
    font: inherit;
    font-size: 13px;
}

.bills-search input::placeholder {
    color: #7d8aa0;
}

.bills-count {
    color: #8b97ab;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.bills-table-wrap {
    overflow-x: auto;
}

.bills-table {
    width: 100%;
    min-width: 920px;
}

.bills-table th {
    white-space: nowrap;
}

.bills-table__actions-col {
    min-width: 280px;
}

.bills-invoice-cell,
.bills-customer-cell {
    display: grid;
    gap: 2px;
}

.bills-invoice-cell strong,
.bills-customer-cell strong {
    color: #fff;
    font-size: 13px;
}

.bills-invoice-cell small,
.bills-customer-cell small {
    color: #8b97ab;
    font-size: 12px;
}

.bills-payment-chip {
    display: inline-block;
    max-width: 160px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #c7d0dd;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.bills-money {
    white-space: nowrap;
    font-weight: 750;
    color: #fff;
}

.bills-money--profit {
    color: #48c98b;
}

.bills-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bills-empty {
    text-align: center;
    color: #8b97ab;
    padding: 36px 16px !important;
    font-size: 13px;
}

.bills-modal-dialog {
    width: min(900px, 100%);
    max-height: 92vh;
    grid-template-rows: auto 1fr auto;
}

.bills-modal-body {
    overflow: auto;
    padding: 16px;
    background: #e8eef5;
}

.bills-modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 16px;
    border-top: 1px solid #d7dee8;
    background: #fff;
}

.bills-modal-footer--form {
    margin-top: 8px;
    padding: 14px 0 0;
    border-top: 1px solid #e5ebf2;
}

.bills-edit-dialog {
    width: min(760px, 100%);
    max-height: 92vh;
    grid-template-rows: auto 1fr;
}

.bills-edit-form {
    overflow: auto;
    padding: 16px 18px 18px;
    background: #fff;
}

.bills-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bills-edit-field {
    display: grid;
    gap: 6px;
    color: #5b6b7c;
    font-size: 12px;
    font-weight: 700;
}

.bills-edit-field--full {
    grid-column: 1 / -1;
}

.bills-edit-field input,
.bills-edit-field textarea,
.bills-edit-field select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #d7dee8;
    border-radius: 10px;
    background: #f8fafc;
    color: #0b1f3a;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
}

.bills-edit-field textarea {
    min-height: 72px;
    resize: vertical;
}

.bills-edit-items {
    margin-top: 18px;
}

.bills-edit-items__head h3 {
    margin: 0;
    color: #0b1f3a;
    font-size: 14px;
}

.bills-edit-items__head p {
    margin: 4px 0 10px;
    color: #5b6b7c;
    font-size: 12px;
}

.bills-edit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bills-edit-table th,
.bills-edit-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e5ebf2;
    text-align: left;
    vertical-align: middle;
    color: #0b1f3a;
}

.bills-edit-table th {
    color: #5b6b7c;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bills-edit-table td strong {
    display: block;
}

.bills-edit-table td small {
    color: #8b97ab;
    font-size: 11px;
}

.bills-edit-table input[type="number"] {
    width: 72px;
    min-height: 34px;
    padding: 6px 8px;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    text-align: center;
    font: inherit;
}

.bills-edit-empty {
    padding: 18px;
    border: 1px dashed #d7dee8;
    border-radius: 12px;
    color: #8b97ab;
    font-size: 13px;
    text-align: center;
}

.bills-edit-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f5f8fb;
}

.bills-edit-totals div {
    display: grid;
    gap: 2px;
}

.bills-edit-totals span {
    color: #8b97ab;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bills-edit-totals strong {
    color: #0b1f3a;
    font-size: 18px;
}

.bills-edit-totals div:last-child strong {
    color: #0f8a4b;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1100px) {
    .billing-layout {
        grid-template-columns: 1fr;
    }

    .billing-admin-panel {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bills-stats,
    .bills-charts {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .invoice-sheet__top,
    .invoice-summary,
    .invoice-footer,
    .billing-admin-panel,
    .bills-stats,
    .bills-charts,
    .bills-edit-grid {
        grid-template-columns: 1fr;
    }

    .bills-history-card__head {
        align-items: stretch;
    }

    .bills-search input {
        width: 100%;
    }

    .invoice-meta {
        flex-direction: column;
        gap: 14px;
    }

    .invoice-meta > div:last-child {
        min-width: 0;
        width: 100%;
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid var(--bill-line);
        padding-top: 12px;
    }

    .invoice-table td:nth-child(6),
    .invoice-table th:nth-child(6) {
        width: 44px;
    }
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    body * {
        visibility: hidden !important;
    }

    .invoice-sheet,
    .invoice-sheet * {
        visibility: visible !important;
    }

    .invoice-sheet {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 12mm;
        border: 2px solid #0b1f3a;
        box-shadow: none;
    }

    .billing-fab,
    .billing-modal__header,
    .billing-modal__backdrop,
    .billing-modal .admin-button,
    .invoice-remove,
    .no-print,
    .admin-sidebar,
    .admin-header,
    .billing-toolbar,
    .billing-admin-panel,
    .admin-sidebar-overlay {
        display: none !important;
    }

    .invoice-table th.no-print,
    .invoice-table td.no-print {
        display: none !important;
    }

    .billing-modal,
    .billing-modal.is-open,
    .billing-modal__dialog,
    [data-bill-view-body] {
        position: static !important;
        display: block !important;
        width: 100% !important;
        max-height: none !important;
        overflow: visible !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        visibility: visible !important;
    }

    .invoice-field input,
    .invoice-field textarea,
    .invoice-field select,
    .invoice-table input {
        border: 0 !important;
        background: transparent !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
