/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg: #e9edf2;
  --nav: #1f2d3a;
  --nav-soft: #34465b;
  --nav-active: #f4f6fa;
  --nav-active-text: #111827;
  --text: #111827;
  --muted: #526173;
  --card: #f8fafc;
  --border: #c8d0dc;
  --free: #9adeb0;
  --lvc: #ffd96a;
  --ivc: #ee6b8a;
  --hc: #55a7df;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.app-shell { display: grid; grid-template-columns: 226px 1fr; min-height: 100vh; }
.sidebar { background: var(--nav); color: white; padding: 24px 14px; }
.brand-block { margin-bottom: 42px; }
.brand { font-size: 30px; font-weight: 800; margin-bottom: 1px; }
.brand-version { font-size: 11px; font-weight: 600; color: #c7d2df; letter-spacing: 0.02em; }
.nav-list { margin-right: -14px; }
.nav-link { display: block; padding: 13px 20px; margin: 6px 0; color: #eef4ff; border-radius: 0; }
.nav-link:hover { background: var(--nav-soft); }
.nav-link.active { background: var(--nav-active); color: var(--nav-active-text); font-weight: 800; margin-right: -14px; padding-right: 34px; }
.nav-link.active:hover { background: var(--nav-active); }
.main { display: flex; flex-direction: column; min-width: 900px; }
.topbar { height: 78px; background: #253441; color: white; padding: 22px 34px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; grid-gap: 18px; gap: 18px; }
.topbar h1 { margin: 0; font-size: 32px; letter-spacing: 0.3px; justify-self: start; }
.topbar p { margin: 0; color: #d5dee8; justify-self: end; text-align: right; }
.topbar-alert-slot { justify-self: center; }
.topbar-spacer { justify-self: end; }
.content-card { margin: 0; padding: 36px 34px 48px; background: #f4f6fa; flex: 1 1; }
.page-title { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 20px; }
.page-title h2 { margin: 0; font-size: 21px; }
.page-title p { color: var(--muted); }
.primary-btn, .secondary-btn { border: 0; border-radius: 9px; padding: 13px 24px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.primary-btn { background: #263443; color: white; }
.secondary-btn { background: white; border: 1px solid var(--border); color: #183454; }
.legend { display: flex; gap: 44px; margin: 18px 0 28px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.legend-swatch { width: 120px; height: 30px; border-radius: 5px; display: inline-block; }
.capacity-free { background: var(--free); }
.capacity-lvc { background: var(--lvc); }
.capacity-ivc { background: var(--ivc); }
.capacity-hc { background: var(--hc); }
.capacity-square { width: 84px; height: 84px; border: 2px solid #111; border-radius: 8px; overflow: hidden; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); background: white; }
.capacity-cell { border: 1px solid #111; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: 10px; line-height: 1.05; min-width: 0; }
.capacity-cell span { font-weight: 800; }
.capacity-cell strong { font-size: 10px; }
.overview-grid { display: grid; grid-auto-rows: auto; grid-gap: 18px 22px; gap: 18px 22px; align-items: center; margin-top: 20px; }
.overview-grid.days { grid-template-columns: 145px repeat(7, 84px); }
.overview-grid.weeks { grid-template-columns: 150px repeat(7, 84px); }
.grid-header { font-weight: 800; color: #183b63; text-align: center; padding: 10px 6px; background: white; border: 1px solid var(--border); border-radius: 6px; }
.row-label { font-weight: 800; font-size: 20px; }
.week-nav { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 22px 0 14px; color: #1f446d; font-size: 26px; font-weight: 800; }
.week-arrow { font-size: 26px; }
.selector-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.selector-row > span { margin-right: 8px; color: var(--muted); font-weight: 700; }
.pill { border: 1px solid var(--border); background: white; border-radius: 999px; padding: 7px 12px; font-size: 13px; }
.pill.active { background: #263443; color: white; border-color: #263443; }
.form-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 22px; max-width: 760px; margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 16px; gap: 16px; }
.form-grid label { display: grid; grid-gap: 6px; gap: 6px; font-weight: 700; color: #2b3a4a; min-width: 0; max-width: 100%; }
.form-grid input, .form-grid select { padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; background: white; width: 100%; min-width: 0; max-width: 100%; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; }
.table { width: 100%; border-collapse: collapse; background: white; border: 1px solid var(--border); margin-top: 20px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { background: #e7ecf3; }
.notice { background: #fff7d6; border: 1px solid #e5c35a; border-radius: 10px; padding: 14px 16px; margin: 16px 0; color: #433811; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); grid-gap: 16px; gap: 16px; margin-top: 18px; }
.metric { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.metric strong { font-size: 28px; display: block; }
.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); grid-gap: 16px; gap: 16px; margin-top: 20px; }
.asset-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.asset-card h3 { margin-top: 0; }
.small { font-size: 12px; color: var(--muted); }
.error-list { color: #b42318; }
.notice { display: flex; gap: 8px; align-items: flex-start; }
.notice span { display: inline-block; }
.notice-error { background: #fff1f0; border-color: #ffa39e; color: #a8071a; }
.notice-info { background: #edf9f0; border-color: #8bd69b; color: #135822; }

.type-badge { display: inline-block; min-width: 42px; padding: 4px 8px; border-radius: 6px; font-weight: 800; text-align: center; color: #111827; }
.type-hc { background: var(--hc); }
.type-lvc { background: var(--lvc); }
.type-ivc { background: var(--ivc); }

.wizard-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 22px; max-width: 900px; }
.wizard-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 18px; }
.wizard-header h2 { margin: 0 0 6px; }
.wizard-header p { margin: 0; color: var(--muted); }
.wizard-progress { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 24px; }
.wizard-step { background: #f4f6fa; border: 1px solid var(--border); border-radius: 9px; padding: 10px 20px; min-width: 130px; text-align: center; font-weight: 800; color: #2b3a4a; position: relative; }
.wizard-step:not(:last-child)::after { content: "›"; position: absolute; right: -10px; top: 50%; transform: translateY(-50%); color: #9aa7b8; }
.wizard-step.active { background: #0b5ba8; color: white; border-color: #0b5ba8; }
.wizard-step.done { background: #dbeafe; border-color: #93c5fd; color: #123a5f; }
.wizard-body h3 { margin-top: 0; }
.medium-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); grid-gap: 14px; gap: 14px; max-width: 720px; }
.option-row { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border); background: white; border-radius: 9px; padding: 14px 16px; }
.option-row.selected { border-color: #0b5ba8; background: #eef6ff; }
.option-row.disabled { color: #8491a2; background: #f6f7f9; }
.shop-option-list { display: grid; grid-gap: 10px; gap: 10px; max-width: 760px; }
.shop-option { display: grid; grid-gap: 4px; gap: 4px; border: 1px solid var(--border); background: white; border-radius: 9px; padding: 14px 16px; }
.shop-option span { font-weight: 800; }
.shop-option small { color: var(--muted); }
.shop-option.selected { border-color: #0b5ba8; background: #eef6ff; }
.wizard-actions { margin-top: 22px; display: flex; gap: 12px; align-items: center; }
.wizard-span { grid-column: 1 / -1; }
.summary-card { display: grid; grid-gap: 10px; gap: 10px; max-width: 720px; border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: #f8fafc; }
.summary-line { display: grid; grid-template-columns: 180px 1fr; grid-gap: 16px; gap: 16px; border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; }
.summary-line:last-child { border-bottom: 0; padding-bottom: 0; }
.summary-line span { color: var(--muted); font-weight: 700; }
.summary-line strong { color: var(--text); }

/* Phase 5 booking wizard v001b */
.week-nav { justify-content: flex-start; margin-left: 0; }
.overview-panel { min-width: 0; }
.calendar-strip { display: grid; grid-gap: 14px 14px; gap: 14px 14px; align-items: center; justify-content: start; margin-top: 12px; }
.calendar-strip.weeks, .calendar-strip.days { grid-template-columns: repeat(7, 84px); }
.overview-shop-name { margin-top: 22px; font-weight: 800; font-size: 20px; text-align: left; min-height: 28px; }
.booking-page-title { margin-bottom: 8px; }
.booking-split { display: grid; grid-template-columns: minmax(610px, 0.92fr) minmax(560px, 1.08fr); grid-gap: 32px; gap: 32px; align-items: flex-start; }
.booking-split > .overview-panel { border-right: 4px solid #1da7df; padding-right: 28px; min-height: 560px; }
.booking-split .legend { gap: 18px; }
.booking-split .legend-swatch { width: 82px; }
.booking-split .selector-row { align-items: flex-start; }
.booking-split .week-nav { font-size: 21px; gap: 14px; }
.booking-split .wizard-card { max-width: none; min-width: 0; }
.wizard-card { max-width: none; }
.wizard-progress { display: grid; grid-template-columns: repeat(5, minmax(92px, 1fr)); }
.wizard-step { min-width: 0; padding: 10px 8px; }
.shop-option { grid-template-columns: 22px 1fr; cursor: pointer; }
.shop-option input { grid-row: 1 / span 2; align-self: center; }
.shop-option span, .shop-option small { grid-column: 2; }
.asset-picker { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(240px, 1fr); grid-gap: 18px; gap: 18px; align-items: flex-start; }
.asset-preview { min-height: 190px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.asset-preview img, .summary-preview img { display: block; width: 100%; max-height: 260px; object-fit: contain; background: white; }
.asset-preview-empty { display: grid; grid-gap: 8px; gap: 8px; text-align: center; color: var(--muted); padding: 24px; }
.asset-preview-empty strong { color: var(--text); }
.summary-preview { max-width: 420px; max-height: 260px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; background: white; }

@media (max-width: 1500px) {
  .booking-split { grid-template-columns: 1fr; }
  .booking-split > .overview-panel { border-right: 0; border-bottom: 4px solid #1da7df; padding-right: 0; padding-bottom: 28px; min-height: 0; }
}

@media (max-width: 980px) {
  .main { min-width: 0; }
  .content-card { overflow-x: auto; }
  .asset-picker { grid-template-columns: 1fr; }
}
.shop-option:has(input:checked) { border-color: #0b5ba8; background: #eef6ff; }

/* Phase 5 booking wizard v001c */
.booking-workspace { display: grid; grid-gap: 12px; gap: 12px; }
.overview-toggle-row { display: flex; justify-content: flex-end; align-items: center; gap: 12px; min-height: 38px; font-weight: 800; color: #2b3a4a; }
.toggle-switch { width: 92px; height: 36px; border: 1px solid var(--border); border-radius: 999px; background: #d8dee7; padding: 3px 9px 3px 4px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: #263443; }
.toggle-switch.on { background: #9adeb0; }
.toggle-knob { width: 28px; height: 28px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgb(0 0 0 / 25%); transition: transform 150ms ease; }
.toggle-switch.on .toggle-knob { transform: translateX(54px); }
.toggle-switch.on strong { order: -1; }
.booking-split.overview-hidden { grid-template-columns: minmax(560px, 900px); justify-content: start; }
.booking-split.overview-hidden .wizard-pane { grid-column: 1; width: 100%; }
.wizard-pane { min-width: 0; }
.primary-btn:disabled, .secondary-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.asset-source-controls { display: grid; grid-gap: 14px; gap: 14px; }
.asset-source-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.local-file-control { display: grid; grid-gap: 7px; gap: 7px; }
.local-file-control small { color: var(--muted); font-weight: 500; }
.compact-notice { margin: 0; }
.notice ul { margin: 8px 0 0 20px; padding: 0; }

@media (max-width: 980px) {
  .overview-toggle-row { justify-content: flex-start; }
  .booking-split.overview-hidden { grid-template-columns: minmax(0, 1fr); }
}

/* Phase 5 explicit booking ranges and shared calendar interactions v001f */
.calendar-interaction-root { min-width: 0; }
.capacity-square-shell { position: relative; width: 84px; height: 84px; overflow: visible; }
.capacity-booking { padding: 0; margin: 0; cursor: pointer; color: var(--text); position: relative; }
.capacity-booking:hover,
.capacity-booking:focus-visible,
.capacity-booking.capacity-booking-active {
  outline: 4px solid #d92d20;
  outline-offset: -4px;
  filter: brightness(0.97);
  z-index: 3;
}
.calendar-period-header { width: 84px; cursor: help; font-weight: 800; }
.calendar-period-header:hover,
.calendar-period-header:focus-visible { background: #e4e9ef; outline: 2px solid #66758a; outline-offset: -2px; }
.calendar-interaction-area { margin-top: 12px; max-width: 620px; }
.calendar-interaction-area:empty { display: none; }
.calendar-interaction-card { position: static; background: white; border: 1px solid #8fa0b5; border-radius: 8px; box-shadow: 0 8px 24px rgb(15 23 42 / 20%); }
.booking-hover-card { width: min(520px, 100%); padding: 12px 14px; pointer-events: none; }
.booking-hover-card.booking-hover-card-interactive { pointer-events: auto; }
.period-hover-card { width: min(360px, 100%); padding: 12px 14px; }
.period-hover-card > strong { display: block; margin-bottom: 9px; color: #183b63; }
.booking-action-menu { width: max-content; max-width: 100%; padding: 6px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
.booking-action-menu a,
.booking-action-menu button { width: auto; max-width: 100%; border: 0; background: white; color: #183454; border-radius: 5px; padding: 10px 12px; text-align: left; cursor: pointer; font-weight: 700; }
.booking-action-menu a:hover,
.booking-action-menu a:focus-visible,
.booking-action-menu button:hover,
.booking-action-menu button:focus-visible { background: #d9dde3; }
.booking-delete-confirm { width: min(440px, 100%); padding: 16px; }
.delete-title { display: block; color: #a8071a; font-size: 18px; margin-bottom: 10px; }
.booking-delete-confirm p { margin: 14px 0 10px; font-weight: 800; }
.booking-info-list { display: grid; grid-gap: 6px; gap: 6px; margin: 0; font-size: 12px; }
.booking-info-list > div { display: grid; grid-template-columns: 86px 1fr; grid-gap: 8px; gap: 8px; }
.booking-info-list dt { color: var(--muted); font-weight: 700; }
.booking-info-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.delete-actions { display: flex; gap: 8px; align-items: center; }
.danger-btn, .secondary-small-btn { border-radius: 6px; padding: 8px 16px; font-weight: 800; cursor: pointer; }
.danger-btn { border: 1px solid #b42318; background: #b42318; color: white; }
.secondary-small-btn { border: 1px solid var(--border); background: white; color: #183454; }

/* Phase 6A/6B authentication, roles and user administration */
.sidebar { display: flex; flex-direction: column; min-height: 100vh; }
.sidebar-account { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid rgb(255 255 255 / 18%); display: grid; grid-gap: 5px; gap: 5px; }
.sidebar-account strong { font-size: 13px; overflow-wrap: anywhere; }
.sidebar-account span { font-size: 11px; color: #c7d2df; overflow-wrap: anywhere; }
.logout-btn { margin-top: 8px; width: 100%; border: 1px solid rgb(255 255 255 / 30%); background: transparent; color: white; border-radius: 7px; padding: 8px; cursor: pointer; font-weight: 700; }
.logout-btn:hover, .logout-btn:focus-visible { background: rgb(255 255 255 / 12%); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: #e9edf2; }
.login-card { width: min(440px, 100%); background: white; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 50px rgb(15 23 42 / 15%); padding: 34px; }
.login-brand { display: inline-block; background: var(--nav); color: white; border-radius: 8px; padding: 8px 13px; font-size: 23px; font-weight: 800; }
.login-card h1 { margin: 24px 0 8px; }
.login-card p { color: var(--muted); }
.login-form { display: grid; grid-gap: 16px; gap: 16px; margin-top: 22px; }
.login-form label { display: grid; grid-gap: 7px; gap: 7px; font-weight: 700; }
.login-form input { padding: 12px; border: 1px solid var(--border); border-radius: 7px; }
.error-banner { background: #fff1f0; border: 1px solid #ffa39e; color: #a8071a; border-radius: 8px; padding: 12px; margin-top: 16px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 22px; gap: 22px; align-items: flex-start; }
.admin-grid .form-card { max-width: none; margin-top: 0; min-width: 0; }
.table-scroll { overflow-x: auto; }
.user-table { min-width: 980px; }
.status-pill { display: inline-block; padding: 4px 9px; border-radius: 999px; font-weight: 800; font-size: 12px; }
.status-active { background: #dff6e5; color: #135822; }
.status-disabled { background: #f0f1f3; color: #5b6472; }
.role-chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.role-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #b7c2d0; background: #eef2f7; border-radius: 999px; padding: 5px 8px 5px 10px; max-width: 100%; }
.role-chip span { font-size: 11px; overflow-wrap: anywhere; }
.role-chip button { border: 0; background: transparent; color: #8f1d1d; cursor: pointer; font-size: 16px; line-height: 1; }

@media (max-width: 1100px) {
  .admin-grid { grid-template-columns: 1fr; }
}

/* Phase 6A/6B v001d booking hover thumbnail */
.booking-hover-card { width: min(620px, 100%); }
.booking-hover-layout { display: grid; grid-template-columns: minmax(0, 1fr) 160px; grid-gap: 16px; gap: 16px; align-items: center; }
.booking-hover-thumbnail { width: 160px; height: 96px; border: 1px solid #8fa0b5; border-radius: 6px; background: #f4f6fa; overflow: hidden; display: grid; place-items: center; }
.booking-hover-thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; background: white; }
.booking-hover-thumbnail > .booking-thumbnail-empty { padding: 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; }
@media (max-width: 620px) {
  .booking-hover-layout { grid-template-columns: 1fr; }
  .booking-hover-thumbnail { width: 160px; }
}

/* Keep account switch controls reachable on short viewports. */
.sidebar { height: 100vh; position: -webkit-sticky; position: sticky; top: 0; overflow-y: auto; }

/* Phase 6 responsive booking workspace: prevent calendar/wizard overlap after zoom or resize. */
.booking-workspace { container-type: inline-size; }

.booking-split.booking-split-stacked {
  grid-template-columns: minmax(0, 1fr);
}

.booking-split.booking-split-stacked > .overview-panel {
  border-right: 0;
  border-bottom: 4px solid #1da7df;
  padding-right: 0;
  padding-bottom: 28px;
  min-height: 0;
}

.booking-split.booking-split-stacked > .wizard-pane {
  grid-column: 1;
  width: 100%;
}

/* Container width excludes the sidebar, unlike a normal viewport media query. */
@container (max-width: 1380px) {
  .booking-split:not(.overview-hidden) {
    grid-template-columns: minmax(0, 1fr);
  }

  .booking-split:not(.overview-hidden) > .overview-panel {
    border-right: 0;
    border-bottom: 4px solid #1da7df;
    padding-right: 0;
    padding-bottom: 28px;
    min-height: 0;
  }

  .booking-split:not(.overview-hidden) > .wizard-pane {
    grid-column: 1;
    width: 100%;
  }
}


/* Phase 6A/6B v001f Service Worker debug cache provenance. */
.debug-switch-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px 7px 12px;
  border: 1px solid #7f8da0;
  border-radius: 999px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 6px 18px rgb(15 23 42 / 22%);
  color: #263443;
  font-size: 12px;
  font-weight: 800;
}

.debug-toggle {
  position: relative;
  width: 68px;
  height: 28px;
  border: 1px solid #a9b4c2;
  border-radius: 999px;
  background: #d8dee7;
  padding: 2px 7px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  color: #263443;
}

.debug-toggle.on { background: #9adeb0; justify-content: flex-start; }
.debug-toggle-knob {
  position: absolute;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgb(0 0 0 / 25%);
  transition: left 150ms ease;
}
.debug-toggle.on .debug-toggle-knob { left: 41px; }
.debug-toggle strong { width: 24px; font-size: 10px; text-align: center; }

.cached-asset-image {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.cached-asset-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
}

.asset-preview > .cached-asset-image { height: 190px; min-height: 190px; }
.summary-preview > .cached-asset-image { height: auto; max-height: 260px; }
.summary-preview > .cached-asset-image > img { height: auto; max-height: 260px; }

.debug-data-badge {
  z-index: 4;
  border: 1px solid rgb(17 24 39 / 28%);
  border-radius: 4px;
  padding: 3px 6px;
  box-shadow: 0 1px 4px rgb(15 23 42 / 22%);
  color: #111827;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: lowercase;
  pointer-events: auto;
}
.debug-data-overlay { position: absolute; top: 5px; right: 5px; }
.debug-data-inline { position: static; display: inline-flex; align-items: center; width: -moz-fit-content; width: fit-content; }


.cached-asset-loading {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 42px;
  background: linear-gradient(90deg, #eef1f5 25%, #f8fafc 50%, #eef1f5 75%);
  background-size: 200% 100%;
  animation: wt-cache-loading 1.2s linear infinite;
}
@keyframes wt-cache-loading { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.booking-info-debug-block { min-width: 0; }
.booking-info-debug-status { margin-top: 8px; display: flex; align-items: center; }

.debug-data-cached { background: #69d889; }
.debug-data-retrieved { background: #ffd75f; }
.debug-data-error { background: #ff9b91; }

@media print {
  .debug-switch-panel,
  .debug-data-badge { display: none !important; }
}

/* Dashboard recent-bookings table: user-resizable columns. */
.dashboard-table-scroll {
  width: 100%;
  overflow-x: auto;
  margin-top: 20px;
  border: 1px solid var(--border);
  background: white;
}
.dashboard-bookings-table {
  table-layout: fixed;
  margin-top: 0;
  border: 0;
  min-width: 100%;
}
.dashboard-bookings-table th,
.dashboard-bookings-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-bookings-table th {
  position: relative;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.dashboard-column-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
  touch-action: none;
}
.dashboard-column-resizer::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 4px;
  width: 1px;
  background: transparent;
}
.dashboard-column-resizer:hover::after,
.dashboard-column-resizer:focus-visible::after {
  background: #64748b;
}
.dashboard-column-resizer:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: -2px;
}
body.dashboard-column-resizing,
body.dashboard-column-resizing * {
  cursor: col-resize !important;
  -webkit-user-select: none !important;
     -moz-user-select: none !important;
          user-select: none !important;
}

/* Phase 6A/6B v001h responsive select controls and multi-scope Admin selectors */
select { max-width: 100%; min-width: 0; }
.form-card, .wizard-card, .asset-picker, .form-grid > *, .wizard-pane { min-width: 0; }
.wizard-card select, .asset-picker select, .form-card select { width: 100%; max-width: 100%; min-width: 0; }
.form-field-minzero { min-width: 0; max-width: 100%; }
.scope-mode-note { border: 1px solid #d5dde8; background: #f5f7fa; border-radius: 7px; padding: 10px 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.scope-multiselect-field { display: grid; grid-gap: 6px; gap: 6px; min-width: 0; max-width: 100%; align-self: start; }
.scope-multiselect-label { color: #2b3a4a; font-weight: 700; }
.scope-multiselect-trigger { width: 100%; max-width: 100%; min-width: 0; min-height: 42px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 7px; background: white; color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.scope-multiselect-trigger > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-multiselect-panel { width: 100%; max-width: 100%; min-width: 0; border: 1px solid #9aa8ba; border-radius: 8px; background: white; box-shadow: 0 8px 22px rgb(15 23 42 / 16%); overflow: hidden; }
.scope-multiselect-toolbar { min-height: 40px; padding: 7px 9px; border-bottom: 1px solid #d9e0e8; background: #f4f6f9; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scope-multiselect-toolbar strong { min-width: 0; overflow-wrap: anywhere; }
.scope-clear-btn { border: 1px solid var(--border); background: white; border-radius: 5px; padding: 5px 9px; cursor: pointer; }
.scope-clear-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.scope-option-list { max-height: 520px; max-width: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; }
.scope-check-option { min-height: 26px; padding: 3px 8px; display: grid !important; grid-template-columns: 22px minmax(0, 1fr); grid-gap: 7px !important; gap: 7px !important; align-items: center; border-bottom: 1px solid #edf0f4; cursor: pointer; font-weight: 600 !important; }
.scope-check-option:hover, .scope-check-option:focus-within { background: #eef2f6; }
.scope-check-option input { width: 16px !important; height: 16px; margin: 0; padding: 0; }
.scope-option-copy { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-option-copy strong { font-size: 11px; }
.scope-option-copy small { color: var(--muted); font-size: 10px; font-weight: 500; }
.scope-option-empty { padding: 14px; color: var(--muted); font-size: 12px; }
.scope-multiselect-pager { min-height: 38px; padding: 5px 8px; border-top: 1px solid #d9e0e8; background: #f4f6f9; display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; grid-gap: 8px; gap: 8px; }
.scope-multiselect-pager button { width: 32px; height: 28px; border: 1px solid var(--border); border-radius: 5px; background: white; cursor: pointer; font-weight: 800; }
.scope-multiselect-pager span { min-width: 0; text-align: center; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .wizard-span { grid-column: 1; }
}

/* Phase 6A/6B v001i: corrected HC scopes and P.O.S. master data */
.scope-fixed-tenant { display: grid; grid-gap: 4px; gap: 4px; min-width: 0; border: 1px solid #d5dde8; background: #f5f7fa; border-radius: 7px; padding: 9px 12px; }
.scope-fixed-tenant span { color: var(--muted); font-size: 11px; font-weight: 700; }
.scope-fixed-tenant strong { overflow-wrap: anywhere; }
.scope-filter-input { width: calc(100% - 16px); max-width: calc(100% - 16px); margin: 7px 8px 0; min-width: 0; }

.master-data-section { margin-top: 28px; display: grid; grid-gap: 12px; gap: 12px; min-width: 0; }
.master-data-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.master-data-heading h2 { margin-bottom: 4px; }
.master-data-card { border: 1px solid var(--border); border-radius: 9px; background: white; overflow: hidden; min-width: 0; }
.master-data-card > summary { cursor: pointer; padding: 13px 15px; background: #e8edf4; font-size: 15px; font-weight: 800; display: flex; justify-content: space-between; gap: 12px; }
.master-data-card > summary:hover { background: #dde5ee; }
.master-data-card-body { padding: 15px; min-width: 0; }
.master-data-card-body > h3 { margin: 4px 0 10px; }
.master-record-list { display: grid; grid-gap: 8px; gap: 8px; margin-top: 18px; }
.master-record { border: 1px solid #d7dee8; border-radius: 8px; overflow: hidden; min-width: 0; }
.master-record > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 14px; padding: 9px 11px; background: #f6f8fb; align-items: center; }
.master-record > summary > * { min-width: 0; overflow-wrap: anywhere; }
.master-record > summary:hover { background: #edf2f7; }
.master-record .master-form-grid { padding: 12px; border-top: 1px solid #e0e6ed; }
.master-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 10px 12px; gap: 10px 12px; min-width: 0; }
.master-shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.master-form-grid > *, .master-shop-grid > * { min-width: 0; max-width: 100%; }
.master-form-grid label { display: grid; grid-gap: 5px; gap: 5px; font-weight: 700; }
.master-form-grid input, .master-form-grid select, .master-form-grid textarea { width: 100%; min-width: 0; max-width: 100%; }
.master-span { grid-column: 1 / -1; }
.master-status-form { padding: 0 12px 12px; }
.master-capability-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; border: 1px solid #d8e0e9; border-radius: 7px; padding: 9px 11px; background: #f8fafc; }
.master-capability-row label { display: inline-flex; grid-template-columns: none; align-items: center; gap: 7px; }
.master-capability-row input { width: auto; }
.combinations-table { min-width: 1050px; }
.combinations-table td, .combinations-table th { white-space: nowrap; }
@media (max-width: 1050px) {
  .master-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .master-form-grid, .master-shop-grid { grid-template-columns: minmax(0, 1fr); }
  .master-span { grid-column: 1; }
  .master-record > summary { align-items: flex-start; flex-direction: column; }
}

/* Phase 6 v001i: HC-Master tenant-user special case */
.tenant-user-management {
  margin-top: 22px;
  max-width: 1240px;
}
.compact-form-card {
  min-width: 0;
}
.static-role-chip {
  display: inline-flex;
  align-items: center;
}

/* Phase 6A/6B v001j master-data validation and fixed commercial capability model. */
.master-field-invalid,
.master-field-invalid .scope-multiselect-label { color: #a8071a !important; }
.master-field-invalid input,
.master-field-invalid select,
.master-field-invalid textarea,
.master-field-invalid .scope-multiselect-trigger { color: #a8071a !important; border-color: #ffa39e !important; background: #fff1f0; }
.master-model-note { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; border: 1px solid #d8e0e9; border-radius: 7px; padding: 9px 11px; background: #f8fafc; }
.master-model-note strong { white-space: nowrap; }
.master-model-note span { min-width: 0; overflow-wrap: anywhere; }

/* Phase 6A/6B v001k: collapsible top-level Admin panels. */
.admin-panel {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  overflow: hidden;
}
.admin-panel-wide { margin-top: 18px; }
.admin-panel > .admin-panel-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 14px 16px;
  background: #e8edf4;
  font-size: 18px;
  font-weight: 800;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.admin-panel > .admin-panel-summary::-webkit-details-marker { display: none; }
.admin-panel > .admin-panel-summary::marker { content: ""; }
.admin-panel > .admin-panel-summary::after {
  content: "\25BC";
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 13px;
  line-height: 1;
  color: #244568;
}
.admin-panel[open] > .admin-panel-summary::after { content: "\25B2"; }
.admin-panel > .admin-panel-summary:hover { background: #dde5ee; }
.admin-panel-count {
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f5f7fa;
  border: 1px solid #c9d3df;
  font-size: 12px;
  font-weight: 800;
}
.admin-panel-body { padding: 16px; min-width: 0; max-width: 100%; }
.admin-panel-body > .small:first-child { margin-top: 0; }
.admin-table-panel-body { padding: 0; }
.master-data-section { margin-top: 18px; display: block; }
.master-data-top-body { display: grid; grid-gap: 12px; gap: 12px; }
.master-data-top-body > .master-data-card { width: 100%; }

/* Phase 6A/6B v001l: two-level Admin navigation and explicit create-new panels. */
.admin-section-stack { display: grid; grid-gap: 12px; gap: 12px; }
.admin-subpanel {
  min-width: 0;
  max-width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}
.admin-subpanel-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 12px 14px;
  background: #f0f4f8;
  font-size: 15px;
  font-weight: 800;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.admin-subpanel-summary::-webkit-details-marker { display: none; }
.admin-subpanel-summary::marker { content: ""; }
.admin-subpanel-summary::after {
  content: "\25BC";
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 12px;
  color: #244568;
}
.admin-subpanel[open] > .admin-subpanel-summary::after { content: "\25B2"; }
.admin-subpanel-summary:hover { background: #e4ebf2; }
.admin-subpanel-body { padding: 14px; min-width: 0; max-width: 100%; }
.admin-subpanel-body > .small:first-child { margin-top: 0; }

.admin-create-panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px dashed #9aa9ba;
  border-radius: 8px;
  background: #fbfcfe;
  overflow: hidden;
}
.admin-create-summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 9px 11px;
  font-weight: 800;
  color: #20364b;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.admin-create-summary::-webkit-details-marker { display: none; }
.admin-create-summary::marker { content: ""; }
.admin-create-summary:hover { background: #eef3f8; }
.admin-plus-button {
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 25px;
  border-radius: 6px;
  border: 1px solid #71849a;
  background: white;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
}
.admin-create-panel[open] .admin-plus-button { transform: rotate(45deg); }
.admin-create-body { border-top: 1px solid #d8e0e9; padding: 14px; min-width: 0; max-width: 100%; }
.admin-create-body > .small:first-child { margin-top: 0; }
.admin-list-spacing { margin-top: 14px; }
.master-create-panel { margin-top: 14px; }
.master-record-list-first { margin-top: 0; }

/* Phase 6A/6B v001m logical Content Asset / physical-media library */
.asset-library-tools { display: grid; grid-gap: 14px; gap: 14px; margin: 16px 0; }
.asset-library-tools details.form-card { padding: 0; overflow: visible; }
.asset-library-tools details.form-card > summary { cursor: pointer; padding: 16px 18px; list-style-position: inside; -webkit-user-select: none; -moz-user-select: none; user-select: none; }
.asset-library-tools details.form-card[open] > summary { border-bottom: 1px solid var(--border); }
.asset-library-tool-body { padding: 16px 18px 18px; }
.asset-card-v001m { display: grid; grid-template-columns: minmax(0, 1fr) 180px; grid-gap: 14px; gap: 14px; align-items: flex-start; }
.asset-card-copy { min-width: 0; }
.asset-card-preview { width: 180px; min-height: 108px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: #f7f9fc; overflow: hidden; }
.asset-card-preview .cached-asset-image { display: block; width: 100%; height: 108px; }
.asset-card-preview .cached-asset-image img { width: 100%; height: 100%; object-fit: contain; background: white; }
.asset-storage-path { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .asset-card-v001m { grid-template-columns: 1fr; }
  .asset-card-preview { width: min(100%, 320px); }
}

/* Phase 6 v001n: access-aware Assets shop selector. */
.asset-shop-selector {
  display: grid;
  grid-template-columns: max-content minmax(240px, 520px) minmax(0, 1fr);
  align-items: center;
  grid-gap: 10px 12px;
  gap: 10px 12px;
  margin: 16px 0;
  max-width: 100%;
}
.asset-shop-selector > label {
  color: var(--muted);
  font-weight: 700;
}
.asset-shop-selector > select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.asset-shop-selector > .small {
  min-width: 0;
}
@media (max-width: 900px) {
  .asset-shop-selector {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

/* Phase 6A/6B v001q: compact asset details, admin ID lookup, and grouped overview selectors. */
.overview-shop-selector { margin-top: 16px; margin-bottom: 16px; }
.asset-detail-selector {
  display: grid;
  grid-template-columns: max-content minmax(260px, 620px) minmax(0, 1fr);
  align-items: center;
  grid-gap: 10px 12px;
  gap: 10px 12px;
  margin: 18px 0 12px;
  max-width: 100%;
}
.asset-detail-selector > label { color: var(--muted); font-weight: 800; }
.asset-detail-selector > select { width: 100%; max-width: 100%; min-width: 0; }
.asset-detail-selector > .small { min-width: 0; }
.asset-detail-card-wrap { max-width: 980px; margin-bottom: 18px; }
.admin-id-lookup { margin-top: 18px; display: grid; grid-gap: 12px; gap: 12px; }
.admin-id-lookup-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-id-lookup-panel { border: 1px solid var(--border); border-radius: 10px; background: white; overflow: hidden; }
.admin-id-lookup-title { padding: 12px 14px; background: #e8edf4; font-weight: 800; }
.admin-id-lookup-scroll { max-height: 430px; overflow: auto; }
.admin-id-table { min-width: 860px; margin: 0; }
.admin-asset-id-table { min-width: 1220px; }
.mono-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .asset-detail-selector { grid-template-columns: 1fr; align-items: stretch; }
}

/* Phase 6A/6B v001r: cached asset details, remembered shop and cache-size debug status. */
.debug-controls {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: grid;
  justify-items: end;
  grid-gap: 7px;
  gap: 7px;
}
.debug-controls .debug-switch-panel { position: static; right: auto; bottom: auto; }
.debug-cache-size {
  min-width: 150px;
  padding: 7px 10px;
  border: 1px solid #7f8da0;
  border-radius: 8px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 5px 14px rgb(15 23 42 / 18%);
  color: #263443;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.asset-detail-cached-card { position: relative; }
.asset-detail-debug-status {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 18px;
  margin-top: -2px;
}
@media print {
  .debug-controls { display: none !important; }
}

/* Phase 7 physical master-data inventory */
.physical-record-body { padding: 12px; border-top: 1px solid #e0e6ed; display: grid; grid-gap: 12px; gap: 12px; }
.physical-side-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 10px; gap: 10px; }
.physical-side-card { border: 1px solid #d8e0e9; border-radius: 7px; background: #f8fafc; padding: 10px; display: grid; grid-gap: 4px; gap: 4px; min-width: 0; }
.physical-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 4px 16px; gap: 4px 16px; overflow-wrap: anywhere; }
.physical-action-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.physical-action-row form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.physical-action-row select { min-width: 160px; }
@media (max-width: 760px) {
  .physical-side-grid, .physical-meta-grid { grid-template-columns: minmax(0, 1fr); }
}


/* Phase 7 v001d WT union-state flags */
.wt-state-flags { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.wt-state-flags .status-pill { text-transform:lowercase; }
.wt-state-online { font-weight:700; }
.wt-state-offline { opacity:.72; }

/* Phase 7 v001e logical-asset change/delete controls */
.asset-modify-panel { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.asset-modify-panel summary { cursor: pointer; }
.asset-modify-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; }
.asset-modify-form label { min-width: min(360px, 100%); display: grid; grid-gap: 4px; gap: 4px; }
.asset-detail-management-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--border); }

.physical-delete-row { justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

.project-ceilings-pre {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #202020;
  color: #ffffff;
  font: 700 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  white-space: pre;
  overflow-x: auto;
}

/* Phase 7 v002b: a weekly HC occupancy slice can represent more than one day-based HC booking range. */
.booking-hover-group { width: min(720px, 100%); }
.booking-hover-group > .booking-hover-layout { margin-top: 10px; padding-top: 10px; border-top: 1px solid #c7d1dd; }

/* Phase 7 v002f: customer multi-shop calendar overview and side interaction pane. */
.overview-shop-picker { display: grid; grid-gap: 8px; gap: 8px; margin: 16px 0 12px; }
.overview-shop-picker-row { display: grid; grid-template-columns: max-content minmax(280px, 620px) minmax(180px, 1fr); grid-gap: 10px; gap: 10px; align-items: center; }
.overview-shop-picker-label { font-weight: 800; color: #41516a; }
.overview-shop-picker-control { position: relative; min-width: 0; }
.overview-shop-picker-trigger { width: 100%; min-height: 34px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid #9aa7b8; border-radius: 4px; background: white; color: var(--text); padding: 6px 10px; cursor: pointer; text-align: left; font-weight: 700; }
.overview-shop-picker-panel { position: absolute; z-index: 70; top: calc(100% + 5px); left: 0; width: min(760px, calc(100vw - 80px)); max-height: 620px; overflow: auto; background: white; border: 1px solid #9aa7b8; border-radius: 8px; box-shadow: 0 12px 34px rgb(15 23 42 / 25%); padding: 12px; }
.overview-shop-picker-panel[hidden] { display: none; }
.overview-shop-picker-panel section + section { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.overview-shop-picker-heading { display: block; margin-bottom: 8px; }
.overview-region-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 7px; gap: 7px; }
.overview-region-option { border: 1px solid var(--border); border-radius: 7px; background: #f8fafc; color: var(--text); padding: 8px 10px; text-align: left; display: flex; justify-content: space-between; gap: 10px; cursor: pointer; }
.overview-region-option:hover, .overview-region-option:focus-visible, .overview-region-option.active { border-color: #0b5ba8; background: #eef6ff; }
.overview-region-option small { color: var(--muted); white-space: nowrap; }
.overview-shop-picker-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.overview-shop-check-list { max-height: 300px; overflow: auto; border: 1px solid var(--border); border-radius: 7px; }
.overview-shop-check-option { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; grid-gap: 8px; gap: 8px; min-height: 48px; padding: 6px 9px; border-bottom: 1px solid #e7ebf0; cursor: pointer; }
.overview-shop-check-option:last-child { border-bottom: 0; }
.overview-shop-check-option:has(input:checked) { background: #eef6ff; }
.overview-shop-check-option span { display: grid; grid-gap: 2px; gap: 2px; min-width: 0; }
.overview-shop-check-option strong, .overview-shop-check-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overview-shop-check-option small { color: var(--muted); }
.overview-shop-picker-actions { margin-top: 10px; display: flex; justify-content: flex-end; gap: 8px; }
.overview-shop-page-nav { display: flex; gap: 10px; align-items: center; padding-left: 92px; }
.overview-shop-page-nav button { width: 34px; height: 30px; border: 1px solid var(--border); border-radius: 6px; background: white; color: #173f68; cursor: pointer; font-weight: 900; }
.overview-shop-page-nav button:disabled { opacity: 0.35; cursor: default; }
.overview-shop-page-nav strong { min-width: 150px; text-align: center; color: #173f68; }

.calendar-interaction-root { container-type: inline-size; container-name: calendar-overview; }
.calendar-interaction-split { display: grid; grid-template-columns: minmax(0, 930px) minmax(340px, 520px); grid-gap: 28px; gap: 28px; align-items: flex-start; }
.calendar-interaction-calendar { min-width: 0; overflow-x: auto; padding-bottom: 8px; }
.calendar-interaction-area { margin-top: 0; max-width: none; min-height: 160px; position: -webkit-sticky; position: sticky; top: 12px; align-self: start; }
.calendar-interaction-area:empty { display: block; visibility: hidden; }
.calendar-interaction-card { width: 100%; max-width: 100%; }
.booking-hover-card, .period-hover-card, .booking-delete-confirm { width: 100%; max-width: 100%; }
.booking-action-menu { width: max-content; max-width: 100%; }
.calendar-matrix { display: grid; grid-template-columns: minmax(190px, 240px) repeat(7, 84px); grid-gap: 12px 14px; gap: 12px 14px; align-items: center; justify-content: start; min-width: max-content; padding-top: 4px; }
.calendar-shop-column-header { align-self: stretch; display: flex; align-items: center; font-weight: 800; color: #41516a; padding: 0 8px; }
.calendar-shop-row-label { min-height: 84px; position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 8px 88px 8px 10px; border: 1px solid #d6dde7; border-radius: 7px; background: #f8fafc; overflow: hidden; }
.calendar-shop-row-label strong { color: #153d67; font-size: 14px; }
.calendar-shop-row-name { color: #2b3a4a; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-content-type-indicator { position: absolute; top: 0; right: 0; width: 78px; height: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-left: 1px solid #111827; border-bottom: 1px solid #111827; }
.shop-content-type-segment { display: flex; align-items: center; justify-content: center; min-width: 0; border-right: 1px solid #111827; color: #111827; font-size: 9px; font-weight: 900; line-height: 1; }
.shop-content-type-segment:last-child { border-right: 0; }
.shop-content-type-segment.content-type-disabled { background: transparent; color: transparent; }
.master-content-types-field .scope-multiselect-field { width: min(520px, 100%); }

@container calendar-overview (max-width: 1299px) {
  .calendar-interaction-split { grid-template-columns: minmax(0, 1fr); }
  .calendar-interaction-area { position: static; top: auto; width: min(620px, 100%); margin-top: 14px; min-height: 0; }
  .calendar-interaction-area:empty { display: none; }
}

@media (max-width: 980px) {
  .overview-shop-picker-row { grid-template-columns: 1fr; align-items: stretch; }
  .overview-shop-page-nav { padding-left: 0; }
  .overview-region-list { grid-template-columns: 1fr; }
  .overview-shop-picker-panel { width: min(720px, calc(100vw - 36px)); }
}

/* Phase 7 v002g: overview scope shortcuts and booking wizard below calendar. */
.overview-shop-picker-inline-actions { display: flex; align-items: center; gap: 8px; }
.booking-stack { display: grid; grid-gap: 24px; gap: 24px; align-items: flex-start; }
.booking-stack > .overview-panel { min-width: 0; padding-bottom: 24px; border-bottom: 4px solid #1da7df; }
.booking-stack > .wizard-pane { min-width: 0; width: min(1120px, 100%); }
.booking-stack.overview-hidden > .wizard-pane { width: min(1120px, 100%); }
.booking-stack .wizard-card { width: 100%; max-width: none; }

/* Phase 8 gateway inventory / commissioning */
.gateway-intro { margin-bottom: 18px; }
.gateway-intro p { margin: 4px 0; }
.gateway-form-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); grid-gap: 14px 18px; gap: 14px 18px; align-items: flex-end; }
.gateway-form-grid label { display: grid; grid-gap: 6px; gap: 6px; font-weight: 700; color: #2b3a4a; }
.gateway-form-grid input, .gateway-form-grid select, .gateway-form-grid textarea,
.gateway-inline-form input, .gateway-inline-form select,
.gateway-mini-form input, .gateway-mini-form select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: white; }
.gateway-form-wide { grid-column: 1 / -1; }
.gateway-inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gateway-inline-form select { max-width: 520px; }
.gateway-table { min-width: 1180px; }
.gateway-connectivity { display: inline-flex; align-items: center; gap: 7px; text-transform: capitalize; }
.gateway-online-dot, .gateway-offline-dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; flex: 0 0 auto; }
.gateway-online-dot { background: var(--free); border: 1px solid #135822; }
.gateway-offline-dot { background: #e7ecf3; border: 1px solid #8491a2; }
.gateway-action-stack { display: grid; grid-gap: 8px; gap: 8px; min-width: 190px; }
.gateway-mini-form { display: grid; grid-gap: 7px; gap: 7px; }
.gateway-mini-form .secondary-small-btn { justify-self: flex-start; }
.gateway-modify-details { min-width: 190px; }
.gateway-modify-details > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: -moz-fit-content; width: fit-content; -webkit-user-select: none; -moz-user-select: none; user-select: none; }
.gateway-modify-details > summary::-webkit-details-marker { display: none; }
.gateway-modify-details > summary::marker { content: ""; }
.gateway-modify-form { display: grid; grid-gap: 8px; gap: 8px; margin-top: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; min-width: 250px; }
.gateway-modify-form label { display: grid; grid-gap: 4px; gap: 4px; font-size: 12px; font-weight: 700; color: #2b3a4a; }
.gateway-modify-form input, .gateway-modify-form select, .gateway-modify-form textarea { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid var(--border); border-radius: 7px; background: white; font: inherit; }
.gateway-modify-form textarea { resize: vertical; }
.gateway-modify-form .primary-btn { justify-self: flex-start; }

/* Phase 8 v001d MQTT presence / assignment guidance */
.gateway-assignment-wait { display: grid; grid-gap: 7px; gap: 7px; min-width: 190px; }
.gateway-assignment-wait select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: #f3f5f8; color: #788494; }
.gateway-assignment-wait .secondary-small-btn { justify-self: flex-start; }

/* Phase 9 v001b: coordinated shop-wide WT BLE discovery. */
.wt-scan-panel { margin-top: 18px; }
.wt-scan-start-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.wt-scan-start-form label { display: grid; grid-gap: 6px; gap: 6px; min-width: 240px; font-weight: 700; color: #2b3a4a; }
.wt-scan-start-form label:nth-child(2) { min-width: 120px; }
.wt-scan-start-form select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: white; }
.wt-scan-session-strip { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.wt-scan-session-link { display: inline-flex; align-items: center; min-height: 30px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 7px; background: white; color: #173f68; text-decoration: none; font-size: 12px; font-weight: 700; }
.wt-scan-session-link.active { border-width: 2px; }
.wt-scan-session-summary { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; background: #f8fafc; }
.wt-scan-gateway-table { min-width: 820px; }
.wt-scan-candidate-table { min-width: 1180px; }
.wt-scan-observations { display: grid; grid-gap: 3px; gap: 3px; min-width: 160px; }
.wt-scan-observations span { white-space: nowrap; }
.wt-scan-running-row { display: flex; align-items: center; min-height: 38px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 7px; background: #f8fafc; }
.wt-scan-running-status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: #172b3f; }
.wt-scan-running-status strong { font-weight: 800; }
.wt-scan-timeout-elapsed { color: var(--muted); font-weight: 600; }

/* Phase 9 v001d: action color, scan history, monitoring, full-shop list and global alerts. */
:root { --action-orange: #ebba34; --action-orange-hover: #ebba34; }
.primary-btn,
.secondary-btn,
.secondary-small-btn,
.scope-clear-btn,
.booking-action-menu a,
.booking-action-menu button,
.overview-shop-page-nav button {
  background: var(--action-orange);
  border-color: var(--action-orange);
  color: #172b3f;
}
.primary-btn:hover:not(:disabled),
.secondary-btn:hover:not(:disabled),
.secondary-small-btn:hover:not(:disabled),
.scope-clear-btn:hover:not(:disabled),
.booking-action-menu a:hover,
.booking-action-menu a:focus-visible,
.booking-action-menu button:hover,
.booking-action-menu button:focus-visible,
.overview-shop-page-nav button:hover:not(:disabled) { background: var(--action-orange-hover); border-color: var(--action-orange-hover); }
.admin-create-panel { background: #fbfcfe; }
.admin-create-summary { background: var(--action-orange); border-radius: 7px; }
.admin-create-summary:hover { background: var(--action-orange-hover); }
.admin-plus-button { background: var(--action-orange); border-color: var(--action-orange); }
.danger-btn { background: #b42318; border-color: #b42318; color: white; }

.physical-modify-panel { width: -moz-fit-content; width: fit-content; max-width: 100%; }
.physical-modify-summary { list-style: none; display: inline-flex; width: -moz-fit-content; width: fit-content; -webkit-user-select: none; -moz-user-select: none; user-select: none; }
.physical-modify-summary::-webkit-details-marker { display: none; }
.physical-modify-summary::marker { content: ""; }
.physical-modify-panel[open] { width: 100%; }
.physical-modify-body { margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; background: #fbfcfe; }

.wt-scan-history { border: 1px solid var(--border); border-radius: 7px; background: #f8fafc; overflow: hidden; }
.wt-scan-history > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-weight: 800; color: #173f68; }
.wt-scan-history > summary::-webkit-details-marker { display: none; }
.wt-scan-history > summary::after { content: "\25BC"; margin-left: auto; font-size: 11px; }
.wt-scan-history[open] > summary::after { content: "\25B2"; }
.wt-scan-history-list { display: grid; grid-gap: 5px; gap: 5px; max-height: 250px; overflow-y: auto; padding: 8px 10px 10px; border-top: 1px solid var(--border); }
.wt-scan-history-list .wt-scan-session-link { display: flex; justify-content: space-between; gap: 14px; width: 100%; }

.gateway-monitor-config-form { display: grid; grid-template-columns: minmax(260px,1fr) minmax(180px,.55fr) minmax(180px,.55fr) minmax(180px,.45fr); grid-gap: 12px 16px; gap: 12px 16px; align-items: end; }
.gateway-monitor-config-form label { display: grid; grid-gap: 6px; gap: 6px; font-weight: 700; color: #2b3a4a; }
.gateway-monitor-config-form input,.gateway-monitor-config-form select { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: white; }
.gateway-monitor-config-meta { grid-column: 1 / -1; }
.gateway-monitor-config-form .primary-btn { justify-self: start; }

.gateway-monitor-enable-label { align-self: stretch; }
.gateway-monitor-switch-row { min-height: 39px; display: flex; align-items: center; gap: 10px; }
.gateway-monitor-switch { position: relative; width: 48px; height: 26px; display: inline-block; flex: 0 0 auto; }
.gateway-monitor-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gateway-monitor-switch-track { position: absolute; inset: 0; border-radius: 999px; background: #aeb8c4; border: 1px solid #8794a5; cursor: pointer; transition: background .15s ease; }
.gateway-monitor-switch-track span { position: absolute; width: 20px; height: 20px; left: 2px; top: 2px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgb(0 0 0 / 25%); transition: transform .15s ease; }
.gateway-monitor-switch input:checked + .gateway-monitor-switch-track { background: var(--action-orange); border-color: #b98700; }
.gateway-monitor-switch input:checked + .gateway-monitor-switch-track span { transform: translateX(22px); }
.gateway-monitor-switch input:focus-visible + .gateway-monitor-switch-track { outline: 3px solid rgb(235 186 52 / 35%); outline-offset: 2px; }

.full-shop-wt-panel { margin-top: 18px; }
.full-shop-wt-table { min-width: 1180px; }
.full-shop-wt-table td { min-width: 120px; }

.global-alert-groups { display: flex; align-items: flex-start; justify-content: center; gap: 6px; flex-wrap: nowrap; }
.global-alert-control { position: relative; z-index: 90; }
.global-alert-button { min-height: 36px; display: inline-flex; white-space: nowrap; align-items: center; gap: 8px; border: 1px solid var(--action-orange); border-radius: 8px; background: var(--action-orange); color: #172b3f; padding: 6px 10px; font-weight: 800; cursor: pointer; box-shadow: 0 2px 8px rgb(0 0 0 / 12%); }
.global-alert-count { min-width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 999px; background: #f6f7f9; border: 1px solid #8794a5; font-size: 12px; }
.global-alert-count.has-unread { background: #b42318; color: white; border-color: #b42318; }
.global-alert-popover { position: absolute; top: 42px; left: 50%; transform: translateX(-50%); width: min(430px, calc(100vw - 270px)); max-height: 440px; overflow: auto; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: white; box-shadow: 0 10px 28px rgb(0 0 0 / 18%); }
.global-alert-popover-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.global-alert-popover-title { font-weight: 800; }
.global-alert-clear-btn { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.global-alert-error { margin: 0 0 8px; padding: 7px 8px; border: 1px solid #b42318; border-radius: 6px; background: #fff1f0; color: #7a271a; font-size: 12px; font-weight: 700; }
.global-alert-headlines { display: grid; grid-gap: 6px; gap: 6px; max-height: 210px; overflow-y: auto; }
.global-alert-headline { width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; background: #f8fafc; color: #172b3f; cursor: pointer; font-weight: 700; display: flex; gap: 7px; align-items: baseline; }
.global-alert-seq { flex: 0 0 auto; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; font-weight: 900; color: #172b3f; }
.global-alert-headline.global-alert-real { border-left: 5px solid #b42318; background: #FFE0E0; color: #111111; }
.global-alert-headline.global-alert-debug { border-left: 5px solid #6B7280; background: #CFD4DA; color: #111111; }
.global-alert-headline.global-alert-gw_info { border-left: 5px solid #3B82A0; background: #DAEEFF; color: #111111; }
.global-alert-headline.global-alert-real *,
.global-alert-headline.global-alert-debug *,
.global-alert-headline.global-alert-gw_info * { color: #111111; }
.global-alert-detail { margin-top: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: #f8fafc; color: #111827 !important; }
.global-alert-detail * { color: #111111 !important; }
.global-alert-detail.global-alert-real { border-left: 5px solid #b42318; background: #FFE0E0; color: #111111 !important; }
.global-alert-detail.global-alert-debug { border-left: 5px solid #6B7280; background: #CFD4DA; color: #111111 !important; }
.global-alert-detail.global-alert-gw_info { border-left: 5px solid #3B82A0; background: #DAEEFF; color: #111111 !important; }
.global-alert-message { margin-top: 5px; line-height: 1.35; max-height: 4.05em; overflow-y: auto; white-space: pre-wrap; color: #111111; }
.global-alert-empty { padding: 5px 0; }

.dashboard-alert-panel { margin-top: 22px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: white; }
.dashboard-alert-panel.is-collapsed { padding-top: 10px; padding-bottom: 10px; }
.dashboard-alert-header { display: flex; align-items: center; gap: 9px; min-height: 36px; }
.dashboard-alert-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: #172b3f; padding: 4px 2px; cursor: pointer; font: inherit; font-weight: 800; }
.dashboard-alert-toggle:hover .dashboard-alert-title { text-decoration: underline; }
.dashboard-alert-toggle-icon { width: 16px; text-align: center; font-size: 12px; }
.dashboard-alert-title { font-size: 20px; }
.dashboard-alert-clear-form { margin-left: auto; }
.dashboard-alert-page-controls { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.dashboard-alert-page-button { min-width: 34px; padding: 5px 9px; font-size: 18px; line-height: 1; }
.dashboard-alert-page-button:disabled { opacity: .45; cursor: not-allowed; }
.dashboard-alert-page-label { min-width: 48px; text-align: center; font-weight: 800; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.dashboard-alert-history { margin-top: 10px; }
.dashboard-alert-list { display: grid; grid-gap: 8px; gap: 8px; max-height: 560px; overflow-x: auto; overflow-y: auto; padding-right: 3px; }
.dashboard-alert-row { display: grid; grid-template-columns: minmax(240px,.8fr) minmax(520px,1.2fr); grid-gap: 14px; gap: 14px; min-width: 820px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: #f8fafc; }
.dashboard-alert-row.global-alert-real { border-left: 5px solid #b42318; background: #FFE0E0; color: #111111; }
.dashboard-alert-row.global-alert-debug { border-left: 5px solid #6B7280; background: #CFD4DA; color: #111111; }
.dashboard-alert-row.global-alert-gw_info { border-left: 5px solid #3B82A0; background: #DAEEFF; color: #111111; }
.dashboard-alert-row.global-alert-real *,
.dashboard-alert-row.global-alert-debug *,
.dashboard-alert-row.global-alert-gw_info * { color: #111111; }
.dashboard-alert-message { max-height: 4.05em; overflow-y: auto; white-space: pre-wrap; line-height: 1.35; color: #111827; }
.dashboard-alert-page-hint { margin-top: 8px; color: #526273; }

@media (max-width: 980px) {
  .gateway-monitor-config-form { grid-template-columns: 1fr; }
  .gateway-monitor-config-meta { grid-column: auto; }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .topbar p { display: none; }
  .topbar-alert-slot { justify-self: end; }
  .global-alert-popover { left: auto; right: 0; transform: none; width: min(430px, calc(100vw - 28px)); }
  .dashboard-alert-row { grid-template-columns: 1fr; }
}

/* Phase 9 Hotfix09: single Dashboard alert scope selector. */
.dashboard-alert-scope-selector {
  display: grid;
  grid-template-columns: auto minmax(260px, 520px) 1fr;
  grid-gap: 10px;
  gap: 10px;
  align-items: center;
  margin: 12px 0 10px;
}
.dashboard-alert-scope-selector select {
  width: 100%;
  min-height: 36px;
}
@media (max-width: 900px) {
  .dashboard-alert-scope-selector {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}


/* Phase 10C v003: configurable commissioning image encoder. */
.image-encoder-form { display: grid; grid-gap: 14px; gap: 14px; }
.image-encoder-form > label { display: grid; grid-gap: 6px; gap: 6px; max-width: 360px; font-weight: 700; color: #2b3a4a; }
.image-encoder-form select { width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: white; }
.image-encoder-colors { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); grid-gap: 10px 12px; gap: 10px 12px; }
.image-encoder-colors > label { display: grid; grid-gap: 6px; gap: 6px; font-weight: 700; color: #2b3a4a; }
.image-encoder-percent-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; grid-gap: 6px; gap: 6px; }
.image-encoder-percent-input input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 7px; background: white; }
.image-encoder-percent-input > span { font-weight: 800; }
.image-encoder-percent-input.is-invalid input { border-color: #b42318; outline-color: #b42318; }
.image-encoder-config-meta { grid-column: 1 / -1; }
.image-encoder-form .primary-btn { justify-self: start; }
@media (max-width: 980px) { .image-encoder-colors { grid-template-columns: repeat(3, minmax(110px, 1fr)); } }
@media (max-width: 620px) { .image-encoder-colors { grid-template-columns: repeat(2, minmax(110px, 1fr)); } }

/* Phase 10C v004: global Image Encoder distribution scopes. */
.image-encoder-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.image-encoder-apply-scope { border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin: 2px 0 0; min-width: 0; }
.image-encoder-apply-scope > legend { padding: 0 6px; font-weight: 800; color: #2b3a4a; }
.image-encoder-scope-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-gap: 12px; gap: 12px; align-items: start; margin: 10px 0 14px; }
@media (max-width: 980px) { .image-encoder-scope-grid { grid-template-columns: 1fr; } }

/* Phase 10D v001: dedicated 5-step Commissioning wizard and live physical progress. */
.gateway-commissioning-launch { margin-top: 18px; }
.gateway-commissioning-launch-body { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.gateway-commissioning-launch-body h2 { margin: 0 0 5px; }
.gateway-commissioning-launch-body p { margin: 0; }
.commissioning-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.commissioning-wizard { width: 100%; }
.commissioning-progress-tabs { margin-top: 0; }
.commissioning-step-stack { display: grid; grid-gap: 18px; gap: 18px; }
.commissioning-step-stack h2, .commissioning-step-stack h3 { margin: 0 0 6px; }
.commissioning-form-grid { display: grid; grid-template-columns: minmax(280px, 2fr) minmax(150px, 1fr); grid-gap: 16px; gap: 16px; align-items: end; }
.commissioning-field { display: grid; grid-gap: 7px; gap: 7px; font-weight: 800; color: #2b3a4a; }
.commissioning-field select { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--border); border-radius: 7px; background: white; color: var(--text); }
.commissioning-form-grid .commissioning-action-row { grid-column: 1 / -1; }
.commissioning-action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.commissioning-selection-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 7px; background: #f8fafc; }
.commissioning-blocker-list { display: grid; grid-gap: 5px; gap: 5px; padding: 12px; border: 1px solid #ffa39e; border-radius: 7px; background: #fff1f0; color: #a8071a; font-size: 13px; }
.commissioning-scan-countdown { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 9px; background: #f8fafc; color: #172b3f; font-size: 28px; font-weight: 700; line-height: 1.25; }
.commissioning-scan-countdown > strong { font-size: 30px; }
.commissioning-countdown-value { color: #b42318; font-size: 34px; font-weight: 900; }
.commissioning-countdown-wait { width: 100%; color: var(--muted); font-size: 18px; font-weight: 700; }
.commissioning-device-table { min-width: 1080px; }
.commissioning-errors { margin: 0; }
.commissioning-physical-start { display: grid; justify-items: start; grid-gap: 6px; gap: 6px; padding: 14px; border: 1px solid #ebba34; border-radius: 9px; background: #fff9e8; }
.commissioning-progress-feed { display: grid; grid-gap: 7px; gap: 7px; max-height: 420px; overflow-y: auto; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; }
.commissioning-progress-line { display: grid; grid-template-columns: 170px minmax(0, 1fr); grid-gap: 12px; gap: 12px; align-items: baseline; padding: 9px 10px; border-left: 4px solid #9aa7b8; background: white; }
.commissioning-progress-line > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.commissioning-progress-line.is-current { border-left-color: #0b5ba8; }
.commissioning-progress-line.is-success { border-left-color: #135822; color: #135822; }
.commissioning-progress-line.is-error { border-left-color: #b42318; color: #a8071a; background: #fff1f0; }
.commissioning-progress-line > strong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.commissioning-side-countdown { color: #7a1010; font-size: 30px; font-weight: 950; line-height: 1; letter-spacing: 0.02em; white-space: nowrap; }
.commissioning-side-status-table { min-width: 980px; }
.commissioning-summary-list { display: grid; grid-gap: 8px; gap: 8px; }
.commissioning-summary-list > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 7px; background: #f8fafc; }
.commissioning-summary-list > div.is-success { border-left: 5px solid #135822; }
.commissioning-summary-list > div.is-error { border-left: 5px solid #b42318; color: #a8071a; }
.commissioning-success-message { padding: 22px; border: 2px solid #135822; border-radius: 10px; background: #edf9f0; color: #135822; font-size: 30px; font-weight: 900; text-align: center; }
.commissioning-failure-message { padding: 20px; border: 2px solid #b42318; border-radius: 10px; background: #fff1f0; color: #a8071a; font-size: 24px; font-weight: 900; text-align: center; }

@media (max-width: 760px) {
  .gateway-commissioning-launch-body { align-items: stretch; flex-direction: column; }
  .commissioning-form-grid { grid-template-columns: 1fr; }
  .commissioning-progress-line { grid-template-columns: 1fr; gap: 3px; }
  .commissioning-scan-countdown { font-size: 22px; }
  .commissioning-scan-countdown > strong { font-size: 24px; }
  .commissioning-countdown-value { font-size: 30px; }
}

/* Phase 10D v002: commissioning controls, plan editing and quieter progress. */
.commissioning-periodic-pause-note {
  margin: -2px 0 12px;
  padding: 8px 11px;
  border: 1px solid #c9d6e3;
  border-radius: 7px;
  background: #f8fafc;
  color: #526273;
  font-size: 12px;
  font-weight: 700;
}
.commissioning-history { margin: 0 0 14px; }
.commissioning-history-table { min-width: 820px; }
.commissioning-history-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.commissioning-asset-source-controls { padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; }
.commissioning-content-selection { display: grid; grid-template-columns: minmax(0, 1fr) 280px; grid-gap: 16px; gap: 16px; align-items: start; }
.commissioning-asset-preview { min-height: 168px; border: 1px solid var(--border); border-radius: 8px; background: white; padding: 8px; display: grid; place-items: center; overflow: hidden; }
.commissioning-asset-preview .cached-asset-image, .commissioning-asset-preview img { display: block; width: 100%; height: auto; max-height: 190px; object-fit: contain; }
.commissioning-plan-section { display: grid; grid-gap: 10px; gap: 10px; }
.commissioning-gateway-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-gap: 14px; gap: 14px; }
.commissioning-gateway-plan { min-width: 0; border: 1px solid var(--border); border-radius: 8px; background: #f8fafc; padding: 12px; display: grid; grid-gap: 10px; gap: 10px; }
.commissioning-gateway-plan-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 16px; }
.commissioning-gateway-plan-title > span { padding: 2px 8px; border-radius: 999px; background: #e6edf5; color: #34495e; font-size: 12px; font-weight: 800; }
.commissioning-plan-add-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-gap: 8px; gap: 8px; align-items: center; }
.commissioning-plan-add-form select { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid var(--border); border-radius: 6px; background: white; }
@media (max-width: 980px) {
  .commissioning-content-selection { grid-template-columns: 1fr; }
  .commissioning-gateway-plan-grid { grid-template-columns: 1fr; }
}

/* Phase10G live gateway connectivity: WiFi / ETH / MQTT are independent states. */
.gateway-network-stack { display: grid; grid-gap: 3px; gap: 3px; min-width: 210px; }
.gateway-network-line { display: grid; grid-template-columns: 44px 82px minmax(74px, 1fr); align-items: center; grid-column-gap: 8px; column-gap: 8px; }
.gateway-network-label { font-weight: 700; }
.gateway-network-ip { white-space: nowrap; }

/* Phase 10H v001: mobile pinch-zoom freedom + compact responsive shell.
   Desktop >= 981px is intentionally unchanged. */
html,
body {
  min-width: 0;
  text-size-adjust: 100%;
}

@media (max-width: 980px) {
  body { overflow-x: auto; }

  .app-shell {
    grid-template-columns: 160px minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }

  .sidebar {
    min-width: 0;
    padding: 16px 8px;
  }

  .brand-block { margin-bottom: 22px; }
  .brand { font-size: 22px; line-height: 1.1; overflow-wrap: anywhere; }
  .brand-version { font-size: 9px; }

  .nav-list { margin-right: -8px; }
  .nav-link {
    margin: 3px 0;
    padding: 10px 10px;
    font-size: 14px;
  }
  .nav-link.active {
    margin-right: -8px;
    padding-right: 18px;
  }

  .sidebar-account { padding: 12px 4px 0; }
  .sidebar-account strong { font-size: 11px; }
  .sidebar-account span { font-size: 9px; }
  .logout-btn { padding: 7px 5px; font-size: 11px; }

  .main {
    width: 100%;
    min-width: 0;
  }

  .topbar {
    height: auto;
    min-height: 64px;
    padding: 12px 14px;
    gap: 10px;
  }
  .topbar h1 {
    min-width: 0;
    font-size: 24px;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }
  .topbar-alert-slot { min-width: 0; }

  .content-card {
    min-width: 0;
    padding: 18px 14px 32px;
    overflow-x: auto;
  }

  .page-title {
    flex-wrap: wrap;
    gap: 12px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
  }
  .metric { padding: 12px; }
  .metric strong { font-size: 24px; }

  .legend {
    gap: 14px;
    margin: 12px 0 18px;
  }
  .legend-swatch {
    width: 70px;
    height: 22px;
  }

  .debug-switch-panel {
    right: 8px;
    bottom: 8px;
    transform: scale(0.88);
    transform-origin: bottom right;
  }
}

@media (max-width: 600px) {
  .app-shell {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .sidebar { padding: 12px 6px; }
  .brand-block { margin-bottom: 16px; }
  .brand { font-size: 20px; }

  .nav-list { margin-right: -6px; }
  .nav-link {
    margin: 2px 0;
    padding: 9px 8px;
    font-size: 12px;
  }
  .nav-link.active {
    margin-right: -6px;
    padding-right: 12px;
  }

  .sidebar-account { padding: 10px 2px 0; }
  .sidebar-account strong { font-size: 10px; }
  .sidebar-account span { font-size: 8px; }
  .logout-btn { font-size: 10px; }

  .topbar {
    min-height: 58px;
    padding: 10px;
  }
  .topbar h1 { font-size: 20px; }

  .content-card { padding: 14px 10px 28px; }

  .metric-grid { grid-template-columns: minmax(0, 1fr); }

  .debug-switch-panel {
    right: 5px;
    bottom: 5px;
    transform: scale(0.78);
  }
}

@media (max-width: 980px) and (orientation: landscape) and (max-height: 600px) {
  .app-shell {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .sidebar { padding: 10px 6px; }
  .brand-block { margin-bottom: 12px; }
  .brand { font-size: 19px; }
  .nav-link { padding: 7px 8px; font-size: 12px; }
  .sidebar-account { padding-top: 8px; }

  .topbar {
    min-height: 52px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .topbar h1 { font-size: 20px; }
}

/* Phase 10H v002: dense mobile main canvas.
   Keep the compact sidebar at its v001 size while rendering the right-hand
   application canvas at 25% on narrow viewports.  The 400% logical width
   compensates for the zoom so the main pane still occupies the available
   screen area, but roughly four times as much UI fits horizontally.
   Browser pinch zoom remains enabled on top of this application-level zoom. */
@media (max-width: 980px) {
  .main {
    width: 400%;
    min-width: 0;
    zoom: 0.25;
  }
}

/* Phase 10I v001: global EN/DE UI language switch.
   The buttons intentionally live outside the scaled main canvas so they remain
   readable and reachable on desktop and mobile. */
.language-switcher {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 3000;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 9px;
  background: rgb(31 45 58 / 92%);
  box-shadow: 0 3px 12px rgb(0 0 0 / 22%);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
}
.language-button {
  min-width: 38px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #eef4ff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}
.language-button:hover,
.language-button:focus-visible { background: rgb(255 255 255 / 14%); }
.language-button.active {
  background: var(--action-orange, #ebba34);
  border-color: #b98700;
  color: #172b3f;
}
/* Reserve the upper-right corner of the authenticated top bar for EN/DE. */
.topbar { padding-right: 126px; }

@media (max-width: 980px) {
  .language-switcher { top: 8px; right: 8px; padding: 3px; }
  .language-button { min-width: 34px; height: 27px; font-size: 11px; }
  .topbar { padding-right: 108px; }
}

/* Phase 10J Admin Demo v001. */
.demo-wizard { width: 100%; }
.demo-local-upload-grid { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.5fr); grid-gap: 14px; gap: 14px; align-items: end; }
.demo-wt-table { min-width: 980px; }
.demo-side-choice { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; white-space: nowrap; }
.block-small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.is-error-text { color: #a8071a; }
.row-muted { opacity: .66; background: #fafafa; }
@media (max-width: 760px) { .demo-local-upload-grid { grid-template-columns: 1fr; } }

