/* هلا كير — واجهة PHP (RTL) */
*, *::before, *::after { box-sizing: border-box; }

.web-shell {
  font-family: "Cairo", "Segoe UI", system-ui, sans-serif;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #eef2f7;
  background-image: linear-gradient(180deg, #f8fafc 0%, #eef2f7 32%, #e8edf4 100%);
  color: #1e293b;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* لوحة الفريق — ثيم هادئ (خلفية طبية فاتحة، مثل عيادة تاج) */
.web-shell--panel {
  color-scheme: light;
  background-color: #f1f5f9;
  background-image: radial-gradient(1000px 480px at 0% 0%, rgba(13, 148, 136, 0.065), transparent 58%),
    radial-gradient(720px 420px at 100% 100%, rgba(14, 165, 233, 0.05), transparent 55%);
  background-attachment: fixed;
}

.web-top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.75rem 1.25rem; background: #fff; border-bottom: 1px solid #e2e8f0; }
.web-top a { color: #0d9488; font-weight: 600; text-decoration: none; }
.web-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem 1.25rem; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.web-nav a { padding: 0.35rem 0.65rem; border-radius: 8px; text-decoration: none; color: #334155; font-size: 0.9rem; }
.web-nav a:hover { background: #e2e8f0; }

.muted { color: #64748b; font-size: 0.88rem; }
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 560px) {
  .grid2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.grid-kpi { gap: 1rem 1.1rem; }

.kpi {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f766e;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
table.data th, table.data td { padding: 0.5rem 0.65rem; border-bottom: 1px solid #e2e8f0; text-align: right; }
table.data th { background: #f1f5f9; font-size: 0.78rem; color: #64748b; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  background: #0d9488;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
}
.btn:hover { background: #0f766e; }
.btn:active { transform: scale(0.98); }
.btn.secondary { background: transparent; color: #334155; border: 1px solid #e2e8f0; }
.btn.secondary:hover { background: #f8fafc; }

.input {
  width: 100%;
  max-width: 320px;
  padding: 0.55rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
  outline: none;
  border-color: #5eead4;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.25);
}

label { display: block; margin: 0.35rem 0 0.15rem; font-size: 0.85rem; color: #64748b; }
.pill {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #ccfbf1;
  color: #115e59;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: lowercase;
}
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.82rem; border-radius: 9px; }

/* ——— شريط علوي + هيكل التطبيق ——— */
.web-app-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  padding: 0.75rem 1.35rem;
  background: linear-gradient(120deg, #0d4f4a 0%, #0f766e 38%, #0d9488 72%, #14b8a6 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(15, 118, 110, 0.28);
  position: sticky;
  top: 0;
  z-index: 40;
}
.web-brand { display: flex; flex-direction: column; gap: 0.05rem; min-width: 7.5rem; }
.web-brand-link {
  color: #fff;
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.web-brand-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.web-brand-sub { color: rgba(255, 255, 255, 0.88); font-size: 0.78rem; font-weight: 600; }

.web-header-search {
  flex: 1;
  min-width: 200px;
  max-width: 440px;
  margin-inline: auto;
}
.web-search-input {
  max-width: none;
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.web-search-input::placeholder { color: #94a3b8; }

.web-user-area {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-inline-start: auto;
}
.web-user-area .muted {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  font-size: 0.9rem;
}
.web-user-area .pill {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.web-user-area .btn.secondary {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}
.web-user-area .btn.secondary:hover { background: rgba(255, 255, 255, 0.22); }
.web-user-area .btn {
  background: #fff;
  color: #0f766e;
  border: none;
}
.web-user-area .btn:hover { background: #f0fdfa; color: #134e4a; }

/* رأس أبيض داخل لوحة الفريق (مثل أنظمة العيادات التقليدية) */
.web-app-header--panel {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 4px 22px rgba(15, 23, 42, 0.05);
}
.web-app-header--panel .web-brand-link {
  color: #0f172a;
  font-weight: 800;
}
.web-app-header--panel .web-brand-sub {
  color: #64748b;
  font-weight: 600;
}
.web-app-header--panel .web-user-area .muted {
  color: #475569;
}
.web-app-header--panel .web-user-area .pill {
  background: #e8f4fc;
  color: #1e4976;
  border: 1px solid #bfdbfe;
}
.web-app-header--panel .web-search-input {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}
.web-app-header--panel .web-header-search-btn {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: #fff;
  border: 1px solid rgba(13, 148, 136, 0.35);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.22);
}
.web-app-header--panel .web-header-search-btn:hover {
  background: linear-gradient(135deg, #2dd4bf 0%, #0f766e 100%);
  filter: brightness(1.02);
}
.web-app-header--panel .web-user-area .btn.secondary {
  border-color: #cbd5e1;
  color: #334155;
  background: #fff;
}
.web-app-header--panel .web-user-area .btn.secondary:hover {
  background: #f1f5f9;
}
.web-app-header--panel .web-user-area .btn {
  background: #0d9488;
  color: #fff;
}
.web-app-header--panel .web-user-area .btn:hover {
  background: #0f766e;
  color: #fff;
}

.web-app-body {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  min-height: calc(100vh - 64px);
  min-height: calc(100dvh - 64px);
}

.web-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #fff;
  border-inline-end: 1px solid #e2e8f0;
  padding: 0.5rem 0 1.25rem;
  box-shadow: -4px 0 20px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 64px;
  align-self: flex-start;
  max-height: calc(100vh - 64px);
  max-height: calc(100dvh - 64px);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 20;
}

/* شريط جانبي — لوحة فريق: فاتح وهادئ (مثل ثيم clinic في تاج) */
.web-sidebar--panel {
  --sb-teal: #0d9488;
  --sb-teal-deep: #0f766e;
  --sb-surface: #ffffff;
  --sb-surface-hover: #f0fdfa;
  --sb-surface-muted: #f8fafc;
  --sb-line: #e2e8f0;
  background: linear-gradient(195deg, #ffffff 0%, #f8fafc 52%, #f1f5f9 100%);
  border-inline-end: 1px solid #e2e8f0;
  box-shadow: 4px 0 28px rgba(15, 23, 42, 0.04);
  padding: 0;
}
.web-sidebar--panel::-webkit-scrollbar { width: 6px; }
.web-sidebar--panel::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }

.web-sidebar::-webkit-scrollbar { width: 6px; }
.web-sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }

.web-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 0.9rem 1rem;
  margin: 0.5rem 0.65rem 0.35rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}
.web-sidebar-brand-mark {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  background: linear-gradient(145deg, #14b8a6 0%, var(--sb-teal-deep) 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.45);
}
.web-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.web-sidebar-brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.web-sidebar-brand-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(226, 252, 249, 0.75);
  line-height: 1.3;
}
.web-sidebar--panel .web-sidebar-brand {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
.web-sidebar--panel .web-sidebar-brand-mark {
  border: 1px solid #ccfbf1;
  box-shadow: 0 2px 12px rgba(13, 148, 136, 0.18);
}
.web-sidebar--panel .web-sidebar-brand-name {
  color: #0f172a;
}
.web-sidebar--panel .web-sidebar-brand-tag {
  color: #64748b;
}

.web-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem 1rem;
}

.web-sidebar--panel .web-nav-accordion {
  border: 1px solid var(--sb-line);
  border-radius: 14px;
  background: var(--sb-surface-muted);
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.web-sidebar--panel .web-nav-accordion[open] {
  border-color: #99f6e4;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.08), 0 8px 26px rgba(15, 23, 42, 0.05);
}
.web-nav-accordion {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.2rem;
  padding-top: 0.15rem;
}
.web-sidebar:not(.web-sidebar--panel) .web-nav-accordion {
  border-radius: 0;
  border: none;
  border-top: 1px solid #e2e8f0;
  background: transparent;
}
.web-nav-accordion:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.web-sidebar:not(.web-sidebar--panel) .web-nav-accordion:first-child {
  border-top: none;
}
.web-sidebar:not(.web-sidebar--panel) .web-nav-accordion-summary {
  color: #64748b;
  background: transparent;
  padding-inline-start: 1.75rem;
}
.web-sidebar:not(.web-sidebar--panel) .web-nav-accordion[open] > .web-nav-accordion-summary {
  color: #0f172a;
}
.web-nav-accordion-summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.65);
  padding: 0.55rem 0.5rem 0.45rem 1.75rem;
  line-height: 1.35;
  position: relative;
  user-select: none;
  text-transform: none;
}
.web-sidebar--panel .web-nav-accordion-summary {
  font-size: 0.74rem;
  padding: 0.7rem 2rem 0.65rem 0.85rem;
  color: #64748b;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}
.web-nav-accordion[open] > .web-nav-accordion-summary {
  color: rgba(255, 255, 255, 0.95);
}
.web-sidebar--panel .web-nav-accordion[open] > .web-nav-accordion-summary {
  color: #0f172a;
  background: #fff;
  border-bottom-color: #f1f5f9;
}
.web-nav-accordion-summary::-webkit-details-marker { display: none; }
.web-nav-accordion-summary::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.35rem;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 0.45rem;
  height: 0.45rem;
  border-inline-end: 2px solid rgba(255, 255, 255, 0.55);
  border-bottom: 2px solid rgba(255, 255, 255, 0.55);
  transform: translateY(-65%) rotate(-45deg);
  transition: transform 0.2s;
}
.web-sidebar--panel .web-nav-accordion-summary::before {
  inset-inline-start: 0.65rem;
  border-inline-end-color: #94a3b8;
  border-bottom-color: #94a3b8;
}
.web-nav-accordion[open] > .web-nav-accordion-summary::before {
  transform: translateY(-35%) rotate(45deg);
}
.web-nav-accordion-panel {
  padding: 0.1rem 0.35rem 0.65rem 0.35rem;
  margin-inline-start: 0.4rem;
  padding-inline-start: 0.7rem;
  border-inline-start: 2px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.web-sidebar--panel .web-nav-accordion-panel {
  margin-inline-start: 0;
  padding-inline: 0.45rem 0.5rem;
  padding-block: 0.35rem 0.65rem;
  border-inline-start: none;
  border-top: 1px solid #f1f5f9;
  gap: 0.2rem;
  background: #fff;
}

.web-nav-group {
  margin-bottom: 0.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #f1f5f9;
}
.web-nav-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.web-nav-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #94a3b8;
  padding: 0.5rem 0.65rem 0.35rem;
  line-height: 1.35;
}

.web-sidebar-link {
  display: block;
  padding: 0.5rem 0.7rem;
  margin: 0.1rem 0;
  border-radius: 10px;
  text-decoration: none;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  border: 1px solid transparent;
}
.web-sidebar--panel .web-sidebar-link {
  color: #334155;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  margin: 0;
  padding: 0.52rem 0.65rem;
  border-inline-start: 3px solid transparent;
}
.web-sidebar--panel .web-sidebar-link--hub {
  font-weight: 800;
  font-size: 0.86rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}
.web-sidebar--panel .web-sidebar-link--hub:hover {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #0f766e;
}
.web-sidebar--panel .web-sidebar-link--hub.active {
  background: #ecfdf5;
  border-inline-start-color: #2dd4bf;
  border-color: #5eead4;
  color: #0f766e;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.1);
}
.web-sidebar-link:hover {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #d1fae5;
}
.web-sidebar--panel .web-sidebar-link:hover {
  background: var(--sb-surface-hover);
  color: #0f766e;
  border-color: transparent;
}
.web-sidebar:not(.web-sidebar--panel) .web-sidebar-link--hub {
  font-weight: 800;
  background: #f1f5f9;
  border-color: #e2e8f0;
}
.web-sidebar:not(.web-sidebar--panel) .web-sidebar-link--hub:hover {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #0f766e;
}
.web-sidebar:not(.web-sidebar--panel) .web-nav-accordion-panel {
  border-inline-start-color: #e2e8f0;
}
.web-sidebar-link.active {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #0f766e;
  font-weight: 800;
  border-color: #99f6e4;
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.12);
}
.web-sidebar--panel .web-sidebar-link.active {
  background: #f0fdfa;
  color: #0d9488;
  font-weight: 800;
  border: 1px solid #99f6e4;
  border-inline-start: 3px solid #2dd4bf;
  box-shadow: 0 1px 8px rgba(13, 148, 136, 0.1);
}

.web-main {
  flex: 1;
  padding: 1.35rem 1.65rem 2rem;
  max-width: none;
  margin: 0;
  background: transparent;
  min-width: 0;
}
.web-shell--panel .web-main {
  background: transparent;
}
.web-shell--panel .card {
  border-color: #e2e8f0;
  box-shadow: 0 4px 22px rgba(15, 23, 42, 0.05);
}
.web-shell--panel .table-wrap {
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}
.web-shell--panel .hub-card--classic:hover {
  border-color: #99f6e4;
  box-shadow: 0 8px 28px rgba(13, 148, 136, 0.1);
}

/* ——— عناوين الصفحات ——— (مخفاة بالكامل — لا عناوين رئيسية/وصف علوي) */
.page-hero {
  display: none !important;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}
.page-hero-dashboard {
  border-inline-start: 4px solid #0d9488;
  background: linear-gradient(135deg, #fff 0%, #f8fffc 100%);
}
.web-shell--panel .page-hero-dashboard {
  border-inline-start: 4px solid #0d9488;
  background: linear-gradient(135deg, #fff 0%, #f8fffc 100%);
}
.page-title {
  margin: 0 0 0.4rem;
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.page-hero--compact {
  padding: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}
.page-hero--compact .page-title {
  font-size: 1.35rem;
  margin-bottom: 0;
}
.page-lead { margin: 0; max-width: 42rem; line-height: 1.6; }

/* مسار الحسابات — شريط أرقام بدل فقرات طويلة */
.flow-kpi-strip {
  margin-bottom: 0.5rem;
}
.flow-kpi-strip .card-kpi {
  min-height: 4.25rem;
  padding: 0.55rem 0.7rem;
  margin-bottom: 0;
}
.flow-kpi-strip .card-kpi .kpi {
  font-size: 1.15rem;
}
.flow-kpi-actions {
  margin: 0 0 0.85rem;
}
table.data tbody th[scope="row"] {
  text-align: right;
  background: #f8fafc;
  font-weight: 700;
  color: #334155;
  width: 42%;
}
.section-title { margin: 0 0 0.85rem; font-size: 1.08rem; font-weight: 700; color: #1e293b; }
.subsection-title { margin: 1rem 0 0.5rem; font-size: 0.95rem; font-weight: 700; color: #475569; }

.card-kpi {
  min-height: 5.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card-kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}
.card-kpi .muted {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.35;
}

.card-narrow { max-width: 440px; margin: 1rem auto; }
.card-tight { padding: 0.75rem 1rem; margin-bottom: 0.75rem; }
.card-filter .filter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 1rem;
  align-items: end;
}
@media (min-width: 640px) {
  .card-filter .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card-filter .filter-row:has(> div:nth-child(2)) > button[type="submit"] {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
.card-filter .filter-row .input {
  max-width: none;
  width: 100%;
}

/* بحث شامل — نموذج موحّد */
.page-hero--search-tight {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.page-hero--search-tight .page-title {
  margin: 0;
}
.search-help-trigger {
  margin: 0;
  padding: 0.25rem 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0d9488;
  text-decoration: underline;
  cursor: pointer;
}
.search-help-trigger:hover {
  color: #0f766e;
}
.search-unified-form {
  padding: 1rem 1.1rem;
}
.search-help-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.65rem;
}
.search-unified-main {
  margin-bottom: 0.85rem;
}
.search-unified-q-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: #334155;
  margin-bottom: 0.35rem;
}
.search-unified-q-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}
.search-unified-q {
  flex: 1 1 220px;
  min-width: 0;
  max-width: none;
}
.search-unified-microhint {
  margin: 0.4rem 0 0;
}
.search-unified-fieldset {
  margin: 0;
  padding: 0.85rem 0 0;
  border: none;
  border-top: 1px solid #e2e8f0;
}
.search-unified-legend {
  padding: 0;
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1e293b;
}
.search-unified-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  align-items: center;
}
.search-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  font-size: 0.86rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
}
.search-type-chip:has(input:checked) {
  background: #ecfdf5;
  border-color: #5eead4;
  color: #0f766e;
}
.search-type-chip input {
  margin: 0;
}
.search-unified-dates {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
}
.search-unified-dates-title {
  margin: 0 0 0.5rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: #334155;
}
.search-unified-dates-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}
.search-unified-date-field {
  flex: 1 1 160px;
  min-width: 0;
}
.search-unified-date-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.input-block { max-width: none; }
.btn-block { width: 100%; text-align: center; }
.mt-1 { margin-top: 0.75rem; }
.small { font-size: 0.82rem; }
.pill-error { background: #fee2e2 !important; color: #991b1b !important; }
.pre-debug { overflow: auto; font-size: 0.85rem; }

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  margin-bottom: 1rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.table-wrap table.data { border: none; border-radius: 0; margin: 0; }

.inline-form { display: inline; }
.inline-metrics { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }

.chat-thread { max-height: 440px; overflow-y: auto; }
.chat-bubble { padding: 0.75rem 0; border-bottom: 1px solid #f1f5f9; }
.chat-bubble:last-child { border-bottom: none; }

.tabs-bar { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.tab-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  color: #475569;
  cursor: pointer;
}
.tab-btn.active { background: #ecfdf5; border-color: #99f6e4; color: #0f766e; }
.tab-panel.hidden { display: none; }
.mh-row { margin-bottom: 0.5rem; }
.mh-label { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-weight: 600; }
.svc-line { display: block; margin: 0.35rem 0; }
.svc-pick { margin: 0.35rem 0; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

.svc-line-picker__rows { margin-top: 0.25rem; }
.svc-line-picker__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.svc-line-picker__row .svc-line-picker__select {
  flex: 1 1 14rem;
  min-width: 12rem;
}
hr.sep { border: 0; border-top: 1px solid #e2e8f0; margin: 1rem 0; }
.hidden { display: none !important; }

/* مراكز الأقسام (Hub) — عمودان ثابتان على الشاشات المتوسطة+ */
.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.hub-grid--classic {
  gap: 1.15rem;
}
@media (min-width: 640px) {
  .hub-grid,
  .hub-grid--classic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.15rem 1.2rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
  min-height: 8.5rem;
}
.hub-card--classic {
  min-height: 10.5rem;
  padding: 1.1rem 1.15rem 1rem;
  border-radius: 12px;
  border: 1px solid #dce3ed;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  align-items: stretch;
  text-align: start;
  display: grid;
  grid-template-columns: 3.35rem 1fr;
  column-gap: 0.9rem;
  row-gap: 0.35rem;
}
.hub-card:hover {
  border-color: #99f6e4;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.12);
  transform: translateY(-2px);
}
.hub-card--classic:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 28px rgba(33, 97, 242, 0.12);
  transform: translateY(-3px);
}
.hub-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.hub-card-top--classic {
  justify-content: flex-start;
  margin-bottom: 0;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
}
.hub-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.35rem;
  height: 3.35rem;
  margin: 0;
  font-size: 1.55rem;
  line-height: 1;
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 12px;
  border: 1px solid #bfdbfe;
}
.hub-card--classic .hub-card-title {
  display: block;
  margin-top: 0;
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  font-size: 1.02rem;
}
.hub-card-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: #0f172a;
  line-height: 1.35;
}
.hub-card-badge {
  flex-shrink: 0;
  min-width: 1.65rem;
  text-align: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.78rem;
  font-weight: 800;
}
.hub-card--classic .hub-card-badge {
  position: absolute;
  margin: 0;
}
.hub-card-top--classic {
  position: relative;
}
.hub-card-desc {
  margin: 0;
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.55;
  flex: 1;
}
.hub-card--classic .hub-card-desc {
  text-align: start;
  font-size: 0.83rem;
  margin-top: 0;
  grid-column: 2;
  grid-row: 2;
  line-height: 1.5;
}
.hub-card-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0d9488;
  margin-top: auto;
}
.hub-card--classic .hub-card-enter {
  grid-column: 1 / -1;
  grid-row: 3;
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}
.hub-card-enter {
  display: block;
  margin-top: auto;
  padding-top: 0.85rem;
}
.hub-card-enter-btn {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: filter 0.15s, transform 0.1s;
}
.hub-card--classic:hover .hub-card-enter-btn {
  filter: brightness(1.05);
}
.hub-card--enter-cyan .hub-card-enter-btn { background: linear-gradient(180deg, #06b6d4 0%, #0891b2 100%); }
.hub-card--enter-blue .hub-card-enter-btn { background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%); }
.hub-card--enter-green .hub-card-enter-btn { background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%); }
.hub-card--enter-royal .hub-card-enter-btn { background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%); }
.hub-card--enter-slate .hub-card-enter-btn { background: linear-gradient(180deg, #64748b 0%, #475569 100%); }
.hub-card--enter-red .hub-card-enter-btn { background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%); }
.hub-card--enter-yellow .hub-card-enter-btn { background: linear-gradient(180deg, #eab308 0%, #ca8a04 100%); color: #1e293b; }
.hub-back { margin: 0 0 0.85rem; }

/* صفحات التسويق — توضيح مسار الإعلان + تنسيق أوضح */
#add-ad {
  scroll-margin-top: 5.5rem;
}

.marketing-campaigns-page,
.team-portal-page {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.team-portal-welcome-meta {
  margin: 0.65rem 0 0;
}
.team-portal-user-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f766e;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.22);
}
.web-shell--panel .team-portal-user-chip {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.22);
}

.team-portal-shortcuts .hub-grid {
  margin-bottom: 0;
}

.portal-tip-card {
  margin-bottom: 0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.web-shell--panel .portal-tip-card {
  background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
}
.portal-tip-card__head {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.portal-tip-card__badge {
  background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fcd34d;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.marketing-page-hero {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.15rem;
  padding-bottom: 1.1rem;
}
.marketing-page-hero__intro .page-title {
  margin-bottom: 0.35rem;
}
.marketing-page-hero .marketing-breadcrumb {
  margin-top: 0.15rem;
}

.marketing-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0.55rem 0.85rem;
  list-style: none;
  background: rgba(13, 148, 136, 0.06);
  border: 1px solid rgba(13, 148, 136, 0.14);
  border-radius: 12px;
}
.web-shell--panel .marketing-breadcrumb__list {
  background: rgba(33, 97, 242, 0.06);
  border-color: rgba(33, 97, 242, 0.16);
}
.marketing-breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.marketing-breadcrumb__item:not(:last-child)::after {
  content: "›";
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.95rem;
  margin-inline-start: 0.15rem;
}
.marketing-breadcrumb__link {
  color: #0d9488;
  text-decoration: none;
  border-radius: 6px;
  padding: 0.1rem 0.2rem;
  margin: -0.1rem -0.2rem;
  transition: background 0.12s, color 0.12s;
}
.marketing-breadcrumb__link:hover {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
}
.web-shell--panel .marketing-breadcrumb__link {
  color: #1d4ed8;
}
.web-shell--panel .marketing-breadcrumb__link:hover {
  background: rgba(37, 99, 235, 0.12);
  color: #1e40af;
}
.marketing-breadcrumb__current {
  color: #0f172a;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #ccfbf1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.web-shell--panel .marketing-breadcrumb__current {
  border-color: #bfdbfe;
}

.marketing-flash-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.marketing-flash-row__pill {
  margin: 0;
}

.marketing-section-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}
.marketing-section-head--inline {
  margin-bottom: 1rem;
}
.marketing-section-head__badge {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}
.marketing-new-campaign-card .marketing-section-head__badge {
  background: linear-gradient(145deg, #f0fdfa 0%, #ccfbf1 100%);
  border-color: #5eead4;
}
.marketing-section-head__text {
  min-width: 0;
  flex: 1;
}
.marketing-section-head__title {
  margin: 0 0 0.35rem !important;
}
.marketing-section-head__lead {
  margin: 0;
  line-height: 1.55;
  max-width: 40rem;
}

.marketing-new-campaign-card {
  padding: 1.25rem 1.35rem 1.35rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, #fff 0%, #fafefd 100%);
  border-inline-start: 4px solid #0d9488;
  margin-bottom: 1.15rem;
}
.web-shell--panel .marketing-new-campaign-card {
  border-inline-start-color: #2563eb;
  background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
}

.marketing-campaign-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 26rem;
}
.marketing-campaign-form__field label {
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.25rem;
}
.marketing-optional-label {
  font-weight: 600;
  color: #94a3b8;
}
.marketing-campaign-form__field .input {
  max-width: none;
  width: 100%;
  padding: 0.62rem 0.85rem;
  border-radius: 12px;
  border-color: #e2e8f0;
  background: #fff;
}
.marketing-campaign-form__field .input:focus {
  border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.22);
}
.marketing-campaign-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.marketing-campaign-form__field--budget {
  flex: 0 1 12rem;
  min-width: 10rem;
}

.marketing-form-actions {
  margin-top: 0.35rem;
  padding-top: 0.5rem;
}
.marketing-btn-primary {
  padding: 0.55rem 1.25rem;
  border-radius: 12px;
  font-size: 0.95rem;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.28);
}
.marketing-btn-primary:hover {
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

.marketing-empty-state {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 16px;
  border-style: dashed;
  border-color: #cbd5e1;
  background: #f8fafc;
  margin-bottom: 1rem;
}
.marketing-empty-state__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #334155;
}
.marketing-empty-state__text {
  margin: 0;
  max-width: 28rem;
  margin-inline: auto;
  line-height: 1.65;
}

.marketing-campaigns-list-card {
  padding: 1.2rem 1.3rem 1.3rem;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.05);
}
.marketing-campaigns-list-card .marketing-section-head {
  border-bottom-color: #e2e8f0;
}
.marketing-table-shell {
  margin-bottom: 0;
  border-radius: 14px;
  border-color: #e2e8f0;
  box-shadow: none;
}
.marketing-campaigns-table th {
  font-size: 0.72rem;
  text-transform: none;
  letter-spacing: 0;
  color: #64748b;
  font-weight: 800;
  white-space: nowrap;
}
.marketing-campaigns-table tbody tr:hover td {
  background: #f8fffc;
}
.web-shell--panel .marketing-campaigns-table tbody tr:hover td {
  background: #f8fafc;
}
.marketing-campaigns-table td:first-child {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #64748b;
  width: 3rem;
}

.marketing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0;
}

.marketing-ads-empty {
  margin: 0;
  padding: 0.35rem 0 0;
}

.marketing-ad-locate {
  border-inline-start: 4px solid #16a34a;
  background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
}
.marketing-ad-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.65;
}
.marketing-ad-steps li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #dcfce7;
}
.marketing-ad-steps li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.marketing-ad-steps__n {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  background: #16a34a;
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.marketing-ad-shortcut {
  margin: 0.75rem 0 0;
}
.marketing-workflow-card {
  border-inline-start: 4px solid #2161f2;
}
.marketing-workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .marketing-workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.marketing-workflow-item {
  padding: 0.75rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.marketing-workflow-item--highlight {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
}
.marketing-workflow-item__k {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
}
.marketing-actions-cell {
  white-space: normal;
  min-width: 12rem;
}
.marketing-actions-cell .btn,
.marketing-actions-cell .btn-sm {
  margin: 0.15rem 0.1rem;
}

.card-reminders { border-color: #bae6fd; background: linear-gradient(180deg, #fff 0%, #f0f9ff 100%); }
.row-highlight { background: #ecfdf5 !important; }
.call-conditional { margin-top: 0.65rem; }


@media (max-width: 900px) {
  .web-sidebar { width: 232px; }
  .web-main { padding: 1rem 1.1rem 1.5rem; }
  .input, .btn, .tab-btn { min-height: 44px; }
  .web-app-header .btn-sm { min-height: 40px; }
  .page-title { font-size: 1.35rem; }
  .hub-card { min-height: unset; }
}

@media (max-width: 768px) {
  .web-app-header { position: relative; }
  .web-app-body { flex-direction: column; }
  .web-sidebar {
    width: 100%;
    border-inline-end: none;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    top: auto;
    max-height: min(52vh, 360px);
    box-shadow: none;
  }
  .web-sidebar--panel {
    border-bottom: 1px solid #e2e8f0;
  }
  .web-sidebar-nav {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
  }
  .web-header-search { max-width: none; order: 3; width: 100%; margin-inline: 0; }
  .web-user-area { margin-inline-start: 0; width: 100%; justify-content: flex-start; }
  .tabs-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
  }
  .tabs-bar .tab-btn { flex: 0 0 auto; white-space: nowrap; }
}

/* ——— إطار التطبيق + تذييل ثابت ——— */
body.web-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.web-app-frame {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.web-app-footer-fixed {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 34;
  padding: 0.45rem 1rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -6px 28px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(10px);
}
.web-app-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: center;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
}
.web-app-footer-nav a {
  color: #0f766e;
  text-decoration: none;
}
.web-app-footer-nav a:hover {
  text-decoration: underline;
}

/* بحث الرأس */
.web-header-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.web-header-search .web-search-input {
  flex: 1;
  min-width: 140px;
}
.web-header-search-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* اقتراح مرضى أثناء الكتابة */
.patient-suggest-anchor {
  position: relative;
  display: block;
}
.patient-suggest-anchor--header {
  flex: 1;
  min-width: 140px;
}
.patient-suggest-anchor--header .web-search-input {
  width: 100%;
}
.patient-suggest-anchor--grow {
  flex: 1 1 220px;
  min-width: 0;
}
.patient-suggest-anchor--grow .search-unified-q {
  width: 100%;
  max-width: none;
}
.patient-suggest-dd {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 4px);
  z-index: 200;
  max-height: min(280px, 52vh);
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  text-align: start;
}
.web-app-header:not(.web-app-header--panel) .patient-suggest-dd {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}
.patient-suggest-empty {
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
}
.patient-suggest-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  width: 100%;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  cursor: pointer;
  text-align: inherit;
  font: inherit;
  transition: background 0.12s;
}
.patient-suggest-item:last-child {
  border-bottom: 0;
}
.patient-suggest-item:hover,
.patient-suggest-item:focus-visible {
  background: #f0fdfa;
  outline: none;
}
.patient-suggest-item--active {
  background: #ecfdf5;
}
.patient-suggest-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.9rem;
}
.patient-suggest-phone {
  font-size: 0.78rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

/* خلية عميل: رابط + واتساب */
.client-cell {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.client-cell-name {
  font-weight: 700;
  color: #0f766e;
  text-decoration: none;
}
.client-cell-name:hover {
  text-decoration: underline;
}
.client-cell-wa {
  font-size: 0.72rem;
}

/* لوحة جانبية فرعية + محتوى */
.web-stage-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 960px) {
  .web-stage-layout {
    grid-template-columns: 1fr;
  }
  .web-sub-sidebar.web-sub-sidebar--collapsed {
    display: none;
  }
}
.web-sub-sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.web-main-primary {
  min-width: 0;
}
.ui-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0;
  font-weight: 600;
  font-size: 0.88rem;
}

/* لوحة إدارة الكتالوج (تبويبات) */
.admin-catalog-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.admin-catalog-panel__hint {
  margin: 0 0 0.65rem;
}
.admin-catalog-panel__tabs {
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e2e8f0;
}
.admin-catalog-panel__panels {
  min-width: 0;
}
.admin-catalog-panel__panels > [data-ui-panel] .card:last-child {
  margin-bottom: 0;
}

/* ملف الطبيب + دليل الأطباء العام */
.doctor-profile-thumb {
  max-width: 220px;
  max-height: 160px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
}
.doctor-profile-uploads {
  margin-top: 0.5rem;
}
.doctor-svc-checks {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}
.doctor-specialty-grid {
  margin-top: 0.5rem;
}
.doctor-dir-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.doctor-dir-card__main {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.doctor-dir-card__photo {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
}
.doctor-dir-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.doctor-dir-card__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.doctor-dir-card__name {
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
}
.doctor-dir-card__svc {
  font-size: 0.88rem;
  margin: 0.35rem 0;
}
.doctor-public-profile__top {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.doctor-public-profile__photo img {
  max-width: min(100%, 280px);
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

/* تبويبات موحّدة */
.ui-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}
.ui-tab {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  color: #475569;
  cursor: pointer;
}
.ui-tab--active,
.ui-tab.ui-tab--active {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: #0f766e;
}

/* نوافذ منبثقة */
body.ui-modal-open {
  overflow: hidden;
}
.ui-modal[hidden] {
  display: none !important;
}
.ui-modal:not([hidden]) {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 100;
}
.ui-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.ui-modal-panel {
  position: absolute;
  inset-inline-start: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 420px);
  max-height: min(86vh, 520px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
  border: 1px solid #e2e8f0;
}
.ui-modal-close {
  position: absolute;
  top: 0.5rem;
  inset-inline-end: 0.5rem;
  border: none;
  background: #f1f5f9;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: #475569;
}

/* تقويم حجوزات (أسبوع) */
.booking-cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.booking-cal-range {
  font-weight: 700;
  color: #0f172a;
}
.booking-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}
@media (max-width: 900px) {
  .booking-cal {
    grid-template-columns: 1fr;
  }
}
.booking-cal-day {
  min-height: 200px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.booking-cal-day-head {
  padding: 0.45rem 0.55rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ecfdf5 100%);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem;
}
.booking-cal-dow {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
}
.booking-cal-date {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f766e;
}
.booking-cal-slots {
  padding: 0.45rem;
  flex: 1;
  overflow-y: auto;
  max-height: 320px;
}
.booking-cal-slot {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.5rem;
  margin-bottom: 0.35rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff 0%, #f0fdfa 100%);
  border-inline-start: 3px solid #0d9488;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.12s, transform 0.12s;
}
.booking-cal-slot:hover {
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
  transform: translateY(-1px);
}
.booking-cal-time {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f766e;
  font-variant-numeric: tabular-nums;
}
.booking-cal-title {
  font-weight: 700;
  font-size: 0.82rem;
}
.booking-cal-meta {
  font-size: 0.7rem;
}

/* ——— صفحة العملاء المحتملين (تبويبات) ——— */
.leads-workspace {
  padding: 1.15rem 1.25rem 1.25rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
.leads-workspace .tabs-bar {
  gap: 0.4rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}
.leads-workspace .tab-btn {
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.84rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.leads-workspace .tab-btn.active {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.35);
}
.leads-workspace .tab-btn:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
}
.leads-field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem 1.1rem;
  align-items: start;
}
@media (min-width: 640px) {
  .leads-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.leads-field-grid .field-span-full {
  grid-column: 1 / -1;
}
.leads-field-grid .input-block,
.leads-field-grid .input.input-block {
  max-width: none;
}
.leads-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}
.leads-form-footer .leads-hint {
  margin: 0;
  font-size: 0.8rem;
}
.leads-table-panel .table-wrap {
  margin-bottom: 0;
}
.leads-table-panel .section-title {
  margin-top: 0;
}
table.data td .btn.secondary.btn-sm {
  margin-inline-start: 0.35rem;
}
.lead-status-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}
.lead-status-pill--converted { background: #d1fae5; color: #065f46; }
.lead-status-pill--new { background: #e0f2fe; color: #0369a1; }
.lead-status-pill--assigned { background: #fef3c7; color: #92400e; }
.lead-status-pill--telesales_queue { background: #ede9fe; color: #5b21b6; }
.lead-score-cell {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f766e;
}

/* ——— ملف المريض (تبويبات) ——— */
.patient-chart-shell {
  padding: 1.15rem 1.25rem 1.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.07);
  margin-bottom: 1.25rem;
}
.patient-chart-shell__head {
  margin-bottom: 0.35rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #eef2f7;
}
.patient-chart-shell__head .section-title {
  margin: 0;
  font-size: 1.08rem;
  color: #0f766e;
  border-bottom: 0;
  padding-bottom: 0;
}
.patient-chart-shell__lead {
  margin: 0.35rem 0 0;
  line-height: 1.45;
}
.patient-chart-shell > .section-title {
  margin-top: 0;
  font-size: 1.05rem;
  color: #0f766e;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.65rem;
  margin-bottom: 0.85rem;
}
.patient-chart-shell .tabs-bar {
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}
.patient-chart-shell .tab-btn {
  border-radius: 999px;
  padding: 0.48rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.patient-chart-shell .tab-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.patient-chart-shell .tab-btn.active {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 12px rgba(13, 148, 136, 0.32);
}
.patient-chart-shell .tab-btn:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
}
.patient-chart-panels-wrap .tab-panel {
  animation: patient-tab-in 0.2s ease-out;
}
@keyframes patient-tab-in {
  from { opacity: 0.55; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.patient-tab-section {
  padding: 0.85rem 0 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}
.patient-tab-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.patient-tab-section h3 {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: #334155;
}
/* شبكة حقول عامة — حقلان في الصف (نفس منطق ملف المريض) */
.patient-form-grid,
.form-field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem 1rem;
  align-items: start;
}
@media (min-width: 640px) {
  .patient-form-grid,
  .form-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.patient-form-grid .input-block,
.patient-form-grid .input.input-block,
.form-field-grid .input-block,
.form-field-grid .input.input-block,
.form-field-grid select.input {
  max-width: none;
}
.patient-form-grid .field-span-full,
.form-field-grid .field-span-full {
  grid-column: 1 / -1;
}
.patient-chart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.patient-chart-actions--tight {
  margin-bottom: 0;
  gap: 0.4rem;
}
.page-hero-patient {
  margin-bottom: 0.25rem;
}

/* بطاقة علوية — ملف المريض */
.patient-page-top {
  margin-bottom: 1rem;
}
.patient-page-flash {
  margin: 0.35rem 0 0.5rem;
}
.patient-hero-card {
  background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem 1.15rem 1.05rem;
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.055);
  margin-bottom: 0.5rem;
}
.patient-hero-name {
  margin: 0 0 0.45rem;
  font-size: clamp(1.2rem, 2.8vw, 1.55rem);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.patient-hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.patient-hero-phone {
  font-variant-numeric: tabular-nums;
  color: #475569;
  font-weight: 600;
  font-size: 0.95rem;
}
.patient-hero-pills,
.patient-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.patient-hero-tags {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed #e2e8f0;
}
.patient-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}
.patient-pill--seg {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.patient-pill--detail {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}
.patient-pill--muted {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  font-weight: 600;
}
.patient-pill--tag {
  background: #fff;
  color: #0f172a;
  border: 1px solid var(--patient-tag-color, #cbd5e1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* أقسام فرعية داخل تبويب البيانات */
.patient-subcard {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 14px;
  padding: 0.75rem 0.95rem 0.85rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04);
}
.patient-subcard:last-child {
  margin-bottom: 0;
}
.patient-subcard__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.55rem;
}
.patient-subcard__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #1e293b;
}
.patient-subcard__hint {
  margin: 0;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}
.patient-subcard__body {
  margin: 0;
}
.patient-subcard__actions {
  margin: 0.65rem 0 0;
}

.patient-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.patient-tag-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.38rem 0.65rem 0.38rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
  user-select: none;
}
.patient-tag-chip:hover {
  border-color: #cbd5e1;
  background: #fff;
}
.patient-tag-chip input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: #0d9488;
}
.patient-tag-chip:has(input:checked) {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.12);
}

.patient-address-preview {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.patient-address-preview__row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem 0.75rem;
  align-items: start;
  font-size: 0.88rem;
  line-height: 1.45;
}
.patient-address-preview__row--full {
  grid-template-columns: 5.5rem 1fr;
}
.patient-address-preview__k {
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.76rem;
}
.patient-address-preview__v {
  color: #1e293b;
  font-weight: 600;
  word-break: break-word;
}
@media (max-width: 480px) {
  .patient-address-preview__row,
  .patient-address-preview__row--full {
    grid-template-columns: 1fr;
  }
  .patient-address-preview__k {
    margin-bottom: -0.2rem;
  }
}

.patient-edit-disclosure {
  margin-top: 0.65rem;
  border-top: 1px dashed #e2e8f0;
  padding-top: 0.5rem;
}
.patient-edit-disclosure > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  color: #0d9488;
  list-style: none;
  padding: 0.25rem 0;
}
.patient-edit-disclosure > summary::-webkit-details-marker {
  display: none;
}
.patient-edit-disclosure > summary::after {
  content: " ▼";
  font-size: 0.7em;
  opacity: 0.55;
  margin-inline-start: 0.2em;
}
.patient-edit-disclosure[open] > summary::after {
  content: " ▲";
}
.patient-edit-disclosure__form {
  margin-top: 0.65rem;
  padding-top: 0.35rem;
}
.patient-form-grid--tight {
  gap: 0.5rem 0.85rem;
}

/* ملخص مالي عند دفع المريض */
.patient-pay-finance-wrap {
  margin-bottom: 0.5rem;
}
.patient-finance-cost-cta {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid #bae6fd;
  background: linear-gradient(165deg, #f0f9ff 0%, #fff 55%);
  box-shadow: 0 1px 8px rgba(14, 116, 144, 0.08);
}
.patient-finance-cost-cta__title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0c4a6e;
}
.patient-finance-cost-cta__text {
  margin: 0;
  line-height: 1.55;
  max-width: 52rem;
}
.patient-finance-cost-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}
.patient-finance-cost-readonly {
  margin: 0 0 0.75rem;
}
.patient-booking-actions {
  white-space: nowrap;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.patient-pay-finance {
  padding: 1rem 1.15rem 1.15rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(165deg, #fff 0%, #f8fafc 55%, #f1f5f9 100%);
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.05);
}
.patient-pay-finance__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}
.patient-pay-finance__lead {
  margin: 0 0 1rem;
  line-height: 1.55;
  max-width: 48rem;
}
.patient-pay-finance__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
@media (min-width: 768px) {
  .patient-pay-finance__grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}
.patient-pay-finance__h {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.02em;
}
.patient-pay-finance__tablewrap {
  margin-bottom: 0;
  border-radius: 10px;
}
.patient-pay-finance__table {
  font-size: 0.8rem;
}
.patient-pay-finance__table th {
  font-size: 0.72rem;
}
.patient-pay-finance__subtotal td {
  font-weight: 800;
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
}
.patient-pay-finance__kv {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.patient-pay-finance__kv li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.4rem 0.55rem;
  border-radius: 10px;
  background: rgba(13, 148, 136, 0.06);
  border: 1px solid rgba(13, 148, 136, 0.12);
}
.patient-pay-finance__kv--costs li {
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.12);
}
.patient-pay-finance__kv-total {
  margin-top: 0.25rem;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.06) !important;
  border-color: #cbd5e1 !important;
}
.patient-pay-finance__k {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 700;
}
.patient-pay-finance__v {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #0f172a;
  font-size: 0.88rem;
}
.patient-pay-finance__hint {
  margin: 0 0 0.65rem;
}
.patient-pay-finance__block {
  margin-bottom: 1rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px dashed #e2e8f0;
}
.patient-pay-finance__strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}
.patient-pay-finance__pill {
  flex: 1 1 12rem;
  min-width: 10rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.patient-pay-finance__pill--gross {
  border-color: #99f6e4;
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
}
.patient-pay-finance__pill--net {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}
.patient-pay-finance__pill-k {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
}
.patient-pay-finance__pill-v {
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0f766e;
}
.patient-pay-finance__pill--net .patient-pay-finance__pill-v {
  color: #1d4ed8;
}
.patient-pay-finance__pill-hint {
  font-size: 0.68rem;
  line-height: 1.35;
}
.patient-pay-finance__footer-note {
  margin: 0.75rem 0 0;
}

/* نافذة تعديل تسعير الحجز من ملف المريض */
.patient-pricing-modal-panel {
  max-width: min(36rem, 96vw);
  max-height: min(88vh, 640px);
  overflow-y: auto;
}
.ppm-live-summary {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 100%);
  border: 1px solid #99f6e4;
}
.ppm-live-summary__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.ppm-live-summary__list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.86rem;
}
.ppm-live-summary__list li span {
  color: #64748b;
  font-weight: 600;
}
.ppm-live-summary__list li strong {
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}
.ppm-live-summary__total {
  margin-top: 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px dashed #5eead4;
  font-weight: 800;
}
.ppm-live-summary__margin {
  font-weight: 800;
  color: #0f766e !important;
}
.ppm-live-summary__margin strong {
  color: #0f766e !important;
}
.ppm-pricing-table {
  font-size: 0.85rem;
}
.ppm-pricing-table .input {
  max-width: none;
}

/* ——— تيلي سيلز — ملف المكالمة (تبويبات موحّدة) ——— */
.telesales-intake-page.patient-chart-shell {
  margin-top: 0.25rem;
}
.telesales-intake-page .patient-chart-panels-wrap form {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.telesales-intake-page #intake-form .tab-panel,
.telesales-intake-page #call-log-form .tab-panel {
  padding-top: 0.25rem;
}
.telesales-intake-page .subsection-title {
  margin-top: 1rem;
}
