body.admin-shell {
  min-width: 900px;
  background: #eef2f5;
  color: #14213a;
}

body.admin-shell > header { display: none !important; }

body.admin-shell > main {
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: clamp(150px, 15vw, 220px) minmax(0, 1fr);
  gap: 0;
  background: #fff;
}

body.admin-shell #office-space { min-width: 0; }
body.admin-shell #office-space > .intro,
body.admin-shell #office-space > nav { display: none !important; }
body.admin-shell #office-space > .panel {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 22px 18px;
}

.admin-sidebar,
.admin-queue {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: #eef2f5;
  box-shadow: none;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  padding: 24px 14px 14px;
  border-right: 1px solid #dce4eb;
}

.admin-brand { text-align: center; padding: 0 4px 26px; }
.admin-brand img { display: block; width: 72px; height: 72px; margin: 0 auto 8px; }
.admin-brand strong { display: block; color: #172239; font: 700 20px/1.1 Georgia, serif; }
.admin-brand span { color: #637086; font-size: 12px; }

.admin-menu { display: grid; gap: 7px; margin: 0; overflow: visible; }
.admin-menu button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: var(--ui-corner-radius, 10px);
  padding: 10px 12px;
  background: transparent;
  color: #25344a;
  text-align: left;
}
.admin-menu button span { display: grid; place-items: center; color: #5a687a; }
.admin-menu svg,
.queue-alert svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.admin-menu button b { overflow: hidden; font-size: 15px; font-weight: 680; text-overflow: ellipsis; }
.admin-menu button:hover { background: #e4eaf0; }
.admin-menu button.active { background: #f9d3dc; color: #c82349; }
.admin-menu button.active span { color: #d32650; }

.admin-user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 13px 5px; font-size: 12px; }
.admin-user span { display: grid; flex: 0 0 auto; place-items: center; width: 39px; height: 39px; border-radius: 50%; background: #536174; color: #fff; font-weight: 800; }
.admin-user strong { overflow: hidden; text-overflow: ellipsis; }
.admin-logout { width: 100%; border: 1px solid #cbd5df; border-radius: var(--ui-corner-radius, 10px); background: #f8fafc; padding: 10px; color: #26364b; font-weight: 700; }

.admin-queue {
  padding-bottom: 14px;
  overflow: hidden;
  border-left: 1px solid #dce4eb;
}
.admin-queue > h2 { margin: 0; padding: 24px 14px 18px; border-bottom: 1px solid #dce4eb; font: 750 25px/1.05 Georgia, serif; }
.queue-alert {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  width: calc(100% - 20px);
  min-height: 50px;
  margin: 10px 10px 0;
  border-radius: var(--ui-corner-radius, 10px);
  padding: 8px 9px;
  text-align: left;
}
.queue-alert > span { display: grid; place-items: center; }
.queue-alert svg { width: 20px; height: 20px; }
.queue-alert strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; }
.queue-alert b { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 12px; }
.queue-alert.delay { border: 1px solid #efd4a8; background: #fff7e9; color: #bd6b05; }
.queue-alert.delay b { background: #e88a08; }
.queue-alert.vehicle { border: 1px solid #c8dcf2; background: #edf5fd; color: #116dcc; }
.queue-alert.vehicle b { background: #1478d4; }

body.admin-shell .pv-heading {
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 14px;
  margin: -4px 0 8px;
  padding: 12px 14px;
  border: 1px solid #d5dee7;
  border-radius: var(--ui-corner-radius, 10px);
  background: #eef2f5;
}
body.admin-shell .pv-heading h2 { color: #16233b; font: 750 27px/1.05 Georgia, serif; white-space: nowrap; }
body.admin-shell .pv-heading:has(.pv-heading-main) {
  display: grid;
  grid-template-columns: minmax(285px, auto) minmax(0, 1fr);
  grid-template-areas:
    "title controls"
    "actions controls";
  column-gap: 16px;
  row-gap: 8px;
}
body.admin-shell .pv-heading-main { display: contents; }
body.admin-shell .pv-title-block { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
body.admin-shell .pv-title-block { grid-area: title; }
body.admin-shell .pv-count { color: #647184; font-size: 11px; font-weight: 650; white-space: nowrap; }
body.admin-shell .pv-heading-controls { grid-area: controls; justify-content: flex-end; min-width: 0; gap: 7px; }
body.admin-shell .pv-heading-controls .field { min-width: 160px; max-width: 170px; }
body.admin-shell .pv-heading-controls .field:has(#pv-period) { min-width: 180px; max-width: 190px; }
body.admin-shell .pv-heading-actions { grid-area: actions; display: flex; align-items: flex-end; align-self: flex-end; flex-wrap: nowrap; justify-content: flex-start; gap: 8px; margin-left: 0; }
body.admin-shell #pv-new-course,
body.admin-shell #pv-week-courses { border-color: #cbd7e3; background: #fff; color: #182840; }
body.admin-shell #group-open,
body.admin-shell #pv-new-course,
body.admin-shell #pv-week-courses { box-shadow: 0 2px 6px rgba(32, 48, 71, .14); font-weight: 750; }
body.admin-shell #group-open { border-color: #aebbc9; background: #fff; color: #182840; }
body.admin-shell #pv-new-course,
body.admin-shell #pv-week-courses { border-color: #d88ca0; color: #a92849; }
body.admin-shell #group-open:hover,
body.admin-shell #pv-new-course:hover,
body.admin-shell #pv-week-courses:hover { background: #f7f9fb; box-shadow: 0 3px 8px rgba(32, 48, 71, .2); }
body.admin-shell #pv-publish {
  order: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 104px;
  box-shadow: 0 2px 6px rgba(32, 48, 71, .16);
}
body.admin-shell #pv-publish .admin-publish-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.admin-shell #pv-publish.pv-publish-pending {
  border-color: #c82349 !important;
  background: #d32650 !important;
  color: #fff !important;
}
body.admin-shell #pv-publish.pv-publish-pending:hover {
  border-color: #a91d3d !important;
  background: #bd2347 !important;
}
body.admin-shell #pv-publish.pv-publish-done,
body.admin-shell #pv-publish.pv-publish-done:disabled {
  border-color: #247247 !important;
  background: #2e8b57 !important;
  color: #fff !important;
  opacity: 1;
  cursor: default;
}

body.admin-shell .pv-controls { align-items: end; margin: 4px 0 6px; }
body.admin-shell .admin-date-control { min-width: 160px; }
.admin-date-arrow { width: 36px; height: 45px; border: 1px solid #cbd7e3; border-radius: var(--ui-corner-radius, 10px); background: #fff; color: #182840; font-size: 26px; line-height: 1; }
body.admin-shell .pv-filters { margin-top: 8px; }
body.admin-shell .pv-filter-options label,
body.admin-shell .pv-filter-options label:has(input:not(:checked)) {
  border-color: #cbd5df;
  background: #fff;
  color: #25344a;
}
body.admin-shell .pv-scroll { border-color: #d7e0e9; }
body.admin-shell .pv-grid { color: #203047; }
body.admin-shell #planning-panel[data-period="morning"] .pv-grid,
body.admin-shell #planning-panel[data-period="afternoon"] .pv-grid { min-width: 0; width: 100%; }
body.admin-shell .pv-delay { margin-left: 5px; color: #d97706; font-style: normal; font-size: 13px; }

@media (max-width: 1200px) {
  body.admin-shell #office-space > .panel { padding-inline: 10px; }
  body.admin-shell .pv-heading { padding: 10px 8px; }
  body.admin-shell .pv-heading:has(.pv-heading-main) { grid-template-columns: minmax(270px, auto) minmax(0, 1fr); column-gap: 10px; row-gap: 6px; }
  body.admin-shell .pv-heading h2 { font-size: clamp(21px, 2.15vw, 25px); }
  body.admin-shell .pv-count { font-size: 10px; }
  body.admin-shell .pv-heading-controls { gap: 4px; }
  body.admin-shell .pv-heading-controls .field,
  body.admin-shell .pv-heading-controls .field:has(#pv-period) { min-width: 0; max-width: none; }
  body.admin-shell .admin-date-control { flex: 1 1 112px; min-width: 100px; }
  body.admin-shell .pv-heading-controls .field:has(#pv-period) { flex: 1 1 126px; }
  .admin-date-arrow { flex: 0 0 28px; width: 28px; }
  body.admin-shell .pv-heading-actions { gap: 4px; }
  body.admin-shell .pv-heading-actions button { min-width: 0; padding: 8px clamp(7px, .75vw, 10px); font-size: 11px; white-space: nowrap; }
  body.admin-shell #pv-publish { min-width: 0; gap: 5px; }
  body.admin-shell #pv-publish .admin-publish-icon { width: 14px; height: 14px; }
}

@media (max-width: 1000px) {
  body.admin-shell > main { grid-template-columns: 150px minmax(0, 1fr); }
  body.admin-shell #office-space > .panel { padding: 18px 14px; }
  body.admin-shell #office-space > #planning-panel { padding: 14px 8px; }
  .admin-menu button { padding-inline: 9px; }
}
