/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require_self
 */
:root {
  --bs-font-sans-serif: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --bs-primary: #104a8b;
  --bs-primary-rgb: 16, 74, 139;
  --bs-secondary: #667588;
  --bs-secondary-rgb: 102, 117, 136;
  --bs-success: #00c3a0;
  --bs-success-rgb: 0, 195, 160;
  --bs-info: #30aadd;
  --bs-info-rgb: 48, 170, 221;
  --bs-warning: #F0D58A;
  --bs-warning-rgb: 240, 213, 138;
  --bs-danger: #c4455a;
  --bs-danger-rgb: 196, 69, 90;
  --bs-light: #f8fbfe;
  --bs-light-rgb: 248, 251, 254;
  --bs-dark: #2f3640;
  --bs-dark-rgb: 47, 54, 64;

  --bs-body-bg: #f3f7fb;
  --bs-body-color: #2f3640;
  --bs-border-color: #d6e0eb;
  --bs-link-color: #104a8b;
  --bs-link-hover-color: #0b3564;

  --brand: #104a8b;
  --brand-dark: #0b3564;
  --brand-soft: #eaf3fb;
  --brand-border: #cfe0f2;

  --success: #00c3a0;
  --success-dark: #009d82;

  --bg: #f3f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbfe;
  --text: #2f3640;
  --muted: #667588;
  --card: #ffffff;
  --border: #d6e0eb;
  --shadow-xs: 0 1px 2px -1px rgba(15, 23, 42, 0.16), 0 6px 12px -12px rgba(15, 23, 42, 0.18);
  --shadow-sm: 0 1px 2px -1px rgba(15, 23, 42, 0.18), 0 10px 18px -16px rgba(15, 23, 42, 0.22);
  --shadow-md: 0 2px 4px -2px rgba(15, 23, 42, 0.18), 0 16px 28px -22px rgba(15, 23, 42, 0.22);
  --shadow-lg: 0 3px 6px -3px rgba(15, 23, 42, 0.18), 0 22px 36px -28px rgba(15, 23, 42, 0.24);
  --shadow-focus: 0 0 0 0.2rem rgba(var(--bs-success-rgb), 0.14);
  --bs-box-shadow-sm: var(--shadow-sm);
  --bs-box-shadow: var(--shadow-md);
  --bs-box-shadow-lg: var(--shadow-lg);
}

body {
  color: var(--text);
  background-color: var(--bg);
  background-image: none;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow {
  box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

.card,
.panel,
.stat-card {
  background-color: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.card-header,
.board-column-header {
  background-color: var(--surface-soft);
  border-bottom-color: var(--border);
}

.table {
  --bs-table-bg: var(--surface);
  --bs-table-striped-bg: var(--surface-soft);
  --bs-table-hover-bg: var(--brand-soft);
  --bs-table-border-color: var(--border);
}

.btn-primary {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: #0b3564;
  --bs-btn-hover-border-color: #0b3564;
  --bs-btn-active-bg: #0b3564;
  --bs-btn-active-border-color: #0b3564;
}

.btn-success {
  --bs-btn-bg: var(--bs-success);
  --bs-btn-border-color: var(--bs-success);
  --bs-btn-hover-bg: var(--success-dark);
  --bs-btn-hover-border-color: var(--success-dark);
  --bs-btn-active-bg: var(--success-dark);
  --bs-btn-active-border-color: var(--success-dark);
}

.btn-success,
.btn-info {
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
}

.queue-panel-page {
	  --queue-surface: rgba(255, 255, 255, 0.94);
	  --queue-surface-strong: #ffffff;
	  --queue-muted: var(--muted);
	  --queue-shadow: var(--shadow-lg);

  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 10%, #fff) 0, var(--bg) 42%, color-mix(in srgb, var(--success) 8%, var(--bg)) 100%);
  overflow: hidden;
}

.queue-panel-shell {
  width: min(100%, 1920px);
  min-height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(12rem, 28vh);
  gap: 1rem;
}

.queue-panel-header,
.queue-current-grid,
.queue-recent-row {
  display: flex;
  align-items: center;
}

.queue-panel-header {
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.queue-panel-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.queue-panel-logo-frame {
  display: grid;
  width: 5.25rem;
  height: 5.25rem;
  place-items: center;
  padding: 0.65rem;
	  border: 1px solid var(--brand-border);
	  border-radius: 8px;
	  background: var(--queue-surface-strong);
	  box-shadow: var(--shadow-sm);
}

.queue-panel-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.queue-panel-heading {
  min-width: 0;
}

.queue-panel-kicker {
  color: var(--queue-muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

.queue-panel-header h1,
.queue-recent-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.queue-panel-header h1 {
  overflow: hidden;
  color: var(--brand-dark);
  font-size: 2.6rem;
  font-weight: 850;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-panel-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  color: var(--brand-dark);
  background: var(--queue-surface-strong);
  border: 1px solid var(--brand-border);
	  border-radius: 8px;
	  padding: 0.65rem 1rem;
	  font-weight: 750;
	  white-space: nowrap;
	  box-shadow: var(--shadow-sm);
}

.queue-current-call,
.queue-recent-card {
  background: var(--queue-surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--queue-shadow);
}

.queue-current-call {
  min-height: 0;
  padding: 2.5rem;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
}

.queue-current-label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 1.05rem;
  font-weight: 850;
  align-self: start;
  margin-bottom: 1.25rem;
}

.queue-live-indicator,
.queue-idle-indicator {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
}

	.queue-live-indicator {
	  background: var(--success);
	  box-shadow: 0 0 0 0.24rem rgba(var(--bs-success-rgb), 0.14);
	  animation: queue-live-pulse 1.6s ease-in-out infinite;
	}

	.queue-idle-indicator {
	  background: var(--queue-muted);
	  box-shadow: 0 0 0 0.24rem rgba(var(--bs-secondary-rgb), 0.1);
	}

@keyframes queue-live-pulse {
	  0%,
	  100% {
	    box-shadow: 0 0 0 0.24rem rgba(var(--bs-success-rgb), 0.14);
	  }
	
	  50% {
	    box-shadow: 0 0 0 0.45rem rgba(var(--bs-success-rgb), 0.05);
	  }
	}

.queue-current-grid {
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  min-height: 0;
}

.queue-current-patient {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.queue-current-name {
  color: var(--brand-dark);
  font-size: 7rem;
  font-weight: 850;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.queue-current-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--queue-muted);
  font-size: 1.45rem;
  font-weight: 650;
  margin-top: 1rem;
}

.queue-current-room {
  flex: 0 0 clamp(24rem, 32vw, 30rem);
  width: clamp(24rem, 32vw, 30rem);
  max-width: 100%;
  min-height: 14rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
	  padding: 1.6rem;
	  text-align: center;
	  overflow: hidden;
	  box-shadow: inset 0 -0.25rem 0 rgba(0, 0, 0, 0.08);
	}

.queue-current-room-icon {
  display: block;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 2rem;
}

.queue-current-room-label {
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.95rem;
  font-weight: 850;
  margin-bottom: 0.5rem;
}

.queue-current-room-name {
  max-width: 100%;
  font-size: clamp(2.2rem, 3.1vw, 2.85rem);
  font-weight: 850;
  line-height: 1.08;
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: balance;
  hyphens: auto;
}

.queue-current-doctor {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  margin-top: 1.4rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.queue-current-doctor i {
  color: var(--brand);
}

.queue-empty-call .queue-current-name {
  font-size: 4.6rem;
}

.queue-empty-call {
  display: grid;
  place-items: center;
  align-self: center;
}

.queue-recent-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.queue-recent-header {
  padding: 1rem 1.5rem;
  background: var(--brand-dark);
  color: #fff;
}

.queue-recent-header h2 {
  font-size: 1.45rem;
  font-weight: 850;
}

.queue-recent-header .queue-panel-kicker {
  color: rgba(255, 255, 255, 0.72);
}

.queue-recent-list {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.queue-recent-row {
  display: grid;
  grid-template-columns: 8rem minmax(12rem, 1.2fr) minmax(12rem, 1fr) minmax(10rem, 0.8fr);
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
  font-weight: 650;
}

.queue-recent-row:nth-child(even) {
  background: var(--surface-soft);
}

.queue-recent-time {
  color: var(--brand);
  font-weight: 850;
}

.queue-recent-patient {
  color: var(--brand-dark);
  font-weight: 850;
}

.queue-recent-doctor,
.queue-recent-room {
  color: var(--queue-muted);
}

.queue-recent-time,
.queue-recent-doctor,
.queue-recent-room {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.queue-recent-time span,
.queue-recent-doctor span,
.queue-recent-room span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-recent-empty {
  padding: 2rem;
  color: var(--queue-muted);
  font-size: 1.25rem;
}

@media (min-width: 1440px) {
  .queue-panel-header h1 {
    font-size: 3.25rem;
  }

  .queue-panel-shell {
    padding: 1.75rem;
    gap: 1.25rem;
  }

  .queue-current-call {
    padding: 3rem;
  }

  .queue-current-name {
    font-size: 8.4rem;
  }

  .queue-current-room {
    flex-basis: clamp(28rem, 30vw, 32rem);
    width: clamp(28rem, 30vw, 32rem);
  }

  .queue-current-room-name {
    font-size: clamp(2.8rem, 2.9vw, 3.35rem);
  }

  .queue-recent-row {
    font-size: 1.18rem;
  }
}

@media (max-width: 1199.98px) {
  .queue-current-name {
    font-size: 5.5rem;
  }

  .queue-current-room {
    flex-basis: clamp(18rem, 34vw, 22rem);
    width: clamp(18rem, 34vw, 22rem);
  }

  .queue-current-room-name {
    font-size: clamp(1.9rem, 3.4vw, 2.35rem);
  }
}

@media (max-width: 900px) {
  .queue-panel-page {
    overflow: auto;
  }

  .queue-panel-shell {
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0.85rem;
  }

  .queue-panel-header,
  .queue-current-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .queue-panel-header {
    gap: 0.75rem;
  }

  .queue-panel-brand {
    width: 100%;
    gap: 0.75rem;
  }

  .queue-panel-logo-frame {
    width: 4rem;
    height: 4rem;
  }

  .queue-panel-header h1 {
    font-size: 1.75rem;
    white-space: normal;
  }

  .queue-panel-refresh {
    width: 100%;
    justify-content: center;
  }

  .queue-current-call {
    padding: 1.25rem;
  }

  .queue-current-name {
    font-size: 3.25rem;
  }

  .queue-current-meta,
  .queue-current-doctor {
    font-size: 1.05rem;
  }

  .queue-current-room {
    flex-basis: auto;
    width: 100%;
    text-align: left;
  }

  .queue-current-room-icon {
    display: none;
  }

  .queue-current-room-name {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .queue-empty-call .queue-current-name {
    font-size: 2.5rem;
  }

  .queue-recent-row {
    grid-template-columns: 80px 1fr;
    font-size: 0.98rem;
  }

  .queue-recent-doctor,
  .queue-recent-room {
    grid-column: 2;
  }
}

.btn-warning {
  --bs-btn-color: var(--bs-dark);
  --bs-btn-hover-color: var(--bs-dark);
  --bs-btn-active-color: var(--bs-dark);
}

.pagination .page-link {
  color: var(--brand);
}

.pagination .page-link:hover,
.pagination .page-link:focus {
  color: var(--brand-dark);
  background-color: var(--brand-soft);
  border-color: var(--brand-border);
}

.pagination .page-item.active .page-link {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.admin-sidebar {
  --bs-offcanvas-bg: var(--surface);
  --bs-offcanvas-color: var(--bs-dark);
  background-color: var(--surface) !important;
  color: var(--bs-dark);
}

.admin-sidebar .nav-link.text-white-50,
.admin-sidebar .text-white-50 {
  color: var(--bs-secondary) !important;
}

.admin-sidebar .nav-link.text-white,
.admin-sidebar .nav-link.active {
  color: var(--bs-dark) !important;
}

.admin-sidebar .nav-link.active {
  background-color: var(--brand-soft) !important;
  color: var(--brand) !important;
  border: 1px solid var(--brand-border);
}

.admin-sidebar .border-white.border-opacity-25 {
  border-color: var(--bs-border-color) !important;
}

.admin-sidebar .btn-close {
  filter: none !important;
}

.triage-page {
  max-width: 1180px;
}

.triage-form textarea.form-control {
  min-height: 5.5rem;
}

@media (min-width: 992px) {
  .admin-sidebar {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    align-self: flex-start;
    overflow-y: auto;
  }
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.admin-sidebar .admin-sidebar-subitem {
  padding-left: 1.75rem;
}

.admin-main > .container-fluid > .container {
  max-width: 100%;
}

.admin-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0, rgba(255, 255, 255, 0) 18rem),
    var(--bg);
}

.admin-shell {
  display: flex;
  min-height: 100vh;
  min-width: 0;
}

.admin-shell .admin-sidebar {
  --bs-offcanvas-width: min(88vw, 340px);
  width: 268px;
  min-width: 268px;
  max-width: 268px;
  background: var(--surface) !important;
  box-shadow: 4px 0 12px rgba(15, 23, 42, 0.04);
  backdrop-filter: none;
}

.admin-shell .admin-sidebar .offcanvas-body {
  height: 100%;
}

.admin-sidebar-branding {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.admin-sidebar-client-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 6.5rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.admin-sidebar-client-logo {
  display: block;
  max-width: 100%;
  max-height: 4.75rem;
  object-fit: contain;
}

.admin-sidebar-product {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
  text-align: center;
}

.admin-sidebar-product-name {
  color: var(--text);
  font-weight: 740;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.admin-sidebar-product-signature {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.admin-shell .admin-sidebar .nav-link {
  min-width: 0;
  min-height: 2.45rem;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.admin-shell .admin-sidebar .nav-link:hover {
  color: var(--text) !important;
  background: rgba(var(--bs-primary-rgb), 0.045);
  border-color: rgba(var(--bs-primary-rgb), 0.1);
}

.admin-shell .admin-sidebar .nav-link.active {
  color: var(--brand) !important;
  background: var(--brand-soft) !important;
  border-color: var(--brand-border);
  box-shadow: inset 2px 0 0 var(--brand);
}

.admin-shell .admin-sidebar .nav-link.active i {
  color: var(--brand);
}

.admin-sidebar-item + .admin-sidebar-item {
  margin-top: 0.1rem;
}

.admin-shell .admin-sidebar .nav-link i {
  flex: 0 0 1rem;
  text-align: center;
}

.admin-shell .admin-sidebar .nav-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-shell .admin-sidebar .admin-sidebar-subitem {
  padding-left: 2rem;
  font-size: 0.88rem;
}

.admin-shell .admin-sidebar .admin-sidebar-subitem.active {
  color: var(--brand-dark) !important;
  background: rgba(var(--bs-primary-rgb), 0.06) !important;
  border-color: rgba(var(--bs-primary-rgb), 0.12);
  box-shadow: inset 2px 0 0 rgba(var(--bs-primary-rgb), 0.48);
}

.admin-sidebar-subheader {
  color: var(--muted) !important;
  font-size: 0.68rem;
  line-height: 1.2;
}

.sidebar-caret {
  flex: 0 0 auto;
  margin-left: auto;
}

.admin-shell .admin-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 1rem clamp(1rem, 2vw, 1.5rem) 1.5rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 255, 255, 0) 14rem),
    var(--bg);
}

.admin-main-container {
  width: min(100%, 84rem);
  margin: 0 auto;
  padding: 0;
}

.admin-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: min(100%, 84rem);
  margin: 0 auto 0.75rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-xs);
}

.admin-mobile-menu-button,
.admin-mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.admin-mobile-brand {
  min-width: 0;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.admin-mobile-brand:hover,
.admin-mobile-brand:focus {
  color: var(--brand);
}

.admin-mobile-brand-mark {
  width: 1.9rem;
  height: 1.9rem;
  object-fit: contain;
  padding: 0.25rem;
  border-radius: 7px;
  background: var(--brand);
}

.admin-mobile-brand-logo,
.admin-brand-logo {
  display: block;
  width: auto;
  height: 1.9rem;
  max-width: min(10rem, 42vw);
  object-fit: contain;
}

.admin-brand-logo {
  height: 1.75rem;
  max-width: 9rem;
}

.clinic-logo-fallback {
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  font-weight: 850;
  line-height: 1;
}

.admin-sidebar-client-logo.clinic-logo-fallback {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 8px;
  font-size: 1.45rem;
}

.admin-mobile-brand-logo.clinic-logo-fallback,
.admin-brand-logo.clinic-logo-fallback {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 7px;
  font-size: 0.72rem;
}

.queue-panel-logo.clinic-logo-fallback {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  font-size: 1.35rem;
}

.admin-mobile-brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sidebar-account {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.admin-sidebar-profile {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.admin-sidebar-profile:hover,
.admin-sidebar-profile:focus {
  border-color: rgba(20, 74, 139, 0.24);
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
}

.admin-sidebar-profile:focus-visible {
  outline: 2px solid rgba(0, 191, 166, 0.35);
  outline-offset: 2px;
}

.admin-sidebar-profile-name {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.admin-sidebar-profile-role {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.52rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  appearance: none;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.admin-sidebar-logout i {
  color: var(--muted);
}

.admin-sidebar-logout:hover,
.admin-sidebar-logout:focus {
  border-color: rgba(20, 74, 139, 0.24);
  color: var(--brand-dark);
  background: var(--surface-soft);
  box-shadow: var(--shadow-xs);
}

.admin-sidebar-logout:hover i,
.admin-sidebar-logout:focus i {
  color: var(--brand-dark);
}

.admin-sidebar-logout:focus-visible {
  outline: 2px solid rgba(0, 191, 166, 0.35);
  outline-offset: 2px;
}

.admin-sidebar-footer {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: 0 0.75rem 0.85rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.35;
  text-align: center;
}

.admin-main-container,
.admin-page,
.admin-page .card,
.admin-page .card-header,
.admin-page .card-body,
.admin-page .table-responsive,
.admin-page .row,
.admin-page [class*="col-"],
.admin-page h1,
.admin-page h2,
.admin-page .fw-semibold,
.admin-page .text-muted {
  min-width: 0;
}

.admin-page {
  width: 100%;
  max-width: none;
  margin: 0;
}

.admin-page h1,
.admin-page h2,
.admin-page .fw-semibold,
.admin-page .text-muted,
.admin-page td,
.admin-page th {
  overflow-wrap: anywhere;
}

.admin-page .btn {
  white-space: normal;
  overflow-wrap: anywhere;
}

.btn .bi {
  line-height: 1;
}

.btn-icon-label {
  min-width: 0;
}

.btn-icon-only {
  display: inline-grid;
  place-items: center;
  width: 2.35rem;
  min-width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
}

.btn-icon-only.btn-sm {
  width: 2.05rem;
  min-width: 2.05rem;
  height: 2.05rem;
}

.btn-icon-only.btn-lg {
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
}

@media (min-width: 992px) {
  .admin-shell .admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
    overflow-y: auto;
  }
}

@media (max-width: 991.98px) {
  .admin-shell {
    display: block;
  }

  .admin-shell .admin-main {
    padding: 0.75rem;
  }

  .admin-shell .admin-sidebar {
    width: min(88vw, 340px);
    min-width: 0;
    max-width: none;
  }

  .admin-shell .admin-sidebar .offcanvas-body {
    overflow-y: auto;
  }

  .admin-shell .admin-sidebar .nav-link {
    min-height: 42px;
    white-space: normal;
  }
}

.queue-board > [class*="col-"] {
  display: flex;
}

.queue-board .card {
  width: 100%;
}

.queue-column-header {
  min-height: 56px;
}

.organization-brand-logo-preview {
  display: block;
  width: 100%;
  max-width: 15rem;
  max-height: 5rem;
  object-fit: contain;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.organization-brand-favicon-preview {
  display: block;
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.organization-color-field {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.organization-color-field .form-control-color {
  flex: 0 0 3rem;
  width: 3rem;
  height: 2.5rem;
  padding: 0.25rem;
}

.organization-color-field .organization-color-value {
  color: var(--muted);
  font-family: var(--bs-font-monospace);
  font-size: 0.875rem;
}

.queue-entry-card {
  padding: 0.85rem;
}

.queue-entry-card + .queue-entry-card {
  border-top-color: var(--bs-border-color);
}

.queue-entry-name {
  line-height: 1.25;
}

.queue-entry-time {
  color: var(--bs-dark);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.queue-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-top: 0.6rem;
  color: var(--bs-secondary);
  font-size: 0.82rem;
  line-height: 1.35;
}

.queue-entry-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
}

.queue-entry-meta i {
  color: var(--brand);
  font-size: 0.9rem;
}

.queue-entry-actions {
  margin-top: 0.75rem;
}

.queue-entry-actions .btn,
.queue-entry-actions .badge {
  font-size: 0.78rem;
}

.queue-entry-actions .queue-entry-receipt-button {
  width: 2.35rem;
  min-width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.45rem;
  font-size: 1rem;
}

.queue-empty {
  display: grid;
  min-height: 120px;
  place-items: center;
}

.queue-column--finalized .list-group-item {
  background-color: var(--bs-white);
  border-color: var(--bs-border-color);
}

.queue-column--finalized .list-group-item + .list-group-item {
  border-top-color: var(--bs-border-color);
}

.queue-history summary {
  cursor: pointer;
  list-style: none;
}

.queue-history summary::-webkit-details-marker {
  display: none;
}

.queue-history summary::after {
  color: var(--bs-secondary);
  content: "Abrir";
  font-size: 0.82rem;
  margin-left: 1rem;
}

.queue-history[open] summary::after {
  content: "Fechar";
}

.form-check-input.switch-success:checked {
  background-color: var(--bs-success);
  border-color: var(--bs-success);
}

.form-check-input.switch-success:focus {
  border-color: var(--bs-success);
  box-shadow: var(--shadow-focus);
}

.modal-backdrop {
  --bs-backdrop-bg: #000;
  --bs-backdrop-opacity: 0.32;
}

.modal-backdrop.show {
  opacity: var(--bs-backdrop-opacity);
}

.document-editor {
  min-height: 560px;
  background: #fff;
}

.document-editor .ql-editor {
  min-height: 500px;
  font-size: 15px;
  line-height: 1.45;
}

.document-template-tag-cloud-button {
  --bs-btn-padding-y: 0.2rem;
  --bs-btn-padding-x: 0.5rem;
  --bs-btn-font-size: 0.78rem;
  border-style: dashed;
}

.document-template-tag-cloud-button code {
  color: inherit;
  white-space: normal;
}

.appointment-page {
  --appointment-sidebar-width: 260px;
  --appointment-hour-height: 88px;
  --appointment-minute-height: calc(var(--appointment-hour-height) / 60);
  color: var(--text);
}

.appointment-patient-field {
  position: relative;
}

.appointment-patient-results {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  left: 0;
  z-index: 1040;
  max-height: 15rem;
  overflow-y: auto;
  padding: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.appointment-patient-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  color: var(--text);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.appointment-patient-result:hover,
.appointment-patient-result:focus {
  background: var(--brand-soft);
}

.appointment-patient-result-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-patient-result-birthdate {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
}

.appointment-page-header,
.appointment-toolbar,
.appointment-toolbar-actions,
.appointment-navigation {
  display: flex;
  align-items: center;
}

.appointment-page-header {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.appointment-page-title {
  margin: 0 0 0.25rem;
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  line-height: 1.15;
}

.appointment-page-date {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.appointment-breadcrumb {
  --bs-breadcrumb-divider: "›";
  font-size: 0.9rem;
}

.appointment-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.appointment-new-button,
.appointment-filter-button,
.appointment-today-button {
  min-height: 38px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.appointment-square-button {
  width: 38px;
  height: 38px;
  min-width: 38px;
  flex: 0 0 38px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.appointment-toolbar {
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  min-width: 0;
}

.appointment-navigation,
.appointment-toolbar-left,
.appointment-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.appointment-professional-form {
  flex: 1 1 220px;
  min-width: 190px;
  max-width: 320px;
}

.appointment-professional-select {
  min-height: 38px;
  border-radius: 7px;
  min-width: 0;
}

.appointment-view-switch .btn {
  min-width: 64px;
  min-height: 38px;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.appointment-date-dropdown {
  flex: 1 0 clamp(300px, 24vw, 360px);
  min-width: 300px;
  max-width: 360px;
}

.appointment-date-button {
  min-height: 38px;
  width: 100%;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  color: var(--text);
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.appointment-date-button span {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-export-actions .appointment-square-button {
  width: 44px;
  min-width: 44px;
  flex-basis: 44px;
  font-size: 0.78rem;
  font-weight: 800;
}

.appointment-date-menu {
  width: 300px;
  padding: 1rem;
  border-color: var(--border);
  border-radius: 8px;
}

.appointment-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
}

.appointment-sidebar {
  display: grid;
  gap: 0.85rem;
}

.appointment-side-panel,
.appointment-board {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.appointment-side-panel {
  padding: 1rem;
}

.appointment-mini-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.appointment-mini-calendar-title {
  color: var(--text);
}

.appointment-mini-calendar-nav {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
}

.appointment-mini-calendar-nav:hover,
.appointment-mini-calendar-nav:focus {
  color: var(--brand);
  background: var(--brand-soft);
}

.appointment-mini-calendar-weekdays,
.appointment-mini-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}

.appointment-mini-calendar-weekdays {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.55rem;
}

.appointment-mini-calendar-day {
  width: 32px;
  height: 32px;
  margin: 0.1rem auto;
  border-radius: 50%;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
  text-decoration: none;
}

.appointment-mini-calendar-day:hover,
.appointment-mini-calendar-day:focus {
  color: var(--brand);
  background: var(--brand-soft);
}

.appointment-mini-calendar-day.is-outside {
  color: var(--muted);
  opacity: 0.68;
}

.appointment-mini-calendar-day.is-selected {
  color: #fff;
  background: var(--brand);
}

.appointment-mini-calendar-day.is-today:not(.is-selected) {
  border: 1px solid var(--brand-border);
  color: var(--brand);
}

.appointment-filter-form {
  display: grid;
  gap: 1rem;
}

.appointment-filter-section + .appointment-filter-section {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.appointment-filter-title {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--text);
  font-size: 0.92rem;
}

.appointment-filter-check {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-size: 0.9rem;
}

.appointment-filter-check .form-check-input {
  margin: 0;
}

.appointment-filter-check--confirmed .form-check-label {
  color: var(--success-dark);
}

.appointment-filter-check--scheduled .form-check-label {
  color: #a87900;
}

.appointment-filter-check--waiting .form-check-label {
  color: var(--muted);
}

.appointment-filter-check--cancelled .form-check-label {
  color: var(--bs-danger);
}

.appointment-filter-select {
  min-height: 42px;
  border-radius: 7px;
}

.appointment-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 0.25rem;
}

.appointment-filter-actions .btn {
  border-radius: 7px;
  min-height: 40px;
}

.appointment-board {
  min-width: 0;
  overflow: hidden;
}

.appointment-calendar-scroll {
  overflow: auto;
  max-width: 100%;
}

.appointment-calendar-header-row,
.appointment-calendar-body-row {
  display: grid;
  min-width: 100%;
}

.appointment-calendar-header-row {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.appointment-calendar-corner,
.appointment-doctor-heading,
.appointment-week-day-heading {
  min-height: 70px;
}

.appointment-calendar-corner {
  border-right: 1px solid var(--border);
}

.appointment-doctor-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--border);
}

.appointment-doctor-heading:last-child {
  border-right: 0;
}

.appointment-week-day-heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  color: var(--text);
  text-decoration: none;
  border-right: 1px solid var(--border);
}

.appointment-week-day-heading:hover,
.appointment-week-day-heading:focus {
  color: var(--brand);
  background: var(--brand-soft);
}

.appointment-week-day-heading:last-child {
  border-right: 0;
}

.appointment-week-day-heading.is-selected {
  color: var(--brand);
  background: var(--brand-soft);
}

.appointment-week-day-heading.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1px var(--brand-border);
}

.appointment-week-day-name {
  font-size: 0.9rem;
  line-height: 1.15;
}

.appointment-week-day-date {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.15;
}

.appointment-doctor-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.appointment-doctor-avatar--purple {
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
}

.appointment-doctor-avatar--blue {
  color: var(--bs-info);
  background: rgba(var(--bs-info-rgb), 0.12);
  border: 1px solid rgba(var(--bs-info-rgb), 0.24);
}

.appointment-doctor-avatar--green {
  color: var(--success-dark);
  background: rgba(var(--bs-success-rgb), 0.12);
  border: 1px solid rgba(var(--bs-success-rgb), 0.24);
}

.appointment-doctor-avatar--orange {
  color: #a87900;
  background: rgba(var(--bs-warning-rgb), 0.18);
  border: 1px solid rgba(var(--bs-warning-rgb), 0.38);
}

.appointment-doctor-name {
  color: var(--text);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-doctor-room {
  color: var(--muted);
  font-size: 0.84rem;
}

.appointment-time-column,
.appointment-doctor-column {
  min-height: calc(var(--calendar-hour-count) * var(--appointment-hour-height));
}

.appointment-time-column {
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.appointment-time-label {
  height: var(--appointment-hour-height);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.72rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.appointment-doctor-column {
  position: relative;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.appointment-doctor-column:last-child {
  border-right: 0;
}

.appointment-slot-stack {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.appointment-time-slot {
  height: var(--appointment-hour-height);
  border-bottom: 1px solid var(--border);
}

.appointment-cell-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.appointment-cell-link:hover,
.appointment-cell-link:focus {
  background: var(--brand-soft);
  outline: 0;
}

.appointment-event {
  position: absolute;
  z-index: 1;
  top: calc((var(--event-offset) * var(--appointment-minute-height)) + 0.35rem);
  left: 0.55rem;
  right: 0.55rem;
  min-height: 58px;
  height: max(58px, calc((var(--event-duration) * var(--appointment-minute-height)) - 0.7rem));
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.appointment-event:hover,
.appointment-event:focus {
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.appointment-event--success {
  background: rgba(var(--bs-success-rgb), 0.13);
  border-color: rgba(var(--bs-success-rgb), 0.26);
}

.appointment-event--warning {
  background: rgba(var(--bs-warning-rgb), 0.22);
  border-color: rgba(var(--bs-warning-rgb), 0.5);
}

.appointment-event--danger {
  background: rgba(var(--bs-danger-rgb), 0.13);
  border-color: rgba(var(--bs-danger-rgb), 0.28);
}

.appointment-event--info {
  background: rgba(var(--bs-info-rgb), 0.12);
  border-color: rgba(var(--bs-info-rgb), 0.24);
}

.appointment-event--muted {
  background: var(--surface-soft);
  border-color: var(--border);
}

.appointment-event-status {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  line-height: 1;
}

.appointment-event--success .appointment-event-status {
  color: var(--success-dark);
}

.appointment-event--warning .appointment-event-status {
  color: #a87900;
}

.appointment-event--danger .appointment-event-status {
  color: var(--bs-danger);
}

.appointment-event--info .appointment-event-status {
  color: var(--bs-info);
}

.appointment-event-time {
  color: var(--brand-dark);
  font-size: 0.82rem;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-event-patient,
.appointment-event-kind {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-event-patient {
  font-size: 0.88rem;
  line-height: 1.12;
}

.appointment-event-kind {
  font-size: 0.82rem;
  line-height: 1.12;
}

.appointment-week-board .appointment-event {
  padding-left: 0.6rem;
  padding-right: 1.75rem;
}

.appointment-week-board .appointment-event-status {
  right: 0.55rem;
}

.appointment-month-board {
  padding: 0;
}

.appointment-month-weekdays,
.appointment-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
}

.appointment-month-weekdays {
  color: var(--muted);
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border);
}

.appointment-month-weekdays > div {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
}

.appointment-month-weekdays > div:last-child {
  border-right: 0;
}

.appointment-month-grid {
  overflow-x: auto;
}

.appointment-month-day {
  min-height: 132px;
  padding: 0.65rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.appointment-month-day:nth-child(7n) {
  border-right: 0;
}

.appointment-month-day.is-outside {
  background: var(--surface-soft);
  color: var(--muted);
}

.appointment-month-day.is-selected {
  box-shadow: inset 0 0 0 2px var(--brand-border);
}

.appointment-month-day.is-today .appointment-month-day-number {
  color: #fff;
  background: var(--brand);
}

.appointment-month-day-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.appointment-month-day-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
}

.appointment-month-day-number:hover,
.appointment-month-day-number:focus {
  color: var(--brand);
  background: var(--brand-soft);
}

.appointment-month-events {
  display: grid;
  gap: 0.35rem;
}

.appointment-month-event {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.28rem 0.45rem;
  color: var(--text);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem;
  align-items: center;
  text-decoration: none;
}

.appointment-month-event:hover,
.appointment-month-event:focus {
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.appointment-month-event-time {
  color: var(--brand-dark);
  font-size: 0.78rem;
}

.appointment-month-event-patient,
.appointment-month-more-link,
.appointment-month-empty {
  font-size: 0.78rem;
}

.appointment-month-event-patient {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment-month-more-link {
  color: var(--brand);
  text-decoration: none;
}

.appointment-month-more-link:hover,
.appointment-month-more-link:focus {
  color: var(--brand-dark);
  text-decoration: underline;
}

.appointment-month-empty {
  color: var(--muted);
}

.appointment-empty-state {
  min-height: 320px;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 2rem;
}

.appointment-filters-offcanvas {
  --bs-offcanvas-width: 380px;
}

@media (max-width: 1199.98px) {
  .appointment-workspace {
    grid-template-columns: 1fr;
  }

  .appointment-sidebar {
    grid-template-columns: minmax(240px, 360px);
  }
}

@media (min-width: 992px) and (max-width: 1399.98px) {
  .appointment-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .appointment-toolbar-left {
    flex: 1 1 620px;
    flex-wrap: nowrap;
    gap: 0.65rem;
  }

  .appointment-toolbar-actions {
    flex: 1 1 360px;
    justify-content: flex-end;
    gap: 0.55rem;
  }

  .appointment-navigation {
    flex: 0 0 auto;
    gap: 0.45rem;
  }

  .appointment-today-button {
    min-width: 58px;
    padding-right: 0.7rem;
    padding-left: 0.7rem;
  }

  .appointment-view-switch {
    flex: 0 0 auto;
  }

  .appointment-view-switch .btn {
    min-width: 58px;
    padding-right: 0.7rem;
    padding-left: 0.7rem;
  }

  .appointment-date-dropdown {
    flex: 1 0 300px;
    min-width: 300px;
    max-width: 340px;
  }

  .appointment-professional-form {
    flex: 1 1 210px;
    min-width: 190px;
    max-width: 280px;
  }

  .appointment-filter-button {
    min-width: 104px;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }
}

@media (max-width: 991.98px) {
  .appointment-page-header,
  .appointment-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .appointment-toolbar-actions,
  .appointment-toolbar-left,
  .appointment-navigation {
    flex-wrap: wrap;
  }
}

@media (max-width: 575.98px) {
  .appointment-new-button,
  .appointment-filter-button,
  .appointment-today-button {
    width: 100%;
  }

  .appointment-navigation,
  .appointment-toolbar-actions,
  .appointment-professional-form,
  .appointment-date-dropdown,
  .appointment-view-switch {
    width: 100%;
  }

  .appointment-date-dropdown {
    min-width: 0;
    max-width: none;
  }

  .appointment-view-switch .btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .appointment-square-button {
    flex: 0 0 38px;
  }

  .appointment-date-menu {
    width: min(300px, calc(100vw - 2rem));
  }

  .appointment-week-board .appointment-event-kind {
    display: none;
  }
}

@media (max-height: 760px) and (min-width: 992px) {
  .appointment-page {
    --appointment-hour-height: 76px;
  }

  .appointment-page-header {
    margin-bottom: 0.8rem;
  }

  .appointment-page-title {
    font-size: 1.45rem;
  }

  .appointment-page-date,
  .appointment-breadcrumb {
    font-size: 0.84rem;
  }

  .appointment-new-button,
  .appointment-filter-button,
  .appointment-today-button {
    min-height: 34px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .appointment-square-button {
    width: 34px;
    height: 34px;
  }

  .appointment-view-switch .btn {
    min-height: 34px;
    min-width: 64px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .appointment-date-button {
    min-height: 34px;
    font-size: 0.84rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .appointment-calendar-corner,
  .appointment-doctor-heading,
  .appointment-week-day-heading {
    min-height: 58px;
  }

  .appointment-doctor-heading {
    padding: 0.55rem 0.8rem;
  }

  .appointment-doctor-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 1.12rem;
  }

  .appointment-event {
    min-height: 54px;
    height: max(54px, calc((var(--event-duration) * var(--appointment-minute-height)) - 0.6rem));
    padding-top: 0.36rem;
    padding-bottom: 0.36rem;
  }

  .appointment-event-patient {
    font-size: 0.84rem;
  }

  .appointment-event-time,
  .appointment-event-kind {
    font-size: 0.78rem;
  }
}

.document-editor .ql-editor .ql-liquid-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.45rem;
  margin: 0 0.1rem;
  border-radius: 999px;
  border: 1px solid var(--brand-border);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.9em;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.ql-toolbar.ql-snow .ql-picker.ql-size {
  width: 92px;
}

.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item::before {
  content: attr(data-value);
}

.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label:not([data-value])::before,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item:not([data-value])::before,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=""]::before,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=""]::before {
  content: "Padrão";
}

.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="custom"]::before,
.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="custom"]::before {
  content: "Inserir...";
}

.document-editor .ql-editor pre,
.document-editor .ql-editor .ql-code-block-container,
.document-editor .ql-editor .ql-code-block,
.document-editor .ql-editor .ql-highlight-block {
  background-color: #f5e653 !important;
  color: inherit !important;
  font-family: inherit !important;
  white-space: pre-wrap !important;
  padding: 8px 12px !important;
}

.document-editor .ql-editor code {
  background-color: #f5e653 !important;
  color: inherit !important;
  font-family: inherit !important;
  padding: 4px 8px !important;
  border-radius: 3px !important;
  white-space: normal !important;
  text-align: inherit !important;
  line-height: 1.25;
}

.document-editor .ql-editor .ql-code-block-container.ql-align-justify,
.document-editor .ql-editor .ql-code-block.ql-align-justify,
.document-editor .ql-editor .ql-highlight-block.ql-align-justify {
  text-align: justify !important;
}

.document-editor .ql-editor pre strong,
.document-editor .ql-editor .ql-code-block-container strong,
.document-editor .ql-editor .ql-code-block strong,
.document-editor .ql-editor .ql-highlight-block strong {
}

.document-editor .ql-editor pre em,
.document-editor .ql-editor .ql-code-block-container em,
.document-editor .ql-editor .ql-code-block em,
.document-editor .ql-editor .ql-highlight-block em {
  font-style: italic !important;
}

.document-editor .ql-editor pre u,
.document-editor .ql-editor .ql-code-block-container u,
.document-editor .ql-editor .ql-code-block u,
.document-editor .ql-editor .ql-highlight-block u {
  text-decoration: underline !important;
}

.document-editor .ql-editor .ql-font-serif {
  font-family: Georgia, "Times New Roman", Times, serif !important;
}

.document-editor .ql-editor .ql-font-monospace {
  font-family: "Courier New", "Liberation Mono", "DejaVu Sans Mono", monospace !important;
}

.document-preview-panel {
  max-height: 76vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem;
  background: var(--bg);
}

.document-preview-sheet {
  width: 100%;
  max-width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: #fff;
  box-shadow: var(--shadow-md);
  padding: 8mm 14mm 10mm;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
}

.document-preview-sheet .pdf-header-wrap {
  padding: 12px 0 0;
  margin-bottom: 11mm;
}

.document-preview-sheet .pdf-header-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
}

.document-preview-sheet .pdf-header-logo {
  position: absolute;
  left: 0;
  width: 58px;
  height: 58px;
}

.document-preview-sheet .pdf-header-name {
  width: 300px;
  max-width: 72%;
}

.document-preview-sheet .pdf-header-line {
  margin-top: 10px;
  height: 1.5px;
  background: var(--brand);
}

.document-preview-sheet .pdf-content {
  color: #212529;
  font-family: "Times New Roman", Times, serif;
  font-size: 12pt;
  line-height: 1.45;
  position: relative;
  z-index: 2;
  flex: 1;
}

.document-preview-sheet .pdf-content p {
  margin: 0 0 0.45rem;
}

.document-preview-sheet .pdf-content pre,
.document-preview-sheet .pdf-content .ql-code-block-container,
.document-preview-sheet .pdf-content .ql-code-block,
.document-preview-sheet .pdf-content .ql-highlight-block {
  background-color: #f5e653 !important;
  color: inherit !important;
  font-family: inherit !important;
  white-space: pre-wrap !important;
  padding: 8px 12px !important;
}

.document-preview-sheet .pdf-content code {
  background-color: #f5e653 !important;
  color: inherit !important;
  font-family: inherit !important;
  padding: 4px 8px !important;
  border-radius: 3px !important;
  white-space: normal !important;
  text-align: inherit !important;
  line-height: 1.25;
}

.document-preview-sheet .pdf-content .ql-code-block-container.ql-align-justify,
.document-preview-sheet .pdf-content .ql-code-block.ql-align-justify,
.document-preview-sheet .pdf-content .ql-highlight-block.ql-align-justify {
  text-align: justify !important;
}

.document-preview-sheet .pdf-content pre strong,
.document-preview-sheet .pdf-content .ql-code-block-container strong,
.document-preview-sheet .pdf-content .ql-code-block strong,
.document-preview-sheet .pdf-content .ql-highlight-block strong {
}

.document-preview-sheet .pdf-content pre em,
.document-preview-sheet .pdf-content .ql-code-block-container em,
.document-preview-sheet .pdf-content .ql-code-block em,
.document-preview-sheet .pdf-content .ql-highlight-block em {
  font-style: italic !important;
}

.document-preview-sheet .pdf-content pre u,
.document-preview-sheet .pdf-content .ql-code-block-container u,
.document-preview-sheet .pdf-content .ql-code-block u,
.document-preview-sheet .pdf-content .ql-highlight-block u {
  text-decoration: underline !important;
}

.document-preview-sheet .pdf-content .ql-align-center {
  text-align: center;
}

.document-preview-sheet .pdf-content .ql-align-right {
  text-align: right;
}

.document-preview-sheet .pdf-content .ql-align-justify {
  text-align: justify;
}

.document-preview-sheet .pdf-content .ql-font-serif {
  font-family: Georgia, "Times New Roman", Times, serif !important;
}

.document-preview-sheet .pdf-content .ql-font-monospace {
  font-family: "Courier New", "Liberation Mono", "DejaVu Sans Mono", monospace !important;
}

.document-preview-sheet .pdf-content ol {
  counter-reset: ql-list-0 ql-list-1 ql-list-2 ql-list-3 ql-list-4 ql-list-5 ql-list-6 ql-list-7 ql-list-8 ql-list-9;
  margin: 0 0 0.75rem;
  padding-left: 1.8em;
}

.document-preview-sheet .pdf-content ol li {
  list-style-type: none;
  position: relative;
}

.document-preview-sheet .pdf-content ol li::before {
  display: inline-block;
  white-space: nowrap;
  width: 1.4em;
  margin-left: -1.6em;
  margin-right: 0.2em;
  text-align: right;
}

.document-preview-sheet .pdf-content ol li[data-list="bullet"] {
  counter-increment: none;
}

.document-preview-sheet .pdf-content ol li[data-list="bullet"]::before {
  content: "• ";
}

.document-preview-sheet .pdf-content ol li:not([class*="ql-indent-"]):not([data-list="bullet"]) {
  counter-reset: ql-list-1 ql-list-2 ql-list-3 ql-list-4 ql-list-5 ql-list-6 ql-list-7 ql-list-8 ql-list-9;
  counter-increment: ql-list-0;
}

.document-preview-sheet .pdf-content ol li:not([class*="ql-indent-"]):not([data-list="bullet"])::before { content: counter(ql-list-0, decimal) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-1:not([data-list="bullet"]) { counter-reset: ql-list-2 ql-list-3 ql-list-4 ql-list-5 ql-list-6 ql-list-7 ql-list-8 ql-list-9; counter-increment: ql-list-1; }
.document-preview-sheet .pdf-content ol li.ql-indent-1:not([data-list="bullet"])::before { content: counter(ql-list-1, lower-alpha) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-2:not([data-list="bullet"]) { counter-reset: ql-list-3 ql-list-4 ql-list-5 ql-list-6 ql-list-7 ql-list-8 ql-list-9; counter-increment: ql-list-2; }
.document-preview-sheet .pdf-content ol li.ql-indent-2:not([data-list="bullet"])::before { content: counter(ql-list-2, lower-roman) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-3:not([data-list="bullet"]) { counter-reset: ql-list-4 ql-list-5 ql-list-6 ql-list-7 ql-list-8 ql-list-9; counter-increment: ql-list-3; }
.document-preview-sheet .pdf-content ol li.ql-indent-3:not([data-list="bullet"])::before { content: counter(ql-list-3, decimal) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-4:not([data-list="bullet"]) { counter-reset: ql-list-5 ql-list-6 ql-list-7 ql-list-8 ql-list-9; counter-increment: ql-list-4; }
.document-preview-sheet .pdf-content ol li.ql-indent-4:not([data-list="bullet"])::before { content: counter(ql-list-4, lower-alpha) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-5:not([data-list="bullet"]) { counter-reset: ql-list-6 ql-list-7 ql-list-8 ql-list-9; counter-increment: ql-list-5; }
.document-preview-sheet .pdf-content ol li.ql-indent-5:not([data-list="bullet"])::before { content: counter(ql-list-5, lower-roman) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-6:not([data-list="bullet"]) { counter-reset: ql-list-7 ql-list-8 ql-list-9; counter-increment: ql-list-6; }
.document-preview-sheet .pdf-content ol li.ql-indent-6:not([data-list="bullet"])::before { content: counter(ql-list-6, decimal) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-7:not([data-list="bullet"]) { counter-reset: ql-list-8 ql-list-9; counter-increment: ql-list-7; }
.document-preview-sheet .pdf-content ol li.ql-indent-7:not([data-list="bullet"])::before { content: counter(ql-list-7, lower-alpha) ". "; }
.document-preview-sheet .pdf-content ol li.ql-indent-8:not([data-list="bullet"]) { counter-reset: ql-list-9; counter-increment: ql-list-8; }
.document-preview-sheet .pdf-content ol li.ql-indent-8:not([data-list="bullet"])::before { content: counter(ql-list-8, lower-roman) ". "; }

.document-preview-sheet .pdf-content .ql-indent-1 { padding-left: 3em; }
.document-preview-sheet .pdf-content .ql-indent-2 { padding-left: 6em; }
.document-preview-sheet .pdf-content .ql-indent-3 { padding-left: 9em; }
.document-preview-sheet .pdf-content .ql-indent-4 { padding-left: 12em; }
.document-preview-sheet .pdf-content .ql-indent-5 { padding-left: 15em; }
.document-preview-sheet .pdf-content .ql-indent-6 { padding-left: 18em; }
.document-preview-sheet .pdf-content .ql-indent-7 { padding-left: 21em; }
.document-preview-sheet .pdf-content .ql-indent-8 { padding-left: 24em; }

.document-preview-sheet .pdf-content table th,
.document-preview-sheet .pdf-content table td {
  font-size: inherit;
}

.document-preview-sheet .pdf-content table th span,
.document-preview-sheet .pdf-content table th strong,
.document-preview-sheet .pdf-content table th em,
.document-preview-sheet .pdf-content table th u,
.document-preview-sheet .pdf-content table th b,
.document-preview-sheet .pdf-content table th i,
.document-preview-sheet .pdf-content table th small,
.document-preview-sheet .pdf-content table th a,
.document-preview-sheet .pdf-content table td span,
.document-preview-sheet .pdf-content table td strong,
.document-preview-sheet .pdf-content table td em,
.document-preview-sheet .pdf-content table td u,
.document-preview-sheet .pdf-content table td b,
.document-preview-sheet .pdf-content table td i,
.document-preview-sheet .pdf-content table td small,
.document-preview-sheet .pdf-content table td a {
  font-size: inherit !important;
}

.document-preview-sheet .liquid-page-break {
  border-top: 2px dashed var(--border);
  margin: 1.1rem 0;
  height: 0;
  page-break-before: always;
  break-before: page;
  position: relative;
}

.document-preview-sheet .liquid-page-break::after {
  content: "Quebra de página";
  position: relative;
  top: -0.75rem;
  display: inline-block;
  padding: 0 0.35rem;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
}

.document-preview-sheet .pdf-footer-wrap {
  margin-top: 8mm;
  text-align: center;
  color: #303030;
  font-size: 12px;
  line-height: 1.35;
  position: relative;
  z-index: 1;
}

.app-flash {
  border-left: 4px solid transparent;
  color: #0f172a;
  padding: 0.9rem 2.9rem 0.9rem 1rem;
}

.app-flash .btn-close {
  top: 0.75rem;
  right: 0.75rem;
}

.app-flash__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2rem;
}

.app-flash__title {
  margin-bottom: 0.2rem;
}

.app-flash__message {
  margin: 0;
}

.app-flash--success {
  background: linear-gradient(130deg, #eaf9f0 0%, #ddf3e6 100%);
  border-left-color: var(--card-accent-success);
  color: #0f5132;
}

.app-flash--success .app-flash__icon {
  background: rgba(var(--bs-success-rgb), 0.16);
  color: var(--bs-success);
}

.app-flash--danger {
  background: linear-gradient(130deg, #fdecef 0%, #fbdde2 100%);
  border-left-color: var(--card-accent-danger);
  color: #842029;
}

.app-flash--danger .app-flash__icon {
  background: rgba(220, 53, 69, 0.16);
  color: #b02a37;
}

.app-flash--warning {
  background: linear-gradient(130deg, #fff8e2 0%, #fff2cc 100%);
  border-left-color: var(--card-accent-warning);
  color: #664d03;
}

.app-flash--warning .app-flash__icon {
  background: rgba(240, 173, 0, 0.2);
  color: #8a5a00;
}

.app-flash--info {
  background: linear-gradient(130deg, #e9f5ff 0%, #d8edff 100%);
  border-left-color: var(--card-accent-primary);
  color: var(--brand-dark);
}

.app-flash--info .app-flash__icon {
  background: rgba(var(--bs-primary-rgb), 0.16);
  color: var(--brand);
}

.doctor-calendar-table-wrapper {
  overflow-x: hidden;
}

.doctor-calendar-table {
  width: 100%;
  table-layout: fixed;
}

.doctor-calendar-table th,
.doctor-calendar-table td {
  width: 14.285%;
}

.doctor-calendar-table th {
  font-size: 0.78rem;
  white-space: nowrap;
}

.doctor-calendar-cell {
  vertical-align: top;
  padding: 0.625rem;
  height: 170px;
}

.doctor-calendar-cell-empty {
  height: 170px;
}

.doctor-calendar-cell .small,
.doctor-calendar-cell .badge {
  overflow-wrap: anywhere;
}

.doctor-calendar-event {
  overflow: hidden;
  padding: 0.625rem;
  min-height: 84px;
}

.doctor-calendar-event-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.doctor-calendar-event-patient {
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.doctor-calendar-event-procedures {
  line-height: 1.3;
}

.doctor-calendar-event .badge {
  max-width: 100%;
  white-space: normal;
}

.doctor-calendar-month-picker-form {
  margin-bottom: 0;
}

.doctor-calendar-month-input {
  min-width: 150px;
}

.doctor-calendar-month-focus-badge {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid var(--brand-border);
  letter-spacing: 0.01em;
}

.doctor-calendar-period-label {
  color: var(--muted);
}

.doctor-calendar-cell-today {
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 2px var(--brand-border);
}

.doctor-calendar-cell-outside-month {
  background: var(--surface-soft);
}

.doctor-calendar-day-label {
  letter-spacing: 0.01em;
}

.doctor-calendar-day-label-today {
  color: var(--brand);
}

.doctor-calendar-today-badge {
  background: var(--brand);
  color: #fff;
}

/* Cubo Mágico Software: identidade visual compartilhada para a operação clínica. */
:root {
  --bs-font-sans-serif: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --bs-primary: #145c9e;
  --bs-primary-rgb: 20, 92, 158;
  --bs-success: #00a98f;
  --bs-success-rgb: 0, 169, 143;
  --bs-info: #2f9bc8;
  --bs-info-rgb: 47, 155, 200;
  --bs-warning: #e8bd55;
  --bs-warning-rgb: 232, 189, 85;
  --bs-danger: #c94b62;
  --bs-danger-rgb: 201, 75, 98;
  --bs-body-bg: #eef5f7;
  --bs-body-color: #24313f;
  --bs-border-color: #d7e4e8;
  --bs-link-color: var(--bs-primary);
  --bs-link-hover-color: #0f416f;

  --brand: #145c9e;
  --brand-dark: #0f416f;
  --brand-deep: #102f4c;
  --brand-soft: #eaf4fb;
  --brand-border: #bed8ed;
  --success: #00a98f;
  --success-dark: #007f73;
  --care: #effaf7;
  --care-border: #c9eee4;
  --amber-soft: #fff7df;
  --card-accent-primary: color-mix(in srgb, var(--brand) 24%, #fff);
  --card-accent-success: color-mix(in srgb, var(--success) 24%, #fff);
  --card-accent-danger: color-mix(in srgb, var(--bs-danger) 24%, #fff);
  --card-accent-warning: color-mix(in srgb, var(--bs-warning) 42%, #fff);
  --card-accent-info: color-mix(in srgb, var(--bs-info) 24%, #fff);
  --card-accent-muted: color-mix(in srgb, var(--muted) 18%, #fff);
  --ink: #24313f;
  --muted: #69798a;
  --bg: #eef5f7;
  --surface: #ffffff;
  --surface-soft: #f7fbfb;
  --surface-tint: #f0f8f7;
  --border: #d7e4e8;
  --card-shadow: var(--shadow-xs);
  --card-shadow-hover: var(--shadow-sm);
}

html {
  background: var(--bg);
}

body {
  color: var(--ink);
  font-family: var(--bs-font-sans-serif);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

a {
  text-underline-offset: 0.16em;
}

.admin-body {
  background: var(--bg);
}

.admin-shell .admin-main {
  background: var(--bg);
}

.admin-main-container {
  width: min(100%, 92rem);
}

.admin-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(20, 92, 158, 0.12);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.admin-workspace-brandline,
.admin-workspace-context {
  display: flex;
  align-items: center;
  min-width: 0;
}

.admin-workspace-brandline {
  gap: 0.75rem;
}

.admin-workspace-mark {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  flex: 0 0 2.45rem;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--success));
  box-shadow: var(--shadow-sm);
}

.admin-workspace-heading {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.admin-workspace-kicker {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-workspace-title {
  overflow: hidden;
  color: var(--brand-deep);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-workspace-context {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.admin-workspace-context span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 2rem;
  padding: 0.32rem 0.6rem;
  border: 1px solid rgba(20, 92, 158, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-workspace-context i {
  color: var(--success-dark);
}

.admin-mobile-header {
  border-color: rgba(20, 92, 158, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

.admin-page > .container,
.admin-page form.container {
  max-width: 100%;
  padding-right: 0;
  padding-left: 0;
}

.admin-page h1,
.admin-page .h1,
.admin-page h2,
.admin-page .h2 {
  color: var(--brand-deep);
  font-weight: 800;
}

.admin-page h1.h4,
.admin-page .h4 {
  color: var(--brand-deep);
  font-weight: 800;
}

.admin-page .text-muted {
  color: var(--muted) !important;
}

.admin-page .card,
.admin-page .list-group,
.appointment-side-panel,
.appointment-board {
  border-color: rgba(20, 92, 158, 0.13) !important;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.admin-page .table-responsive {
  border-color: rgba(20, 92, 158, 0.13) !important;
  border-radius: 8px;
}

.admin-page .card .table-responsive {
  border: 0 !important;
  border-radius: 0;
  box-shadow: none;
}

.admin-page .card.border-0,
.admin-page .list-group.border-0 {
  border: 1px solid rgba(20, 92, 158, 0.13) !important;
}

.admin-page .card {
  overflow: hidden;
}

.admin-page a.card {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.admin-page a.card:hover,
.admin-page a.card:focus {
  border-color: rgba(var(--bs-success-rgb), 0.38) !important;
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.admin-page .card-header {
  background: var(--surface-soft) !important;
  border-bottom-color: rgba(20, 92, 158, 0.1);
}

.admin-page .card-footer {
  background: var(--surface-soft) !important;
  border-top-color: rgba(20, 92, 158, 0.1);
}

.admin-page .card .h4,
.admin-page .card .fs-4 {
  color: var(--brand);
  font-weight: 800;
}

.schedule-table-row {
  cursor: pointer;
}

.schedule-table-row:focus {
  outline: 2px solid var(--brand-border);
  outline-offset: -2px;
}

.schedules-table .schedule-category-column {
  min-width: 8.5rem;
  white-space: nowrap;
}

.admin-page .card i.text-primary,
.admin-page .text-primary {
  color: var(--brand) !important;
}

.admin-page .table {
  --bs-table-bg: var(--surface);
  --bs-table-striped-bg: var(--surface-soft);
  --bs-table-hover-bg: var(--care);
  --bs-table-border-color: rgba(20, 92, 158, 0.1);
  color: var(--ink);
  margin-bottom: 0;
}

.admin-page .table thead,
.admin-page .table .table-light,
.admin-page thead.table-light {
  --bs-table-bg: #f3f9f9;
  --bs-table-color: var(--brand-deep);
  color: var(--brand-deep);
}

.admin-page .table th {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-page .table td {
  color: var(--ink);
}

.admin-page .list-group-item {
  border-color: rgba(20, 92, 158, 0.1);
}

.form-label {
  color: var(--brand-deep);
  font-weight: 700;
}

.form-control,
.form-select,
.input-group-text {
  border-color: rgba(20, 92, 158, 0.16);
  border-radius: 7px;
}

.input-group > .form-control,
.input-group > .form-select,
.input-group > .input-group-text {
  border-radius: 0;
}

.input-group > :first-child {
  border-top-left-radius: 7px;
  border-bottom-left-radius: 7px;
}

.input-group > :last-child {
  border-top-right-radius: 7px;
  border-bottom-right-radius: 7px;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(var(--bs-success-rgb), 0.72);
  box-shadow: var(--shadow-focus);
}

.form-check-input:checked {
  background-color: var(--success);
  border-color: var(--success);
}

.btn {
  border-radius: 7px;
  font-weight: 700;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: rgba(var(--bs-primary-rgb), 0.42);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
}

.badge {
  font-weight: 750;
}

.app-flash {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-left-width: 4px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.app-flash__copy {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
  padding-right: 1.6rem;
}

.app-flash__title,
.app-flash__message {
  display: block;
  overflow-wrap: anywhere;
}

.app-flash__title {
  font-size: 0.9rem;
  line-height: 1.2;
}

.app-flash__message {
  font-size: 0.92rem;
  line-height: 1.35;
}

.app-flash__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 7px;
}

.app-flash--success {
  background: linear-gradient(90deg, #effaf4, #f8fffc);
  border-color: rgba(var(--bs-success-rgb), 0.26);
  border-left-color: var(--card-accent-success);
}

.app-flash--danger {
  background: linear-gradient(90deg, #fff1f3, #fffafa);
  border-color: rgba(var(--bs-danger-rgb), 0.24);
  border-left-color: var(--card-accent-danger);
}

.app-flash--warning {
  background: linear-gradient(90deg, var(--amber-soft), #fffdf5);
  border-color: rgba(var(--bs-warning-rgb), 0.36);
  border-left-color: var(--card-accent-warning);
}

.app-flash--info {
  background: linear-gradient(90deg, var(--brand-soft), #f9fcff);
  border-color: rgba(var(--bs-primary-rgb), 0.22);
  border-left-color: var(--card-accent-primary);
}

.queue-panel-page {
  background:
    linear-gradient(180deg, #f7fcfc 0, var(--care) 42%, #eaf4fb 100%);
}

.queue-panel-logo-frame,
.queue-current-call,
.queue-recent-card {
  border-color: rgba(20, 92, 158, 0.14);
  box-shadow: var(--card-shadow);
}

.queue-current-call {
  border-top: 5px solid var(--card-accent-success);
}

.queue-panel-kicker,
.queue-current-label {
  color: var(--success-dark);
}

.queue-panel-header h1,
.queue-recent-header h2,
.queue-current-name {
  color: var(--brand-deep);
}

.queue-recent-header .queue-panel-kicker {
  color: rgba(255, 255, 255, 0.72);
}

.queue-recent-header h2 {
  color: #fff;
}

.public-panel-body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

.dashboard-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 8.35rem;
  overflow: hidden;
  padding: clamp(1.2rem, 2.4vw, 1.55rem);
  border: 1px solid #cfe7df;
  border-radius: 8px;
  background:
    linear-gradient(115deg, #ffffff 0%, #ffffff 38%, #f8fdfb 64%, #edf9f4 100%);
  box-shadow: var(--card-shadow);
}

.dashboard-hero::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    linear-gradient(118deg, transparent 0 15%, rgba(255, 255, 255, 0.72) 15% 29%, transparent 29% 51%, rgba(255, 255, 255, 0.58) 51% 63%, transparent 63% 100%),
    linear-gradient(118deg, transparent 0 71%, rgba(0, 195, 160, 0.055) 71% 82%, transparent 82% 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(245, 253, 250, 0.9) 56%, rgba(229, 245, 239, 0.82) 100%);
}

.dashboard-hero-watermark {
  position: absolute;
  top: 50%;
  right: clamp(-1.25rem, -1vw, -0.35rem);
  z-index: 0;
  width: clamp(16rem, 28vw, 24rem);
  max-width: 42%;
  height: auto;
  opacity: 0.105;
  transform: translateY(-50%);
  filter: invert(58%) sepia(16%) saturate(560%) hue-rotate(116deg) brightness(88%) contrast(86%);
  pointer-events: none;
}

.dashboard-hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  max-width: min(58rem, 64%);
}

.dashboard-hero-icon,
.dashboard-action-icon,
.dashboard-metric-icon,
.support-dashboard-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
}

.dashboard-hero-icon {
  width: 3.1rem;
  height: 3.1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--success));
  font-size: 1.35rem;
}

.dashboard-hero-copy {
  min-width: 0;
}

.dashboard-hero-eyebrow,
.dashboard-metric-hint,
.dashboard-action-description {
  color: var(--muted);
}

.dashboard-hero-eyebrow {
  margin-bottom: 0.45rem;
  color: var(--success-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-hero h1 {
  margin: 0;
  color: color-mix(in srgb, var(--brand-dark) 72%, #10251e);
  font-size: clamp(2rem, 3.4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.05;
}

.dashboard-hero-meta {
  max-width: 48rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 500;
}

.dashboard-hero-description {
  max-width: 48rem;
  margin: 0.35rem 0 0;
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  font-size: 0.95rem;
}

.dashboard-hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  max-width: min(38rem, 50%);
}

.dashboard-hero-live-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.45rem;
  padding: 0.55rem 0.9rem;
  gap: 0.45rem;
  color: #1f5138;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #cde9de;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-hero-live-dot {
  display: inline-block;
  width: 0.58rem;
  height: 0.58rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #2ed6a3;
  box-shadow: 0 0 0 0.25rem rgba(46, 214, 163, 0.16);
}

.dashboard-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.58rem 0.95rem;
  color: #fff;
  background: #2a7c55;
  border: 1px solid #2a7c55;
  border-radius: 8px;
  box-shadow: 0 10px 20px -14px rgba(42, 124, 85, 0.65);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-hero-cta:hover,
.dashboard-hero-cta:focus {
  color: #fff;
  background: #236846;
  border-color: #236846;
  text-decoration: none;
}

.dashboard-hero-cta:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(46, 214, 163, 0.25), 0 10px 20px -14px rgba(42, 124, 85, 0.65);
}

.dashboard-metric {
  --metric-accent: var(--brand);
  --metric-accent-soft: var(--brand-soft);
  --metric-accent-border: var(--brand-border);
  position: relative;
  overflow: hidden;
}

.dashboard-metric::before {
  position: absolute;
  inset: 0 0 auto;
  height: 0.38rem;
  content: "";
  background: linear-gradient(90deg, var(--metric-accent-border), var(--metric-accent-soft));
}

.dashboard-metric::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, var(--metric-accent-soft) 0%, rgba(255, 255, 255, 0) 42%);
  opacity: 0.32;
  pointer-events: none;
}

.dashboard-metric--primary {
  --metric-accent: var(--brand);
  --metric-accent-soft: color-mix(in srgb, var(--brand) 6%, #fff);
  --metric-accent-border: var(--card-accent-primary);
}

.dashboard-metric--success {
  --metric-accent: var(--success);
  --metric-accent-soft: color-mix(in srgb, var(--success) 7%, #fff);
  --metric-accent-border: var(--card-accent-success);
}

.dashboard-metric--warning {
  --metric-accent: #d99a00;
  --metric-accent-soft: color-mix(in srgb, #f0ad00 8%, #fff);
  --metric-accent-border: var(--card-accent-warning);
}

.dashboard-metric--danger {
  --metric-accent: var(--bs-danger);
  --metric-accent-soft: color-mix(in srgb, var(--bs-danger) 6%, #fff);
  --metric-accent-border: var(--card-accent-danger);
}

.dashboard-metric--info {
  --metric-accent: var(--bs-info);
  --metric-accent-soft: color-mix(in srgb, var(--bs-info) 7%, #fff);
  --metric-accent-border: var(--card-accent-info);
}

.dashboard-metric--muted {
  --metric-accent: var(--muted);
  --metric-accent-soft: color-mix(in srgb, var(--muted) 6%, #fff);
  --metric-accent-border: var(--card-accent-muted);
}

.dashboard-metric .card-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.55rem;
  padding-top: 1.15rem;
}

.dashboard-metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-metric-icon {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 1.05rem;
}

.dashboard-metric-icon--primary,
.dashboard-action-icon--primary {
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
}

.dashboard-metric-icon--success,
.dashboard-action-icon--success {
  color: var(--success-dark);
  background: var(--care);
  border: 1px solid var(--care-border);
}

.dashboard-metric-icon--warning,
.dashboard-action-icon--warning {
  color: #8a5a00;
  background: var(--amber-soft);
  border: 1px solid rgba(var(--bs-warning-rgb), 0.42);
}

.dashboard-metric-icon--danger,
.dashboard-action-icon--danger {
  color: var(--bs-danger);
  background: #fff1f3;
  border: 1px solid rgba(var(--bs-danger-rgb), 0.24);
}

.dashboard-metric-icon--muted,
.dashboard-action-icon--muted {
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.dashboard-metric-value {
  color: var(--brand-deep);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  font-weight: 800;
  line-height: 1;
  text-align: right;
}

.dashboard-metric-label,
.dashboard-action-title {
  color: var(--brand-deep);
  font-weight: 800;
  line-height: 1.2;
}

.dashboard-metric-hint,
.dashboard-action-description {
  font-size: 0.86rem;
  line-height: 1.35;
}

.dashboard-check-in-table {
  width: 100%;
  table-layout: fixed;
}

.dashboard-check-in-responsive {
  overflow-x: hidden;
}

.dashboard-check-in-table th {
  font-size: 0.76rem;
  line-height: 1.15;
  white-space: nowrap;
}

.dashboard-check-in-table td {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-check-in-table--compact th,
.dashboard-check-in-table--compact td {
  padding-right: 0.45rem;
  padding-left: 0.45rem;
}

.dashboard-check-in-time {
  width: 10%;
  white-space: nowrap;
}

.dashboard-check-in-coverage {
  width: 12%;
}

.dashboard-check-in-status {
  width: 14%;
  white-space: nowrap;
}

.dashboard-check-in-table th:last-child,
.dashboard-check-in-action {
  width: 13%;
}

.dashboard-check-in-table--compact th:nth-child(2),
.dashboard-check-in-table--compact td:nth-child(2) {
  width: 30%;
}

.dashboard-check-in-table--compact th:nth-child(3),
.dashboard-check-in-table--compact td:nth-child(3) {
  width: 19%;
}

.dashboard-check-in-table--compact .dashboard-check-in-coverage {
  width: 13%;
}

.dashboard-check-in-table--compact .dashboard-check-in-status {
  width: 13%;
}

.dashboard-check-in-table--compact th:last-child,
.dashboard-check-in-table--compact .dashboard-check-in-action {
  width: 12%;
}

.dashboard-check-in-action form {
  display: inline-block;
  margin: 0;
}

.dashboard-check-in-action .btn {
  min-width: 4.5rem;
  white-space: nowrap;
}

.dashboard-check-in-table--compact .dashboard-check-in-action .btn {
  min-width: 4.125rem;
  padding-right: 0.55rem;
  padding-left: 0.55rem;
}

.dashboard-action-grid,
.dashboard-action-stack {
  display: grid;
  gap: 0.75rem;
}

.dashboard-action-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-action-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 5.5rem;
  padding: 0.9rem;
  border: 1px solid rgba(20, 92, 158, 0.13);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
  box-shadow: var(--card-shadow);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-action-card:hover,
.dashboard-action-card:focus {
  color: var(--ink);
  border-color: rgba(var(--bs-success-rgb), 0.38);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.dashboard-action-icon {
  width: 2.4rem;
  height: 2.4rem;
}

.dashboard-action-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.dashboard-action-arrow {
  color: var(--muted);
}

.support-dashboard-panel {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.support-dashboard-icon {
  width: 2.6rem;
  height: 2.6rem;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
}

@media (max-width: 991.98px) {
  .admin-workspace-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-workspace-context {
    justify-content: flex-start;
  }

  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-hero-main,
  .dashboard-hero-actions {
    width: 100%;
    max-width: 100%;
  }

  .dashboard-hero-actions {
    justify-content: flex-start;
  }

  .dashboard-hero-watermark {
    right: -2.75rem;
    width: 15rem;
    max-width: 58%;
    opacity: 0.09;
  }

  .dashboard-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .admin-workspace-context span {
    width: 100%;
  }

  .admin-workspace-kicker,
  .admin-workspace-title {
    white-space: normal;
  }

  .dashboard-hero-main,
  .support-dashboard-panel {
    flex-direction: column;
  }

  .dashboard-hero {
    min-height: 0;
  }

  .dashboard-hero h1 {
    font-size: 2rem;
  }

  .dashboard-hero-watermark {
    right: -4rem;
    width: 13rem;
    max-width: 80%;
  }

  .dashboard-hero-live-pill,
  .dashboard-hero-actions .btn,
  .dashboard-hero-cta {
    width: 100%;
  }

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