/* Statement workspace: scoped to the reference-style management page. */
.dr-workspace {
  --dr-ink: #14223b;
  --dr-muted: #7789a5;
  --dr-teal: #00898b;
  --dr-line: #e4edf5;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  color: var(--dr-ink);
}
.dr-workspace * { box-sizing: border-box; }
.dr-workspace button:not(.btn):not(.dr-stat) { min-height: 0; }
.dr-workspace .dr-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 0 1px; }
.dr-workspace .dr-header h1 { margin: 2px 0 5px; color: #121d2f; font-size: 25px; line-height: 1.25; letter-spacing: -.7px; }
.dr-workspace .dr-header p { margin: 0; color: #647793; font-size: 12px; line-height: 1.5; }
.dr-workspace .dr-header .dr-breadcrumb { margin-bottom: 4px; color: #8191a9; font-size: 10px; }
.dr-workspace .dr-header-actions { display: flex; flex-shrink: 0; gap: 8px; }
.dr-workspace .btn { width: auto; min-width: 0; min-height: 34px; height: 34px; padding: 0 12px; gap: 6px; border: 1px solid #dce6f0; border-radius: 6px; background: #fff; color: #25354c; font-size: 11px; font-weight: 700; white-space: nowrap; box-shadow: none; }
.dr-workspace .btn.primary { border-color: var(--dr-teal); background: linear-gradient(115deg, #00979a, #007b7d); color: #fff; }
.dr-workspace .icon { display: inline-flex; width: 15px; height: 15px; flex-shrink: 0; }
.dr-workspace .icon svg { width: 100%; height: 100%; }
.dr-workspace .dr-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.dr-workspace .dr-stat { display: flex; align-items: center; gap: 15px; min-width: 0; min-height: 84px; padding: 15px 16px; border: 1px solid var(--dr-line); border-radius: 7px; background: #fff; color: var(--dr-ink); text-align: left; font: inherit; box-shadow: 0 3px 9px rgb(22 52 86 / 3%); }
.dr-workspace button.dr-stat { cursor: pointer; }
.dr-workspace .dr-stat-icon { display: grid; place-items: center; flex: 0 0 43px; width: 43px; height: 43px; border-radius: 11px; color: #11a466; background: #e8faf1; }
.dr-workspace .dr-stat-icon svg { width: 25px; height: 25px; }
.dr-workspace .dr-stat > span:last-child { min-width: 0; }
.dr-workspace .dr-stat small { display: block; margin-bottom: 4px; color: #677a96; font-size: 11px; font-weight: 700; }
.dr-workspace .dr-stat strong { display: block; font-size: clamp(17px, 1.65vw, 24px); line-height: 1.25; letter-spacing: -.6px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.dr-workspace .dr-stat.teal { border-color: #00898b; background: linear-gradient(115deg, #008c8c, #007b7f); color: #fff; }
.dr-workspace .dr-stat.teal small { color: #d8f7f4; }
.dr-workspace .dr-stat.teal .dr-stat-icon { background: rgb(255 255 255 / 20%); color: #fff; }
.dr-workspace .dr-stat.orange .dr-stat-icon { background: #fff3df; color: #ff860b; }
.dr-workspace .dr-stat.orange strong { font-size: clamp(16px, 1.5vw, 22px); }
.dr-workspace .surface { border: 1px solid var(--dr-line); border-radius: 8px; background: #fff; box-shadow: 0 3px 12px rgb(23 53 83 / 2%); }
.dr-workspace .surface:hover { transform: none; border-color: var(--dr-line); box-shadow: 0 3px 12px rgb(23 53 83 / 2%); }
.dr-workspace .dr-filters { display: grid; grid-template-columns: minmax(200px, 2.1fr) auto minmax(110px, .85fr) minmax(120px, 1fr) minmax(130px, 1.1fr) auto; align-items: center; gap: 8px; padding: 10px 11px; }
.dr-workspace input, .dr-workspace select { min-width: 0; max-width: 100%; border: 1px solid #dbe5f0; border-radius: 5px; background-color: #fff; color: #24354c; font: inherit; font-size: 11px; }
.dr-workspace select { width: 100%; height: 34px; padding: 0 26px 0 11px; text-overflow: ellipsis; }
.dr-workspace .dr-query { display: flex; position: relative; align-items: center; min-width: 0; }
.dr-workspace .dr-query > .icon { position: absolute; left: 10px; color: #8196b1; pointer-events: none; }
.dr-workspace .dr-query input { width: 100%; height: 34px; padding: 0 33px 0 31px; }
.dr-workspace input::placeholder { color: #8b9bb1; }
.dr-workspace .dr-advanced { display: grid; place-items: center; position: absolute; right: 3px; width: 27px; height: 27px; padding: 5px; border: 0; border-radius: 4px; background: transparent; color: #8c9db3; cursor: pointer; }
.dr-workspace .dr-advanced svg { width: 15px; height: 15px; }
.dr-workspace .dr-advanced:hover { color: var(--dr-teal); background: #eaf8f7; }
.dr-workspace .dr-date-caption { color: #7c8da7; font-size: 10px; white-space: nowrap; }
.dr-workspace .dr-custom-period { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; padding-top: 4px; }
.dr-workspace .dr-custom-period[hidden] { display: none; }
.dr-workspace .dr-custom-period label { display: flex; align-items: center; gap: 9px; color: #7185a0; font-size: 11px; }
.dr-workspace .dr-custom-period input { width: 145px; height: 33px; padding: 0 8px; }
.dr-workspace .dr-filter-state { display: flex; justify-content: space-between; gap: 12px; grid-column: 1 / -1; color: #7990a8; font-size: 10px; }
.dr-workspace .dr-filter-state .link-button { width: auto; color: var(--dr-teal); font-size: 10px; }
.dr-workspace .dr-list { min-width: 0; padding: 0 11px; overflow: hidden; }
.dr-workspace .dr-list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 5px 11px; }
.dr-workspace .dr-list-head > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dr-workspace .dr-list-head h2 { margin: 0; font-size: 14px; letter-spacing: -.3px; white-space: nowrap; }
.dr-workspace .dr-list-head > div > span { color: #7386a1; font-size: 10px; white-space: nowrap; }
.dr-workspace .dr-list-head .dr-selection { border-radius: 12px; padding: 3px 8px; background: #e8f7f5; color: var(--dr-teal); }
.dr-workspace .dr-list-tools { margin-left: auto; }
.dr-workspace .dr-profit-control { display: flex; align-items: center; gap: 10px; color: #647794; font-size: 10px; white-space: nowrap; }
.dr-workspace .dr-switch { display: flex; align-items: center; width: 35px; height: 20px; padding: 2px; border: 0; border-radius: 20px; background: #bdc9d8; cursor: pointer; }
.dr-workspace .dr-switch span { display: block; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 15%); transition: transform 160ms ease; }
.dr-workspace .dr-switch.on { background: var(--dr-teal); }
.dr-workspace .dr-switch.on span { transform: translateX(15px); }
.dr-workspace .dr-list-tools select { width: 106px; height: 30px; font-size: 10px; }
.dr-workspace .dr-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid #eaf0f6; border-radius: 7px; overscroll-behavior-x: contain; }
.dr-workspace .dr-table { table-layout: fixed; width: 100%; min-width: 880px; border-collapse: collapse; border: 0; font-size: 11px; }
.dr-workspace .dr-table .dr-check-col { width: 34px; }
.dr-workspace .dr-table .dr-number-col { width: 144px; }
.dr-workspace .dr-table .dr-customer-col { width: 17%; }
.dr-workspace .dr-table .dr-status-col { width: 78px; }
.dr-workspace .dr-table .dr-money-col { width: 110px; }
.dr-workspace .dr-table .dr-profit-col { width: 102px; }
.dr-workspace .dr-table .dr-arrow-col { width: 28px; }
.dr-workspace .dr-table th { height: 34px; padding: 8px; border: 0; background: #f6f9fc; color: #7d8eaa; font-size: 10px; font-weight: 700; white-space: nowrap; }
.dr-workspace .dr-table td { height: 43px; padding: 6px 8px; border: 0; border-top: 1px solid #eaf0f7; background: transparent; color: #24344c; vertical-align: middle; }
.dr-workspace .dr-table tr.dr-row { cursor: pointer; }
.dr-workspace .dr-table tbody tr:hover, .dr-workspace .dr-table tr.dr-selected { background: #eaf8f7; }
.dr-workspace .dr-checkbox { text-align: center; }
.dr-workspace .dr-checkbox input { appearance: auto; width: 13px; height: 13px; margin: 0; accent-color: #008c8d; vertical-align: middle; cursor: pointer; }
.dr-workspace .dr-table .link-button { display: block; width: 100%; min-width: 0; max-width: 100%; padding: 0; border: 0; color: #00878b; background: transparent; font: inherit; font-weight: 700; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.dr-workspace .dr-number .link-button { font-size: 11px; }
.dr-workspace .dr-number small { display: block; margin-top: 2px; color: #7c8fad; font-size: 10px; line-height: 1.3; white-space: nowrap; }
.dr-workspace .dr-customer svg { display: inline-block; width: 11px; height: 11px; margin-left: 5px; vertical-align: -1px; }
.dr-workspace .dr-product { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-workspace .dr-table .badge, .dr-workspace .dr-table .document-status-badge { min-height: 22px; height: auto; display: inline-flex; align-items: center; justify-content: center; min-width: 49px; padding: 3px 9px; border-radius: 20px; font-size: 10px; line-height: 1.3; white-space: nowrap; }
.dr-workspace .dr-table .document-status-badge.draft { border-color: #cbdfff; background: #e3eeff; color: #397ee8; }
.dr-workspace .dr-table .num { text-align: right; }
.dr-workspace .dr-table .dr-money { font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dr-workspace .dr-table .dr-profit { font-weight: 500; }
.dr-workspace .dr-table .dr-arrow { padding: 4px; }
.dr-workspace .dr-arrow button { display: grid; place-items: center; width: 20px; height: 26px; padding: 3px; border: 0; background: transparent; color: #68839c; cursor: pointer; }
.dr-workspace .dr-arrow svg { width: 15px; height: 15px; }
.dr-workspace .dr-pagination { display: flex; align-items: center; gap: 12px; min-height: 47px; padding: 9px 1px; color: #7486a2; font-size: 10px; }
.dr-workspace .dr-pagination > span { margin-right: auto; }
.dr-workspace .dr-pagination label { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.dr-workspace .dr-pagination select { width: 76px; height: 27px; padding: 0 22px 0 9px; font-size: 10px; }
.dr-workspace .dr-pagination nav { display: flex; align-items: center; gap: 4px; }
.dr-workspace .dr-page { display: grid; place-items: center; width: 26px; height: 27px; padding: 0; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #687f9c; font: inherit; cursor: pointer; }
.dr-workspace .dr-page.active { border-color: #8bcfce; background: #e4f7f4; color: #00878a; }
.dr-workspace .dr-page:disabled { opacity: .35; cursor: default; }
.dr-workspace .dr-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; min-height: 230px; color: #7a8ea8; font-size: 12px; }
.dr-workspace .dr-empty > .icon { width: 30px; height: 30px; color: #9ab8c7; }
.dr-workspace button:focus-visible, .dr-workspace input:focus-visible, .dr-workspace select:focus-visible, .dr-workspace .dr-row:focus-visible { outline: 2px solid #00a4a0; outline-offset: 2px; }
@media (max-width: 1180px) {
  .dr-workspace .dr-stat { gap: 9px; padding: 13px 11px; }
  .dr-workspace .dr-stat-icon { flex-basis: 35px; width: 35px; height: 38px; }
  .dr-workspace .dr-stat strong { font-size: 19px; }
  .dr-workspace .dr-stat.orange strong { font-size: 17px; }
  .dr-workspace .dr-filters { grid-template-columns: minmax(170px, 1.6fr) minmax(100px, .8fr) minmax(110px, 1fr) minmax(120px, 1fr) auto; }
  .dr-workspace .dr-date-caption { display: none; }
}
@media (max-width: 800px) {
  .dr-workspace { gap: 11px; }
  .dr-workspace .dr-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .dr-workspace .dr-header h1 { font-size: 23px; }
  .dr-workspace .dr-header-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .dr-workspace .dr-header-actions .btn { width: 100%; min-height: 39px; height: auto; }
  .dr-workspace .dr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dr-workspace .dr-stat { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 100px; padding: 12px; }
  .dr-workspace .dr-stat > span:last-child { display: contents; }
  .dr-workspace .dr-stat-icon { flex-basis: 30px; width: 30px; height: 34px; border-radius: 9px; }
  .dr-workspace .dr-stat-icon svg { width: 22px; height: 22px; }
  .dr-workspace .dr-stat small { grid-column: 2; margin: 0; font-size: 10px; }
  .dr-workspace .dr-stat strong, .dr-workspace .dr-stat.orange strong { grid-column: 1 / -1; font-size: clamp(16px, 4.6vw, 22px); letter-spacing: -.6px; }
  .dr-workspace .dr-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
  .dr-workspace .dr-query { grid-column: 1 / -1; }
  .dr-workspace .dr-query input { padding-left: 31px !important; padding-right: 33px !important; }
  .dr-workspace .dr-query input, .dr-workspace .dr-filters select, .dr-workspace .dr-filters > .btn { min-height: 39px; height: 39px; font-size: 12px; }
  .dr-workspace .dr-custom-period { align-items: center; gap: 6px; }
  .dr-workspace .dr-custom-period label { flex: 1 1 120px; display: grid; gap: 4px; }
  .dr-workspace .dr-custom-period input { width: 100%; height: 37px; font-size: 12px; }
  .dr-workspace .dr-list { padding: 0 9px; }
  .dr-workspace .dr-list-head { flex-wrap: wrap; gap: 9px; padding: 13px 1px; }
  .dr-workspace .dr-list-head > div { gap: 9px; }
  .dr-workspace .dr-list-head .dr-list-tools { justify-content: space-between; width: 100%; margin-left: 0; }
  .dr-workspace .dr-profit-control { font-size: 11px; }
  .dr-workspace .dr-list-tools select { width: 148px; height: 33px; font-size: 11px; }
  .dr-workspace .dr-pagination select { width: 88px; }
  .dr-workspace .dr-table-wrap { touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
  .dr-workspace .dr-table { min-width: 880px; }
  .dr-workspace .dr-table td { height: 48px; }
  .dr-workspace .dr-pagination { flex-wrap: wrap; gap: 9px; min-height: 55px; padding: 11px 1px; }
  .dr-workspace .dr-pagination nav { justify-content: flex-end; margin-left: auto; }
  .dr-workspace .dr-page { width: 28px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .dr-workspace .dr-switch span { transition: none; }
}
