/* A compact department panel inside the shared dashboard. Editing expands in place. */
.ls-module { --ls-line:#c9cec0; min-width:0; margin:20px 0; }
.ls-board { border:1px solid var(--ls-line); background:var(--t-paper,#fafaf4); }
.ls-toolbar { padding:18px 24px; display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; border-bottom:1px solid var(--ls-line); }
.ls-table-title { display:grid; gap:5px; min-width:0; }
.ls-table-title h3 { margin:0; font-size:20px; color:var(--t-ink,#272d23); }
.ls-table-title .t-index { font-size:10px; color:#77816d; }
.ls-save-state { font-size:12px; color:#68715e; }
.ls-save-state.is-dirty { color:#965017; }
.ls-tools { display:flex; flex-wrap:wrap; gap:8px; }
.ls-tools .t-button { min-height:44px; padding:10px 14px; font-size:13px; }
.ls-tools .t-primary { background:#293124; border-color:#293124; color:#f8f9ef; }
.ls-tools .t-primary:hover:not(:disabled) { background:#404d32; }
.ls-tools .t-button:disabled { opacity:.45; cursor:wait; }
.ls-rooms { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); }
.ls-room { min-width:0; border-right:1px solid var(--ls-line); }
.ls-room:last-child { border-right:0; }
.ls-room>header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px; padding:12px 18px; min-height:48px; background:#edf0e6; border-bottom:1px solid var(--ls-line); }
.ls-room>header h4 { margin:0; font:700 21px/1.1 "DM Mono",Consolas,monospace; color:#30372a; }
.ls-room-tag { font-size:10px; background:#dce5b6; padding:4px 6px; color:#475431; }
.ls-room-large>header { background:#e6ebd5; box-shadow:inset 0 2px #8a9b48; }
.ls-grade { padding:12px 18px; }
.ls-grade-label { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:6px; }
.ls-grade-label h4 { margin:0; font-size:12px; font-weight:500; color:#747d68; }
.ls-grade-label>span { font-size:11px; color:#7c826e; }
.ls-senior { border-bottom:1px solid var(--ls-line); }
.ls-assignees { display:flex; flex-wrap:wrap; gap:4px 10px; line-height:1.6; min-height:23px; }
.ls-assignees span { font-size:15px; color:#2c3525; overflow-wrap:anywhere; max-width:100%; }
.ls-assignees em { font-size:13px; font-style:normal; color:#929a84; }
.ls-name-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.ls-name { display:flex; align-items:center; min-width:0; min-height:44px; gap:8px; padding:9px 8px; background:#fff; border:1px solid #c4cbb4; margin:0; }
.ls-name>span:first-child { font:9px "DM Mono",Consolas,monospace; color:#9ba28d; flex-shrink:0; }
.ls-name-value { min-width:0; font-size:16px; overflow-wrap:anywhere; line-height:1.6; color:#30392a; }
.ls-name-value em { font-style:normal; color:#8b937d; font-size:13px; }
.ls-name input { min-width:0; width:100%; border:0; padding:0; color:#283222; outline:none; background:transparent; font-size:16px; line-height:1.6; }
.ls-name input::placeholder { color:#969e89; font-size:13px; }
.ls-name:focus-within { border-color:#697b3e; box-shadow:0 0 0 2px #91a75c22; }
.is-editing .ls-grade { padding-top:16px; padding-bottom:18px; }
.is-editing .ls-grade-label { margin-bottom:10px; }
.is-editing .ls-name-grid .ls-name { flex-wrap:wrap; gap:2px 6px; }
.is-editing .ls-name-grid .ls-name>span:first-child { width:100%; }
.ls-board-foot { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:12px 24px; border-top:1px solid var(--ls-line); background:#f2f3eb; }
.ls-board-foot p { margin:0; color:#69715c; font-size:12px; line-height:1.8; }
.ls-board-foot>span { font-size:12px; color:#69715c; flex-shrink:0; }
.ls-storage { margin-left:14px; color:#8b927d; }
.ls-error { background:#fff3e4; color:#834e24; border-bottom:1px solid #e7c8a3; padding:16px 24px; font-size:14px; overflow-wrap:anywhere; }
.ls-error p { margin:6px 0; }
.ls-error>span { font-size:12px; }
.ls-confirm { border:1px solid #a9b394; padding:26px; background:#f6f7ed; color:#293024; max-width:min(460px,calc(100vw - 32px)); }
.ls-confirm::backdrop { background:#151b14a6; }
.ls-confirm h3 { font-size:20px; margin:12px 0; }
.ls-confirm p { font-size:14px; line-height:1.8; }
.ls-confirm form>div { display:flex; gap:10px; flex-wrap:wrap; margin-top:24px; }
.ls-confirm .t-button { min-height:44px; }
@media(min-width:801px) and (max-width:1200px) {
  .ls-grade { padding:12px 10px; }
  .ls-room>header { padding:12px 10px; }
  .ls-room-tag { display:none; }
  .is-editing .ls-name-grid { grid-template-columns:1fr; }
  .is-editing .ls-name-grid .ls-name { flex-wrap:nowrap; }
  .is-editing .ls-name-grid .ls-name>span:first-child { width:auto; }
}
@media(max-width:800px) {
  .ls-module { margin:16px 0; }
  .ls-toolbar { padding:16px; }
  .ls-tools { width:100%; }
  .ls-tools .t-button { flex:1; white-space:nowrap; }
  .ls-rooms { display:block; }
  .ls-room,.ls-room:last-child { display:grid; grid-template-columns:82px minmax(0,1fr) minmax(0,1.2fr); border:0; border-bottom:1px solid var(--ls-line); }
  .ls-room:last-child { border-bottom:0; }
  .ls-room>header { border-bottom:0; border-right:1px solid var(--ls-line); padding:12px; align-content:center; }
  .ls-room>header h4 { font-size:19px; }
  .ls-room-tag { font-size:9px; }
  .ls-senior { border:0; border-right:1px solid var(--ls-line); }
  .ls-grade { padding:12px; }
  .ls-grade-label { gap:4px; }
  .ls-board-foot { padding:12px 16px; flex-wrap:wrap; gap:4px; }
  .ls-storage { display:block; margin-left:0; }
  .is-editing .ls-room { grid-template-columns:82px minmax(0,1fr); }
  .is-editing .ls-room>header { grid-row:1 / 3; }
  .is-editing .ls-senior { border-right:0; border-bottom:1px solid var(--ls-line); }
  .is-editing .ls-grade { padding:12px; }
}
@media(max-width:480px) {
  .is-editing .ls-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ls-grade { padding:10px 8px; }
  .ls-room,.ls-room:last-child { grid-template-columns:72px minmax(0,1fr) minmax(0,1.2fr); }
  .ls-room>header { padding:10px 8px; }
  .ls-room>header h4 { font-size:18px; }
  .ls-assignees span { font-size:14px; }
  .ls-grade-label>span { font-size:10px; }
  .is-editing .ls-room { grid-template-columns:72px minmax(0,1fr); }
  .is-editing .ls-name-grid { gap:6px; }
  .is-editing .ls-name { padding:8px 6px; }
  .ls-table-title h3 { font-size:18px; }
}
