.admin-header {
  position: relative;
  background: #0f4c81;
  color: #fff;
  padding: max(1.25rem, env(safe-area-inset-top, 0px))
    max(1.25rem, env(safe-area-inset-right, 0px)) 0
    max(1.25rem, env(safe-area-inset-left, 0px));
}

/* Must beat .god-fab { display: inline-flex } or [hidden] FAB stays visible */
[hidden] {
  display: none !important;
}

.admin-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.admin-brand {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}

.admin-header h1 {
  margin: 0.15rem 0 0;
  font-size: 1.5rem;
  color: #fff;
}

.admin-sub {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Platform-admin context switcher: gear control + modal (not inline layout) */
.god-fab {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  z-index: 1100;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.god-fab:hover,
.god-fab:focus-visible {
  opacity: 0.88;
  outline: none;
}

.god-fab-icon {
  width: 100%;
  height: 100%;
  display: block;
  fill: #fff;
  stroke: #0f4c81;
  stroke-width: 1.35;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.god-context-fields {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.god-context-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.god-context-fields select {
  width: 100%;
  font: inherit;
  font-weight: 400;
  padding: 0.5rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
  box-sizing: border-box;
}

a.btn-secondary.god-admin-link,
a.btn-secondary#admin-facility-link {
  display: inline-block;
  text-decoration: none;
  line-height: 1.4;
  text-align: center;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pending-sms-badge-btn {
  appearance: none;
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 40;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: #0f4c81;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 0.35rem 1rem rgba(11, 31, 51, 0.35);
}

/* Header scrolled away — pin to viewport, below update banner if shown */
.pending-sms-badge-btn--fixed {
  position: fixed;
  top: max(0.85rem, env(safe-area-inset-top, 0px));
  right: max(0.85rem, env(safe-area-inset-right, 0px));
  z-index: 900;
}

body:has(.sw-update-banner:not([hidden])) .pending-sms-badge-btn--fixed {
  top: calc(
    max(0.625rem, env(safe-area-inset-top, 0px)) + 3.25rem
  );
}

.pending-sms-badge-btn--active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #0b1f33;
  animation: pending-sms-pulse 1.4s ease-in-out infinite;
}

.pending-sms-badge-count {
  display: inline-flex;
  min-width: 1.25rem;
  justify-content: center;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.8rem;
}

.pending-sms-badge-btn--active .pending-sms-badge-count {
  background: rgba(255, 255, 255, 0.45);
}

@keyframes pending-sms-pulse {
  0%,
  100% {
    box-shadow: 0 0.35rem 1rem rgba(245, 158, 11, 0.45);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0.45rem 1.35rem rgba(245, 158, 11, 0.75);
    transform: scale(1.04);
  }
}

.pending-sms-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pending-sms-card {
  border: 1px solid #cbd5e1;
  border-radius: 0.45rem;
  padding: 0.75rem 0.85rem;
  background: #f8fafc;
}

.pending-sms-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.35rem;
}

.pending-sms-preview {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

.pending-sms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pending-sms-hint {
  margin-top: 0;
}

.admin-header .muted {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.session-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin: 0 auto;
  max-width: 72rem;
  padding: 1.5rem max(1.25rem, env(safe-area-inset-right, 0px))
    max(1.5rem, env(safe-area-inset-bottom, 0px))
    max(1.25rem, env(safe-area-inset-left, 0px));
  text-align: center;
  border-top: 1px solid #d8dee9;
}

.session-footer-email {
  flex: 1 1 100%;
  color: #64748b;
  font-size: 0.9rem;
  word-break: break-all;
}

.session-footer .btn-secondary {
  min-height: 44px;
}

.admin-tabs {
  max-width: 72rem;
  margin: 1rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.admin-tabs .tab {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  padding: 0.65rem 0.9rem;
  border-radius: 0.4rem 0.4rem 0 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.admin-tabs .tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.admin-tabs .tab.active {
  background: #f5f7fa;
  color: #0f4c81;
}

.admin-tabs--select {
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
}

.admin-section-label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.admin-section-select {
  flex: 1 1 14rem;
  max-width: 22rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-weight: 600;
  color: #0f4c81;
  background: #f5f7fa;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.4rem;
  cursor: pointer;
}

.admin-section-select:focus,
.admin-section-select:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}

.admin-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem max(1.25rem, env(safe-area-inset-right, 0px))
    max(1.25rem, env(safe-area-inset-bottom, 0px))
    max(1.25rem, env(safe-area-inset-left, 0px));
  overflow-x: clip;
}

.panel-head {
  margin-bottom: 1rem;
}

.panel-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.muted {
  color: #64748b;
  margin: 0;
}

.card-form {
  background: #fff;
  border: 1px solid #d8dee9;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
}

.grid-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  min-width: 0;
  max-width: 100%;
}

.grid-form .check-label {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.4rem;
}

.grid-form .span-2 {
  grid-column: 1 / -1;
}

.grid-form .field-hint {
  font-weight: 400;
  font-size: 0.8rem;
  line-height: 1.35;
}

.hue-control {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.hue-control input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  accent-color: #0f4c81;
  background: linear-gradient(
    90deg,
    hsl(0, 70%, 45%),
    hsl(60, 70%, 45%),
    hsl(120, 70%, 45%),
    hsl(180, 70%, 45%),
    hsl(240, 70%, 45%),
    hsl(300, 70%, 45%),
    hsl(360, 70%, 45%)
  );
  border-radius: 999px;
  height: 0.55rem;
}

.hue-control input[type="number"] {
  flex: 0 0 4.5rem;
  width: 4.5rem;
}

.hue-swatch {
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.35rem;
  border: 1px solid #cbd5e1;
  background: hsl(205, 79%, 28%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.grid-form input,
.grid-form select,
.grid-form textarea {
  font: inherit;
  font-weight: 400;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.5rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
}

.grid-form .check-label input[type="checkbox"] {
  width: auto;
  max-width: none;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  align-self: flex-start;
  margin-top: 0.15rem;
}

.grid-form .check-label > span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

.grid-form > .muted {
  align-self: start;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

button,
.btn-secondary {
  font: inherit;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 0.35rem;
  border: 1px solid #0f4c81;
  background: #0f4c81;
  color: #fff;
  cursor: pointer;
}

.btn-secondary,
button.btn-secondary {
  background: #fff;
  color: #0f4c81;
}

button.linkish,
.btn-link {
  background: none;
  border: none;
  color: #0f4c81;
  padding: 0.2rem 0.4rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

button.danger {
  color: #b91c1c;
}

/* Solid primary-style buttons: red fill, white label (not link-style Delete) */
button.danger:not(.btn-link) {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

button.danger:not(.btn-link):hover {
  background: #991b1b;
  border-color: #991b1b;
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #d8dee9;
  border-radius: 0.5rem;
}

.data-view {
  display: block;
}

.data-cards {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}

.data-cards-empty {
  margin: 0;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid #d8dee9;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

.data-card {
  background: #fff;
  border: 1px solid #d8dee9;
  border-radius: 0.5rem;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.data-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

.data-card-title {
  font-size: 1.05rem;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.35;
  word-break: break-word;
}

.data-card-head .data-card-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.data-card-status {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.data-card-status .status-badge {
  margin: 0;
}

.data-card-fields {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.data-card-field {
  display: grid;
  grid-template-columns: minmax(5.5rem, 34%) 1fr;
  gap: 0.35rem 0.75rem;
  align-items: start;
  font-size: 0.9rem;
}

.data-card-field--bare {
  grid-template-columns: 1fr;
}

.data-card-field dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  padding-top: 0.15rem;
}

.data-card-field dd {
  margin: 0;
  color: #1a1a1a;
  word-break: break-word;
}

.data-card-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem 0.75rem;
  align-items: stretch;
  padding-top: 0.15rem;
  border-top: 1px solid #e8edf3;
  width: 100%;
  min-width: 0;
}

.data-card-actions .queue-actions,
.data-card-actions .comm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.data-card-actions .data-card-action-btns {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.data-card-actions .data-card-action-btns > .btn-link,
.data-card-actions .data-card-action-btns > button {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0.45rem 0.4rem;
  text-align: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #0f4c81;
  border-radius: 0.4rem;
  background: #0f4c81;
  color: #fff;
  text-decoration: none;
  box-sizing: border-box;
}

.data-card-actions .data-card-action-btns > .btn-link.danger,
.data-card-actions .data-card-action-btns > button.danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

/* Queue action colors: Call blue, Recall yellow, Hold red, Complete green */
.btn-action-call,
button.btn-action-call,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-call {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}

.btn-action-call:hover,
button.btn-action-call:hover,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-call:hover {
  background: #1d4ed8;
  border-color: #1e40af;
  color: #fff;
}

.btn-action-counter,
button.btn-action-counter,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-counter {
  background: #0e7490;
  border-color: #0e7490;
  color: #fff;
}

.btn-action-counter:hover,
button.btn-action-counter:hover,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-counter:hover {
  background: #155e75;
  border-color: #155e75;
  color: #fff;
}

.btn-action-whatsapp,
button.btn-action-whatsapp {
  background: #25d366;
  border-color: #1ebe57;
  color: #fff;
}

.btn-action-whatsapp:hover,
button.btn-action-whatsapp:hover {
  background: #1ebe57;
  border-color: #128c7e;
  color: #fff;
}

.btn-action-recall,
button.btn-action-recall,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-recall {
  background: #eab308;
  border-color: #ca8a04;
  color: #422006;
}

.btn-action-recall:hover,
button.btn-action-recall:hover,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-recall:hover {
  background: #ca8a04;
  border-color: #a16207;
  color: #422006;
}

.btn-action-hold,
button.btn-action-hold,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-hold {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}

.btn-action-hold:hover,
button.btn-action-hold:hover,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-hold:hover {
  background: #b91c1c;
  border-color: #991b1b;
  color: #fff;
}

.btn-action-noshow,
button.btn-action-noshow,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-noshow {
  background: #b45309;
  border-color: #92400e;
  color: #fff;
}

.btn-action-noshow:hover,
button.btn-action-noshow:hover,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-noshow:hover {
  background: #92400e;
  border-color: #78350f;
  color: #fff;
}

.btn-action-back,
button.btn-action-back,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-back {
  background: #64748b;
  border-color: #475569;
  color: #fff;
}

.btn-action-back:hover,
button.btn-action-back:hover,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-back:hover {
  background: #475569;
  border-color: #334155;
  color: #fff;
}

.btn-action-complete,
button.btn-action-complete,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-complete {
  background: #16a34a;
  border-color: #15803d;
  color: #fff;
}

.btn-action-complete:hover,
button.btn-action-complete:hover,
.data-card-actions .data-card-action-btns > .btn-link.btn-action-complete:hover {
  background: #15803d;
  border-color: #166534;
  color: #fff;
}

.action-chooser {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 18rem;
}

.action-chooser-select {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.4rem 0.55rem;
  font: inherit;
  font-size: 0.9rem;
  color: #0f172a;
  background: #fff;
  border: 1px solid #c5d0de;
  border-radius: 0.4rem;
}

.action-chooser-select--danger {
  border-color: #f1a8a8;
  color: #991b1b;
}

.action-chooser-go {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
  color: #fff;
  background: #0f4c81;
  border: 1px solid #0f4c81;
  border-radius: 0.4rem;
  cursor: pointer;
}

.action-chooser-go:hover,
.action-chooser-go:focus-visible {
  background: #0a3559;
  border-color: #0a3559;
}

.data-card-actions .action-chooser {
  max-width: none;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #e8edf3;
  vertical-align: top;
}

.data-table th {
  background: #f8fafc;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table .col-drag {
  width: 2rem;
  padding-left: 0.5rem;
  padding-right: 0.25rem;
}

.data-table .drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.75rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0.25rem;
  background: transparent;
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -0.08em;
  cursor: grab;
  user-select: none;
}

.data-table .drag-handle:hover {
  color: #475569;
  background: #f1f5f9;
}

.data-table .drag-handle:active {
  cursor: grabbing;
}

.data-table .drag-handle[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.35;
  pointer-events: none;
}

.data-table tr.is-dragging {
  opacity: 0.45;
}

.data-table tr.drag-over-above td {
  box-shadow: inset 0 2px 0 #38bdf8;
}

.data-table tr.drag-over-below td {
  box-shadow: inset 0 -2px 0 #38bdf8;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #d8dee9;
  border-radius: 0.5rem;
}

.toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin: 0;
  min-width: 0;
}

.toolbar-field input,
.toolbar-field select {
  font: inherit;
  font-weight: 400;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.4rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
}

.toolbar-reset {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #0f4c81;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  align-self: flex-end;
}

.toolbar-reset:hover {
  color: #0a3559;
}

.toolbar-count {
  margin: 0 0 0.35rem auto;
  font-size: 0.85rem;
  font-weight: 400;
}

.toolbar-view-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.toolbar-view-toggle .view-toggle.active {
  background: #0f4c81;
  color: #fff;
  border-color: #0f4c81;
}

.roster-month-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.roster-month-nav .btn-secondary {
  min-width: 2.25rem;
  padding: 0.35rem 0.5rem;
}

.roster-month-label {
  min-width: 8.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f172a;
}

.roster-calendar-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #d8dee9;
  border-radius: 0.5rem;
}

.roster-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(8.5rem, 1fr));
  min-width: 42rem;
}

.roster-cal-dow {
  padding: 0.5rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e8edf3;
  border-right: 1px solid #eef2f7;
}

.roster-cal-dow:nth-child(7n),
.roster-cal-day:nth-child(7n) {
  border-right: none;
}

.roster-cal-day {
  min-height: 7.5rem;
  padding: 0.4rem 0.45rem 0.5rem;
  border-right: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
  background: #fff;
}

.roster-cal-day.outside {
  background: #f8fafc;
  color: #94a3b8;
}

.roster-cal-day.today {
  background: #f0f7fc;
}

.roster-cal-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.roster-cal-day-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}

.roster-cal-day.outside .roster-cal-day-num {
  color: #94a3b8;
}

.roster-cal-day.today .roster-cal-day-num {
  color: #0f4c81;
}

.roster-cal-add {
  appearance: none;
  border: 0;
  background: transparent;
  color: #0f4c81;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.roster-cal-add:hover {
  text-decoration: underline;
}

.roster-cal-entries {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.roster-cal-entry {
  padding: 0.3rem 0.35rem;
  border-radius: 0.3rem;
  background: #f1f5f9;
  border-left: 3px solid #0f4c81;
  font-size: 0.72rem;
  line-height: 1.3;
}

.roster-cal-entry-doctor {
  display: block;
  font-weight: 600;
  color: #0f172a;
}

.roster-cal-entry-meta {
  display: block;
  color: #64748b;
  margin-top: 0.1rem;
}

.roster-cal-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.roster-cal-empty {
  font-size: 0.72rem;
  color: #94a3b8;
  padding: 0.15rem 0;
}

.roster-cal-entry.is-series .roster-cal-entry-doctor::after {
  content: " · series";
  font-weight: 500;
  color: #64748b;
  font-size: 0.85em;
}

.avail-weekdays {
  border: 0;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}

.avail-weekdays legend {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.avail-weekday-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.avail-weekday {
  position: relative;
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.avail-weekday input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.avail-weekday span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 600;
}

.avail-weekday input:checked + span {
  background: #0f4c81;
  border-color: #0f4c81;
  color: #fff;
}

.avail-weekday input:focus-visible + span {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.avail-scope-options {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.75rem 0 1rem;
}

.avail-scope-options label {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.35;
  cursor: pointer;
}

.avail-scope-options input {
  margin-top: 0.2rem;
}

.th-sort {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  text-align: left;
}

.th-sort:hover {
  color: #0f4c81;
}

.th-sort[aria-sort="ascending"]::after {
  content: " ↑";
  font-weight: 700;
}

.th-sort[aria-sort="descending"]::after {
  content: " ↓";
  font-weight: 700;
}

.status {
  min-height: 1.25rem;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #334155;
}

.status.error {
  color: #b91c1c;
}

.status.ok {
  color: #047857;
}

code {
  font-size: 0.85em;
  background: #e8edf3;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
}

.catalog-panel {
  margin-bottom: 1.25rem;
}

.catalog-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.catalog-picker {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
  max-width: 28rem;
}

#specialty-catalog-controls {
  display: grid;
  gap: 0.75rem;
}

.catalog-picker-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.catalog-picker-label select {
  font: inherit;
  font-weight: 500;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  min-height: 2.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
  background: #fff;
}

#specialty-catalog-controls > button {
  justify-self: start;
  min-height: 44px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stats-row.dashboard-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-row.card-form {
  display: grid;
}

.stat-card {
  padding: 1rem;
  background: #fff;
  border: 1px solid #d8dee9;
  border-radius: 0.5rem;
}

.dashboard-stats .stat-card {
  text-align: center;
}

.activity-report-toolbar {
  align-items: flex-end;
}

.activity-report-toolbar .toolbar-field select {
  min-width: 10rem;
}

.activity-report-note {
  margin: 0 0 0.75rem;
}

.activity-report-block {
  margin: 1.25rem 0 0;
}

.activity-report-heading {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.stat-label {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-value {
  margin: 0.35rem 0 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: #0f4c81;
}

.empty-hint {
  color: #64748b;
  font-style: italic;
}

.import-box {
  margin-bottom: 1.25rem;
}

.import-actions {
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.file-pick {
  display: inline-block;
  cursor: pointer;
  margin: 0;
}

.file-pick input[type="file"] {
  display: none;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.media-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.media-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #f4f7fb;
  border: 1px solid #d8dee9;
  border-radius: 0.5rem;
}

.media-bulk-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.media-bulk-bar #media-bulk-count {
  margin: 0;
  min-width: 5.5rem;
}

.media-col-check {
  width: 2rem;
  text-align: center;
}

.media-card-check {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 0.25rem;
  box-shadow: 0 0 0 1px rgba(11, 31, 51, 0.12);
}

.media-card--selected {
  border-color: #0b5cab;
  box-shadow: 0 0 0 1px #0b5cab;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.media-crumb {
  border: none;
  background: transparent;
  color: #0b5cab;
  padding: 0.15rem 0.25rem;
  cursor: pointer;
  font: inherit;
  border-radius: 0.25rem;
}

.media-crumb:hover,
.media-crumb:focus-visible {
  background: #e8f1fb;
  outline: none;
}

.media-crumb-sep {
  color: #8b97a8;
  user-select: none;
}

.media-card--folder .media-thumb--folder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #e8eef5 0%, #d5dee9 100%);
}

.media-folder-icon {
  width: 2.75rem;
  height: 2rem;
  border-radius: 0.2rem 0.2rem 0.15rem 0.15rem;
  background: #e2b203;
  box-shadow: inset 0 0.35rem 0 #f0c94a;
  position: relative;
}

.media-folder-icon::before {
  content: "";
  position: absolute;
  left: 0;
  top: -0.35rem;
  width: 1.1rem;
  height: 0.45rem;
  background: #c99900;
  border-radius: 0.15rem 0.15rem 0 0;
}

.media-card {
  position: relative;
  background: #fff;
  border: 1px solid #d8dee9;
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.media-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: #0b1f33;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.media-card-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.media-card-body strong {
  font-size: 0.85rem;
  word-break: break-all;
}

.media-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.media-preview-stage {
  background: #0b1f33;
  border-radius: 0.5rem;
  min-height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.media-preview-stage img,
.media-preview-stage video {
  max-width: 100%;
  max-height: 24rem;
  display: block;
}

.panel-actions {
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top, 0px))
    max(1rem, env(safe-area-inset-right, 0px))
    max(1rem, env(safe-area-inset-bottom, 0px))
    max(1rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 40, 70, 0.55);
}

.admin-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 40rem);
  max-height: min(90vh, 44rem);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0.6rem;
  border: 1px solid #d8dee9;
  box-shadow: 0 1rem 2.5rem rgba(15, 76, 129, 0.28);
  overflow: hidden;
}

/* Content-sized dialogs: always vertically + horizontally centered */
.admin-modal--compact {
  align-items: center;
  justify-content: center;
}

.admin-modal--compact .admin-modal-panel {
  width: min(100%, 28rem);
  height: auto;
  max-height: min(90dvh, 90vh, 44rem);
  margin: auto;
  align-self: center;
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: #0f4c81;
  color: #fff;
  flex-shrink: 0;
}

.admin-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.admin-modal-close {
  appearance: none;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.15rem 0.4rem;
  cursor: pointer;
  border-radius: 0.3rem;
}

.admin-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.admin-modal-body {
  padding: 1rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-modal-body .card-form {
  margin-bottom: 0;
  border: none;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

/* Compact dialogs (e.g. Call confirm): hug content, stack full-width actions */
.call-confirm-actions {
  flex-direction: column;
  align-items: stretch;
  margin-top: 1rem;
}

.call-confirm-actions > button {
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
}

.call-confirm-specialty-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.call-confirm-specialty-options[hidden] {
  display: none;
}

.call-confirm-group-label {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted, #64748b);
}

.call-confirm-group-label:first-child {
  margin-top: 0;
}

.call-confirm-chooser {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  width: 100%;
}

.call-confirm-select {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.45rem 0.55rem;
  font: inherit;
  font-size: 0.9rem;
  color: #0f172a;
  background: #fff;
  border: 1px solid #c5d0de;
  border-radius: 0.4rem;
}

.call-confirm-go {
  flex: 0 0 auto;
  width: 2.5rem;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
  color: #fff;
  background: #0f4c81;
  border: 1px solid #0f4c81;
  border-radius: 0.4rem;
  cursor: pointer;
}

.call-confirm-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin: 0 0 0.65rem;
}

.call-confirm-patient {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

.call-confirm-status {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.call-confirm-meta {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.call-confirm-meta[hidden] {
  display: none;
}

.call-confirm-meta-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 8.5rem) 1fr;
  gap: 0.5rem;
  align-items: baseline;
  margin: 0;
}

.call-confirm-meta-row dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #64748b;
}

.call-confirm-meta-row dd {
  margin: 0;
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.3;
}

.call-confirm-meta-primary {
  font-weight: 600;
}

.call-confirm-meta-secondary {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
}

.call-confirm-empty {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.call-confirm-actions > button.call-confirm-btn--ideal {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
}

.call-confirm-actions > button.call-confirm-btn--ideal:hover {
  background: #166534;
  border-color: #166534;
  color: #fff;
}

.call-confirm-actions > button.call-confirm-btn--hold {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.call-confirm-actions > button.call-confirm-btn--hold:hover {
  background: #991b1b;
  border-color: #991b1b;
  color: #fff;
}

.call-confirm-chooser--available .call-confirm-go {
  background: #15803d;
  border-color: #15803d;
}

.call-confirm-chooser--available .call-confirm-go:hover {
  background: #166534;
  border-color: #166534;
}

.call-confirm-chooser--available .call-confirm-select {
  border-color: #86efac;
  background: #f0fdf4;
}

.call-confirm-chooser--hold .call-confirm-go {
  background: #b91c1c;
  border-color: #b91c1c;
}

.call-confirm-chooser--hold .call-confirm-go:hover {
  background: #991b1b;
  border-color: #991b1b;
}

.call-confirm-chooser--hold .call-confirm-select {
  border-color: #f1a8a8;
}

.call-confirm-chooser--other .call-confirm-go {
  background: #0f4c81;
  border-color: #0f4c81;
}

.call-confirm-chooser--other .call-confirm-go:hover {
  background: #0a3559;
  border-color: #0a3559;
}

.call-confirm-chooser--other .call-confirm-select {
  border-color: #c5d0de;
}

.call-confirm-chooser--away {
  grid-template-columns: minmax(0, 1fr) 2.5rem;
}

.call-confirm-chooser--away .call-confirm-select {
  border-color: #94a3b8;
  background: #fff;
  color: #0f172a;
}

.call-confirm-contact {
  flex: 0 0 auto;
  width: 2.5rem;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  color: #fff;
  background: #0f766e;
  border: 1px solid #0f766e;
  border-radius: 0.4rem;
  cursor: pointer;
}

.call-confirm-contact:hover {
  background: #0d9488;
  border-color: #0d9488;
}

.call-confirm-actions > button.call-confirm-btn--contact {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.call-confirm-actions > button.call-confirm-btn--contact:hover {
  background: #0d9488;
  border-color: #0d9488;
}

.confirm-modal-message {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
  color: #334155;
}

.creative-delete-usage-list,
.delete-usage-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  max-height: min(40vh, 14rem);
  overflow: auto;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 0.45rem;
}

.creative-delete-usage-list li,
.delete-usage-list li {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: 0.9rem;
  line-height: 1.35;
  color: #334155;
}

.creative-delete-usage-list li:last-child,
.delete-usage-list li:last-child {
  border-bottom: none;
}

.creative-delete-usage-list .usage-meta,
.delete-usage-list .usage-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: #64748b;
}

body.admin-modal-open {
  overflow: hidden;
}

.display-pair-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
  max-height: min(50vh, 22rem);
  overflow: auto;
}

.display-pair-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 0.45rem;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.display-pair-option:hover,
.display-pair-option:focus-visible {
  border-color: #0f4c81;
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}

.display-pair-option:disabled {
  opacity: 0.55;
  cursor: default;
}

.display-pair-option--demo {
  border-color: #f59e0b;
  background: #fffbeb;
}

.display-pair-option--demo .display-pair-option-title {
  color: #b45309;
}

.display-pair-option-title {
  font-weight: 700;
}

.display-pair-option-sub {
  font-size: 0.9rem;
  color: #334155;
}

.display-pair-option-meta {
  font-size: 0.8rem;
  color: #64748b;
}

#display-pair-code {
  font-size: 1.35rem;
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
  max-width: 10rem;
}

@media (max-width: 40rem) {
  .admin-tabs--select {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-section-select {
    max-width: none;
    width: 100%;
    flex: 1 1 auto;
  }

  .table-toolbar {
    align-items: stretch;
  }

  .toolbar-field {
    flex: 1 1 100%;
  }

  .toolbar-field input,
  .toolbar-field select {
    min-width: 0;
    width: 100%;
  }

  .toolbar-count {
    margin-left: 0;
    margin-right: auto;
  }

  .toolbar-view-toggle {
    width: 100%;
  }

  .toolbar-view-toggle .view-toggle {
    flex: 1 1 auto;
  }

  /* ALL_DATA_TABLES: cards-only on mobile; keep month calendars via [hidden] table-wrap */
  .data-view:has(> .table-wrap:not([hidden])) > .table-wrap {
    display: none !important;
  }

  .data-view:has(> .table-wrap:not([hidden])) > .data-cards {
    display: flex;
  }

  /* Media library: force cards, hide Table toggle */
  .toolbar-view-toggle:has([data-media-view]) [data-media-view="table"] {
    display: none !important;
  }

  .toolbar-view-toggle:has([data-media-view]) [data-media-view="cards"] {
    display: none !important;
  }

  #media-table-wrap {
    display: none !important;
  }

  #media-grid {
    display: grid !important;
  }

  .admin-modal {
    align-items: stretch;
  }

  .admin-modal-panel {
    width: 100%;
    max-height: none;
    height: 100%;
    border-radius: 0;
  }

  /* Keep confirm-style dialogs content-sized and centered on phones */
  .admin-modal--compact {
    align-items: center;
    justify-content: center;
  }

  .admin-modal--compact .admin-modal-panel {
    width: min(100%, 28rem);
    height: auto;
    max-height: min(90dvh, 90vh, calc(100% - 2rem));
    margin: auto;
    align-self: center;
    border-radius: 0.6rem;
  }

  .grid-form {
    grid-template-columns: 1fr;
  }

  .session-footer {
    flex-direction: column;
  }

  .session-footer .btn-secondary,
  .session-footer a.btn-secondary {
    width: 100%;
    text-align: center;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .stats-row.dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

/* Communication actions (Phone / SMS / WhatsApp) */
.comm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.btn-comm {
  font: inherit;
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid #94a3b8;
  border-radius: 0.3rem;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
}

.btn-comm:hover,
.btn-comm:focus-visible {
  border-color: #0ea5e9;
  background: #e0f2fe;
}

.comm-outcome-options {
  border: 0;
  padding: 0;
  margin: 0 0 0.75rem;
  display: grid;
  gap: 0.35rem;
}

.comm-outcome-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.comm-history {
  margin: 0.75rem 0;
  font-size: 0.85rem;
}

.comm-history ul {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

.comm-language-hint {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.comm-language-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn-comm-lang {
  flex: 1 1 8rem;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid #94a3b8;
  border-radius: 0.35rem;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
}

.btn-comm-lang:hover,
.btn-comm-lang:focus-visible {
  border-color: #0ea5e9;
  background: #e0f2fe;
}

.btn-comm-lang--preferred {
  border-color: #0f4c81;
  box-shadow: inset 0 0 0 1px #0f4c81;
}

.scroll-top-btn {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 40;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #0f4c81;
  background: #0f4c81;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
  cursor: pointer;
}

.scroll-top-btn[hidden] {
  display: none;
}

.scroll-top-btn:hover {
  background: #0a3559;
  border-color: #0a3559;
  color: #fff;
}

/* Always-Hub pairing banner (staff primary device) */
.hub-banner {
  margin: 0.75rem 1rem 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #064e3b;
}
.hub-banner-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.hub-banner-line {
  margin: 0.25rem 0;
  font-size: 0.85rem;
  word-break: break-all;
}
.hub-banner-hint {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
}
.hub-banner code {
  font-size: 0.8em;
}
.hub-details {
  margin: 0.75rem 0;
  padding: 0.5rem 0;
}
.hub-details summary {
  cursor: pointer;
  font-weight: 600;
}
.btn-link {
  border: 0;
  background: transparent;
  color: #0f4c81;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0 0.35rem;
}

/* Token issued acknowledgement — large code for staff to copy onto a slip */
.token-issued-body {
  text-align: center;
}

.token-issued-subtitle {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.token-issued-code {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(5.5rem, 24vw, 8rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: #0f4c81;
  font-variant-numeric: tabular-nums;
}

.token-issued-name {
  margin: 0 0 0.65rem;
  font-size: 2.1rem;
  font-weight: 600;
  color: #0f172a;
}

.token-issued-hint {
  margin: 0 0 1rem;
  font-size: 0.85rem;
}

.token-issued-panel .call-confirm-actions {
  justify-content: center;
}

.token-issued-panel .call-confirm-actions > button {
  min-width: 8rem;
}

/* Activity report print / Save as PDF */
.activity-print-sheet {
  display: none;
}

@media print {
  @page {
    margin: 12mm;
  }

  body.printing-activity-report {
    background: #fff !important;
    color: #111 !important;
  }

  body.printing-activity-report > *:not(#activity-print-sheet) {
    display: none !important;
  }

  body.printing-activity-report #activity-print-sheet {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #111;
    font: 11pt/1.35 system-ui, Segoe UI, sans-serif;
  }

  .activity-print-sheet h1 {
    margin: 0 0 0.25rem;
    font-size: 16pt;
  }

  .activity-print-sheet .print-meta {
    margin: 0 0 0.85rem;
    color: #334155;
    font-size: 10pt;
  }

  .activity-print-sheet h2 {
    margin: 1rem 0 0.4rem;
    font-size: 12pt;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 0.2rem;
  }

  .activity-print-sheet table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 0.75rem;
    font-size: 9pt;
  }

  .activity-print-sheet th,
  .activity-print-sheet td {
    border: 1px solid #cbd5e1;
    padding: 0.28rem 0.4rem;
    text-align: left;
    vertical-align: top;
  }

  .activity-print-sheet th {
    background: #f1f5f9;
    font-weight: 600;
  }

  .activity-print-sheet .print-summary td:first-child {
    width: 42%;
    color: #334155;
  }

  .activity-print-sheet .print-footnote {
    margin: 0.5rem 0 0;
    font-size: 8.5pt;
    color: #64748b;
  }

  .activity-print-sheet .print-block {
    break-inside: avoid;
  }
}



