.pos-board-workspace {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.pos-board-commandbar,
.pos-board-section-title,
.pos-board-services-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pos-board-commandbar {
  padding: 12px 14px;
  border-radius: 12px;
  background: #071a2b;
  color: #fff;
}

.pos-board-commandbar h2,
.pos-board-commandbar span { margin: 0; }
.pos-board-commandbar span { color: #d6ad45; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.pos-board-commandbar > div:last-child { display: flex; gap: 8px; }
.pos-board-commandbar button { min-height: 44px; }

.pos-board-technicians {
  padding: 12px;
  border: 1px solid #d8e0e5;
  border-radius: 14px;
  background: #fff;
}

.pos-board-section-title span,
.pos-board-services-head span { display: block; color: #6d7b87; font-size: 12px; }
.pos-board-tech-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 8px; margin-top: 10px; }
.pos-board-tech {
  min-height: 82px;
  padding: 10px;
  border: 2px solid #d6dde2;
  border-radius: 12px;
  background: #f5f7f8;
  color: #071a2b;
  text-align: left;
  cursor: pointer;
}
.pos-board-tech strong { display: block; font-size: 16px; }
.pos-board-tech span { color: #6c7881; font-size: 12px; }
.pos-board-tech.active { border-color: #d6ad45; background: #fff8df; box-shadow: 0 0 0 2px rgba(214,173,69,.18); }
.pos-board-tech.online::before { content: '●'; color: #00a84f; margin-right: 6px; }

.pos-board-layout { display: grid; grid-template-columns: minmax(280px,34%) minmax(0,1fr); gap: 12px; min-height: 470px; }
.pos-board-queue,.pos-board-editor { min-width: 0; }
.pos-board-ticket-list { display: grid; gap: 8px; max-height: 64vh; overflow: auto; }
.pos-board-ticket {
  width: 100%;
  padding: 12px;
  border: 2px solid #dce3e7;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.pos-board-ticket.active { border-color: #00a84f; background: #f0fff5; }
.pos-board-ticket-head { display: flex; justify-content: space-between; gap: 8px; }
.pos-board-ticket small { display: block; margin-top: 5px; color: #62717d; }

.pos-board-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.pos-board-editor label { display: grid; gap: 5px; font-weight: 700; }
.pos-board-editor input,.pos-board-editor select,.pos-board-editor textarea { width: 100%; min-height: 44px; padding: 9px 10px; border: 1px solid #becad2; border-radius: 8px; background: #fff; box-sizing: border-box; }
.pos-board-services-head { margin: 16px 0 8px; }
.pos-board-lines { display: grid; gap: 8px; }
.pos-board-line { display: grid; grid-template-columns: minmax(150px,1.5fr) minmax(130px,1fr) auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid #dce3e7; border-radius: 10px; background: #f8fafb; }
.pos-board-line button { min-width: 44px; min-height: 44px; color: #a31d1d; }
.pos-board-sticky-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; margin: 14px -4px -4px; padding: 12px 4px 4px; background: linear-gradient(transparent,#fff 28%); z-index: 3; }
.pos-board-sticky-actions button { flex: 1 1 110px; min-width: 86px; min-height: 48px; padding-left: 10px; padding-right: 10px; }
.pos-board-empty { padding: 55px 18px; color: #6b7882; text-align: center; }

@media (max-width: 1000px) {
  .pos-board-layout { grid-template-columns: 1fr; }
  .pos-board-ticket-list { grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); max-height: none; }
}

@media (max-width: 650px) {
  .pos-board-commandbar,.pos-board-section-title,.pos-board-services-head { flex-direction: column; align-items: stretch; }
  .pos-board-commandbar > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
  .pos-board-tech-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: visible; }
  .pos-board-tech { min-width: 0; min-height: 64px; padding: 8px; }
  .pos-board-tech strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pos-board-tech span { font-size: 11px; }
  .pos-board-fields,.pos-board-line { grid-template-columns: 1fr; }
  .pos-board-line button { width: 100%; }
  .pos-board-editor { padding-bottom: 76px; }
  .pos-board-sticky-actions { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 10px; background: #fff; box-shadow: 0 -5px 18px rgba(7,26,43,.16); }
  .pos-board-sticky-actions button { flex: 1; min-width: 0; min-height: 54px; padding: 7px 4px; font-size: 11px; }
}

.clover-device .pos-board-commandbar button,
.clover-device .pos-board-tech,
.clover-device .pos-board-ticket,
.clover-device .pos-board-services-head button { min-height: 54px; font-size: 15px; }
.clover-device .pos-board-editor input,
.clover-device .pos-board-editor select { min-height: 52px; font-size: 16px; }

/* Web desktop: keep the employee board dominant and the live-ticket rail
   narrow, matching the Clover Station working layout. The ticket editor uses
   the full width only after a ticket is opened. */
@media (min-width: 801px) {
  .pos-board-workspace:not(.hidden) { display:flex!important; flex-direction:column!important; }
  .pos-board-layout {
    grid-template-columns:minmax(0,2.4fr) minmax(250px,1fr)!important;
    align-items:start!important; gap:10px!important; min-height:0!important;
  }
  .pos-board-layout > .pos-board-technicians { grid-column:1!important; min-width:0!important; }
  .pos-board-layout > .pos-board-queue { grid-column:2!important; min-width:0!important; margin-top:0!important; }
  .pos-board-workspace:not(.editor-open) .pos-board-editor { display:none!important; }
  .pos-board-workspace.editor-open .pos-board-layout { display:block!important; }
  .pos-board-workspace.editor-open .pos-board-technicians,
  .pos-board-workspace.editor-open .pos-board-queue { display:none!important; }
  .pos-board-workspace.editor-open .pos-board-editor { display:block!important; }
  .pos-board-ticket-list { grid-template-columns:1fr!important; max-height:68vh; }
}

/* Clover Station 2018 WebView: make every technician header paint its full grid cell. */
.booking-tech-column,
.booking-tech-column > header,
.booking-tech-column > header small {
  min-width: 0;
  box-sizing: border-box;
}
.booking-tech-column > header {
  display: flex !important;
  width: 100% !important;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  background-color: #e7eff6 !important;
  background-clip: border-box;
}
.booking-tech-column > header small { width: 100%; }
.clover-device .booking-tech-column { background-color: #fff !important; }

/* 2026.9.12.5 compact Register-style command bar. */
.pos-board-commandbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto auto minmax(210px,1fr) auto auto;
  align-items: center;
  gap: 9px;
  min-height: 62px;
  padding: 8px 10px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(7,26,43,.14);
}
.pos-board-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #365168;
  border-radius: 8px;
  background: #0d2b43;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.pos-board-title { min-width: 118px; }
.pos-board-title h2 { font-size: 20px; line-height: 1.05; white-space: nowrap; }
.pos-board-title span { font-size: 9px; white-space: nowrap; }
.pos-board-search { display: block; min-width: 0; margin: 0; }
.pos-board-search span { display: none; }
.pos-board-search input {
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid #355169;
  border-radius: 8px;
  background: #fff;
  color: #102437;
}
.pos-board-primary-actions { display: flex; gap: 7px; }
.pos-board-primary-actions .primary { width: auto; margin: 0; }
.pos-board-primary-actions button { min-height: 42px; padding: 8px 12px; white-space: nowrap; }
.pos-board-more { position: relative; }
.pos-board-more summary {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #355169;
  border-radius: 8px;
  background: #0d2b43;
  color: #fff;
  font-size: 27px;
  cursor: pointer;
  list-style: none;
}
.pos-board-more summary::-webkit-details-marker { display: none; }
.pos-board-more > div {
  position: absolute;
  top: 49px;
  right: 0;
  z-index: 50;
  display: grid;
  width: 180px;
  padding: 7px;
  border: 1px solid #d7e0e5;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(7,26,43,.24);
}
.pos-board-more button { padding: 11px; border: 0; background: #fff; color: #102437; text-align: left; cursor: pointer; }
.pos-board-more button:hover { background: #eef4f6; }

@media (max-width: 800px) {
  /* Phone and Flex default view: two employee columns plus one narrow
     live-waitlist column. The editor takes the whole width only after a
     ticket is opened. */
  .pos-board-workspace:not(.hidden) { display: flex !important; flex-direction: column !important; }
  .pos-board-layout {
    display: grid !important;
    grid-template-columns: minmax(0,2fr) minmax(112px,1fr) !important;
    align-items: start !important;
    gap: 7px !important;
    width: 100% !important;
    min-height: 0 !important;
  }
  .clover-device .pos-board-layout,
  html.nsp-clover-legacy .pos-board-layout {
    display: grid !important;
    grid-template-columns: minmax(0,2fr) minmax(150px,1fr) !important;
    align-items: start !important;
    gap: 7px !important;
    width: 100% !important;
    min-height: 0 !important;
  }
  .pos-board-layout > .pos-board-technicians { grid-column: 1 !important; width: auto !important; min-width: 0 !important; }
  .pos-board-layout > .pos-board-queue { grid-column: 2 !important; width: auto !important; min-width: 0 !important; margin-top: 0 !important; }
  .clover-device .pos-board-layout > .pos-board-technicians,
  html.nsp-clover-legacy .pos-board-layout > .pos-board-technicians { grid-column: 1 !important; width: auto !important; min-width: 0 !important; }
  .clover-device .pos-board-layout > .pos-board-queue,
  html.nsp-clover-legacy .pos-board-layout > .pos-board-queue { grid-column: 2 !important; width: auto !important; min-width: 0 !important; margin-top: 0 !important; }
  .pos-board-workspace:not(.editor-open) .pos-board-editor { display: none; }
  .pos-board-workspace.editor-open .pos-board-technicians { display: none; }
  .pos-board-workspace.editor-open .pos-board-layout,
  .clover-device .pos-board-workspace.editor-open .pos-board-layout,
  html.nsp-clover-legacy .pos-board-workspace.editor-open .pos-board-layout { display: block !important; }
  .pos-board-workspace.editor-open .pos-board-queue { display: none; }
  .pos-board-workspace.editor-open .pos-board-editor { display: block; }
  .pos-board-queue { padding: 8px; }
  .pos-board-queue .panel-head { gap: 4px; }
  .pos-board-queue .panel-head span:first-child { font-size: 9px; }
  .pos-board-queue .panel-head h3 { font-size: 14px; line-height: 1.1; }
  .pos-board-ticket-list { display: grid; grid-template-columns: 1fr; gap: 6px; max-height: 68vh; overflow-y: auto; }
  .pos-board-ticket { min-height: 54px; padding: 7px; }
  .pos-board-ticket-head { display: grid; gap: 2px; }
  .pos-board-ticket-head strong { font-size: 14px; }
  .pos-board-ticket-head span { font-size: 11px; }
  .pos-board-ticket small { margin-top: 2px; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pos-board-commandbar {
    grid-template-columns: auto minmax(0,1fr) auto auto;
    gap: 6px;
    min-height: 56px;
    padding: 6px;
  }
  .pos-board-search { grid-column: 1/-1; grid-row: 2; }
  .pos-board-search input { min-height: 38px; font-size: 14px; }
  .pos-board-primary-actions #posBoardNew {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 7px 10px;
    font-size: 11px;
    white-space: nowrap;
  }
  .pos-board-primary-actions #posBoardRefresh { min-height: 44px; padding: 7px 10px; }
  .pos-board-title h2 { font-size: 18px; }
  .pos-board-title span { font-size: 8px; }
  .pos-board-technicians { padding: 9px; }
  .pos-board-section-title { flex-direction: row; align-items: center; }
  .pos-board-section-title span { display: none; }
}

@media (max-width: 430px) {
  .pos-board-title span { display: none; }
  .pos-board-primary-actions { gap: 4px; }
  .pos-board-primary-actions #posBoardNew {
    width: 64px;
    padding: 0;
    font-size: 0;
  }
  .pos-board-primary-actions #posBoardNew::before { content: '+ NEW'; font-size: 11px; }
  .pos-board-primary-actions #posBoardRefresh { font-size: 0; width: 44px; padding: 0; }
  .pos-board-primary-actions #posBoardRefresh::before { content: '↻'; font-size: 21px; }
  .pos-board-technicians,.pos-board-queue { padding: 6px; }
  .pos-board-tech-grid { gap: 5px; margin-top: 6px; }
  .pos-board-tech { min-height: 58px; padding: 6px; border-radius: 9px; }
  .pos-board-tech strong { font-size: 12px; }
  .pos-board-tech span { font-size: 9px; line-height: 1.15; }
  .pos-board-queue .panel-head h3 { font-size: 12px; }
  .pos-board-ticket { min-height: 48px; padding: 5px; }
  .pos-board-ticket-head strong { font-size: 12px; }
  .pos-board-ticket-head span,.pos-board-ticket small { font-size: 9px; }
}
