/* Compact summary tiles and aligned table controls for the staff workspace. */
html body #kai-workspace.kai-theme .rake-linked-deductions {
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px;
}
html body #kai-workspace.kai-theme .rake-linked-deductions > span {
  --entry-icon-color: #008768;
  display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto auto auto;
  align-content: center; align-items: center; column-gap: 10px; row-gap: 3px;
  min-width: 0; min-height: 94px; padding: 13px 12px !important;
  background: #fff !important; border: 1px solid #dbe3f1 !important; border-radius: 10px !important;
}
html body #kai-workspace.kai-theme .rake-linked-deductions > span::before {
  content: ''; grid-column: 1; grid-row: 1 / 4; width: 38px; height: 38px;
  background: var(--entry-icon-color); border-radius: 10px; box-shadow: 0 3px 7px #18234b12;
}
html body #kai-workspace.kai-theme .rake-linked-deductions > span::after {
  content: ''; grid-column: 1; grid-row: 1 / 4; justify-self: center;
  width: 20px; height: 20px; background: white;
  -webkit-mask: var(--entry-icon) center / contain no-repeat;
  mask: var(--entry-icon) center / contain no-repeat;
}
html body #kai-workspace.kai-theme .rake-linked-deductions > span > svg { display: none; }
html body #kai-workspace.kai-theme .rake-linked-deductions > span > small { grid-column: 2; grid-row: 1; color: #18345b !important; font-size: 11px; font-weight: 700; line-height: 1.4; }
html body #kai-workspace.kai-theme .rake-linked-deductions > span > strong { grid-column: 2; grid-row: 2; color: #526b93 !important; font-size: 15px !important; font-weight: 650; line-height: 1.4; font-variant-numeric: tabular-nums; }
html body #kai-workspace.kai-theme .rake-linked-deductions > span > em { grid-column: 2; grid-row: 3; color: #74839a !important; font-size: 10px; font-style: normal; line-height: 1.4; }
html body #kai-workspace.kai-theme .rake-linked-deductions > :is(.deduction, .expense, .rake-back, .net-negative) { --entry-icon-color: #cf2850; }
html body #kai-workspace.kai-theme .rake-linked-deductions > .warning { --entry-icon-color: #c45d00; }
html body #kai-workspace.kai-theme .rake-linked-deductions > .net-positive { --entry-icon-color: #265dcc; }

html body #kai-workspace.kai-theme .rake-history-panel .table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 10px; }
html body #kai-workspace.kai-theme .rake-history-panel table { width: 100%; border-collapse: separate; border-spacing: 0; }
html body #kai-workspace.kai-theme .rake-history-panel :is(th, td) { padding: 12px 14px; vertical-align: middle; white-space: nowrap; line-height: 1.5; }
html body #kai-workspace.kai-theme .rake-history-panel th { background: #f6f8fc; color: #526b93; font-size: 11px; font-weight: 700; text-transform: none; }
html body #kai-workspace.kai-theme .rake-history-panel td { font-size: 12px; border-bottom: 1px solid #edf0f5; }
html body #kai-workspace.kai-theme .rake-history-panel :is(th, td):nth-child(n+3):nth-child(-n+16) { text-align: right; font-variant-numeric: tabular-nums; }
html body #kai-workspace.kai-theme .rake-history-panel :is(th, td):nth-last-child(2) { color: #265dcc; font-weight: 750; }
html body #kai-workspace.kai-theme .rake-history-panel :is(th, td):last-child { position: sticky; right: 0; z-index: 1; text-align: center; background: #fff; border-left: 1px solid #edf0f5; }
html body #kai-workspace.kai-theme .rake-history-panel th:last-child { background: #f6f8fc; }
html body #kai-workspace.kai-theme .rake-history-panel .table-inline-actions { display: flex; align-items: center; justify-content: center; gap: 8px; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .table-inline-actions .btn:is(.table-edit-icon, .table-delete-icon),
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .table-inline-actions .btn:has(svg:is(.lucide-trash-2, .lucide-trash2, .lucide-pencil, .lucide-pen-line, .lucide-edit-3, .lucide-square-pen)) {
  display: inline-flex; justify-content: center; align-items: center; gap: 0;
  width: 36px; height: 36px; min-width: 36px; min-height: 36px !important; padding: 0 !important;
  border: 0 !important; border-radius: 8px !important; font-size: 0; color: white !important; background: #265dcc !important;
}
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .table-inline-actions .btn:is(.table-delete-icon, :has(svg:is(.lucide-trash-2, .lucide-trash2))) { background: #cf2850 !important; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .table-inline-actions .btn svg { width: 16px; height: 16px; flex: none; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .table-inline-actions .btn:is(.table-edit-icon, .table-delete-icon):hover { filter: brightness(.9); }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .table-inline-actions .btn:focus-visible { outline: 2px solid #265dcc; outline-offset: 3px; }

/* These controls previously had layout rules only inside cashier-fullscreen. */
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel > .panel-header {
  display: flex !important; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 18px 20px !important; margin: 0 0 14px; min-height: 0;
}
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel > .panel-header > div:first-child { flex: 1 1 260px; min-width: 0; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .panel-header h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; line-height: 1.5; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .te-history-count { margin: 0; padding: 4px 9px; font-size: 11px; line-height: 1.4; white-space: nowrap; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .panel-header p { margin: 5px 0 0; line-height: 1.5; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .bank-ledger-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; flex: 0 1 auto; min-width: 0; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .bank-search { display: flex; align-items: center; gap: 8px; width: 290px; max-width: 100%; min-width: 0; height: 40px; padding: 0 11px; border: 1px solid #dbe3f1; border-radius: 8px; background: white; margin: 0; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .bank-search > svg { position: static; flex: 0 0 16px; width: 16px; height: 16px; color: #74839a; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .bank-search input { flex: 1; width: 100%; min-width: 0; height: 38px; padding: 0 !important; margin: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 12px; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .bank-search:focus-within { outline: 2px solid #265dcc; outline-offset: 2px; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .recent-transaction-pages { display: flex; align-items: center; justify-content: center; gap: 10px; flex: 0 0 auto; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .recent-transaction-pages > span { min-width: 42px; text-align: center; white-space: nowrap; font-size: 12px; line-height: 1.5; }
html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .recent-transaction-pages .btn { min-height: 40px; padding: 8px 12px; white-space: nowrap; margin: 0; }
@media (max-width: 1200px) { html body #kai-workspace.kai-theme .rake-linked-deductions { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 700px) {
  html body #kai-workspace.kai-theme .rake-linked-deductions { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  html body #kai-workspace.kai-theme .rake-linked-deductions > span { grid-template-columns: 32px minmax(0, 1fr); column-gap: 8px; padding: 11px 9px !important; }
  html body #kai-workspace.kai-theme .rake-linked-deductions > span::before { width: 32px; height: 32px; }
  html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .bank-ledger-tools { width: 100%; flex: 1 1 100%; justify-content: space-between; }
  html body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .bank-search { width: 100%; flex: 1 1 100%; }
}
@media (max-width: 380px) { html body #kai-workspace.kai-theme .rake-linked-deductions { grid-template-columns: 1fr !important; } }
html[data-theme="dark"] body #kai-workspace.kai-theme .rake-linked-deductions > span,
html[data-theme="dark"] body #kai-workspace.kai-theme .rake-history-panel :is(th, td):last-child,
html[data-theme="dark"] body :is(#kai-workspace.kai-theme, .cashier-fullscreen) .cash-register-panel .bank-search { background: #1b2638 !important; border-color: #3a4b63 !important; }
html[data-theme="dark"] body #kai-workspace.kai-theme .rake-linked-deductions > span > small { color: #e5edf9 !important; }
html[data-theme="dark"] body #kai-workspace.kai-theme .rake-linked-deductions > span > :is(strong, em) { color: #b9cceb !important; }

html body #kai-workspace.kai-theme .kitty-report-toolbar { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
html body #kai-workspace.kai-theme .kitty-report-selection { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
html body #kai-workspace.kai-theme .kitty-report-selectors { display: grid; grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr); gap: 12px; }
html body #kai-workspace.kai-theme .kitty-report-selectors label { display: grid; gap: 6px; font-size: 12px; font-weight: 650; min-width: 0; }
html body #kai-workspace.kai-theme .kitty-report-selectors select { min-width: 0; width: 100%; min-height: 40px; padding: 8px 10px; border-radius: 8px; }
html body #kai-workspace.kai-theme .kitty-report-metadata { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid #dbe3f1; border-radius: 9px; background: #f6f8fc; }
html body #kai-workspace.kai-theme .kitty-report-metadata span { display: grid; gap: 4px; min-width: 0; }
html body #kai-workspace.kai-theme .kitty-report-metadata small { color: #74839a; font-size: 10px; }
html body #kai-workspace.kai-theme .kitty-report-metadata strong { color: #18345b; font-size: 12px; overflow-wrap: anywhere; }
html body #kai-workspace.kai-theme .kitty-report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
html body #kai-workspace.kai-theme .kitty-report-format { display: flex; align-items: center; gap: 6px; }
html body #kai-workspace.kai-theme .kitty-report-format .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; border-radius: 8px; }
@media (max-width: 600px) {
  html body #kai-workspace.kai-theme .kitty-report-selectors { grid-template-columns: 1fr; }
  html body #kai-workspace.kai-theme .kitty-report-metadata { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

html body #kai-workspace.kai-theme .rake-linked-deductions > span:nth-child(1) { --entry-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22lucide%20lucide-receipt%22%20aria-hidden%3D%22true%22%3E%3Cpath%20d%3D%22M4%202v20l2-1%202%201%202-1%202%201%202-1%202%201%202-1%202%201V2l-2%201-2-1-2%201-2-1-2%201-2-1-2%201Z%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M16%208h-6a2%202%200%201%200%200%204h4a2%202%200%201%201%200%204H8%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M12%2017.5v-11%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E"); }

html body #kai-workspace.kai-theme .rake-linked-deductions > span:nth-child(2) { --entry-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22lucide%20lucide-hand-coins%22%20aria-hidden%3D%22true%22%3E%3Cpath%20d%3D%22M11%2015h2a2%202%200%201%200%200-4h-3c-.6%200-1.1.2-1.4.6L3%2017%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22m7%2021%201.6-1.4c.3-.4.8-.6%201.4-.6h4c1.1%200%202.1-.4%202.8-1.2l4.6-4.4a2%202%200%200%200-2.75-2.91l-4.2%203.9%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22m2%2016%206%206%22%3E%3C%2Fpath%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%229%22%20r%3D%222.9%22%3E%3C%2Fcircle%3E%3Ccircle%20cx%3D%226%22%20cy%3D%225%22%20r%3D%223%22%3E%3C%2Fcircle%3E%3C%2Fsvg%3E"); }

html body #kai-workspace.kai-theme .rake-linked-deductions > span:nth-child(3) { --entry-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22lucide%20lucide-coins%22%20aria-hidden%3D%22true%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20r%3D%226%22%3E%3C%2Fcircle%3E%3Cpath%20d%3D%22M18.09%2010.37A6%206%200%201%201%2010.34%2018%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M7%206h1v4%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22m16.71%2013.88.7.71-2.82%202.82%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E"); }

html body #kai-workspace.kai-theme .rake-linked-deductions > span:nth-child(4) { --entry-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22lucide%20lucide-circle-plus%22%20aria-hidden%3D%22true%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22%3E%3C%2Fcircle%3E%3Cpath%20d%3D%22M8%2012h8%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M12%208v8%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E"); }

html body #kai-workspace.kai-theme .rake-linked-deductions > span:nth-child(5) { --entry-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22lucide%20lucide-plus%22%20aria-hidden%3D%22true%22%3E%3Cpath%20d%3D%22M5%2012h14%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M12%205v14%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E"); }

html body #kai-workspace.kai-theme .rake-linked-deductions > span:nth-child(6) { --entry-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22lucide%20lucide-minus%22%20aria-hidden%3D%22true%22%3E%3Cpath%20d%3D%22M5%2012h14%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E"); }

html body #kai-workspace.kai-theme .rake-linked-deductions > span:nth-child(7) { --entry-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22lucide%20lucide-users-round%22%20aria-hidden%3D%22true%22%3E%3Cpath%20d%3D%22M18%2021a8%208%200%200%200-16%200%22%3E%3C%2Fpath%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%228%22%20r%3D%225%22%3E%3C%2Fcircle%3E%3Cpath%20d%3D%22M22%2020c0-3.37-2-6.5-4-8a5%205%200%200%200-.45-8.3%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E"); }

html body #kai-workspace.kai-theme .rake-linked-deductions > span:nth-child(8) { --entry-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20class%3D%22lucide%20lucide-calculator%22%20aria-hidden%3D%22true%22%3E%3Crect%20width%3D%2216%22%20height%3D%2220%22%20x%3D%224%22%20y%3D%222%22%20rx%3D%222%22%3E%3C%2Frect%3E%3Cline%20x1%3D%228%22%20x2%3D%2216%22%20y1%3D%226%22%20y2%3D%226%22%3E%3C%2Fline%3E%3Cline%20x1%3D%2216%22%20x2%3D%2216%22%20y1%3D%2214%22%20y2%3D%2218%22%3E%3C%2Fline%3E%3Cpath%20d%3D%22M16%2010h.01%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M12%2010h.01%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M8%2010h.01%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M12%2014h.01%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M8%2014h.01%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M12%2018h.01%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M8%2018h.01%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E"); }
