/* Workspace additions, with layouts that also fit narrow screens. */
.ws-preview { margin:0 0 18px; padding:10px 14px; border:1px dashed var(--line); border-radius:10px; color:var(--dim); font-size:12px; }
.ws-search-button { display:inline-flex; align-items:center; gap:10px; height:42px; padding:0 12px; border:1px solid var(--line); background:var(--panel); color:var(--dim); border-radius:12px; cursor:pointer; font:inherit; }
.ws-search-button svg { width:18px; height:18px; }
.ws-search-button kbd { font-size:11px; opacity:.6; }
.ws-search-button:focus-visible,.ws-result:focus-visible,.ws-review-row:focus-visible { outline:2px solid var(--lime); outline-offset:3px; }
.ws-section-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.ws-section-head h2,.ws-overview-tools h2 { margin:5px 0 7px; font-size:22px; font-weight:600; letter-spacing:-.4px; }
.ws-section-head p,.ws-overview-tools p { color:var(--dim); font-size:13px; line-height:1.6; margin:0; }
.ws-section-head .ws-eyebrow,.ws-overview-tools .ws-eyebrow { color:var(--faint); font-size:10px; letter-spacing:.12em; text-transform:uppercase; font-weight:600; }
#wsReviewCount { display:inline-grid; place-items:center; min-width:27px; height:27px; margin-left:6px; border-radius:8px; font-size:14px; background:rgba(198,244,63,.12); color:var(--lime); vertical-align:middle; }
.ws-review { margin-bottom:16px; }
.ws-review-filters { display:flex; flex-wrap:wrap; gap:6px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.ws-review-filters button { min-height:38px; padding:8px 12px; border-radius:9px; border:1px solid transparent; background:none; color:var(--dim); font:inherit; font-size:13px; cursor:pointer; }
.ws-review-filters button span { opacity:.65; margin-left:5px; }
.ws-review-filters button[aria-pressed="true"] { color:var(--text); border-color:var(--line); background:rgba(127,127,127,.1); }
.ws-review-row { display:grid; grid-template-columns:32px minmax(0,1fr) auto 14px; align-items:center; gap:13px; width:100%; min-height:76px; padding:14px 0; border:0; border-bottom:1px solid var(--line); background:none; color:var(--text); text-align:left; font:inherit; cursor:pointer; }
.ws-review-row:hover { background:rgba(127,127,127,.04); }
.ws-review-row b { display:block; font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.ws-review-row small { display:block; color:var(--dim); font-size:12px; line-height:1.5; margin-top:4px; }
.ws-review-icon { display:grid; place-items:center; width:32px; height:32px; background:rgba(127,127,127,.08); border:1px solid var(--line); border-radius:10px; font-size:20px; color:var(--lime); }
.ws-review-amount { font-size:14px; text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.ws-show-all { margin:18px 0 0; min-height:36px; }
.ws-clear { padding:26px 0 8px; }
.ws-clear b { color:var(--lime); font-size:15px; }
.ws-clear p { color:var(--dim); font-size:13px; line-height:1.6; }
.ws-overview-tools { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; margin-bottom:24px; }
.ws-accountant .btn { margin-top:23px; gap:18px; min-height:44px; }
.ws-backup .actions { flex-wrap:wrap; margin-top:16px; gap:8px; }
.ws-overview-tools .hint { margin-top:13px; font-size:11px; line-height:1.6; }
#wsBackupState { display:grid; gap:5px; margin-top:13px; font-size:12px; color:var(--dim); }
#wsBackupState b { color:var(--text); font-weight:500; font-size:14px; }
#wsBackupState small { color:#d5a85c; }
.ws-lock { padding:16px; border:1px solid var(--line); border-left:3px solid var(--lime); border-radius:12px; margin-bottom:16px; background:var(--panel); }
.ws-lock p { color:var(--dim); font-size:12px; line-height:1.6; margin:6px 0 12px; }
.ws-lock .actions { flex-wrap:wrap; gap:6px; }
.archive-lock { display:block; color:var(--faint); padding:8px 10px; font-size:11px; }
#btnSave:disabled { opacity:.45; cursor:not-allowed; }
.workspace-dialog { width:min(650px,calc(100vw - 40px)); max-width:850px; max-height:calc(100dvh - 48px); padding:0; border:1px solid var(--line); border-radius:18px; background:var(--panel); color:var(--text); overflow:auto; box-shadow:0 30px 100px #0007; }
.workspace-dialog::backdrop { background:rgba(8,2,20,.7); backdrop-filter:blur(4px); }
.ws-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; position:sticky; top:0; z-index:1; padding:20px 24px; background:var(--panel); border-bottom:1px solid var(--line); }
.ws-dialog-head h2 { margin:0; font-size:20px; letter-spacing:-.3px; font-weight:600; }
.ws-dialog-head .icon-btn { min-width:40px; min-height:40px; font-size:25px; }
.ws-dialog-body { padding:24px; }
.ws-dialog-body > p { margin-top:0; color:var(--dim); line-height:1.6; font-size:14px; }
.ws-dialog-body .fld { margin-bottom:16px; }
.ws-dialog-body input,.ws-dialog-body textarea { font-size:16px; }
.ws-package-counts { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:20px 0; }
.ws-package-counts span { padding:13px 15px; background:rgba(127,127,127,.08); border-radius:10px; font-size:12px; color:var(--dim); }
.ws-package-counts b { display:block; color:var(--text); font-size:26px; font-weight:600; }
.ws-warning { color:#d5a85c; padding:14px; border:1px solid var(--line); border-radius:10px; margin-bottom:18px; font-size:13px; line-height:1.6; }
.ws-warning ul { padding-left:18px; }
.ws-error { color:#ed999f; line-height:1.6; }
.ws-success { color:var(--lime) !important; line-height:1.6; font-size:13px; }
.ws-result { display:grid; gap:6px; width:100%; padding:16px 2px; text-align:left; color:var(--text); border:0; border-bottom:1px solid var(--line); background:none; font:inherit; cursor:pointer; overflow-wrap:anywhere; }
.ws-result:hover { background:rgba(127,127,127,.05); }
.ws-result b { font-size:16px; font-weight:500; }
.ws-result span:not(.ws-result-type),.ws-result small { color:var(--dim); font-size:13px; }
.ws-result .ws-result-type { color:var(--lime); font-size:10px; text-transform:uppercase; letter-spacing:.1em; }
.ws-history { list-style:none; padding:0; }
.ws-history > li { padding:0 0 20px 16px; border-left:1px solid var(--line); margin-bottom:16px; }
.ws-history-head { display:grid; gap:7px; margin-bottom:12px; }
.ws-history-head b { font-weight:500; font-size:14px; }
.ws-history-head span { color:var(--dim); font-size:12px; }
.ws-history li > p,.ws-history details { font-size:13px; line-height:1.6; }
.ws-history details summary { padding:6px 0; cursor:pointer; }
.ws-change { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:8px; align-items:start; }
.ws-change pre { font:12px/1.6 monospace; white-space:pre-wrap; overflow-wrap:anywhere; background:rgba(127,127,127,.08); border-radius:8px; padding:10px; margin:0; max-height:220px; overflow:auto; }
@media(max-width:1100px) { .ws-search-button kbd { display:none; } }
@media(max-width:900px) { .ws-search-button { width:42px; padding:0; justify-content:center; flex:none; } .ws-search-button > span { display:none; } .ws-overview-tools { grid-template-columns:1fr; } }
@media(max-width:600px) {
  .ws-section-head { align-items:flex-start; flex-direction:column; gap:12px; }
  .ws-section-head h2,.ws-overview-tools h2 { font-size:21px; }
  .ws-review-filters { gap:3px; }
  .ws-review-filters button { min-height:44px; padding:8px; font-size:12px; }
  .ws-review-row { grid-template-columns:28px minmax(0,1fr) auto; gap:10px; }
  .ws-review-row > span:last-child { display:none; }
  .ws-review-icon { width:28px; height:30px; }
  .ws-review-row b,.ws-review-amount { font-size:13px; }
  .ws-review-row b { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .ws-review-row small { font-size:11px; }
  .ws-backup .btn,.ws-lock .btn { min-height:44px; }
  .ws-section-head .btn,.ws-dialog-head .icon-btn,#wsMonth,#wsSearch { min-height:44px; }
  .ws-search-button { width:44px; height:44px; }
  .ws-backup .link-btn { display:inline-flex; align-items:center; min-height:44px; }
  .workspace-dialog { width:calc(100vw - 20px); max-height:calc(100dvh - 24px); border-radius:15px; }
  .ws-dialog-head { padding:14px 16px; }
  .ws-dialog-head h2 { font-size:18px; }
  .ws-dialog-body { padding:18px 16px max(20px,env(safe-area-inset-bottom)); }
  .ws-dialog-body > .btn,.ws-dialog-body form > .btn { width:100%; min-height:46px; }
  .ws-change { grid-template-columns:minmax(0,1fr); }
}
@media print { .ws-search-button,.ws-lock,.workspace-dialog,.ws-preview { display:none !important; } }
