.company-invoices { min-width: 0; color: var(--text, #202020); }
.company-invoices h2 { font-size: 24px; }
.company-invoices h3 { margin: 26px 0 12px; font-size: 18px; line-height: 1.35; }
.company-invoices p { max-width: 72ch; line-height: 1.55; overflow-wrap: anywhere; }
.company-invoices form { display: grid; max-width: 600px; margin-block: 22px; gap: 14px; }
.company-invoices label { display: grid; gap: 6px; color: var(--muted, #667085); font-size: 14px; }
.company-amount-control { display: flex; align-items: flex-end; gap: 12px; }
.company-amount-control > label { flex: 1; min-width: 0; }
.company-amount-currency { display: flex; align-items: center; min-height: 44px; color: var(--text, #202020); font-size: 16px; white-space: nowrap; }
.company-invoices input, .company-invoices select {
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #b8b5ae;
  border-radius: 10px;
  background: #fff;
  color: var(--text, #202020);
  font: inherit;
}
.company-invoices label:has(> input[type=checkbox]) { display: flex; align-items: center; gap: 10px; min-height: 44px; line-height: 1.45; cursor: pointer; }
.company-invoices input[type=checkbox] { width: 20px; height: 20px; min-height: 20px; flex: 0 0 20px; padding: 0; margin: 0; }
.company-invoices button { min-height: 44px; padding: 10px 16px; cursor: pointer; }
.company-invoices button:disabled { cursor: default; opacity: .55; }
.company-invoices :focus-visible { outline: 3px solid var(--blue, #b10101); outline-offset: 3px; }
.company-invoices section { min-width: 0; }
.company-connect-state { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 16px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line, #d4dae1); }
.company-connect-badge { display: grid; grid-row: 1 / span 2; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--blue-bg, #f3e7e5); color: var(--blue, #b10101); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.company-connect-copy h4 { margin: 1px 0 6px; font-size: 17px; line-height: 1.35; }
.company-connect-copy p { margin: 0; color: var(--muted, #667085); font-size: 14px; }
.company-connect-action { grid-column: 2; justify-self: start; min-height: 44px; padding: 10px 18px; }
.company-connect-note { grid-column: 1 / -1; margin: 2px 0 0; color: var(--muted, #667085); font-size: 13px; }
.company-invoices [data-company-balance] { margin: 16px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.company-profile-details { margin-top: 20px; border-block: 1px solid var(--line, #d4dae1); }
.company-profile-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding-block: 14px; cursor: pointer; list-style: none; }
.company-profile-details > summary::-webkit-details-marker { display: none; }
.company-profile-copy { display: grid; min-width: 0; gap: 4px; font-size: 14px; overflow-wrap: anywhere; }
.company-profile-copy > small { color: var(--muted, #62605b); font-size: 13px; }
.company-profile-edit { flex-shrink: 0; color: #174f89; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.company-invoices [data-company-profile] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: none; margin: 0 0 16px; gap: 12px 16px; }
.company-invoices [data-company-profile] > label:last-of-type { grid-column: 1 / -1; }
.company-invoices [data-company-profile] > button { grid-column: 1 / -1; justify-self: start; width: auto; }
.company-invoices [data-company-profile] input, .company-invoices [data-company-invoice-create] input, .company-invoices [data-company-invoice-create] select { box-sizing: border-box; width: 100%; }
.company-invoices [data-company-invoice-create] { grid-template-columns: minmax(120px, 1fr) 100px auto; align-items: end; max-width: 600px; margin: 20px 0 24px; gap: 12px; }
.company-invoices [data-company-invoice-create] h3,
.company-invoices [data-company-invoice-create] p { grid-column: 1 / -1; }
.company-invoices [data-company-invoice-create] h3 { margin: 0; }
.company-invoices [data-company-invoice-create] button { width: auto; white-space: nowrap; }
.company-invoices [data-company-key-reveal] { display: grid; max-width: 600px; margin-block: 20px; padding: 16px; gap: 12px; border: 1px solid #b8b5ae; border-radius: 10px; }
.company-invoices [data-company-key-reveal] input { width: 100%; box-sizing: border-box; }
.company-row { padding-block: 18px; border-bottom: 1px solid var(--line, #d4dae1); font-variant-numeric: tabular-nums; }
.company-row a { display: inline-block; margin: 8px 24px 8px 0; color: #174f89; text-underline-offset: 4px; }
.company-invoices ::selection { background: #e3bdb6; color: var(--text, #202020); }

.company-admin-panel.company-invoices { margin: 0; padding: 0; border: 0; color: var(--text); }
.company-admin-panel.company-invoices form { max-width: none; margin: 0; }
.company-admin-panel.company-invoices label { color: var(--muted); }
.company-admin-panel.company-invoices input { border-color: var(--line); border-radius: 12px; }
.company-admin-panel.company-invoices fieldset { padding: 20px; border-color: var(--line); border-radius: 16px; }
.company-admin-panel.company-invoices legend { color: var(--text); font-size: 15px; }
.company-admin-panel .company-feedback { max-width: 75ch; margin: 0 0 20px; padding: 14px 16px; border: 1px solid #b9d4b5; border-radius: 12px; background: #eef6ed; color: #28512c; }
.company-admin-panel .company-feedback:empty { display: none; }
.company-settings-form { display: grid; gap: 24px; }
.company-admin-panel .company-identity-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.company-admin-panel .company-bank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.company-admin-panel .company-bank-grid fieldset { display: grid; align-content: start; gap: 16px; }
.company-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.company-form-footer p { margin: 0; color: var(--muted); font-size: 14px; }
.company-form-footer button { min-width: 220px; }
.company-rate-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.company-rate-current { display: grid; gap: 5px; padding: 20px; border-block: 1px solid var(--line); }
.company-rate-current span { color: var(--muted); font-size: 13px; font-weight: 600; }
.company-rate-current strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.company-rate-current small { color: var(--muted); overflow-wrap: anywhere; }
.company-rate-form { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; align-items: end; gap: 16px !important; }
.company-rate-form button { min-height: 44px; }
.company-provision-form { display: grid !important; grid-template-columns: minmax(240px, 560px) auto; align-items: end; gap: 16px !important; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.company-provision-form h3 { grid-column: 1 / -1; margin: 0 !important; }
.company-configuration-summary { color: var(--muted); font-size: 14px; }
.company-admin-panel > .company-panel-content > h3 { margin-top: 32px; }
.company-admin-panel .company-row { padding: 20px 0; }
.company-admin-panel .company-row form { max-width: 680px; margin-top: 20px; }
.company-account-tools { margin-bottom: 18px; font-size: 14px; }
.company-account-tools > summary { min-height: 44px; align-content: center; cursor: pointer; color: var(--muted, #62605b); }
.company-account-tools .company-provision-form { margin-top: 12px !important; }
.company-invoice-filters { display: flex; flex-wrap: wrap; gap: 8px 24px; border-bottom: 1px solid var(--line, #d4dae1); }
.company-invoices .company-invoice-filter { width: auto; padding: 10px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted, #62605b); font-size: 14px; }
.company-invoices .company-invoice-filter[aria-pressed=true] { border-bottom-color: var(--text, #202020); color: var(--text, #202020); font-weight: 600; }
.company-invoices .company-invoice-category-note, .company-invoice-empty { margin: 12px 0; color: var(--muted, #62605b); font-size: 13px; }
.company-invoices .company-invoice-row { padding: 0; }
.company-invoice-row > summary { display: flex; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; }
.company-invoice-row > summary::-webkit-details-marker { display: none; }
.company-invoice-row > summary::before { content: ''; flex: 0 0 7px; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.company-invoice-row[open] > summary::before { transform: rotate(45deg); }
.company-invoice-summary { display: grid; flex: 1; min-width: 0; grid-template-columns: minmax(180px, 1fr) 130px minmax(140px, auto) 90px; align-items: center; gap: 16px; font-size: 14px; }
.company-invoice-identity { display: grid; min-width: 0; gap: 4px; }
.company-invoice-identity > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted, #62605b); }
.company-invoice-total { font-weight: 600; white-space: nowrap; }
.company-invoice-date { color: var(--muted, #62605b); text-align: right; font-size: 13px; }
.company-invoice-state { font-size: 13px; }
.payment-method .company-invoice-summary { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
.payment-method .company-invoice-total { text-align: right; }
.payment-method .company-invoice-panel { padding: 0 0 12px; }
.company-invoice-panel { padding: 0 24px 20px; }
.company-invoice-actions { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.company-invoice-actions a { margin: 0 0 12px; font-size: 14px; }
.company-invoice-panel > p { margin: 6px 0 12px; font-size: 13px; }
.company-invoice-review { font-weight: 600; }
.company-admin-panel .company-invoice-panel .company-confirm-form { max-width: 640px; margin: 10px 0 0; gap: 12px; }
.company-confirm-fields { display: grid; grid-template-columns: 200px minmax(220px, 340px); gap: 16px; align-items: end; }
.company-confirm-fields input { box-sizing: border-box; width: 100%; }
.company-invoices .company-confirm-help { margin: 0; font-size: 13px; }
.company-confirm-footer { display: flex; align-items: center; gap: 20px; justify-content: space-between; }
.company-confirm-footer > label { flex: 1; font-size: 13px; }
.company-confirm-footer > button { flex: 0 0 auto; }
.company-keys-details { margin-top: 24px; border-block: 1px solid var(--line, #d4dae1); }
.company-keys-details > summary, .company-key-row > summary { display: flex; align-items: center; gap: 12px; min-height: 44px; padding-block: 12px; cursor: pointer; list-style: none; font-size: 14px; }
.company-keys-details > summary::-webkit-details-marker, .company-key-row > summary::-webkit-details-marker { display: none; }
.company-keys-details > summary::before, .company-key-row > summary::before { content: ''; flex: 0 0 7px; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.company-keys-details[open] > summary::before, .company-key-row[open] > summary::before { transform: rotate(45deg); }
.company-keys-details > summary > span { margin-left: auto; color: var(--muted, #62605b); font-variant-numeric: tabular-nums; }
.company-invoices [data-company-key-content] > p { margin: 0 0 12px; font-size: 13px; }
.company-invoices [data-company-key-create] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: none; margin: 12px 0 16px; gap: 12px 16px; }
.company-invoices [data-company-key-create] > p { grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: 13px; }
.company-invoices [data-company-key-create] input { box-sizing: border-box; width: 100%; }
.company-invoices [data-company-key-create] > button { grid-column: 1 / -1; justify-self: start; width: auto; }
.company-invoices .company-key-row { padding: 0 0 12px; border-top: 1px solid var(--line, #d4dae1); border-bottom: 0; }
.company-key-identity { display: grid; flex: 1; min-width: 0; gap: 4px; overflow-wrap: anywhere; }
.company-key-identity > span { color: var(--muted, #62605b); }
.company-key-row > summary > span:last-child { font-size: 13px; }
.company-key-row > p { margin: 0 0 8px; font-size: 13px; }
.company-invoices .company-key-row > button { width: auto; }

@media (max-width: 760px) {
  .company-invoice-summary { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .company-invoice-total { text-align: right; }
  .company-invoice-panel { padding: 0 0 16px; }
  .company-invoice-filters { gap: 0 16px; }
  .company-confirm-fields { grid-template-columns: minmax(150px, .65fr) minmax(0, 1fr); gap: 12px; }
  .company-confirm-footer { flex-direction: column; align-items: stretch; gap: 8px; }
  .company-invoices form { max-width: 100%; }
  .company-invoices button { width: 100%; }
  .company-connect-state { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; }
  .company-connect-badge { width: 40px; height: 40px; }
  .company-connect-action { grid-column: 1 / -1; width: 100%; }
  .company-admin-panel .company-identity-fields,
  .company-admin-panel .company-bank-grid,
  .company-rate-summary { grid-template-columns: 1fr; }
  .company-rate-form,
  .company-provision-form { grid-template-columns: 1fr !important; }
  .company-form-footer { align-items: stretch; flex-direction: column; }
  .company-form-footer button { min-width: 0; }
}
@media (max-width: 520px) {
  .company-invoices [data-company-key-create] { grid-template-columns: 1fr; }
  .company-invoices [data-company-key-create] > p { grid-row: auto; }
  .company-invoices [data-company-profile] { grid-template-columns: 1fr; }
  .company-invoices [data-company-invoice-create] { grid-template-columns: minmax(0, 1fr) 100px; }
  .company-invoices [data-company-invoice-create] button { grid-column: 1 / -1; justify-self: start; }
  .company-confirm-fields { grid-template-columns: 1fr; }
}
.entity-confirm-check { display:flex; align-items:center; gap:8px; }
#entity-admin .company-invoice-filters { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
#entity-admin .company-invoice-filters button { width:auto; }
#entity-admin .company-invoice-filters button[aria-pressed=true] { background:#202020; color:#fff; }
.entity-confirm-check input[type=checkbox] { width:18px; height:18px; flex:0 0 18px; }
