/* DocLedger shared UI components */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rise {
  animation: rise 0.4s ease both;
}

.glass-panel {
  background: var(--glass-fill);
  border: var(--glass-border);
  border-radius: var(--radius-2xl);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-panel);
}

.brand-hero,
.site-header-brand {
  background: var(--brand);
  color: var(--brand-ink);
}

.brand-hero a,
.site-header-brand a {
  color: var(--brand-ink);
}

.heading-display {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--leading-head);
}

.stat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 172px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--brand) 10%, #fff) 0%,
      #fff 52%
    );
  border: 1px solid color-mix(in srgb, var(--brand) 14%, #fff);
  box-shadow:
    0 20px 36px -26px color-mix(in srgb, var(--brand) 55%, transparent),
    0 2px 8px rgba(32, 30, 29, 0.05);
  padding: var(--space-8) var(--space-6) var(--space-8);
  padding-inline-start: calc(var(--space-6) + 8px);
  height: 100%;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset-block: 16px;
  inset-inline-start: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--brand);
}

[dir="rtl"] .stat-card::before {
  border-radius: 999px 0 0 999px;
}

.stat-card__label {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

.stat-card__value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  color: var(--brand);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.3em;
  row-gap: 2px;
}

.stat-card__value--lg {
  font-size: 36px;
}

.stat-card__amount {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.stat-card__unit {
  flex: none;
  font-size: 0.48em;
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand);
  white-space: nowrap;
}

.stat-card__hint {
  color: var(--color-text-3);
  font-size: 12px;
  margin-top: var(--space-2);
}

.period-chips-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.period-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.period-chips-bar__range {
  margin: 0;
  margin-inline-start: auto;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

@media (max-width: 767.98px) {
  .stat-card {
    min-height: 140px;
    padding: var(--space-6) var(--space-4);
    padding-inline-start: calc(var(--space-4) + 8px);
  }

  .stat-card__value {
    flex-direction: column;
    align-items: stretch;
    font-size: 20px;
  }

  .stat-card__value--lg {
    font-size: 22px;
  }

  .stat-card__amount {
    width: 100%;
  }

  .stat-card__unit {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.82;
  }

  .period-chips-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .period-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .period-chip {
    width: 100%;
    justify-content: center;
  }

  .period-chips-bar__range {
    margin-inline-start: 0;
    width: 100%;
  }
}

.period-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--neutral-300);
  background: rgba(255, 255, 255, 0.55);
  color: var(--color-text-2);
  border-radius: var(--radius-sm);
  min-height: 44px;
  padding: 0 var(--space-3);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
}

.period-chip i {
  font-size: 0.85em;
}

.period-chip.is-active,
.period-chip[aria-pressed="true"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge--success {
  background: rgba(223, 246, 238, 0.6);
  color: #0b6b52;
}

.status-badge--warning {
  background: rgba(253, 241, 219, 0.65);
  color: #8a5407;
}

.status-badge--danger {
  background: rgba(255, 241, 244, 0.65);
  color: var(--magenta-700);
}

.status-badge--info {
  background: var(--accent-100);
  color: var(--accent-800);
}

.status-badge--muted {
  background: rgba(255, 255, 255, 0.5);
  color: var(--color-text-2);
}

.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-3);
}

.empty-state__icon {
  width: 72px;
  height: 72px;
  margin-inline: auto;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-xl);
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--accent-200), var(--accent-300));
  color: var(--accent-800);
  font-size: 1.75rem;
}

.empty-state__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.empty-state__text {
  margin: 0;
  font-size: 14px;
}

.upload-dropzone {
  border: 2px dashed var(--accent-400);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.45);
  padding: var(--space-8) var(--space-4);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragover {
  background: var(--accent-100);
  border-color: var(--color-accent);
}

.upload-dropzone.has-file {
  border-style: solid;
  border-color: var(--accent-300);
  background: rgba(255, 255, 255, 0.7);
  padding: var(--space-4);
  text-align: start;
  cursor: default;
}

.upload-dropzone.has-file:hover {
  background: rgba(255, 255, 255, 0.78);
}

.upload-dropzone.has-file.is-dragover {
  background: var(--accent-100);
  border-color: var(--color-accent);
  cursor: copy;
}

.upload-dropzone__icon {
  width: 62px;
  height: 62px;
  margin-inline: auto;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-xl);
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--accent-200), var(--accent-300));
  color: var(--accent-800);
  font-size: 1.5rem;
}

.upload-dropzone__title {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.upload-dropzone__hint {
  color: var(--color-muted);
  font-size: 12px;
  margin: 0;
}

.upload-dropzone__selected {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3);
}

.upload-dropzone__file-icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, var(--accent-200), var(--accent-300));
  color: var(--accent-800);
  font-size: 1.35rem;
}

.upload-dropzone__file-meta {
  flex: 1 1 12rem;
  min-width: 0;
}

.upload-dropzone__file-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0.55rem;
  line-height: 1.4;
  word-break: break-word;
}

.upload-dropzone__file-details {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.upload-dropzone__file-details > div {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.85rem;
}

.upload-dropzone__file-details dt {
  margin: 0;
  color: var(--color-text-3);
  font-weight: 500;
}

.upload-dropzone__file-details dd {
  margin: 0;
  color: var(--color-text);
  font-weight: 600;
}

.upload-dropzone__change {
  margin-inline-start: auto;
  align-self: flex-start;
}

.upload-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.otp-input-group {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  direction: ltr;
}

.otp-input-group input {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-300);
  background: rgba(255, 255, 255, 0.8);
}

.otp-input-group input:focus {
  border-color: var(--color-accent);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Bottom sheet (mobile confirms) */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(32, 30, 29, 0.45);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.bottom-sheet-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.bottom-sheet {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1055;
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  box-shadow: var(--shadow-panel);
  padding: var(--space-4);
  transform: translateY(110%);
  transition: transform 0.25s ease;
  max-height: 85vh;
  overflow: auto;
}

.bottom-sheet.is-open {
  transform: translateY(0);
}

.bottom-sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--neutral-300);
  margin: 0 auto var(--space-4);
}

.bottom-sheet__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: var(--space-2);
}

.bottom-sheet__body {
  color: var(--color-text-2);
  margin-bottom: var(--space-4);
}

.bottom-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media (min-width: 768px) {
  .bottom-sheet-backdrop,
  .bottom-sheet {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  .modal {
    /* Prefer bottom sheet on phone; modal host still exists for Bootstrap JS */
  }
}

/* Doctor shell */
.doctor-shell {
  min-height: 100vh;
  padding-bottom: 88px;
}

.doctor-header {
  --header-glow: color-mix(in srgb, var(--brand) 40%, #99e0ff);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--brand);
  color: var(--brand-ink);
  padding: var(--space-4) var(--space-4) var(--space-6);
}

@media (max-width: 767.98px) {
  .doctor-header {
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(
      165deg,
      color-mix(in srgb, var(--brand) 28%, #0a303e) 0%,
      color-mix(in srgb, var(--brand) 72%, #004961) 58%,
      var(--brand) 100%
    );
  }
}

.doctor-header__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-atmosphere {
  display: none;
}

@media (max-width: 767.98px) {
  .header-atmosphere {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
  }
}

.header-atmosphere__glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(
    90% 80% at 78% 20%,
    color-mix(in srgb, var(--header-glow) 38%, transparent),
    transparent 62%
  );
  animation: loginGlowSoft 10s ease-in-out infinite;
}

.header-atmosphere__sweep {
  position: absolute;
  top: -30%;
  bottom: -30%;
  left: 0;
  width: 110px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0)
  );
  filter: blur(12px);
  animation: loginSweepLight 14s ease-in-out infinite;
}

.header-atmosphere__motes {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.header-atmosphere__motes span {
  position: absolute;
  left: var(--mx);
  bottom: var(--mb);
  width: var(--ms);
  height: var(--ms);
  border-radius: 50%;
  background: color-mix(in srgb, var(--header-glow) 85%, transparent);
  animation: headerMoteDrift 22s linear var(--md, 0s) infinite;
}

.header-atmosphere__orb {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.08);
  animation: headerOrbPulse 12s ease-in-out infinite;
}

.header-atmosphere__orb--1 {
  width: 92px;
  height: 92px;
  left: -18px;
  top: -28px;
  opacity: 0.55;
}

.header-atmosphere__orb--2 {
  width: 58px;
  height: 58px;
  right: 18%;
  bottom: -22px;
  opacity: 0.4;
  animation-delay: -4s;
}

.header-atmosphere__tile {
  position: absolute;
  animation: loginTileFloat 16s ease-in-out infinite;
}

.header-atmosphere__tile--1 {
  width: 64px;
  height: 76px;
  left: -12px;
  bottom: -22px;
  animation-delay: 0s;
}

.header-atmosphere__tile--2 {
  width: 52px;
  height: 58px;
  right: -10px;
  top: -16px;
  animation-delay: -5s;
}

.header-atmosphere__tile--3 {
  width: 40px;
  height: 44px;
  left: 38%;
  bottom: -12px;
  opacity: 0.85;
  animation-delay: -9s;
}

.header-atmosphere__face {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
}

.header-atmosphere__face::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    90% 70% at 30% 20%,
    color-mix(in srgb, var(--header-glow) 40%, transparent),
    transparent 70%
  );
}

.header-atmosphere__shine {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 42%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.26), transparent);
  filter: blur(2px);
  animation: loginTileShine 12s ease-in-out infinite;
}

.header-atmosphere__tile--2 .header-atmosphere__shine { animation-delay: 3s; }
.header-atmosphere__tile--3 .header-atmosphere__shine { animation-delay: 6s; }

.header-atmosphere__face i {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.78);
}

.header-atmosphere__tile--1 i { font-size: 28px; }
.header-atmosphere__tile--2 i { font-size: 22px; }
.header-atmosphere__tile--3 i { font-size: 16px; }

@keyframes headerMoteDrift {
  0% { transform: translateY(16px); opacity: 0; }
  18% { opacity: 0.7; }
  82% { opacity: 0.4; }
  100% { transform: translateY(-88px); opacity: 0; }
}

@keyframes headerOrbPulse {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  50% { transform: scale(1.08); opacity: 0.7; }
}

.doctor-header__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  margin: 0;
}

.doctor-header__subtitle {
  opacity: 0.85;
  font-size: 13px;
  margin: var(--space-1) 0 0;
}

.doctor-sidebar {
  display: none;
}

.doctor-main {
  padding: var(--space-4);
  margin-top: calc(var(--space-4) * -1);
}

.doctor-shell .admin-main__panel {
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  border-radius: 0;
  animation: none;
}

@media (max-width: 991.98px) {
  .doctor-shell .page-title,
  .doctor-shell .page-lead {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .doctor-main {
    margin-top: 0;
    padding-top: var(--space-3);
  }
}

@media (min-width: 992px) {
  .doctor-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    max-width: 1320px;
    margin-inline: auto;
    gap: var(--space-4);
    padding: var(--space-4);
  }

  .doctor-header,
  .doctor-bottom-nav {
    display: none;
  }

  .doctor-sidebar {
    display: flex;
  }

  .doctor-main {
    padding: 0;
    margin-top: 0;
  }

  .doctor-shell .admin-main__panel {
    background: var(--glass-fill);
    border: var(--glass-border);
    border-radius: var(--radius-2xl);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-panel);
    padding: var(--space-6);
    animation: rise 0.4s ease both;
  }

  .doctor-shell .admin-main__panel > .glass-panel {
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
  }

  .doctor-profile-logout {
    display: none;
  }
}

.doctor-identity-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.doctor-identity-card__photo {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-100);
  border: 2px solid rgba(255, 255, 255, 0.95);
}

.doctor-identity-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.doctor-identity-card__name {
  margin: 0 0 var(--space-2);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
}

.doctor-identity-card__facts {
  margin: 0;
  display: grid;
  gap: 4px;
}

.doctor-identity-card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 0.86rem;
  line-height: 1.55;
}

.doctor-identity-card__row dt {
  margin: 0;
  color: var(--color-muted);
  font-weight: 500;
}

.doctor-identity-card__row dd {
  margin: 0;
  color: var(--color-text);
  font-weight: 600;
}

.admin-welcome {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.admin-welcome__mark {
  flex: none;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--accent-100);
  color: var(--brand);
  font-size: 1.35rem;
}

.admin-welcome__body {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-welcome__hello {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.45;
}

.admin-welcome__hello strong {
  font-weight: 700;
}

.admin-welcome__thanks {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--color-text-3);
  line-height: 1.55;
}

.admin-welcome__role {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--accent-100);
  border-radius: 999px;
  padding: 2px 10px;
  line-height: 1.5;
}

.doctor-bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1030;
  display: flex;
  gap: var(--space-1);
  justify-content: space-around;
  padding: var(--space-2) var(--space-3) calc(var(--space-2) + env(safe-area-inset-bottom, 0));
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(32, 30, 29, 0.08);
  backdrop-filter: blur(16px);
}

.doctor-bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: var(--space-1);
  color: var(--color-muted);
  font-size: 11px;
  text-decoration: none;
}

.doctor-bottom-nav a.is-active,
.doctor-bottom-nav a.active {
  color: var(--color-accent);
  font-weight: 600;
}

.doctor-bottom-nav i {
  font-size: 1.15rem;
}

@media (min-width: 992px) {
  .doctor-header,
  .doctor-bottom-nav {
    display: none;
  }
}

/* Admin shell */
.admin-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 1320px;
  margin-inline: auto;
  gap: var(--space-4);
  padding: var(--space-4);
}

.admin-sidebar {
  background: rgba(255, 255, 255, 0.4);
  border: var(--glass-border);
  border-radius: var(--radius-2xl);
  backdrop-filter: var(--glass-blur);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: var(--space-4);
  align-self: start;
  max-height: calc(100vh - var(--space-8));
}

.admin-topbar {
  display: none;
}

.admin-nav-backdrop {
  display: none;
}

.admin-sidebar__close {
  display: none;
}

.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.admin-sidebar__brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius-md);
  flex: none;
}

.admin-sidebar__brand-text {
  min-width: 0;
  flex: 1 1 auto;
}

.admin-sidebar__brand-text strong {
  display: block;
  font-size: 14px;
  color: var(--color-text);
}

.admin-sidebar__brand-text span {
  font-size: 12px;
  color: var(--color-muted);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 1;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--color-text-2);
  min-height: 44px;
  text-decoration: none;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--color-accent);
}

.admin-nav a.is-active,
.admin-nav a.active {
  background: var(--accent-100);
  color: var(--accent-800);
  font-weight: 600;
}

.admin-nav__logout {
  margin: 0;
}

.admin-nav__logout-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--state-danger) 8%, transparent);
  color: var(--state-danger);
  min-height: 44px;
  text-align: right;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.admin-nav__logout-btn:hover,
.admin-nav__logout-btn:focus-visible {
  background: color-mix(in srgb, var(--state-danger) 14%, #fff);
  color: var(--magenta-700);
  outline: none;
}

.admin-sidebar__footer {
  border-top: 1px solid rgba(32, 30, 29, 0.1);
  padding-top: var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  color: var(--color-muted);
}

.admin-sidebar__powered-row {
  display: flex;
  align-items: center;
  font-size: 11px;
  line-height: 1.5;
  color: #7d7979;
  font-weight: 500;
}

.admin-sidebar__powered-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.admin-sidebar__powered-link:hover,
.admin-sidebar__powered-link:focus-visible {
  color: var(--brand);
  text-decoration: none;
}

.admin-sidebar__powered-link img {
  height: 22px;
  width: auto;
  object-fit: contain;
  flex: none;
}

.admin-sidebar__copyright {
  margin: 0;
  direction: ltr;
  text-align: left;
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 9.5px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #b0abab;
}

.admin-sidebar__copyright-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-sidebar__copyright-link:hover,
.admin-sidebar__copyright-link:focus-visible {
  color: var(--brand);
}

.admin-main {
  min-width: 0;
}

.admin-main__panel {
  background: var(--glass-fill);
  border: var(--glass-border);
  border-radius: var(--radius-2xl);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-panel);
  padding: var(--space-6);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(32, 30, 29, 0.08);
}

/* Doctors admin toolbar */
.doctors-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}

.doctors-toolbar__title-block {
  min-width: 0;
}

.doctors-toolbar__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0;
  color: var(--color-text);
  line-height: var(--leading-head);
}

.doctors-toolbar__stats {
  margin-top: 4px;
  color: var(--color-text-3);
  font-size: 0.9rem;
}

.doctors-toolbar__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-3);
  margin-right: auto;
  min-width: 0;
}

.doctors-toolbar__search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  max-width: 360px;
  flex: 1 1 240px;
  padding: 0 var(--space-3);
  min-height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(32, 30, 29, 0.1);
  color: var(--color-muted);
  margin: 0;
}

.doctors-toolbar__search:focus-within {
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}

.doctors-toolbar__search > i {
  flex-shrink: 0;
  font-size: 0.95rem;
}

.doctors-toolbar__search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  outline: none;
  padding-block: 10px;
}

.doctors-toolbar__search-input::placeholder {
  color: var(--color-muted-2);
}

.doctors-toolbar__add {
  border-radius: 999px;
  white-space: nowrap;
  flex: 0 0 auto;
}

@media (max-width: 767.98px) {
  .doctors-toolbar__actions {
    width: 100%;
    margin-right: 0;
  }

  .doctors-toolbar__search {
    max-width: none;
  }
}

.doctors-table__photo-col {
  width: 3.25rem;
  padding-inline-end: 0.35rem !important;
  vertical-align: middle;
}

.doctors-table__avatar {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--neutral-200);
  border: 1px solid rgba(32, 30, 29, 0.08);
}

/* Login hero — sizes/layout matched to Documents/Login Hero (standalone).html */
.login-body {
  margin: 0;
  background: #f3f2f2;
}

.login-page {
  --color-accent: var(--brand);
  --accent-600: color-mix(in srgb, var(--brand) 82%, #000);
  --accent-700: color-mix(in srgb, var(--brand) 68%, #000);
  --login-hero-deep: color-mix(in srgb, var(--brand) 22%, #0a303e);
  --login-hero-mid: color-mix(in srgb, var(--brand) 42%, #004961);
  --login-hero-bright: color-mix(in srgb, var(--brand) 70%, #1186ac);
  --login-hero-glow: color-mix(in srgb, var(--brand) 45%, #99e0ff);

  min-height: 100vh;
  min-height: 100dvh;
  background: #f3f2f2;
}

.login-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: #f3f2f2;
}

@media (min-width: 992px) {
  .login-shell {
    flex-direction: row;
    direction: ltr; /* hero left / form right — same as mock artboard */
  }

  .login-hero,
  .login-form-panel {
    direction: rtl;
  }
}

.login-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px 26px 38px;
  background: linear-gradient(
    165deg,
    var(--login-hero-deep) 0%,
    var(--login-hero-mid) 55%,
    var(--login-hero-bright) 100%
  );
}

@media (min-width: 992px) {
  .login-hero {
    width: 640px;
    flex: 0 0 640px;
    padding: 52px 48px;
    min-height: 100vh;
    min-height: 100dvh;
  }
}

.login-hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 80% at 70% 25%,
    color-mix(in srgb, var(--login-hero-glow) 30%, transparent),
    transparent 62%
  );
  pointer-events: none;
  z-index: 0;
}

.login-hero__sweep {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 180px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0)
  );
  filter: blur(14px);
  animation: loginSweepLight 11s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.login-hero__motes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.login-hero__motes span {
  position: absolute;
  left: var(--mx);
  bottom: var(--mb);
  width: var(--ms);
  height: var(--ms);
  border-radius: 50%;
  background: color-mix(in srgb, var(--login-hero-glow) 90%, transparent);
  animation: loginMoteRise 17s linear var(--md, 0s) infinite;
}

.login-hero__eyebrow,
.login-hero__tiles,
.login-hero__brand-block {
  position: relative;
  z-index: 2;
}

.login-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.72);
}

.login-hero__brand-mark {
  letter-spacing: 0.18em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.login-hero__eyebrow-rule {
  width: 44px;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
  flex: none;
}

.login-hero__tiles {
  display: none;
}

@media (min-width: 992px) {
  .login-hero__tiles {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-top: 26px;
  }
}

.login-hero__tile {
  flex: none;
  animation: loginSoftIn 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.login-hero__tile--1 {
  width: 168px;
  height: 206px;
  animation-delay: 0.15s;
}

.login-hero__tile--2 {
  width: 148px;
  height: 164px;
  animation-delay: 0.3s;
}

.login-hero__tile--3 {
  width: 120px;
  height: 124px;
  animation-delay: 0.45s;
}

.login-hero__tile-face {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(6px);
  animation: loginTileFloat 9s ease-in-out infinite;
}

.login-hero__tile--1 .login-hero__tile-face {
  animation-delay: 0.15s;
}

.login-hero__tile--1 .login-hero__tile-face::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    90% 70% at 30% 20%,
    color-mix(in srgb, var(--login-hero-glow) 45%, transparent),
    transparent 70%
  );
}

.login-hero__tile--2 .login-hero__tile-face {
  animation-delay: 0.3s;
}

.login-hero__tile--2 .login-hero__tile-face::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    90% 70% at 30% 20%,
    color-mix(in srgb, var(--brand) 40%, transparent),
    transparent 70%
  );
}

.login-hero__tile--3 .login-hero__tile-face {
  animation-delay: 0.45s;
}

.login-hero__tile--3 .login-hero__tile-face::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    90% 70% at 30% 20%,
    color-mix(in srgb, var(--login-hero-glow) 34%, transparent),
    transparent 70%
  );
}

.login-hero__tile-shine {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 42%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  filter: blur(2px);
  animation: loginTileShine 9s ease-in-out infinite;
}

.login-hero__tile--1 .login-hero__tile-shine { animation-delay: 1.2s; }
.login-hero__tile--2 .login-hero__tile-shine { animation-delay: 3.2s; }
.login-hero__tile--3 .login-hero__tile-shine { animation-delay: 5.4s; }

.login-hero__tile-face i {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.92);
}

.login-hero__tile--1 i { font-size: 70px; }
.login-hero__tile--2 i { font-size: 56px; }
.login-hero__tile--3 i { font-size: 42px; }

.login-hero__brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

@media (min-width: 992px) {
  .login-hero__brand-block {
    gap: 34px;
  }
}

.login-hero__logo-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 992px) {
  .login-hero__logo-wrap {
    width: 250px;
    height: 250px;
  }
}

.login-hero__halo,
.login-hero__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  pointer-events: none;
}

.login-hero__halo {
  width: 210px;
  height: 210px;
  margin: -105px 0 0 -105px;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--login-hero-glow) 55%, transparent),
    transparent 70%
  );
  filter: blur(10px);
  animation: loginGlowSoft 8s ease-in-out infinite;
}

@media (min-width: 992px) {
  .login-hero__halo {
    width: 320px;
    height: 320px;
    margin: -160px 0 0 -160px;
  }
}

.login-hero__ring {
  width: 190px;
  height: 190px;
  margin: -95px 0 0 -95px;
  border: 1px solid color-mix(in srgb, var(--login-hero-glow) 55%, transparent);
}

@media (min-width: 992px) {
  .login-hero__ring {
    width: 300px;
    height: 300px;
    margin: -150px 0 0 -150px;
  }
}

.login-hero__ring--2 { opacity: 0.7; transform: scale(0.92); }
.login-hero__ring--3 { opacity: 0.45; transform: scale(0.84); }

.login-hero__product-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  filter:
    drop-shadow(0 14px 28px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 28px color-mix(in srgb, var(--login-hero-glow) 45%, transparent));
  animation: loginLogoTilt 12s ease-in-out infinite;
}

@media (min-width: 992px) {
  .login-hero__product-logo {
    filter:
      drop-shadow(0 30px 56px rgba(0, 0, 0, 0.45))
      drop-shadow(0 0 44px color-mix(in srgb, var(--login-hero-glow) 45%, transparent));
  }
}

.login-hero__copy {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: loginSoftIn 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both;
}

@media (min-width: 992px) {
  .login-hero__copy {
    gap: 14px;
  }
}

.login-hero__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 30px;
  line-height: 1.2;
  margin: 0;
}

@media (min-width: 992px) {
  .login-hero__title {
    font-size: 46px;
  }
}

.login-hero__tagline {
  margin: 0;
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

@media (min-width: 992px) {
  .login-hero__tagline {
    font-size: 17px;
    max-width: 34ch;
    margin-inline: auto;
  }
}

.login-hero__tagline--desktop { display: none; }
.login-hero__tagline--mobile { display: block; }

@media (min-width: 992px) {
  .login-hero__tagline--desktop { display: block; }
  .login-hero__tagline--mobile { display: none; }
}

@media (max-width: 991.98px) {
  .login-hero__eyebrow {
    align-self: flex-start;
    font-size: 11px;
    letter-spacing: 0.2em;
  }

  .login-hero__eyebrow-rule,
  .login-hero__eyebrow-text {
    display: none;
  }

  .login-hero__brand-mark {
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.7);
  }
}

.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 26px 22px;
  position: relative;
  background: #f3f2f2;
  border-radius: 28px 28px 0 0;
}

@media (min-width: 992px) {
  .login-form-panel {
    padding: 56px 72px;
    border-radius: 0;
    align-items: center;
  }
}

.login-form-panel__inner {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: loginRiseIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
}

@media (min-width: 992px) {
  .login-form-panel__inner {
    gap: 26px;
  }
}

.login-form-panel__hospital {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 0;
}

@media (min-width: 992px) {
  .login-form-panel__hospital {
    gap: 14px;
    padding-bottom: 6px;
  }
}

.login-form-panel__hospital-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(32, 30, 29, 0.08);
  flex: none;
}

@media (min-width: 992px) {
  .login-form-panel__hospital-logo {
    width: 108px;
    height: 108px;
    border-radius: 18px;
  }
}

.login-form-panel__hospital-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-form-panel__hospital-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  color: var(--color-text, #201e1d);
}

@media (min-width: 992px) {
  .login-form-panel__hospital-name {
    font-size: 17px;
  }
}

.login-form-panel__hospital-subtitle {
  font-size: 11px;
  color: #9b9797;
}

@media (min-width: 992px) {
  .login-form-panel__hospital-subtitle {
    font-size: 12px;
  }
}

.login-form-panel__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 992px) {
  .login-form-panel__body {
    gap: 26px;
  }
}

.login-form-intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 992px) {
  .login-form-intro {
    gap: 10px;
  }
}

.login-form-panel__heading,
.login-form-panel h1 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 26px;
  margin: 0;
  line-height: 1.2;
  color: var(--color-text, #201e1d);
}

@media (min-width: 992px) {
  .login-form-panel__heading,
  .login-form-panel h1 {
    font-size: 38px;
  }
}

.login-form-panel__lead,
.login-form-panel .page-lead {
  margin: 0;
  font-size: 15px;
  color: #605d5d;
  line-height: 1.6;
}

@media (max-width: 991.98px) {
  .login-form-intro .login-form-panel__lead {
    display: none;
  }

  /* OTP / non-login bodies keep the lead on mobile */
  .login-form-panel__body > .login-form-panel__lead {
    display: block;
  }
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form__field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
}

.login-form__label {
  font-size: 13px;
  font-weight: 500;
  color: #605d5d;
}

.login-field {
  position: relative;
  display: flex;
  align-items: center;
}

.login-field__icon {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: #9b9797;
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
}

.login-field__input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(32, 30, 29, 0.2);
  background: #fff;
  border-radius: 14px;
  padding: 17px 44px 17px 16px;
  font-family: inherit;
  font-size: 17px;
  color: var(--color-text, #201e1d);
  outline: none;
  min-height: 56px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-field__input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}

.login-submit {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 18px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.18s ease, transform 0.18s ease;
  width: 100%;
}

.login-submit:hover,
.login-submit:focus-visible {
  background: var(--accent-600);
  transform: translateY(-1px);
  color: #fff;
}

.login-submit i {
  font-size: 0.85em;
}

.login-submit--secondary {
  background: transparent;
  color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 32%, transparent);
}

.login-submit--secondary:hover,
.login-submit--secondary:focus-visible {
  background: color-mix(in srgb, var(--brand) 8%, #fff);
  color: var(--accent-600);
  border-color: color-mix(in srgb, var(--brand) 48%, transparent);
  transform: translateY(-1px);
}

.login-form__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-mode-panel[hidden] {
  display: none !important;
}

.login-support-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: #605d5d;
}

.login-support-link > i {
  color: #9b9797;
}

.login-support-link__btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font: inherit;
}

.login-support-link__btn:hover,
.login-support-link__btn:focus-visible {
  color: var(--accent-700);
}

.login-support-link__desktop { display: none; }
.login-support-link__mobile { display: inline; }

@media (min-width: 992px) {
  .login-support-link__desktop { display: inline; }
  .login-support-link__mobile { display: none; }
}

.login-powered {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(32, 30, 29, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

@media (min-width: 992px) {
  .login-powered {
    margin-top: 14px;
    padding-top: 22px;
    gap: 8px;
  }
}

.login-powered__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #7d7979;
  font-weight: 500;
}

.login-powered__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.login-powered__link:hover,
.login-powered__link:focus-visible {
  color: var(--brand);
  text-decoration: none;
}

.login-powered__row img,
.login-powered__link img {
  height: 22px;
  width: auto;
  object-fit: contain;
  flex: none;
}

.login-powered__copy {
  margin: 0;
  direction: ltr;
  text-align: center;
  font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #b0abab;
}

.login-powered__copy-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-powered__copy-link:hover,
.login-powered__copy-link:focus-visible {
  color: var(--brand);
}

.login-support-modal-dialog {
  max-width: 420px;
  margin-inline: auto;
  width: calc(100% - 2rem);
}

#dlSupportModal .modal-content.login-support-dialog,
.login-support-dialog.modal-content,
.login-support-dialog {
  background: #f3f2f2 !important;
  border: none !important;
  border-radius: 24px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.28);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  direction: rtl;
  text-align: right;
  overflow: hidden;
  color: #201e1d;
}

.login-support-dialog__panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
  padding: 28px 28px 22px;
  box-sizing: border-box;
  width: 100%;
}

.login-support-dialog__head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
}

.login-support-dialog__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  flex: 1;
  text-align: right;
}

.login-support-dialog__icon {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 14%, #fff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-700);
  font-size: 20px;
  line-height: 1;
}

.login-support-dialog__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.35;
  margin: 0;
  color: #201e1d;
}

.login-support-dialog__hours {
  font-size: 13px;
  line-height: 1.5;
  color: #8a8686;
  margin: 0;
}

.login-support-dialog__content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  width: 100%;
  text-align: right;
}

.login-support-dialog__phone-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.login-support-dialog__label {
  font-size: 13px;
  line-height: 1.5;
  color: #8a8686;
  margin: 0;
}

.login-support-dialog__phone,
a.login-support-dialog__phone-link {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: #201e1d;
  white-space: nowrap;
  overflow-wrap: normal;
  /* Digits stay LTR; block stays pinned to the RTL start (right). */
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}

a.login-support-dialog__phone-link {
  text-decoration: none;
}

a.login-support-dialog__phone-link:hover,
a.login-support-dialog__phone-link:focus-visible {
  color: var(--brand);
}

.login-support-dialog__note {
  font-size: 14px;
  line-height: 1.7;
  color: #8a8686;
  margin: 0;
  text-align: right;
}

.login-support-dialog__footer {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding-top: 2px;
}

.login-support-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  background: none;
  border: none;
  color: var(--accent-700);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 4px;
  line-height: 1.2;
  min-height: 44px;
}

.login-support-dialog__close i {
  font-size: 0.95em;
  line-height: 1;
}

.login-support-dialog__close:hover,
.login-support-dialog__close:focus-visible {
  color: var(--brand);
}

.login-secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-700);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.login-secondary-link i {
  font-size: 0.95em;
  line-height: 1;
}

.login-secondary-link:hover,
.login-secondary-link:focus-visible {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.login-support-sheet.bottom-sheet,
#dlSupportSheet.login-support-sheet {
  background: #f3f2f2;
  direction: rtl;
  text-align: right;
  padding: 12px 8px 8px;
}

.login-support-sheet .login-support-dialog__panel {
  padding: 8px 16px 12px;
  gap: 20px;
}

.login-support-sheet .bottom-sheet__handle {
  margin-bottom: 8px;
}

.soft-in {
  animation: loginSoftIn 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.rise-in {
  animation: loginRiseIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes loginSoftIn {
  from { opacity: 0; transform: translateY(18px); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes loginRiseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes loginMoteRise {
  0% { transform: translateY(30px); opacity: 0; }
  15% { opacity: 0.75; }
  85% { opacity: 0.55; }
  100% { transform: translateY(-300px); opacity: 0; }
}

@keyframes loginTileFloat {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-10px) rotate(calc(var(--rot, 0deg) + 0.6deg)); }
}

@keyframes loginTileShine {
  0% { transform: translateX(-140%); }
  55%, 100% { transform: translateX(140%); }
}

@keyframes loginLogoTilt {
  0%, 100% { transform: perspective(1000px) rotateX(0deg) rotateY(-5deg) translateY(0); }
  50% { transform: perspective(1000px) rotateX(4deg) rotateY(5deg) translateY(-12px); }
}

@keyframes loginGlowSoft {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.08); }
}

@keyframes loginSweepLight {
  0% { transform: translateX(-70%) rotate(14deg); opacity: 0; }
  18%, 55% { opacity: 0.42; }
  100% { transform: translateX(190%) rotate(14deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .soft-in,
  .rise-in,
  .login-hero__motes span,
  .login-hero__tile,
  .login-hero__tile-face,
  .login-hero__tile-shine,
  .login-hero__product-logo,
  .login-hero__halo,
  .login-hero__sweep,
  .login-form-panel__inner,
  .login-hero__copy,
  .header-atmosphere__glow,
  .header-atmosphere__sweep,
  .header-atmosphere__motes span,
  .header-atmosphere__orb,
  .header-atmosphere__tile,
  .header-atmosphere__shine {
    animation: none !important;
  }
}

.record-list {
  display: grid;
  gap: var(--space-2);
}

.record-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(32, 30, 29, 0.06);
}

.record-row__main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: var(--space-1);
}

.record-row__side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}

.record-row__top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  align-items: baseline;
}

.record-row__amount {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  text-align: end;
}

.record-row__actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-2);
}

.record-row__actions--table {
  margin-top: 0;
  gap: var(--space-1);
}

.record-edited-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: 0.35rem;
  color: #fd7e14;
  font-size: 0.95rem;
  vertical-align: middle;
  line-height: 1;
}

.record-edit-history {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(32, 30, 29, 0.08);
}

.record-edit-history__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.audit-detail {
  display: flex;
  flex-direction: column;
}

.audit-detail__section {
  margin: 0;
}

.audit-detail__section:not([hidden]) ~ .audit-detail__section:not([hidden]) {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(32, 30, 29, 0.08);
}

.audit-detail__heading {
  margin: 0 0 var(--space-2);
  color: var(--color-text-2);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
}

.audit-detail__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
}

.audit-detail__row {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: var(--space-2) var(--space-3);
  align-items: start;
}

.audit-detail__label {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.audit-detail__value {
  margin: 0;
  color: var(--color-text);
  font-size: 0.92rem;
  word-break: break-word;
}

.audit-detail__value[dir="ltr"] {
  word-break: break-all;
}

.audit-change-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.audit-change {
  padding: var(--space-3);
  border: 1px solid rgba(32, 30, 29, 0.08);
  border-radius: var(--radius-md);
  background: var(--neutral-100);
}

.audit-change__field {
  margin: 0 0 var(--space-2);
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
}

.audit-change__values {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
}

.audit-change__slot {
  flex: 1;
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
}

.audit-change__slot--old {
  background: var(--neutral-200);
}

.audit-change__slot--new {
  background: var(--accent-100);
  border: 1px solid var(--accent-200);
}

.audit-change__kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.audit-change__text {
  display: block;
  color: var(--color-text);
  font-size: 0.92rem;
  line-height: 1.7;
  word-break: break-word;
}

.audit-change__text[dir="ltr"] {
  word-break: break-all;
}

.audit-change__text.is-empty {
  color: var(--color-muted);
  font-style: italic;
}

.audit-change__arrow {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  padding-top: 1.1rem;
  color: var(--brand);
}

.audit-change__note {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

@media (max-width: 575.98px) {
  .audit-change__values {
    flex-direction: column;
  }

  .audit-change__arrow {
    justify-content: center;
    padding-top: 0;
  }

  .audit-change__arrow i {
    transform: rotate(-90deg);
  }
}

template[data-audit-changes] {
  display: none;
}

.record-edit-history__entry + .record-edit-history__entry {
  margin-top: var(--space-3);
}

.record-edit-history__meta {
  margin-bottom: var(--space-1);
  color: var(--color-muted, #6c757d);
  font-size: 0.85rem;
}

.record-edit-history__changes {
  margin: 0;
  padding-inline-start: 1.1rem;
}

.record-edit-history__status {
  margin: 0;
  color: var(--color-muted, #6c757d);
  font-size: 0.85rem;
}

.btn-icon-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  padding-inline: 0;
  line-height: 1;
  white-space: nowrap;
}

.skeleton {
  background: var(--neutral-200);
  border-radius: var(--radius-md);
  min-height: 16px;
}

.profile-hero {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.profile-hero__top {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.profile-hero__photo-wrap {
  position: relative;
  flex: none;
  width: 96px;
  height: 96px;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-200);
  border: 3px solid rgba(255, 255, 255, 0.7);
}

.profile-hero .profile-avatar {
  width: 96px;
  height: 96px;
}

.profile-hero__camera {
  position: absolute;
  inset-inline-end: -2px;
  bottom: -2px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--brand) 80%, transparent);
}

.profile-hero__camera:hover,
.profile-hero__camera:focus-visible {
  filter: brightness(1.06);
  outline: none;
}

.profile-hero__side {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.profile-hero__picker {
  padding: var(--space-3);
}

.profile-hero__picker .logo-image-picker__copy {
  flex: 1 1 auto;
}

.profile-hero__picker-icon {
  color: var(--brand);
  font-size: 1.15rem;
  margin-inline-start: auto;
}

.profile-hero__save[hidden] {
  display: none !important;
}

.profile-hero__save {
  justify-self: start;
}

.profile-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-block: var(--space-2) var(--space-6);
  padding: var(--space-2) 0;
}

.profile-correction {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--brand) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent);
}

.profile-correction__icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 14%, #fff);
  color: var(--brand);
}

.profile-correction__body {
  min-width: 0;
  display: grid;
  gap: var(--space-2);
}

.profile-correction__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--color-text);
}

.profile-correction__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--color-text-3);
}

.profile-section-head {
  margin-bottom: var(--space-3);
}

.profile-section-head__title {
  margin: 0 0 var(--space-1);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}

.profile-section-head__lead {
  margin: 0;
  font-size: 0.86rem;
  color: var(--color-text-3);
}

.profile-notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.profile-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(32, 30, 29, 0.08);
}

.profile-notice:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.profile-notice__icon {
  flex: none;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-100);
  color: var(--brand);
}

.profile-notice__body {
  flex: 1 1 auto;
  min-width: 0;
}

.profile-notice__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 4px;
}

.profile-notice__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.profile-notice__text {
  margin: 0 0 4px;
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--color-text-3);
}

.profile-notice__time {
  font-size: 0.8rem;
  color: var(--color-muted);
}

@media (max-width: 479.98px) {
  .profile-hero__picker-icon {
    display: none;
  }

  .profile-hero__camera {
    width: 32px;
    height: 32px;
  }
}

.profile-field {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 6px 0;
  border-bottom: 1px solid rgba(32, 30, 29, 0.08);
}

.profile-field:last-child {
  border-bottom: 0;
}

.profile-field__label {
  flex: none;
  font-size: 12px;
  color: var(--color-muted);
}

.profile-field__value {
  min-width: 0;
  font-weight: 600;
  color: var(--color-text);
  text-align: start;
}

@media (min-width: 576px) {
  .profile-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--space-3);
    row-gap: 0;
    padding: var(--space-3) 0;
  }

  .profile-field {
    display: grid;
    gap: 4px;
    justify-content: start;
    padding: 0 var(--space-3);
    border-bottom: 0;
    border-inline-end: 1px solid rgba(32, 30, 29, 0.08);
  }

  .profile-field:last-child {
    border-inline-end: 0;
    padding-inline-end: 0;
  }

  .profile-field:first-child {
    padding-inline-start: 0;
  }

  .profile-field__value {
    text-align: inherit;
  }
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.wizard-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
  color: var(--color-muted);
  font-size: 13px;
}

.wizard-step.is-active {
  background: var(--accent-100);
  color: var(--accent-800);
  font-weight: 600;
}

.wizard-step.is-done {
  color: #0b6b52;
}

.doctor-picker {
  max-width: 36rem;
}

.doctor-picker__control {
  position: relative;
}

.doctor-picker__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.doctor-picker__input-wrap > i {
  position: absolute;
  inset-inline-start: 0.9rem;
  color: var(--color-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

.doctor-picker__input {
  padding-inline-start: 2.4rem;
}

.doctor-picker__list {
  position: absolute;
  z-index: 20;
  inset-inline: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  max-height: 18rem;
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(32, 30, 29, 0.12);
  background: #fff;
  box-shadow: var(--shadow-soft, 0 10px 30px rgba(32, 30, 29, 0.12));
}

.doctor-picker__option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.doctor-picker__option:hover,
.doctor-picker__option.is-active {
  background: color-mix(in srgb, var(--brand) 10%, #fff);
}

.doctor-picker__option-photo {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--neutral-200);
  border: 1px solid rgba(32, 30, 29, 0.08);
}

.doctor-picker__option-body {
  min-width: 0;
}

.doctor-picker__option-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text);
  line-height: 1.35;
}

.doctor-picker__option-meta {
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--color-text-3);
  line-height: 1.4;
}

.doctor-picker__empty {
  padding: 0.75rem;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.doctor-picker__card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(32, 30, 29, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.doctor-picker__photo {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--neutral-200);
  border: 1px solid rgba(32, 30, 29, 0.08);
}

.doctor-picker__meta {
  flex: 1 1 12rem;
  min-width: 0;
}

.doctor-picker__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 0.55rem;
  line-height: 1.4;
}

.doctor-picker__details {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.doctor-picker__details > div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.85rem;
}

.doctor-picker__details dt {
  margin: 0;
  color: var(--color-text-3);
  font-weight: 500;
}

.doctor-picker__details dd {
  margin: 0;
  color: var(--color-text);
  font-weight: 600;
}

.doctor-picker__clear {
  margin-inline-start: auto;
  align-self: flex-start;
}

.doctor-picker--compact {
  max-width: none;
  min-width: 14rem;
}

.doctor-picker--compact .doctor-picker__input {
  padding-inline-end: 2.2rem;
}

.doctor-picker--compact .doctor-picker__list {
  z-index: 40;
  min-width: 18rem;
}

.doctor-picker--compact .doctor-picker__inline-clear {
  position: absolute;
  inset-inline-end: 0.3rem;
  inset-block: 0;
  margin: auto;
  width: 1.8rem;
  height: 1.8rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.doctor-picker--compact .doctor-picker__inline-clear:hover,
.doctor-picker--compact .doctor-picker__inline-clear:focus-visible {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-text) 8%, #fff);
}

.doctor-picker.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.payout-match-wrap.table-responsive {
  overflow: visible;
}

.payout-match-table tr.is-unmatched > * {
  --bs-table-bg: color-mix(in srgb, var(--state-warning) 22%, #fff);
  --bs-table-accent-bg: color-mix(in srgb, var(--state-warning) 22%, #fff);
  --bs-table-bg-type: color-mix(in srgb, var(--state-warning) 22%, #fff);
  background-color: color-mix(in srgb, var(--state-warning) 22%, #fff);
}

.payout-match-table tr.is-rejected > * {
  --bs-table-bg: color-mix(in srgb, var(--state-danger) 16%, #fff);
  --bs-table-accent-bg: color-mix(in srgb, var(--state-danger) 16%, #fff);
  --bs-table-bg-type: color-mix(in srgb, var(--state-danger) 16%, #fff);
  background-color: color-mix(in srgb, var(--state-danger) 16%, #fff);
}

.specialty-picker {
  max-width: 36rem;
}

.specialty-picker__control {
  position: relative;
}

.specialty-picker__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.specialty-picker__input-wrap > i {
  position: absolute;
  inset-inline-start: 0.9rem;
  color: var(--color-muted);
  pointer-events: none;
  font-size: 0.9rem;
}

.specialty-picker__input {
  padding-inline-start: 2.4rem;
}

.specialty-picker__list {
  position: absolute;
  z-index: 20;
  inset-inline: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  max-height: 14rem;
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(32, 30, 29, 0.12);
  background: #fff;
  box-shadow: var(--shadow-soft, 0 10px 30px rgba(32, 30, 29, 0.12));
}

.specialty-picker__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.92rem;
}

.specialty-picker__option:hover,
.specialty-picker__option.is-active {
  background: color-mix(in srgb, var(--brand) 10%, #fff);
}

.specialty-picker__option--create {
  color: var(--brand);
  font-weight: 600;
}

.pwa-install-banner {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  background: var(--brand);
  color: var(--brand-ink);
}

.pwa-install-banner .btn {
  white-space: nowrap;
}

/* Brand color palette picker (Admin / Settings) */
.brand-color-picker {
  display: grid;
  gap: var(--space-4);
}

.brand-color-picker__group-title {
  margin: 0 0 var(--space-2);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-2);
}

.brand-color-picker__swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: var(--space-2);
}

.brand-color-picker__swatch {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2);
  border: 1px solid rgba(32, 30, 29, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.55);
  color: var(--color-text);
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.brand-color-picker__swatch:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, rgba(32, 30, 29, 0.2));
  background: rgba(255, 255, 255, 0.8);
}

.brand-color-picker__swatch.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 28%, transparent);
  background: color-mix(in srgb, var(--brand) 8%, #fff);
}

.brand-color-picker__chip {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(32, 30, 29, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-color-picker__chip--custom {
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.35) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.35) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.35) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.35) 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
}

.brand-color-picker__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-color-picker__name {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.brand-color-picker__en {
  font-size: 0.75rem;
  color: var(--color-text-3);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-color-picker__custom-panel {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border: 1px dashed rgba(32, 30, 29, 0.18);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.4);
}

.brand-color-picker__custom-panel[hidden] {
  display: none !important;
}

.brand-color-picker__custom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.brand-color-picker__custom-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  width: 7.5rem;
  height: 7.5rem;
  padding: var(--space-2);
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(32, 30, 29, 0.12);
}

.brand-color-picker__custom-preview-fill {
  position: absolute;
  inset: 0;
}

.brand-color-picker__custom-preview-label {
  position: relative;
  z-index: 1;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.brand-color-picker__native {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.brand-color-picker__hex-wrap {
  flex: 1 1 10rem;
  min-width: 8rem;
  max-width: 12rem;
}

/* Hospital logo image picker + square crop */
.logo-image-picker {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px dashed color-mix(in srgb, var(--brand) 42%, var(--neutral-300));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--brand) 6%, #fff);
  color: var(--color-text);
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.logo-image-picker:hover,
.logo-image-picker:focus-visible,
.logo-image-picker.is-dragover {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, #fff);
  outline: none;
}

.logo-image-picker__thumb {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  background: var(--neutral-200);
  border: 1px solid rgba(32, 30, 29, 0.08);
  object-fit: contain;
  display: block;
}

.logo-image-picker__thumb--empty {
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.55) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.55) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.55) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.55) 75%),
    var(--neutral-200);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}

.logo-image-picker__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.logo-image-picker__title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-text);
}

.logo-image-picker__hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--color-text-3);
}

.logo-image-picker__input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.logo-crop-box {
  margin-top: var(--space-3);
  padding: var(--space-4);
  border: 1px solid rgba(32, 30, 29, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.55);
}

.logo-crop-box[hidden] {
  display: none !important;
}

.logo-crop-box__title {
  margin: 0 0 var(--space-1);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.logo-crop-box__lead {
  margin: 0 0 var(--space-3);
  font-size: 0.8rem;
  color: var(--color-text-3);
}

.logo-crop-box__viewport {
  position: relative;
  width: min(100%, 20rem);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(32, 30, 29, 0.12);
  background:
    linear-gradient(45deg, #ececec 25%, transparent 25%),
    linear-gradient(-45deg, #ececec 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ececec 75%),
    linear-gradient(-45deg, transparent 75%, #ececec 75%),
    #f7f7f7;
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  touch-action: none;
  cursor: grab;
  user-select: none;
  /* Crop math uses physical left/top + translate; keep LTR inside the viewport. */
  direction: ltr;
}

.logo-crop-box__viewport.is-dragging {
  cursor: grabbing;
}

.logo-crop-box__image {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  pointer-events: none;
  transform-origin: 0 0;
  will-change: transform;
}

.logo-crop-box__frame {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 9999px rgba(32, 30, 29, 0.28);
  pointer-events: none;
  border-radius: inherit;
}

.logo-crop-box__zoom {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  max-width: 20rem;
  margin-inline: auto;
}

.logo-crop-box__zoom label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-2);
}

.logo-crop-box__zoom input[type="range"] {
  flex: 1 1 auto;
  accent-color: var(--brand);
}

.logo-crop-box__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

@media (max-width: 991.98px) {
  .admin-shell {
    grid-template-columns: 1fr;
    padding: var(--space-3);
    gap: var(--space-3);
  }

  .admin-topbar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 56px;
    padding: var(--space-2) var(--space-3);
    background: rgba(255, 255, 255, 0.4);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    backdrop-filter: var(--glass-blur);
  }

  .admin-topbar__toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
  }

  .admin-topbar__toggle:hover,
  .admin-topbar__toggle[aria-expanded="true"] {
    background: var(--accent-100);
    color: var(--accent-800);
  }

  .admin-topbar__toggle i {
    font-size: 1.15rem;
    line-height: 1;
  }

  .admin-topbar__brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
    flex: 1 1 auto;
  }

  .admin-topbar__brand img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: var(--radius-md);
    flex: none;
  }

  .admin-topbar__brand-text {
    min-width: 0;
  }

  .admin-topbar__brand-text strong,
  .admin-topbar__brand-text span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-topbar__brand-text strong {
    font-size: 14px;
    color: var(--color-text);
  }

  .admin-topbar__brand-text span {
    font-size: 12px;
    color: var(--color-muted);
  }

  .admin-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(32, 30, 29, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
  }

  .admin-nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1045;
    width: min(280px, 88vw);
    max-height: none;
    margin: 0;
    border-radius: var(--radius-2xl) 0 0 var(--radius-2xl);
    overflow-y: auto;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(110%);
    transition: transform 0.22s ease, visibility 0.22s ease;
  }

  .admin-sidebar.is-open {
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .admin-sidebar__close {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-inline-start: auto;
    padding: 0;
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-text-2);
    cursor: pointer;
  }

  .admin-sidebar__close:hover {
    background: var(--accent-100);
    color: var(--accent-800);
  }

  .admin-nav {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  body.admin-nav-open {
    overflow: hidden;
  }
}

@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
  .admin-nav-backdrop,
  .admin-sidebar {
    transition: none;
  }
}

/* Table pager: length select, circular page numbers, "showing X to Y of Z" */
.table-pager,
div.dt-container div.dt-layout-row:has(.dt-info),
div.dt-container div.dt-layout-row:has(.dt-paging),
div.dt-container div.dt-layout-row:has(.dt-length) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.table-pager__start,
div.dt-container .dt-layout-start {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.table-pager__info,
div.dt-container div.dt-info {
  color: var(--color-muted);
  font-size: 0.9rem;
  padding-top: 0;
  margin: 0;
}

.table-pager__length,
div.dt-container .dt-length {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.table-pager__length select,
div.dt-container .dt-length select {
  width: auto;
  min-width: 4.75rem;
  min-height: 36px;
  padding-block: 0.2rem;
  padding-inline: 0.7rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
}

div.dt-container div.dt-paging ul.pagination {
  margin: 0;
}

div.dt-container .pagination .page-item.previous,
div.dt-container .pagination .page-item.next,
div.dt-container .pagination .page-item.first,
div.dt-container .pagination .page-item.last {
  display: none;
}

div.dt-container .dt-search {
  display: none;
}

.table-pager__pages,
div.dt-container .dt-paging {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.table-pager__pages .pagination,
div.dt-container .dt-paging .pagination {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 767.98px) {
  .table-pager,
  div.dt-container div.dt-layout-row:has(.dt-info),
  div.dt-container div.dt-layout-row:has(.dt-paging),
  div.dt-container div.dt-layout-row:has(.dt-length) {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: var(--space-3);
  }

  .table-pager__start,
  div.dt-container .dt-layout-start {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    width: 100%;
  }

  .table-pager__length,
  div.dt-container .dt-length {
    justify-content: space-between;
    width: 100%;
  }

  .table-pager__info,
  div.dt-container div.dt-info {
    text-align: start;
    line-height: 1.7;
  }

  .table-pager__pages,
  div.dt-container .dt-paging {
    width: 100%;
    justify-content: center;
  }

  .table-pager__pages .pagination,
  div.dt-container .dt-paging .pagination {
    justify-content: center;
    width: 100%;
    gap: 6px;
  }

  .table-pager .pagination .page-link,
  div.dt-container .pagination .page-link {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 0.85rem;
  }
}
