:root{font-family:Arial,Helvetica,sans-serif;color:#202020;background:#f3f3f3;font-synthesis:none;text-rendering:optimizeLegibility;--red:#ee3d36;--line:#d4d4d4;--muted:#707070;--green:#dff0d8;--blue:#dcecff}*{box-sizing:border-box}body{margin:0}.shell{max-width:1884px;margin:auto;padding:0 24px 48px}.topbar{min-height:66px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid #c8c8c8;background:#fff}.brand{display:flex;align-items:center;gap:9px;color:#222;text-decoration:none;font-weight:700;letter-spacing:.7px}.brand img{width:37px;height:37px;object-fit:contain}.top-links{display:flex;align-items:center;gap:10px}.top-links>a,.top-links .secondary{padding:9px 12px;background:#f5f5f5;border:1px solid #bbb;color:#222;text-decoration:none;font-size:13px}.top-links>a:hover,.secondary:hover{background:#e9e9e9}.quiet{border:0;background:transparent;padding:8px;color:#444;cursor:pointer;font:inherit}.quiet:hover{text-decoration:underline;color:#111}.db-status{font-size:12px;color:#8c651b;white-space:nowrap}.db-status i{display:inline-block;width:9px;height:9px;border-radius:50%;background:#d7a52a;margin-right:5px}.db-status.connected i{background:#54a451}.error{color:#a5211b;background:#fff1f0;padding:11px;border:1px solid #e8c3c1}.card{background:#fff;border:1px solid #bfbfbf;border-radius:2px;box-shadow:0 1px 3px #00000012}.login{max-width:470px;margin:80px auto;padding:28px}.login form{display:grid;gap:12px}.login label,.form label,.inline-form label,.filters label,.tree-tools label{font-size:14px;font-weight:600}.eyebrow{font-size:11px;font-weight:700;letter-spacing:1px;color:#666;margin:0 0 7px}.login h1,h1,h2,h3,p{margin-top:0}h1{font-size:26px;margin-bottom:8px;font-weight:600;letter-spacing:0}h2{font-size:21px;margin-bottom:12px}h3{font-size:16px}.nav{display:flex;gap:2px;overflow:auto;padding:10px 0 0;background:#f3f3f3;border-bottom:3px solid var(--red)}.nav button{flex:0 0 auto;padding:11px 17px;border:1px solid #c5c5c5;border-bottom:0;background:#eee;color:#222;font:bold 13px Arial,sans-serif;cursor:pointer}.nav button:hover{background:#e4e4e4}.nav button.active{background:var(--red);border-color:var(--red);color:white}.view{padding:20px 0 0}.view[hidden]{display:none}.page-heading{margin:3px 0 16px}.page-heading>p:last-child{margin:0;color:#666;font-size:14px}.primary,.secondary,.danger{border:1px solid #a9a9a9;border-radius:2px;padding:9px 13px;background:#f5f5f5;color:#222;font:600 13px Arial,sans-serif;cursor:pointer;white-space:nowrap}.primary{background:var(--green);border-color:#8cb17b}.primary:hover{background:#cce5c1}.danger{background:#f7e1e0;border-color:#d29a97;color:#751d19}.danger:hover{background:#f0cecc}.secondary:active,.primary:active,.danger:active{transform:translateY(1px)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,.editor:focus-visible{outline:2px solid #3279c6;outline-offset:1px}input,select{font:14px Arial,sans-serif;border:1px solid #aaa;border-radius:2px;background:#fff;padding:8px 9px;min-height:35px;color:#222}input:focus,select:focus,.editor:focus{border-color:#4985c4;outline:1px solid #78a7d3}.home-grid{display:block;min-height:0}.home-main{min-width:0}.home-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:5px 0 17px}.home-heading h1{margin:0}.searchbox{position:relative}.searchbox input{width:255px}.searchbox #suggestions{position:absolute;top:calc(100% + 2px);left:0;right:0;z-index:5;background:#fff;border:1px solid #aaa;box-shadow:0 4px 12px #0002}.searchbox #suggestions:empty{display:none}.searchbox #suggestions button{display:flex;justify-content:space-between;width:100%;padding:10px;text-align:left;border:0;border-bottom:1px solid #eee;background:white;cursor:pointer;font:14px Arial}.searchbox #suggestions button:hover{background:#f4f4f4}.searchbox small{color:#777}.stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border:1px solid #c6c6c6;background:#fff;margin-bottom:14px}.stat{min-width:0;padding:12px 13px;border-right:1px solid #ddd;display:flex;flex-direction:column;gap:5px}.stat:last-child{border-right:0}.stat span{color:#666;font-size:12px}.stat strong{font-size:23px;font-weight:600}.tree-tools{display:flex;align-items:end;gap:8px;margin:10px 0}.tree-tools label{display:grid;gap:5px}.tree-tools select{min-width:230px}.tree{max-height:calc(100vh - 290px);min-height:280px;overflow:auto;padding:4px 12px}.tree details{border-bottom:1px solid #ddd}.tree summary{list-style:none;display:flex;align-items:center;justify-content:space-between;padding:11px 6px;cursor:pointer;font-weight:700}.tree summary::-webkit-details-marker{display:none}.tree summary:before{content:'▸';color:#555;margin-right:8px}.tree details[open]>summary:before{content:'▾'}.tree summary span{flex:1}.tree summary small{font-weight:400;color:#777}.tree-person{display:flex;justify-content:space-between;align-items:center;width:calc(100% - 16px);margin:2px 0 2px 16px;padding:7px 9px;border:0;background:transparent;text-align:left;font:14px Arial;color:#222;cursor:pointer}.tree-person:hover{background:#efefef;color:#111;text-decoration:underline}.tree-person.flagged,.flagged .client-name{color:#b62721;font-weight:700}.tree-arrow{color:#888;font-size:20px}.person-role{display:inline-block;margin-left:7px;padding:2px 5px;border-radius:2px;background:#e7f0fb;color:#245a8d;font-size:10px;font-weight:700;text-transform:uppercase;vertical-align:middle}.tree-empty{margin:0 0 8px 30px;color:#888;font-size:12px}.form{padding:20px}.form-layout{display:grid;grid-template-columns:minmax(340px,.72fr) minmax(400px,1.28fr);gap:22px}.person-fields{display:grid;align-content:start;gap:14px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form-grid label,.rename-field{display:grid;gap:5px}.flag{display:flex!important;align-items:center;gap:7px;cursor:pointer}.flag input,.check-option input{width:16px;height:16px;min-height:16px;margin:0;accent-color:var(--red)}.checks{margin:0;padding:10px;border:1px solid #bbb;min-width:0}.checks legend{padding:0 4px;font-size:14px;font-weight:700}.checks legend small,.file-field small{font-size:12px;font-weight:400;color:#777;margin-left:5px}.check-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 9px;max-height:160px;overflow:auto}.check-option{display:flex!important;align-items:center;gap:7px;padding:6px 5px;font-weight:400!important;cursor:pointer}.check-option:hover{background:#f2f2f2}.file-field{display:grid;gap:5px}.file-field small{margin:0}.note-field{display:flex;flex-direction:column;min-height:100%;gap:5px}.formatbar{display:flex;align-items:center;gap:5px;padding:5px;background:#f1f1f1;border:1px solid #bbb;border-bottom:0}.formatbar>button{width:32px;height:29px;border:1px solid #b9b9b9;background:#fff;cursor:pointer;font:14px Arial}.formatbar>button:hover{background:#e7e7e7}.color-tool{display:flex!important;align-items:center;gap:6px;margin-left:3px;font-weight:400!important}.color-tool input[type=color]{width:29px;height:25px;min-height:25px;padding:2px;cursor:pointer}.editor-hint{margin-left:auto;color:#777;font-size:11px;font-weight:400}.editor{flex:1;min-height:280px;max-height:620px;overflow:auto;padding:12px;border:1px solid #aaa;background:#fff;font:16px/1.55 Arial,sans-serif;white-space:normal}.editor:empty:before{content:'Wpisz notatkę…';color:#aaa}.editor p{margin:0 0 9px}.actions{display:flex;align-items:center;gap:8px;margin-top:16px}.form-message{margin:0 0 0 8px;color:#386b32;font-size:13px}.filters{display:grid;grid-template-columns:minmax(190px,.34fr) minmax(300px,1fr) auto;align-items:start;gap:14px;padding:16px;border-bottom:1px solid #ccc}.filters>label{display:grid;gap:6px}.filter-checks{padding:8px}.check-list.compact{grid-template-columns:repeat(3,minmax(0,1fr));max-height:132px}.filter-actions{display:flex;gap:7px;align-self:end}.table-caption{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;color:#666;font-size:12px}.table-wrap{max-height:62vh;overflow:auto}table{border-collapse:separate;border-spacing:0;width:100%;min-width:1100px;font-size:13px}th,td{text-align:left;border-bottom:1px solid #ddd;padding:9px 10px;white-space:nowrap;background:#fff}th{position:sticky;top:0;z-index:1;background:#eee;border-top:1px solid #d0d0d0;font-size:12px}tbody tr:hover td{background:#f7f7f7}.actions-head{position:sticky;right:0;z-index:3}.row-actions{position:sticky;right:0;z-index:2;box-shadow:-4px 0 8px #0000000c}.row-actions button{margin:0 2px}.client-name{font-weight:600}.empty{padding:16px;color:#777}.inline-form{display:flex;align-items:end;gap:10px;padding:14px;margin-bottom:13px}.inline-form label{display:grid;gap:5px;min-width:min(380px,60vw)}.inline-form .form-message{margin:0 0 9px}.manage-list{display:grid;gap:7px}.manage-row{display:flex;align-items:center;gap:8px;padding:10px 13px}.manage-name{flex:1;font-weight:600}.rename-field{flex:1}.detail-right{min-width:0}.documents{margin-top:18px}.documents h3{margin-bottom:7px}.doclist{list-style:none;padding:0;margin:0;border:1px solid #ccc}.doclist li{display:flex;align-items:center;gap:10px;padding:8px;border-bottom:1px solid #ddd;font-size:13px}.doclist li:last-child{border-bottom:0}.doclist li>span{flex:1;overflow-wrap:anywhere}.doclist a{color:#245a8d}.doclist button{padding:5px 8px}dialog{width:min(1180px,calc(100% - 28px));max-height:94vh;overflow:auto;padding:20px;border:1px solid #888;border-radius:2px;box-shadow:0 12px 50px #0005;color:#222}dialog::backdrop{background:#0007}dialog .close{float:right;border:1px solid #aaa;background:#eee;width:32px;height:32px;font-size:22px;cursor:pointer}.doclist .muted{padding:8px}.startup-error{color:#922}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1000px){.home-grid{display:block}.stats{grid-template-columns:repeat(2,1fr)}.stat:nth-child(2n){border-right:0}.stat:nth-child(-n+4){border-bottom:1px solid #ddd}.stat:nth-child(n+5){border-bottom:0}.form-layout{grid-template-columns:1fr}.editor{min-height:220px}.filters{grid-template-columns:1fr 2fr}.filter-actions{grid-column:1/-1}.check-list.compact{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.shell{padding:0 12px 30px}.topbar{align-items:flex-start;padding:9px 0;flex-wrap:wrap}.top-links{width:100%;justify-content:flex-start;flex-wrap:wrap;gap:5px}.top-links>a{padding:7px}.db-status{margin-right:auto}.nav{margin:0 -12px;padding-left:12px}.nav button{padding:10px 12px}.home-grid{display:block}.home-heading{align-items:stretch;flex-direction:column}.searchbox input{width:100%}.tree{max-height:55vh}.page-heading{margin-top:3px}.form{padding:12px}.form-grid{grid-template-columns:1fr}.form-layout{gap:16px}.editor{min-height:190px}.editor-hint{display:none}.filters{grid-template-columns:1fr;padding:11px}.filter-actions{grid-column:auto;flex-wrap:wrap}.check-list.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.table-wrap{max-height:65vh}.list-card{margin:0 -2px}.inline-form{align-items:stretch;flex-direction:column}.inline-form label{min-width:0}.manage-row{flex-wrap:wrap}.manage-name{flex-basis:100%}.doclist li{flex-wrap:wrap}.doclist li>span{flex-basis:100%}dialog{padding:14px;max-height:96vh}}
.note-field{display:flex;flex-direction:column;gap:0;min-width:0}.note-heading{display:flex;align-items:baseline;gap:12px;margin-bottom:7px}.note-heading strong{font-size:15px}.note-heading span,.note-footer{font-size:12px;color:#666;font-weight:400}.formatbar[role=toolbar]{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:7px;background:#f4f4f4;border:1px solid #b8b8b8}.tool-group{display:flex;gap:3px;align-items:center}.formatbar .tool-group button,.formatbar[role=toolbar]>button{min-width:32px;height:31px;padding:4px 8px;border:1px solid #c3c3c3;border-radius:2px;background:#fff;color:#222;font:14px Arial,sans-serif;cursor:pointer}.formatbar .tool-group button:hover,.formatbar[role=toolbar]>button:hover{background:#e6e6e6;border-color:#999}.formatbar .tool-group button:active,.formatbar .tool-group button[aria-pressed=true]{background:#dbe8f5;border-color:#7497b8}.toolbar-divider{width:1px;height:24px;background:#c6c6c6;margin:0 3px}.size-tool,.color-tool{display:flex!important;align-items:center;gap:6px;padding:0 4px;font-size:12px!important;font-weight:400!important;white-space:nowrap}.size-tool select{min-height:30px;padding:4px 22px 4px 7px;font-size:13px}.color-tool input[type=color]{width:30px;height:27px;min-height:27px;padding:2px;border:1px solid #aaa;background:#fff;cursor:pointer}.note-field .editor{min-height:300px;max-height:620px;padding:14px;border-radius:0 0 2px 2px;font-size:16px;line-height:1.55}.note-field .editor:empty:before{content:attr(data-placeholder);color:#999;pointer-events:none}.note-footer{padding-top:6px}.note-field .editor ul,.note-field .editor ol{padding-left:28px}.note-field .editor table{border-collapse:collapse}.note-field .editor td,.note-field .editor th{border:1px solid #aaa;padding:4px;white-space:normal}@media(max-width:680px){.formatbar[role=toolbar]{gap:4px}.note-heading{align-items:flex-start;flex-direction:column;gap:3px}.note-field .editor{min-height:220px}.alignment-tools{display:none}}
.formatbar[role=toolbar]{gap:7px;padding:8px}.size-tool{gap:7px}.size-tool select{min-width:105px;background:#fff}.color-tool{gap:7px;padding:4px 8px;border:1px solid #c3c3c3;background:#fff;cursor:pointer}.color-tool:hover{background:#e6e6e6}.color-tool input[type=color]{width:28px;height:26px;min-height:26px;padding:1px;border:1px solid #999;cursor:pointer}.color-icon{font:bold 19px Georgia,serif;color:#222;border-bottom:3px solid #222;line-height:21px}.note-field .formatbar .tool-group button[aria-pressed=true]{background:#dbe8f5;border-color:#7497b8;box-shadow:inset 0 0 0 1px #a6bfd8}.color-tools{display:flex;align-items:center;gap:6px}.color-swatch{width:20px;height:20px;padding:0;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #9a9a9a;cursor:pointer}.color-swatch:hover{transform:scale(1.12)}.color-swatch[aria-pressed=true]{box-shadow:0 0 0 2px #222}.custom-color{display:flex!important;align-items:center;gap:5px;padding:4px 7px;border:1px solid #bbb;background:#fff;font-size:11px!important;font-weight:400!important;cursor:pointer}.custom-color:hover{background:#eee}.custom-color input[type=color]{width:22px;height:22px;min-height:22px;padding:1px;border:1px solid #aaa;cursor:pointer}.custom-color span{color:#333}
.brand img{width:190px;height:52px;object-fit:contain;object-position:left center}

/* Keep vertical content in the document flow so the browser has one page scroll. */
.tree,
.check-list,
.table-wrap,
.editor,
.note-field .editor {
  max-height: none;
}
.tree,
.check-list {
  overflow: visible;
}
/* Tables may scroll horizontally when their columns exceed the viewport, but grow vertically with their rows. */
.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}
@media (max-width: 680px) {
  .tree,
  .check-list,
  .table-wrap,
  .editor,
  .note-field .editor {
    max-height: none;
  }
}

/* Prevent content panels from creating their own vertical scroll areas. */
.tree,
.check-list,
.editor,
.note-field .editor {
  height: auto;
  max-height: none;
  overflow-x: visible;
  overflow-y: visible;
}
.table-wrap {
  height: auto;
  max-height: none;
  overflow-x: auto;
  overflow-y: clip;
}

/* The course tree must expand with its rows; only the document scrolls vertically. */
#tree.tree {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
.file-upload{display:grid;gap:7px;padding:10px 12px;border:1px solid #d4d4d4;background:#fff}
.file-upload-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;flex-wrap:wrap}
.file-upload-head strong{font-size:13px}
.file-upload-head>span{color:#707070;font-size:11px}
.dropzone{display:flex!important;align-items:center;gap:10px;min-height:62px;padding:9px 11px;border:1px dashed #aaa;border-radius:2px;background:#fafafa;cursor:pointer;transition:background .15s,border-color .15s}
.dropzone:hover,.dropzone.is-dragging,.file-upload:focus-within .dropzone{border-color:var(--red);background:#fff7f6}
.upload-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border:1px solid #d4d4d4;border-radius:50%;background:#fff;color:#555;font-size:22px;line-height:1}
.dropzone-copy{display:grid;gap:3px;min-width:0}
.dropzone-copy strong{font-size:12px}
.dropzone-copy>span{color:#707070;font-size:11px}
.browse-button{margin-left:auto;padding:7px 10px;border:1px solid #aaa;border-radius:2px;background:#f5f5f5;color:#222;font-size:11px;font-weight:600;white-space:nowrap}
.dropzone:hover .browse-button,.dropzone.is-dragging .browse-button{background:#eee;border-color:#888}
.file-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.file-list{display:grid;gap:4px;margin:0;padding:0;list-style:none}
.file-list[hidden]{display:none}
.file-item{display:flex;align-items:center;gap:8px;min-width:0;padding:5px 7px;border:1px solid #e0e0e0;background:#fff;font-size:11px}
.file-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-item small{color:#707070;white-space:nowrap}
.file-remove{width:23px;height:23px;padding:0;border:1px solid #d4d4d4;border-radius:2px;background:#fff;color:#555;font-size:17px;line-height:18px;cursor:pointer}
.file-remove:hover{border-color:#d29a97;background:#f7e1e0;color:#751d19}
.file-message{margin:0;color:#922;font-size:11px}
.file-message:empty{display:none}
@media(max-width:480px){.file-upload{padding:9px}.dropzone{gap:7px;padding:8px}.upload-icon{flex-basis:29px;width:29px;height:29px}.browse-button{padding:6px 7px}.file-upload-head{gap:3px}}

/* Show every category inside the filter panel without clipping or overlap. */
.check-list.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: none;
  overflow: visible;
  gap: 2px 8px;
}
.filter-checks .check-option {
  min-width: 0;
  gap: 6px;
  padding: 4px 3px;
  font-size: 12px;
}
.filter-checks .check-option span {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
@media (max-width: 1000px) {
  .check-list.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .check-list.compact { grid-template-columns: 1fr; }
}

/* Keep the background page fixed while the client card dialog is open. */
body.dialog-open { overflow: hidden; }
#detail {
  width: min(1100px, calc(100% - 24px));
  max-height: min(92vh, 900px);
  padding: 16px;
  overscroll-behavior: contain;
}
#detail-body > .eyebrow { margin: 0 0 3px; }
#detail-body > h2 { margin: 0 44px 10px 0; font-size: 19px; }
.detail-form { padding: 13px; }
.detail-form .form-layout {
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 14px;
}
.detail-form .person-fields { gap: 9px; }
.detail-form .form-grid { gap: 8px; }
.detail-form .form-grid label { gap: 3px; }
.detail-form input,
.detail-form select { min-height: 32px; padding: 6px 8px; }
.detail-form .checks { padding: 7px; }
.detail-form .check-list { gap: 2px 5px; }
.detail-form .check-option { padding: 4px 3px; font-size: 12px; }
.detail-form .actions { flex-wrap: wrap; margin-top: 10px; }
.detail-form .note-heading { margin-bottom: 5px; }
.detail-form .note-heading span { font-size: 11px; }
.note-field,
.formatbar,
.color-tools { min-width: 0; }
.formatbar[role="toolbar"] { flex-wrap: wrap; row-gap: 5px; }
.color-tools { flex-wrap: wrap; gap: 5px; }
.size-tool { min-width: 0; }
.size-tool select { max-width: min(150px, 38vw); }
.custom-color { flex: 0 0 auto; }
.detail-form .note-field .editor { min-width: 0; width: 100%; }
@media (max-width: 900px) {
  #detail { max-height: 94vh; }
  .detail-form .form-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  #detail { width: calc(100% - 12px); max-height: 96vh; padding: 10px; }
  .detail-form { padding: 9px; }
  .detail-form .form-grid { grid-template-columns: 1fr; }
  .detail-form .formatbar[role="toolbar"] { gap: 4px; padding: 5px; }
  .detail-form .toolbar-divider { display: none; }
  .detail-form .color-tools { flex-basis: 100%; }
  .detail-form .note-field .editor { min-height: 190px; }
}

/* Give the client-card attachment block room inside the compact form. */
.detail-form .file-upload {
  width: 100%;
  min-width: 0;
  margin-top: 3px;
  padding: 12px;
}
.detail-form .dropzone {
  width: 100%;
  min-width: 0;
  margin-top: 3px;
  padding: 10px 12px;
}
.detail-form .file-list { margin-top: 4px; }
@media (max-width: 560px) {
  .detail-form .file-upload { padding: 10px; }
  .detail-form .dropzone { padding: 9px; }
}

/* The client card upload area is a dedicated full-width row below its columns. */
.detail-form > .file-upload {
  margin: 12px 0 0;
  padding: 14px 16px;
}
.detail-form > .file-upload .dropzone {
  min-height: 66px;
  margin-top: 8px;
  padding: 11px 14px;
}
.detail-form > .file-upload .file-list { gap: 6px; margin-top: 8px; }
@media (max-width: 560px) {
  .detail-form > .file-upload { margin-top: 9px; padding: 11px; }
  .detail-form > .file-upload .dropzone { margin-top: 6px; padding: 9px; }
}

/* Keep the client card's uploads and existing documents in separate, full-width rows. */
.detail-form .note-field { min-height: 0; }
.detail-form > .detail-attachments { display: grid; }
.detail-form > .detail-documents {
  width: 100%;
  min-width: 0;
  margin-top: 12px;
}
.detail-form > .detail-documents .doclist { width: 100%; }

.bulk-card { padding: 16px; margin: 0 0 16px; }
.bulk-card h2 { margin-bottom: 10px; }
.bulk-filters { display: grid; grid-template-columns: minmax(180px,1fr) minmax(180px,1fr) auto; align-items: end; gap: 10px; }
.bulk-filters label,.bulk-confirm label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; }
.bulk-filters input,.bulk-filters select,.bulk-confirm input { width: 100%; min-width: 0; }
.bulk-select-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 0; font-size:13px; }
.bulk-client-list { max-height:340px; overflow:auto; border:1px solid #ddd; }
.bulk-row { display:grid; grid-template-columns:auto minmax(140px,.8fr) minmax(180px,1.2fr); align-items:center; gap:10px; padding:8px 10px; border-bottom:1px solid #eee; font-size:13px; }
.bulk-row:last-child { border-bottom:0; }
.bulk-row small { color:#666; overflow-wrap:anywhere; }
.bulk-row.occupied { background:#f7f7f7; }
.bulk-confirm { display:grid; grid-template-columns:minmax(0,1fr) minmax(210px,.45fr) auto; align-items:end; gap:12px; padding-top:12px; font-size:13px; }
@media(max-width:680px){.bulk-filters,.bulk-confirm{grid-template-columns:1fr}.bulk-row{grid-template-columns:auto 1fr}.bulk-row small{grid-column:2}.bulk-select-row{align-items:flex-start;flex-direction:column}}

.tree{max-height:none;min-height:0;height:auto;overflow:visible}.tree summary{justify-content:flex-start;gap:5px}.category-collapse>summary{cursor:pointer;font-weight:600;padding:8px}.detail-form .form-grid input,.detail-form .form-grid select{width:100%;min-width:0;font-size:13px}.detail-form .form-grid label{min-width:0}body{overflow-x:hidden}.table-wrap{max-width:100%;overflow:auto}@media(max-width:680px){.shell{padding:0 10px 30px}.home-heading{align-items:stretch;flex-direction:column}.searchbox input{width:100%}.tree-tools{flex-wrap:wrap}.tree-tools label,.tree-tools select{width:100%;min-width:0}.form-grid{grid-template-columns:1fr!important}.detail-form .form-grid input,.detail-form .form-grid select{font-size:16px}.detail-form .form-layout{grid-template-columns:1fr}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.table-wrap{max-height:65vh}}

.tree summary{justify-content:flex-start;gap:5px}.tree summary span:first-child{flex:0 1 auto}.category-count{color:#019175;font:inherit!important}.category-collapse>summary{cursor:pointer}.form-grid input,.form-grid select{font-size:12px}.detail-form .form-grid input,.detail-form .form-grid select{font-size:12px;min-width:0;width:100%}@media(max-width:680px){.form-grid input,.form-grid select,.detail-form .form-grid input,.detail-form .form-grid select{font-size:14px}}
