/* Simb Clinic Staff Authentication Portal */
#auth-portal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #eef5f1 0%, #dbe8e0 100%);
  padding: 24px;
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #14231b;
}

[data-theme="dark"] #auth-portal {
  background: radial-gradient(circle at 50% 20%, #16241c 0%, #0c1410 100%);
  color: #eaf3ed;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 24px 64px -12px rgba(18, 48, 32, 0.14), 0 4px 16px rgba(0, 0, 0, 0.04);
  border-radius: 24px;
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
  animation: authFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .auth-card {
  background: rgba(24, 38, 30, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.5);
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #114232;
  color: #a3e635;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand__mark svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.auth-brand__text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.auth-brand__text small {
  font-size: 12px;
  font-weight: 500;
  color: #617367;
  margin-top: 2px;
}

[data-theme="dark"] .auth-brand__text small {
  color: #9cb1a3;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
}

.auth-sub {
  font-size: 14px;
  color: #5c6f63;
  margin: 0 0 24px 0;
  line-height: 1.45;
}

[data-theme="dark"] .auth-sub {
  color: #8da496;
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.04);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 20px;
}

[data-theme="dark"] .auth-tabs {
  background: rgba(255, 255, 255, 0.05);
}

.auth-tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #5c6f63;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: #fff;
  color: #114232;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .auth-tab-btn.active {
  background: #25392d;
  color: #a3e635;
}

/* Staff Grid for quick terminal PIN entry */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 4px;
}

.staff-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

[data-theme="dark"] .staff-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.staff-card:hover, .staff-card.selected {
  border-color: #114232;
  background: #eef7f1;
}

[data-theme="dark"] .staff-card:hover, [data-theme="dark"] .staff-card.selected {
  border-color: #a3e635;
  background: rgba(163, 230, 53, 0.1);
}

.staff-card__av {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.staff-card__info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.staff-card__name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-card__role {
  font-size: 11px;
  color: #617367;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tone Colors */
.tone-teal { background: #0d9488; }
.tone-sky { background: #0284c7; }
.tone-lilac { background: #9333ea; }
.tone-apricot { background: #ea580c; }
.tone-mint { background: #059669; }
.tone-ink { background: #1e293b; }

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 600;
  color: #37473e;
}

[data-theme="dark"] .auth-field label {
  color: #c7d8ce;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #cbd7cf;
  background: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-family: inherit;
  color: inherit;
  outline: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

[data-theme="dark"] .auth-input {
  background: rgba(18, 30, 24, 0.8);
  border-color: #2b3d32;
}

.auth-input:focus {
  border-color: #114232;
  box-shadow: 0 0 0 3px rgba(17, 66, 50, 0.12);
}

[data-theme="dark"] .auth-input:focus {
  border-color: #a3e635;
  box-shadow: 0 0 0 3px rgba(163, 230, 53, 0.15);
}

.auth-btn {
  width: 100%;
  padding: 13px;
  background: #114232;
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(17, 66, 50, 0.2);
}

.auth-btn:hover {
  background: #16533f;
  transform: translateY(-1px);
}

[data-theme="dark"] .auth-btn {
  background: #a3e635;
  color: #0c1410;
}

[data-theme="dark"] .auth-btn:hover {
  background: #bef264;
}

.auth-err {
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  margin-top: 12px;
  min-height: 18px;
  text-align: center;
}
