
.loading-workspace { padding: clamp(16px, 2vw, 28px); }
.loading-heading {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  margin-bottom: 18px; padding: clamp(18px, 2.2vw, 32px); border-radius: 14px;
  background: linear-gradient(108deg, #132c46, #18434b); color: #f5fbff;
}
.loading-heading h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 700; }
.loading-heading p { color: #d2e4ed; margin: 8px 0 0; font-size: 14px; }
.settings-link {
  margin: 0; border: 1px solid #6c929b; border-radius: 8px; padding: 0 14px;
  color: #f5fbff; background: #ffffff0c; font-size: 14px; line-height: 36px; cursor: pointer;
}
.settings-link:hover { background: #ffffff20; }
.settings-link:focus-visible { outline: 2px solid #a8f0e1; outline-offset: 2px; }
.loading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.loading-count-preview { display: block; width: 100%; height: min(710px, 76vh); border: 0; border-radius: 14px; margin-bottom: 16px; }
.workbenches {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 610px), 1fr)); align-items: start;
  gap: 16px; margin-bottom: 16px;
}


.loading-regions { padding: 18px; margin-bottom: 16px; border-radius: 12px; border: 1px solid var(--border-color, #d6e0e7); background: var(--bg-card, #fff); }
.loading-regions h2 { font-size: 18px; margin: 0 0 6px; }
.loading-regions-head, .loading-region-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.loading-regions-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.loading-regions-actions button { font-size: 14px; color: #18445b; background: #ecf4f8; border: 1px solid #cddce6; line-height: 1.5; padding: 6px 13px; border-radius: 7px; margin: 0; }
.loading-regions-actions button.loading-regions-primary { color: white; background: #166659; border-color: #166659; }
.loading-regions-actions button:disabled { opacity: .5; }
.loading-regions-muted { font-size: 13px; color: var(--text-secondary, #526475); }
.loading-regions-warning { color: #a03a1e; }
.loading-regions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px; margin-top: 12px; }
.loading-region-row { display: grid; gap: 9px; min-width: 0; align-content: start; padding: 13px; border: 1px solid var(--border-color, #d6e0e7); border-radius: 8px; }
.loading-region-row > label { display: grid; gap: 3px; font-size: 13px; }
.loading-region-row input:not([type="checkbox"]), .loading-region-row select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 32px; padding: 4px 7px; color: inherit; background: transparent; border: 1px solid var(--border-color, #d6e0e7); border-radius: 5px; }


.loading-camera-preview { position: relative; background: #111a24; border-radius: 8px; overflow: hidden; }
.loading-camera-frame { aspect-ratio: 16 / 9; }
.loading-camera-frame video, .loading-camera-frame img {
  width: 100%; height: 100%; display: block; object-fit: contain;
}
.loading-camera-message { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; text-align: center; color: #f2f6fa; pointer-events: none; }


.local-camera {
  padding: clamp(14px, 1.6vw, 20px); border-radius: 14px; min-width: 0;
  border: 1px solid var(--border-color, #d6e0e7); background: var(--bg-card, #fff);
  box-shadow: 0 3px 15px #18364a0b;
}
.station-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.station-overview { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%, 250px),1fr)); gap:12px; margin-top:14px; }
.camera-panel,.trip-progress { min-width:0; padding:14px; border:1px solid var(--border-color,#d6e0e7); border-radius:10px; }
.camera-panel { background:var(--bg-main,#f5f8fa); }
.trip-progress { background:var(--bg-main,#edf5f3); }
.station-overview h3,.tag-dialog h3 { margin:0; font-size:15px; }
.trip-progress h3 span { margin-left:8px; font-weight:500; }
.trip-progress strong { display:block; margin-top:8px; }
.trip-order { padding-top:8px; margin-top:8px; border-top:1px solid var(--border-color,#d6e0e7); overflow-wrap:anywhere; }
.trip-progress small { display:block; line-height:1.6; }
.local-camera .station-role { margin:5px 0 0; }
.local-camera h2 { font-size: 18px; margin: 0; overflow-wrap: anywhere; }
.station-indicator {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 100px;
  font-size: 12px; font-weight: 650; color: #354a5e; background: #eaf0f5;
}
.station-indicator::before { content: ''; width: 7px; height: 7px; background: #687c90; border-radius: 50%; }
.station-online { color: #07584d; background: #d9f5ec; }
.station-online::before { background: #12876f; }
.local-camera p { color: var(--text-secondary, #526475); font-size: 13px; }
.camera-controls, .camera-controls label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.camera-controls select, .camera-controls input, .camera-controls button {
  border: 1px solid var(--border-color, #cddce6); border-radius: 7px; min-height: 34px;
  padding: 4px 10px; margin: 0; background: var(--bg-card, #fff); color: inherit;
}
.camera-controls select { max-width: 100%; }
.camera-controls .open-camera { background: #166659; border-color: #166659; color: #fff; }
.camera-frame { margin-top: 14px; width: min(100%, 840px); background: #111a24; border-radius: 10px; overflow: hidden; }
.camera-frame video { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: contain; }
.loading-station-frame { display: block; border: 0; width: 100%; min-height: 150px; margin-top: 14px; border-radius: 11px; background: #111e2e; }
.tag-dialog { width:min(560px,calc(100% - 24px)); max-height:calc(100% - 24px); border:1px solid var(--border-color,#d6e0e7); border-radius:14px; padding:0; background:var(--bg-card,#fff); color:inherit; overflow:auto; }
.tag-dialog::backdrop { background:#10233699; }
.tag-dialog header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; border-bottom:1px solid var(--border-color,#d6e0e7); }
.tag-dialog button { margin:0; border:1px solid var(--border-color,#d6e0e7); border-radius:7px; padding:5px 12px; background:transparent; color:inherit; }
.tag-dialog iframe { display:block; width:100%; height:min(460px,72vh); border:0; }
