/* Premium admin invoice workspace. */
.invoice-workspace-page { display: grid; gap: 17px; max-width: 1540px; margin: 0 auto; padding: 2px 0 28px; }
.invoice-workspace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 2px 2px; }
.invoice-workspace-header h1 { margin: 0; color: #0d1b32; font-size: clamp(1.75rem,2.2vw,2.2rem); font-weight: 800; letter-spacing: -.045em; }
.invoice-workspace-header p { margin: 5px 0 0; color: #65758b; font-size: .84rem; }
.invoice-dashboard-link { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding-inline: 14px; border-radius: 10px; color: #52667f; border-color: #cfd9e5; font-size: .61rem; font-weight: 740; }

.invoice-pulse { position: relative; display: grid; grid-template-columns: minmax(390px,1fr) minmax(460px,1.08fr) 265px; min-height: 205px; overflow: hidden; border: 1px solid rgba(255,255,255,.07); border-radius: 18px; color: #fff; background: radial-gradient(circle at 5% 0%,rgba(36,207,196,.17),transparent 32%),radial-gradient(circle at 100% 100%,rgba(105,82,235,.2),transparent 36%),linear-gradient(125deg,#0a1e3a,#102c56 55%,#173e74); box-shadow: 0 18px 38px rgba(23,48,88,.14); }
.invoice-pulse::before { content: ""; position: absolute; inset: 0; opacity: .1; background-image: linear-gradient(rgba(255,255,255,.17) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.13) 1px,transparent 1px); background-size: 41px 41px; mask-image: linear-gradient(90deg,#000,transparent 74%); }
.invoice-pulse-primary { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: 23px 25px; border-right: 1px solid rgba(255,255,255,.1); }
.invoice-pulse-primary .member-live-label { margin-bottom: 19px; }
.invoice-pulse-primary > .member-eyebrow,.invoice-pulse-note .member-eyebrow { color: #50d9d2; }
.invoice-pulse-primary > strong { display: block; margin: 6px 0 3px; color: #fff; font-size: 1.75rem; font-weight: 830; letter-spacing: -.05em; }
.invoice-pulse-primary h2 { margin: 2px 0 4px; color: #eaf2ff; font-size: .72rem; font-weight: 730; }
.invoice-pulse-primary p { max-width: 390px; margin: 0; color: #95adcc; font-size: .56rem; line-height: 1.5; }
.invoice-pulse-signals { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 13px; }
.invoice-pulse-signals article { display: grid; grid-template-columns: 35px 1fr; align-items: center; gap: 9px; min-width: 0; padding: 13px; border-right: 1px solid rgba(255,255,255,.09); border-bottom: 1px solid rgba(255,255,255,.09); }
.invoice-pulse-signals article:nth-child(2n) { border-right: 0; }
.invoice-pulse-signals article:nth-child(n+3) { border-bottom: 0; }
.invoice-pulse-signals article > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: #82abff; background: rgba(80,133,240,.14); font-size: .72rem; }
.invoice-pulse-signals article > span.is-green { color: #4cdda8; background: rgba(48,196,143,.13); }
.invoice-pulse-signals article > span.is-red { color: #ff9298; background: rgba(232,83,94,.14); }
.invoice-pulse-signals article > span.is-violet { color: #b5a1ff; background: rgba(130,101,233,.14); }
.invoice-pulse-signals article > div { min-width: 0; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; }
.invoice-pulse-signals small { color: #8fa8c9; font-size: .52rem; }
.invoice-pulse-signals strong { grid-row: 1 / 3; grid-column: 2; color: #fff; font-size: .88rem; letter-spacing: -.03em; white-space: nowrap; }
.invoice-pulse-signals em { overflow: hidden; color: #b0c2da; font-size: .51rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.invoice-pulse-note { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 20px; border-left: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.035); }
.invoice-pulse-note > span { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; color: #52d9d2; background: rgba(255,255,255,.055); }
.invoice-pulse-note > span.has-attention { color: #ffd178; background: rgba(239,174,57,.1); }
.invoice-pulse-note h2 { margin: 6px 0 4px; color: #fff; font-size: .82rem; font-weight: 770; }
.invoice-pulse-note p { margin: 0; color: #93aac9; font-size: .54rem; line-height: 1.5; }

.invoice-ledger-panel { overflow: hidden; border: 1px solid #dfe7f1; border-radius: 15px; background: #fff; box-shadow: 0 8px 25px rgba(28,48,74,.055); }
.invoice-ledger-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 21px 15px; }
.invoice-ledger-heading h2 { margin: 5px 0 2px; color: #172b46; font-size: .96rem; font-weight: 790; letter-spacing: -.022em; }
.invoice-ledger-heading p { margin: 0; color: #7d8b9f; font-size: .61rem; }
.invoice-result-count { display: flex; align-items: baseline; gap: 6px; padding: 8px 11px; border: 1px solid #dce5ef; border-radius: 10px; background: #fafcff; }
.invoice-result-count > span { color: #285eda; font-size: .85rem; font-weight: 820; }
.invoice-result-count small { color: #8391a3; font-size: .52rem; }
.invoice-ledger-toolbar { display: grid; grid-template-columns: minmax(260px,.85fr) minmax(520px,1.6fr) auto; align-items: center; gap: 8px; margin: 0 20px 15px; padding: 9px; border: 1px solid #dfe7f1; border-radius: 11px; background: #f8fafd; }
.invoice-search { position: relative; min-width: 0; margin: 0; }
.invoice-search > i { position: absolute; z-index: 1; top: 50%; left: 11px; color: #8ca0b7; font-size: .61rem; transform: translateY(-50%); pointer-events: none; }
.invoice-search .form-control { min-height: 37px; padding: 7px 52px 7px 31px; border-color: #dce5ef; border-radius: 8px; color: #3f536c; background: #fff; font-size: .6rem; box-shadow: none; }
.invoice-search .form-control:focus { border-color: #93b1f7; box-shadow: 0 0 0 3px rgba(49,105,245,.08); }
.invoice-search kbd { position: absolute; top: 50%; right: 9px; padding: 2px 5px; border: 1px solid #d8e1ec; border-radius: 5px; color: #8191a6; background: #f7f9fc; font-family: inherit; font-size: .46rem; font-weight: 650; transform: translateY(-50%); }
.invoice-status-tabs { display: flex; align-items: center; gap: 5px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.invoice-status-tabs::-webkit-scrollbar { display: none; }
.invoice-status-tabs a { min-height: 34px; display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border: 1px solid #dce5ef; border-radius: 8px; color: #687a90; background: #fff; font-size: .53rem; font-weight: 710; text-decoration: none; white-space: nowrap; }
.invoice-status-tabs a:hover { border-color: #b9caf3; color: #3169f5; background: #f5f8ff; }
.invoice-status-tabs a.is-active { color: #fff; border-color: #245fe9; background: #2864ed; box-shadow: 0 5px 11px rgba(40,100,237,.17); }
.invoice-export-button { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; color: #5e7188; border-color: #d4dee9; font-size: .56rem; font-weight: 730; white-space: nowrap; }
.invoice-active-filter { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 20px 14px; padding: 7px 10px; border: 1px solid #d9e5fb; border-radius: 9px; color: #53709c; background: #f4f8ff; font-size: .53rem; }
.invoice-active-filter span,.invoice-active-filter a { display: inline-flex; align-items: center; gap: 6px; }
.invoice-active-filter a { color: #3169f5; font-weight: 720; text-decoration: none; }

.invoice-table-wrap { border-top: 1px solid #e8edf4; }
.invoice-ledger-table { min-width: 1300px; margin: 0; }
.invoice-ledger-table thead th { padding: 11px 12px; border-color: #e5ebf2; color: #76859a; background: #f6f8fb; font-size: .53rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.invoice-ledger-table thead th:first-child,.invoice-ledger-table tbody td:first-child { padding-left: 20px; }
.invoice-ledger-table thead th:last-child,.invoice-ledger-table tbody td:last-child { padding-right: 20px; }
.invoice-ledger-table tbody tr { height: 74px; box-shadow: inset 3px 0 0 transparent; }
.invoice-ledger-table tbody tr.has-risk { box-shadow: inset 3px 0 0 #e64d54; }
.invoice-ledger-table tbody tr.has-warning { box-shadow: inset 3px 0 0 #eca022; }
.invoice-ledger-table tbody tr.is-settled { box-shadow: inset 3px 0 0 #25ac77; }
.invoice-ledger-table tbody tr[hidden] { display: none; }
.invoice-ledger-table tbody td { padding: 10px 12px; border-color: #edf1f6; color: #53647a; font-size: .6rem; vertical-align: middle; }
.invoice-number-cell { min-width: 210px; display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.invoice-number-cell > span { width: 36px; height: 36px; display: grid; flex: 0 0 36px; place-items: center; border-radius: 10px; color: #3169f5; background: #eaf1ff; font-size: .65rem; }
.invoice-number-cell > div,.invoice-client-cell > div,.invoice-amount-cell,.invoice-due-cell,.invoice-settlement > div { min-width: 0; display: grid; gap: 2px; }
.invoice-number-cell strong { max-width: 180px; overflow: hidden; color: #245bd5; font-size: .6rem; font-weight: 740; text-overflow: ellipsis; white-space: nowrap; }
.invoice-number-cell small,.invoice-client-cell small,.invoice-amount-cell small,.invoice-due-cell small,.invoice-settlement small { color: #8b99ab; font-size: .5rem; }
.invoice-client-cell { min-width: 170px; display: flex; align-items: center; gap: 8px; }
.invoice-client-cell > span { width: 32px; height: 32px; display: grid; flex: 0 0 32px; place-items: center; border-radius: 50%; color: #2e61dc; background: #e9f0ff; font-size: .5rem; font-weight: 820; }
.invoice-client-cell strong { overflow: hidden; max-width: 160px; color: #2c415c; font-size: .61rem; font-weight: 730; text-overflow: ellipsis; white-space: nowrap; }
.invoice-client-cell small { overflow: hidden; max-width: 165px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-plan-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #dfe7f1; border-radius: 8px; color: #53677f; background: #fafcfe; font-size: .53rem; font-weight: 680; white-space: nowrap; }
.invoice-plan-pill i { color: #7790b0; }
.invoice-amount-cell strong { color: #172f4c; font-size: .67rem; font-weight: 810; white-space: nowrap; }
.invoice-amount-cell small { color: #7f8ea1; }
.invoice-due-cell { min-width: 86px; }
.invoice-due-cell strong { color: #3b506a; font-size: .59rem; white-space: nowrap; }
.invoice-due-cell.is-overdue strong,.invoice-due-cell.is-overdue small { color: #c4434a; }
.invoice-due-cell.is-due-soon strong,.invoice-due-cell.is-due-soon small { color: #b97810; }
.invoice-status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid #d9dfe7; border-radius: 99px; color: #778596; background: #f4f6f8; font-size: .49rem; font-weight: 740; white-space: nowrap; }
.invoice-status.is-paid { color: #14845c; border-color: #bce9d4; background: #eefaf4; }
.invoice-status.is-open { color: #2b61dc; border-color: #c5d6fb; background: #eef4ff; }
.invoice-status.is-overdue,.invoice-status.is-failed { color: #c44048; border-color: #fac8cb; background: #fff1f2; }
.invoice-status.is-carried { color: #7152bc; border-color: #ddd2f8; background: #f5f1ff; }
.invoice-status.is-draft { color: #69798c; border-color: #d8e0e9; background: #f5f7f9; }
.invoice-settlement { min-width: 145px; display: flex; align-items: center; gap: 8px; }
.invoice-settlement > span { width: 28px; height: 28px; display: grid; flex: 0 0 28px; place-items: center; border-radius: 8px; color: #718298; background: #f0f3f7; font-size: .54rem; }
.invoice-settlement strong { max-width: 145px; overflow: hidden; color: #40546d; font-size: .56rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.invoice-settlement.is-paid > span { color: #16855d; background: #eaf8f1; }
.invoice-settlement.is-void > span { color: #7d8796; background: #eff2f5; }
.invoice-settlement.is-pending > span { color: #b77913; background: #fff5e4; }
.invoice-settlement-details { margin-top: 5px; }
.invoice-settlement-details summary { color: #647995; font-size: .49rem; font-weight: 700; cursor: pointer; list-style: none; }
.invoice-settlement-details summary::-webkit-details-marker { display: none; }
.invoice-settlement-details summary i { margin-left: 4px; font-size: .4rem; }
.invoice-settlement-details[open] summary i { transform: rotate(180deg); }
.invoice-settlement-details > div { display: grid; gap: 3px; margin-top: 6px; padding: 7px; border: 1px solid #e1e8f0; border-radius: 7px; background: #fafcfe; }
.invoice-settlement-details span { display: flex; justify-content: space-between; gap: 8px; color: #8391a3; font-size: .47rem; }
.invoice-settlement-details strong { color: #40536c; }
.invoice-row-actions { min-width: 190px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.invoice-row-actions .btn { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 8px; font-size: .53rem; font-weight: 740; white-space: nowrap; }
.invoice-view-action,.invoice-more-action { width: 32px; height: 32px; display: grid; flex: 0 0 32px; place-items: center; border: 1px solid #dbe4ee; border-radius: 8px; color: #657a92; background: #fff; font-size: .55rem; text-decoration: none; }
.invoice-view-action:hover { color: #3169f5; border-color: #b9ccf8; background: #f4f7ff; }
.invoice-more-action { color: #c6474e; }
.invoice-more-action:hover { color: #fff; border-color: #d94b52; background: #d94b52; }
.invoice-action-locked { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid #dce3eb; border-radius: 8px; color: #7f8c9c; background: #f7f9fb; font-size: .5rem; font-weight: 680; }

.invoice-search-empty,.invoice-ledger-empty { display: flex; align-items: center; justify-content: center; gap: 17px; min-height: 205px; padding: 30px; background: radial-gradient(circle at 4% 50%,rgba(49,105,245,.045),transparent 27%),linear-gradient(110deg,#fff,#f8fbff); }
.invoice-search-empty[hidden] { display: none; }
.invoice-search-empty > span,.invoice-ledger-empty > span { width: 58px; height: 58px; display: grid; flex: 0 0 58px; place-items: center; border-radius: 16px; color: #3169f5; background: #eaf1ff; font-size: 1.05rem; }
.invoice-search-empty h3,.invoice-ledger-empty h3 { margin: 4px 0; color: #243a57; font-size: .82rem; font-weight: 780; }
.invoice-search-empty p,.invoice-ledger-empty p { margin: 0; color: #8290a3; font-size: .57rem; }
.invoice-search-empty .btn,.invoice-ledger-empty .btn { margin-left: 14px; border-radius: 9px; font-size: .58rem; font-weight: 730; }
.invoice-ledger-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 20px; border-top: 1px solid #e9eef4; color: #8794a5; background: #fbfcfe; font-size: .52rem; }
.invoice-ledger-footer span { display: inline-flex; align-items: center; gap: 6px; }
.invoice-ledger-footer i { color: #6c8fcf; }
.invoice-ledger-footer strong { color: #40546d; }

@media (max-width: 1299.98px) {
  .invoice-pulse { grid-template-columns: minmax(350px,.9fr) minmax(420px,1fr) 240px; }
  .invoice-pulse-primary { padding-inline: 21px; }
  .invoice-pulse-signals article { padding: 10px; }
  .invoice-ledger-toolbar { grid-template-columns: minmax(280px,1fr) auto; }
  .invoice-status-tabs { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 991.98px) {
  .invoice-workspace-header { align-items: flex-start; flex-direction: column; }
  .invoice-pulse { grid-template-columns: minmax(350px,.9fr) minmax(390px,1.1fr); }
  .invoice-pulse-note { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.1); border-left: 0; }
}

@media (max-width: 767.98px) {
  .invoice-pulse { grid-template-columns: 1fr; }
  .invoice-pulse-primary { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .invoice-pulse-note { grid-column: auto; }
  .invoice-ledger-heading { align-items: flex-start; flex-direction: column; }
  .invoice-ledger-toolbar { grid-template-columns: 1fr; margin-inline: 12px; }
  .invoice-status-tabs { grid-column: auto; grid-row: auto; }
  .invoice-export-button { justify-content: center; }
  .invoice-active-filter { margin-inline: 12px; }
  .invoice-ledger-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 575.98px) {
  .invoice-dashboard-link { width: 100%; justify-content: center; }
  .invoice-pulse-signals { grid-template-columns: 1fr; }
  .invoice-pulse-signals article { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.09); }
  .invoice-pulse-signals article:nth-child(3) { border-bottom: 1px solid rgba(255,255,255,.09); }
  .invoice-search-empty,.invoice-ledger-empty { align-items: flex-start; flex-direction: column; }
  .invoice-search-empty .btn,.invoice-ledger-empty .btn { width: 100%; margin-left: 0; }
}
