/* TebManager Public — standalone design system (do NOT load panel.css here) */
:root {
  --tp-primary: #7367f0;
  --tp-primary-dark: #5e50ee;
  --tp-bg: #f1f5f9;
  --tp-surface: #ffffff;
  --tp-text: #334155;
  --tp-heading: #0f172a;
  --tp-muted: #64748b;
  --tp-border: #e2e8f0;
  --tp-radius: 14px;
  --tp-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  --tp-success: #059669;
  --tp-warning: #d97706;
  --tp-danger: #dc2626;
}
*, *::before, *::after { box-sizing: border-box; }
.teb-public, .teb-public-body, .teb-public-wrap {
  font-family: Vazirmatn, Tahoma, system-ui, sans-serif;
  color: var(--tp-text);
  line-height: 1.6;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}
.teb-public-body { margin: 0; background: var(--tp-bg); min-height: 100vh; }

/* Shell */
.teb-public-header {
  background: var(--tp-surface);
  border-bottom: 1px solid var(--tp-border);
  position: sticky; top: 0; z-index: 100;
}
.teb-public-header__inner {
  max-width: 1040px; margin: 0 auto; padding: 0.85rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.teb-public-brand {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--tp-heading); font-weight: 700;
}
.teb-public-brand__mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--tp-primary), var(--tp-primary-dark));
  color: #fff; display: grid; place-items: center; font-size: 0.72rem; font-weight: 800;
}
.teb-public-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.teb-public-nav a {
  padding: 0.45rem 0.85rem; border-radius: 9px;
  text-decoration: none; color: var(--tp-muted); font-size: 0.875rem; font-weight: 600;
}
.teb-public-nav a:hover, .teb-public-nav a.is-active {
  background: color-mix(in srgb, var(--tp-primary) 12%, transparent);
  color: var(--tp-primary);
}
.teb-public-main { min-height: 55vh; }
.teb-public-footer {
  text-align: center; padding: 2rem 1rem; font-size: 0.8rem; color: var(--tp-muted);
}
.teb-public-wrap { max-width: 920px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }

/* Hero */
.teb-public-hero { text-align: center; margin-bottom: 1.75rem; }
.teb-public-hero h1 {
  margin: 0 0 0.4rem; font-size: clamp(1.45rem, 3.2vw, 2rem);
  color: var(--tp-heading); font-weight: 800;
}
.teb-public-hero p { margin: 0; color: var(--tp-muted); font-size: 0.95rem; }

/* Buttons */
.teb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.7rem 1.25rem; border-radius: 11px; font-weight: 600; font-size: 0.9rem;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  font-family: inherit; line-height: 1.3; transition: filter .15s, background .15s, color .15s;
}
.teb-btn--primary { background: var(--tp-primary); color: #fff !important; }
.teb-btn--primary:hover { filter: brightness(0.94); color: #fff !important; }
.teb-btn--outline { background: transparent; border-color: var(--tp-border); color: var(--tp-heading); }
.teb-btn--outline:hover { border-color: var(--tp-primary); color: var(--tp-primary); }
.teb-btn--ghost { background: transparent; color: var(--tp-muted); border-color: transparent; }
.teb-btn--ghost:hover { color: var(--tp-heading); background: rgba(0,0,0,.04); }
.teb-btn--block { width: 100%; }
.teb-btn--sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.teb-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Forms */
.teb-input {
  width: 100%; padding: 0.75rem 0.95rem; border: 1px solid var(--tp-border);
  border-radius: 11px; font-size: 0.95rem; font-family: inherit; background: #fff; color: var(--tp-heading);
}
.teb-input:focus {
  outline: none; border-color: var(--tp-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tp-primary) 20%, transparent);
}
.teb-form-row { margin-bottom: 1rem; }
.teb-form-row label {
  display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--tp-heading);
}
.teb-form-row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .teb-form-row--2 { grid-template-columns: 1fr; } }
.teb-form-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.25rem; flex-wrap: wrap; }
.teb-check { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }

/* Cards / surface */
.teb-surface {
  background: var(--tp-surface); border: 1px solid var(--tp-border);
  border-radius: var(--tp-radius); padding: 1.35rem; box-shadow: var(--tp-shadow);
}
.teb-surface + .teb-surface { margin-top: 1rem; }
.teb-surface h2 { margin: 0 0 0.85rem; font-size: 1.05rem; color: var(--tp-heading); }

/* Steps */
.teb-steps {
  display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.teb-step {
  border: 1px solid var(--tp-border); background: #fff; border-radius: 999px;
  padding: 0.45rem 1rem; font-size: 0.8rem; font-weight: 600; color: var(--tp-muted);
  cursor: default; font-family: inherit; display: inline-flex; align-items: center; gap: 0.35rem;
}
.teb-step span {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: #e2e8f0; font-size: 0.75rem;
}
.teb-step.is-active { border-color: var(--tp-primary); color: var(--tp-primary); }
.teb-step.is-active span { background: var(--tp-primary); color: #fff; }
.teb-step.is-done { border-color: #86efac; color: var(--tp-success); }
.teb-step.is-done span { background: #d1fae5; color: var(--tp-success); }
.teb-step-panel { display: none; }
.teb-step-panel.is-active { display: block; }

/* Doctor grid */
.teb-doctor-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 1rem;
}
.teb-doctor-grid--lg { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.teb-doctor-card {
  border: 2px solid var(--tp-border); border-radius: 16px; padding: 1.1rem 1rem;
  background: #fff; text-align: center; cursor: pointer; font-family: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
button.teb-doctor-card { width: 100%; }
.teb-doctor-card img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 3px solid #eef2ff; margin: 0 auto; display: block;
}
.teb-doctor-card strong { display: block; margin-top: 0.55rem; color: var(--tp-heading); font-size: 0.95rem; }
.teb-doctor-card .teb-spec { font-size: 0.8rem; color: var(--tp-muted); margin-top: 0.2rem; }
.teb-doctor-card:hover, .teb-doctor-card.is-selected {
  border-color: var(--tp-primary); transform: translateY(-3px);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--tp-primary) 18%, transparent);
}
.teb-doctor-card__actions {
  display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; margin-top: 0.85rem;
}
.teb-badge-soft {
  display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px;
  background: #eef2ff; color: #4f46e5; font-size: 0.72rem; font-weight: 600;
}

/* Slots */
.teb-slots { display: flex; flex-wrap: wrap; gap: 0.5rem; min-height: 48px; margin: 0.75rem 0 1rem; }
.teb-slot {
  padding: 0.55rem 0.95rem; border-radius: 10px; border: 1px solid var(--tp-border);
  background: #f8fafc; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 0.875rem;
}
.teb-slot.is-selected, .teb-slot:hover {
  background: var(--tp-primary); color: #fff; border-color: transparent;
}

/* Alerts */
.teb-alert { padding: 1rem 1.15rem; border-radius: 12px; margin: 1rem 0; }
.teb-alert--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.teb-alert--warning { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.teb-alert--error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.teb-muted { color: var(--tp-muted); font-size: 0.9rem; }
.teb-empty { text-align: center; padding: 2rem 1rem; color: var(--tp-muted); }

/* Profile */
.teb-profile-hero {
  display: flex; gap: 1.35rem; align-items: center; flex-wrap: wrap;
  background: var(--tp-surface); border: 1px solid var(--tp-border);
  border-radius: 20px; padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--tp-shadow);
}
.teb-profile-avatar {
  width: 112px; height: 112px; border-radius: 50%; object-fit: cover;
  border: 3px solid #eef2ff; flex-shrink: 0;
}
.teb-profile-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }

/* Digital card */
.teb-digital-card {
  background: linear-gradient(135deg, var(--card-a, #6366f1), var(--card-b, #4338ca));
  color: #fff; border-radius: 20px; padding: 1.5rem; max-width: 400px;
  margin: 0 auto 1.5rem; box-shadow: 0 16px 40px rgba(79, 70, 229, 0.3);
}
.teb-digital-card__top { display: flex; justify-content: space-between; font-size: 0.8rem; opacity: 0.92; }
.teb-digital-card__tier { text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.teb-digital-card__name { font-size: 1.4rem; font-weight: 800; margin: 1.25rem 0 0.35rem; }
.teb-digital-card__code { font-size: 1rem; opacity: 0.95; margin-bottom: 1rem; letter-spacing: 0.02em; }
.teb-digital-card__meta { display: flex; justify-content: space-between; font-size: 0.85rem; opacity: 0.9; }

/* Portal */
.teb-portal-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; justify-content: center; }
.teb-chip-pill {
  padding: 0.4rem 0.9rem; border-radius: 999px; background: #fff;
  border: 1px solid var(--tp-border); font-size: 0.8rem; font-weight: 600; text-decoration: none; color: var(--tp-heading);
}
.teb-chip-pill--accent { color: var(--tp-primary); border-color: color-mix(in srgb, var(--tp-primary) 30%, #fff); }
.teb-portal-list { list-style: none; padding: 0; margin: 0; }
.teb-portal-list li {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
  padding: 0.8rem 0; border-bottom: 1px solid #f1f5f9;
}
.teb-flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Badge status (shared) */
.teb-badge {
  display: inline-block; padding: 0.2rem 0.55rem; border-radius: 6px;
  font-size: 0.7rem; font-weight: 600;
}
.teb-badge--success { background: rgba(5,150,105,.12); color: #059669; }
.teb-badge--warning { background: rgba(217,119,6,.12); color: #d97706; }
.teb-badge--danger { background: rgba(220,38,38,.12); color: #dc2626; }
.teb-badge--info, .teb-badge--primary { background: rgba(115,103,240,.12); color: #7367f0; }

/* Queue TV */
.teb-queue-screen {
  min-height: 100vh; background: #0b1220; color: #e2e8f0;
  padding: 1.5rem; font-family: Vazirmatn, Tahoma, sans-serif;
}
.teb-queue-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap;
}
.teb-queue-clinic { font-size: 0.9rem; opacity: 0.65; }
.teb-queue-title { font-size: 1.55rem; font-weight: 800; }
.teb-queue-clock { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.teb-queue-date { text-align: left; opacity: 0.65; font-size: 0.9rem; }
.teb-queue-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .teb-queue-grid { grid-template-columns: 1fr; } }
.teb-queue-current, .teb-queue-list-card {
  background: #151d2e; border-radius: 20px; padding: 1.25rem; border: 1px solid #243044;
}
.teb-queue-current h2, .teb-queue-list-card h2 { margin: 0 0 1rem; font-size: 1rem; opacity: 0.75; }
.teb-queue-now {
  text-align: center; padding: 2.2rem 1rem; border-radius: 16px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}
.teb-queue-now.is-pulse { animation: tebPulse 0.6s ease; }
@keyframes tebPulse { 0% { transform: scale(1); } 50% { transform: scale(1.03); } 100% { transform: scale(1); } }
.teb-queue-now__name { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 800; }
.teb-queue-now__meta { opacity: 0.85; margin-top: 0.35rem; }
.teb-queue-eta { text-align: center; opacity: 0.7; font-size: 0.9rem; }
.teb-queue-list { list-style: none; padding: 0; margin: 0; max-height: 55vh; overflow: auto; }
.teb-queue-list li {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 0.35rem; border-bottom: 1px solid #243044;
}
.teb-queue-list .q-num {
  width: 28px; height: 28px; border-radius: 8px; background: #243044;
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 700;
}
.teb-queue-list .q-name { flex: 1; font-weight: 600; }
.teb-queue-list .q-time { opacity: 0.7; font-size: 0.85rem; }
.teb-queue-list li.is-vip .q-num { background: #f59e0b; color: #111; }
.teb-queue-footer { text-align: center; margin-top: 1.25rem; opacity: 0.45; font-size: 0.8rem; }

body.teb-view-queue .teb-public-header,
body.teb-view-queue .teb-public-footer { display: none !important; }
body.teb-view-queue { background: #0b1220; }

.teb-form-section { margin-bottom: 1.35rem; padding-bottom: 1rem; border-bottom: 1px solid #f1f5f9; }
.teb-form-section:last-of-type { border-bottom: 0; }
.teb-form-section h3 { margin: 0 0 0.75rem; font-size: 0.95rem; color: var(--tp-heading); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}



/* ============================================================
   TebManager Public UI v5.9.5 — Professional header & pages
   ============================================================ */

/* —— Professional header —— */
.teb-ph {
  background: #fff;
  border-bottom: 1px solid var(--tp-border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 rgba(15,23,42,.04);
}
.teb-ph__bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: .7rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.teb-ph__brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  color: var(--tp-heading);
  font-weight: 800;
  min-width: 0;
}
.teb-ph__mark {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--tp-primary), color-mix(in srgb, var(--tp-primary) 70%, #0f172a));
  color: #fff;
  display: grid; place-items: center;
  font-size: .72rem; font-weight: 800;
  flex-shrink: 0;
}
.teb-ph__logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.teb-ph__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  font-size: .95rem;
}
.teb-ph__nav {
  display: flex;
  gap: .2rem;
  margin-inline-start: auto;
}
.teb-ph__link {
  padding: .42rem .9rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--tp-muted);
  font-size: .875rem;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.teb-ph__link:hover { color: var(--tp-heading); background: #f8fafc; }
.teb-ph__link.is-active {
  background: color-mix(in srgb, var(--tp-primary) 12%, transparent);
  color: var(--tp-primary);
}
.teb-ph__menu {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--tp-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  margin-inline-start: auto;
}
.teb-ph__menu span {
  display: block;
  width: 18px; height: 2px;
  background: #334155;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.teb-ph__menu.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.teb-ph__menu.is-open span:nth-child(2) { opacity: 0; }
.teb-ph__menu.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.teb-ph__drawer {
  border-top: 1px solid var(--tp-border);
  background: #fff;
  padding: .5rem .75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.teb-ph__drawer a {
  padding: .75rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--tp-heading);
  font-weight: 600;
}
.teb-ph__drawer a:hover { background: #f8fafc; }
.teb-pf {
  border-top: 1px solid var(--tp-border);
  background: #fff;
  margin-top: 2rem;
}
.teb-pf__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.25rem;
  text-align: center;
  font-size: .8rem;
  color: var(--tp-muted);
}
.teb-pf__sep { margin: 0 .35rem; opacity: .5; }

@media (max-width: 720px) {
  .teb-ph__nav { display: none; }
  .teb-ph__menu { display: inline-flex; }
  .teb-ph__name { max-width: 140px; }
}

/* Hide legacy header if both exist */
/* classic header restored */

/* —— Page primitives —— */
.teb-page { max-width: 920px; margin: 0 auto; padding: 1.5rem 1.15rem 3rem; }
.teb-page__head { margin-bottom: 1.35rem; }
.teb-page__head h1 {
  margin: 0 0 .35rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--tp-heading);
  letter-spacing: -.02em;
}
.teb-page__head p { margin: 0; color: var(--tp-muted); font-size: .92rem; }

.teb-card-soft {
  background: #fff;
  border: 1px solid var(--tp-border);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(15,23,42,.04);
  overflow: hidden;
}
.teb-card-soft__body { padding: 1.25rem 1.35rem; }

/* Doctor cards grid */
.teb-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.teb-doc-card {
  background: #fff;
  border: 1px solid var(--tp-border);
  border-radius: 16px;
  padding: 1.15rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  cursor: pointer;
}
.teb-doc-card:hover {
  border-color: color-mix(in srgb, var(--tp-primary) 45%, var(--tp-border));
  box-shadow: 0 10px 28px rgba(15,23,42,.07);
  transform: translateY(-2px);
}
.teb-doc-card.is-selected {
  border-color: var(--tp-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tp-primary) 18%, transparent);
}
.teb-doc-card__top { display: flex; gap: .85rem; align-items: center; }
.teb-doc-card__avatar {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  color: #3730a3;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.1rem;
  flex-shrink: 0;
  overflow: hidden;
}
.teb-doc-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.teb-doc-card__name { font-weight: 800; color: var(--tp-heading); font-size: .98rem; margin: 0; }
.teb-doc-card__spec { color: var(--tp-muted); font-size: .82rem; margin: .15rem 0 0; }
.teb-doc-card__meta {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-top: auto;
}
.teb-chip {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  background: #f1f5f9; color: #475569;
}
.teb-chip--ok { background: #ecfdf5; color: #047857; }
.teb-chip--warn { background: #fffbeb; color: #b45309; }

/* Booking steps */
.teb-steps {
  display: flex; gap: .5rem; margin-bottom: 1.35rem;
  overflow-x: auto; padding-bottom: .25rem;
}
.teb-steps__item {
  display: flex; align-items: center; gap: .4rem;
  padding: .4rem .7rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--tp-muted);
  font-size: .8rem; font-weight: 600;
  white-space: nowrap;
}
.teb-steps__item.is-active { background: color-mix(in srgb, var(--tp-primary) 14%, transparent); color: var(--tp-primary); }
.teb-steps__item.is-done { background: #ecfdf5; color: #047857; }
.teb-steps__num {
  width: 22px; height: 22px; border-radius: 50%;
  background: #e2e8f0; color: #64748b;
  display: grid; place-items: center;
  font-size: .7rem; font-weight: 800;
}
.teb-steps__item.is-active .teb-steps__num { background: var(--tp-primary); color: #fff; }
.teb-steps__item.is-done .teb-steps__num { background: #10b981; color: #fff; }

.teb-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: .5rem;
}
.teb-slot {
  padding: .65rem .4rem;
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.teb-slot:hover:not(:disabled) { border-color: var(--tp-primary); color: var(--tp-primary); }
.teb-slot.is-selected { background: var(--tp-primary); border-color: var(--tp-primary); color: #fff; }
.teb-slot:disabled { opacity: .4; cursor: not-allowed; }

/* Patient portal */
.teb-portal-tabs {
  display: flex; gap: .35rem;
  margin-bottom: 1.15rem;
  overflow-x: auto;
  padding-bottom: .15rem;
}
.teb-portal-tabs button {
  border: 0; background: #f1f5f9;
  padding: .55rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600; font-size: .85rem;
  color: var(--tp-muted);
  cursor: pointer;
  white-space: nowrap;
}
.teb-portal-tabs button.is-active {
  background: var(--tp-primary);
  color: #fff;
}
.teb-appt-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: .75rem; padding: .9rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.teb-appt-row:last-child { border-bottom: 0; }
.teb-status {
  font-size: .72rem; font-weight: 700;
  padding: .2rem .55rem; border-radius: 999px;
}
.teb-status--pending { background: #fffbeb; color: #b45309; }
.teb-status--confirmed { background: #ecfdf5; color: #047857; }
.teb-status--cancelled { background: #fef2f2; color: #b91c1c; }
.teb-status--done { background: #eff6ff; color: #1d4ed8; }

/* Digital card */
.teb-dcard {
  max-width: 380px;
  margin: 0 auto;
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 55%, #312e81 100%);
  color: #f8fafc;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(15,23,42,.35);
  position: relative;
  overflow: hidden;
}
.teb-dcard::after {
  content: '';
  position: absolute;
  inset: -40% -20% auto auto;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(99,102,241,.35), transparent 70%);
  pointer-events: none;
}
.teb-dcard__clinic { font-size: .78rem; opacity: .75; margin-bottom: .85rem; }
.teb-dcard__name { font-size: 1.35rem; font-weight: 800; margin: 0 0 .25rem; }
.teb-dcard__code {
  font-family: ui-monospace, monospace;
  letter-spacing: .08em;
  font-size: .9rem;
  opacity: .9;
  margin-bottom: 1rem;
}
.teb-dcard__row {
  display: flex; justify-content: space-between;
  font-size: .82rem; opacity: .85;
  padding: .35rem 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.teb-dcard__qr {
  margin-top: 1rem;
  background: #fff;
  border-radius: 12px;
  padding: .75rem;
  display: grid; place-items: center;
}
.teb-dcard__qr img, .teb-dcard__qr canvas { max-width: 140px; height: auto; }

/* Queue display pro */
.teb-qboard {
  min-height: 100vh;
  background: #0b1220;
  color: #f8fafc;
  padding: 1.25rem 1.5rem 2rem;
  font-family: Vazirmatn, Tahoma, sans-serif;
}
.teb-qboard__hdr {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.25rem;
  gap: 1rem;
}
.teb-qboard__hdr h1 { margin: 0; font-size: 1.35rem; font-weight: 800; }
.teb-qboard__clock {
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  opacity: .8;
  letter-spacing: .04em;
}
.teb-qboard__now {
  background: linear-gradient(135deg, var(--tp-primary), #4f46e5);
  border-radius: 20px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 16px 40px rgba(79,70,229,.35);
}
.teb-qboard__now-label { font-size: .9rem; opacity: .85; margin-bottom: .35rem; }
.teb-qboard__now-name { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; line-height: 1.2; }
.teb-qboard__now-meta { margin-top: .4rem; opacity: .85; font-size: 1rem; }
.teb-qboard__cols {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1rem;
}
@media (max-width: 800px) {
  .teb-qboard__cols { grid-template-columns: 1fr; }
}
.teb-qboard__panel {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 1rem 1.15rem;
}
.teb-qboard__panel h2 {
  margin: 0 0 .85rem;
  font-size: .95rem;
  color: #a5b4fc;
  font-weight: 700;
}
.teb-qboard__list { list-style: none; margin: 0; padding: 0; }
.teb-qboard__list li {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 0;
  border-bottom: 1px solid #1f2937;
}
.teb-qboard__list li:last-child { border-bottom: 0; }
.teb-qboard__list .qn {
  width: 30px; height: 30px; border-radius: 8px;
  background: #1f2937;
  display: grid; place-items: center;
  font-size: .75rem; font-weight: 800;
}
.teb-qboard__list .qname { flex: 1; font-weight: 600; }
.teb-qboard__list .qtime { opacity: .65; font-size: .85rem; font-variant-numeric: tabular-nums; }
.teb-qboard__list li.is-vip .qn { background: #f59e0b; color: #111; }

/* Doctor profile hero */
.teb-doc-hero {
  display: flex; gap: 1.25rem; align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.teb-doc-hero__avatar {
  width: 96px; height: 96px;
  border-radius: 22px;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  display: grid; place-items: center;
  font-size: 2rem; font-weight: 800; color: #3730a3;
  overflow: hidden; flex-shrink: 0;
}
.teb-doc-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.teb-doc-hero__info { flex: 1; min-width: 200px; }
.teb-doc-hero__info h1 { margin: 0 0 .25rem; font-size: 1.45rem; font-weight: 800; }
.teb-doc-hero__info .spec { color: var(--tp-muted); margin: 0 0 .75rem; }
.teb-doc-hero__actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Intake form */
.teb-field { margin-bottom: .9rem; }
.teb-field label {
  display: block;
  font-size: .82rem; font-weight: 600;
  color: #475569;
  margin-bottom: .35rem;
}
.teb-field input,
.teb-field select,
.teb-field textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1px solid var(--tp-border);
  border-radius: 11px;
  font-family: inherit;
  font-size: .95rem;
  background: #fff;
  color: var(--tp-heading);
  transition: border-color .15s, box-shadow .15s;
}
.teb-field input:focus,
.teb-field select:focus,
.teb-field textarea:focus {
  outline: none;
  border-color: var(--tp-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tp-primary) 18%, transparent);
}
.teb-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
@media (max-width: 560px) {
  .teb-field-row { grid-template-columns: 1fr; }
}

/* Empty / loading states */
.teb-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--tp-muted);
}
.teb-empty strong { display: block; color: var(--tp-heading); margin-bottom: .35rem; }
.teb-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: teb-shimmer 1.2s infinite;
  border-radius: 10px;
  height: 48px;
}
@keyframes teb-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* اعداد فارسی در UI */
.teb-stat-card__value,
.teb-topbar-time,
.teb-topbar-date,
.teb-qboard__clock,
.teb-queue-now__name,
.teb-bb-sticky,
.teb-page-heading__title {
  font-feature-settings: "ss01" 0;
}
.teb-fa-num, [data-fa-num] {
  font-variant-numeric: normal;
}
