/* هلا كير — واجهة PHP (RTL) — ثيم v4 ألوان مبهجة (سماء + دفء خفيف) */
:root {
  --hc-font: "IBM Plex Sans Arabic", "Cairo", "Tajawal", "Segoe UI", sans-serif;
  --hc-bg: #e8f6ff;
  --hc-surface: #ffffff;
  --hc-text: #0f172a;
  --hc-muted: #64748b;
  --hc-border: #e2e8f0;
  --hc-brand: #0ea5e9;
  --hc-brand-hover: #0284c7;
  --hc-brand-soft: #e0f2fe;
  --hc-brand-border: #7dd3fc;
  --hc-brand-glow: rgba(14, 165, 233, 0.35);
  --hc-joy-warm: #fbbf24;
  --hc-joy-mint: #6ee7b7;
  --hc-joy-blush: #fda4af;
  --hc-joy-strip: linear-gradient(90deg, #fbbf24 0%, #38bdf8 35%, #34d399 70%, #fb7185 100%);
  --hc-radius: 12px;
  --hc-radius-lg: 16px;
  --hc-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
  --hc-shadow-md: 0 16px 40px rgba(14, 165, 233, 0.12);
  --hc-sidebar-bg: linear-gradient(180deg, #fffbeb 0%, #f0f9ff 100%);
  --hc-sidebar-elevated: #ffffff;
  --hc-sidebar-border: #fde68a;
  --hc-sidebar-text: #0f172a;
  --hc-sidebar-muted: #64748b;
  --hc-sidebar-accent: #0ea5e9;
}

*, *::before, *::after { box-sizing: border-box; }

.web-shell {
  font-family: var(--hc-font);
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--hc-bg);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(251, 191, 36, 0.22), transparent 55%),
    radial-gradient(900px 500px at 0% 100%, rgba(56, 189, 248, 0.18), transparent 50%),
    radial-gradient(700px 400px at 80% 80%, rgba(52, 211, 153, 0.14), transparent 45%),
    linear-gradient(175deg, #fffbeb 0%, #e0f2fe 38%, #ecfdf5 100%);
  color: var(--hc-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}

/* لوحة الفريق */
.web-shell--panel {
  color-scheme: light;
  background-color: #f8fafc;
  background-image:
    radial-gradient(1100px 520px at 100% 0%, rgba(251, 191, 36, 0.16), transparent 58%),
    radial-gradient(800px 420px at 0% 100%, rgba(14, 165, 233, 0.12), 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: var(--hc-brand); 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: var(--hc-muted); font-size: 0.88rem; }
.card {
  background: var(--hc-surface);
  border: 1px solid #bae6fd;
  border-radius: var(--hc-radius-lg);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--hc-shadow);
}
.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: var(--hc-brand);
  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: var(--hc-radius);
  background: linear-gradient(135deg, #38bdf8 0%, var(--hc-brand) 45%, #0284c7 100%);
  color: #fff;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 4px 14px var(--hc-brand-glow);
}
.btn:hover {
  background: linear-gradient(135deg, #7dd3fc 0%, var(--hc-brand-hover) 50%, #0369a1 100%);
}
.btn:active { transform: scale(0.98); }
.btn.secondary {
  background: #fff;
  color: #0369a1;
  border: 1px solid var(--hc-brand-border);
  box-shadow: none;
}
.btn.secondary:hover { background: var(--hc-brand-soft); border-color: var(--hc-brand); color: var(--hc-brand-hover); }

.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: var(--hc-brand-border);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

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: var(--hc-brand-soft);
  color: #0369a1;
  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.65rem 1.35rem;
  background: linear-gradient(110deg, #0ea5e9 0%, #6366f1 42%, #db2777 100%);
  color: #fff;
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.35);
  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: var(--hc-brand);
  border: none;
}
.web-user-area .btn:hover { background: var(--hc-brand-soft); color: var(--hc-brand-hover); }

/* رأس أبيض داخل لوحة الفريق (مثل أنظمة العيادات التقليدية) */
.web-app-header--panel {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
  color: #1e293b;
  border-bottom: none;
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.1);
}
.web-app-header--panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--hc-joy-strip);
  pointer-events: none;
}
.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: linear-gradient(135deg, #e0f2fe 0%, #fef3c7 100%);
  color: #0369a1;
  border: 1px solid var(--hc-brand-border);
}
.web-app-header--panel .web-header-search:focus-within {
  border-color: var(--hc-brand-border);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}
.web-app-header--panel .web-header-search-btn {
  background: linear-gradient(135deg, #38bdf8 0%, var(--hc-brand) 100%);
  color: #fff;
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
  padding-inline: 0.85rem;
}
.web-app-header--panel .web-header-search-btn:hover {
  background: linear-gradient(135deg, #7dd3fc 0%, var(--hc-brand-hover) 100%);
}
.web-app-header--panel .web-search-input {
  background: transparent;
  border: none;
  box-shadow: none;
}
.web-app-header--panel .web-search-input:focus {
  box-shadow: none;
}
.web-app-header--panel .web-header-search {
  background: linear-gradient(135deg, #f0f9ff 0%, #fffbeb 100%);
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: 0.2rem 0.35rem 0.2rem 0.45rem;
  gap: 0.15rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.web-app-header--panel .web-user-area .btn.secondary {
  border-color: var(--hc-brand-border);
  color: var(--hc-brand-hover);
  background: #fff;
}
.web-app-header--panel .web-user-area .btn.secondary:hover {
  background: var(--hc-brand-soft);
  border-color: var(--hc-brand);
  color: #0369a1;
}
.web-app-header--panel .web-user-area .btn {
  background: linear-gradient(135deg, #38bdf8 0%, var(--hc-brand) 50%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
}
.web-app-header--panel .web-user-area .btn:hover {
  background: linear-gradient(135deg, #7dd3fc 0%, var(--hc-brand-hover) 50%, #818cf8 100%);
  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;
}

/* شريط جانبي — لوحة فريق: سطح فاتح بسيط */
.web-sidebar--panel {
  --sb-accent: var(--hc-brand);
  --sb-accent-deep: var(--hc-brand-hover);
  --sb-surface: #ffffff;
  --sb-surface-hover: rgba(251, 191, 36, 0.14);
  --sb-surface-muted: #ecfeff;
  --sb-line: #fde68a;
  background: var(--hc-sidebar-bg);
  border-inline-end: 2px solid #fbbf24;
  box-shadow: 4px 0 20px rgba(251, 191, 36, 0.12);
  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, #2dd4bf 0%, var(--hc-brand-hover) 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
}
.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(135deg, #ffffff 0%, #fffbeb 50%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  box-shadow: var(--hc-shadow-md);
  margin: 0.75rem 0.65rem 0.5rem;
}
.web-sidebar--panel .web-sidebar-brand-mark {
  border: none;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
  background: linear-gradient(135deg, #fbbf24 0%, #0ea5e9 50%, #c084fc 100%);
}
.web-sidebar--panel .web-sidebar-brand-name {
  color: var(--hc-text);
}
.web-sidebar--panel .web-sidebar-brand-tag {
  color: var(--hc-muted);
}

.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: 12px;
  background: #fff;
  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: var(--hc-brand-border);
  background: #fff;
  box-shadow: var(--hc-shadow);
}
.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.8rem;
  padding: 0.7rem 2rem 0.65rem 0.85rem;
  color: var(--hc-muted);
  background: transparent;
  border-bottom: 1px solid var(--sb-line);
}
.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: var(--hc-text);
  background: var(--sb-surface-muted);
  border-bottom-color: var(--sb-line);
}
.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 var(--sb-line);
  gap: 0.25rem;
  background: var(--sb-surface-muted);
}

.web-nav-accordion-summary--with-hub {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.web-sidebar--panel .web-nav-accordion-summary--with-hub {
  padding-inline-start: 2.1rem !important;
}
.web-nav-accordion-hub-link {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 0.74rem;
  padding: 0.28rem 0.2rem;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.web-sidebar--panel .web-nav-accordion-hub-link:hover {
  color: var(--hc-brand-hover);
  background: var(--hc-brand-soft);
}
.web-sidebar:not(.web-sidebar--panel) .web-nav-accordion-hub-link:hover {
  color: var(--hc-brand-hover);
}

.workflow-surface {
  max-width: 1100px;
  margin-inline: auto;
}
.page-hero--compact {
  margin-bottom: 1rem;
}
.page-hero--compact .page-title {
  font-size: clamp(1.3rem, 2.4vw, 1.58rem);
  margin-bottom: 0.35rem;
}
.page-lead-tight {
  margin: 0;
  line-height: 1.55;
  max-width: 50rem;
}
.card--simple {
  border-radius: 12px;
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.card--simple .section-title {
  font-size: 1.06rem;
  margin-top: 0;
}
.table-card-tight .table-wrap {
  margin-top: 0.45rem;
}

.data--comfortable td,
.data--comfortable th {
  padding: 0.65rem 0.85rem;
}
.data--comfortable tbody tr:hover td {
  background: var(--hc-brand-soft);
}
.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: #475569;
  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: 700;
  font-size: 0.86rem;
  background: #fff;
  border: 1px solid var(--hc-border);
  color: var(--hc-text);
}
.web-sidebar--panel .web-sidebar-link--hub:hover {
  background: var(--hc-brand-soft);
  border-color: var(--hc-brand-border);
  color: var(--hc-brand-hover);
}
.web-sidebar--panel .web-sidebar-link--hub.active {
  background: var(--hc-brand-soft);
  border-inline-start-color: var(--sb-accent);
  border-color: var(--hc-brand-border);
  color: var(--hc-brand-hover);
  box-shadow: none;
}
.web-sidebar-link:hover {
  background: var(--hc-brand-soft);
  color: var(--hc-brand-hover);
  border-color: var(--hc-brand-border);
}
.web-sidebar--panel .web-sidebar-link:hover {
  background: var(--sb-surface-hover);
  color: var(--hc-text);
  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: var(--hc-brand-soft);
  border-color: var(--hc-brand-border);
  color: var(--hc-brand-hover);
}
.web-sidebar:not(.web-sidebar--panel) .web-nav-accordion-panel {
  border-inline-start-color: #e2e8f0;
}
.web-sidebar-link.active {
  background: linear-gradient(135deg, var(--hc-brand-soft) 0%, #e6fffa 100%);
  color: var(--hc-brand-hover);
  font-weight: 800;
  border-color: var(--hc-brand-border);
  box-shadow: 0 1px 4px var(--hc-brand-glow);
}
.web-sidebar--panel .web-sidebar-link.active {
  background: var(--hc-brand-soft);
  color: var(--hc-brand-hover);
  font-weight: 700;
  border: 1px solid var(--hc-brand-border);
  border-inline-start: 3px solid var(--sb-accent);
  box-shadow: none;
}

.web-main {
  flex: 1;
  padding: 1.5rem 1.75rem 2.25rem;
  max-width: none;
  margin: 0;
  background: transparent;
  min-width: 0;
}
.web-shell--panel .web-main {
  background: transparent;
}
.web-shell--panel .card {
  border-color: #bae6fd;
  box-shadow: var(--hc-shadow);
}
.web-shell--panel .table-wrap {
  box-shadow: var(--hc-shadow);
}
.web-shell--panel .hub-card--classic:hover {
  border-color: var(--hc-brand-border);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
}

/* ——— عناوين الصفحات ——— (مخفاة بالكامل — لا عناوين رئيسية/وصف علوي) */
.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 var(--hc-brand);
  background: linear-gradient(135deg, #fff 0%, var(--hc-brand-soft) 100%);
}
.web-shell--panel .page-hero-dashboard {
  border-inline-start: 4px solid var(--hc-brand);
  background: linear-gradient(135deg, #fff 0%, var(--hc-brand-soft) 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: var(--hc-brand);
  text-decoration: underline;
  cursor: pointer;
}
.search-help-trigger:hover {
  color: var(--hc-brand-hover);
}
.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: var(--hc-brand-soft);
  border-color: var(--hc-brand-border);
  color: var(--hc-brand-hover);
}
.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; }

/* ——— أسلوب لوحات بيانات (مستوحى من شاشات استقبال/تحصيل مثل Topia) ——— */
.panel-topia {
  border-top: 4px solid #0d4f4a;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}
.topia-data-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.topia-data-board .card-kpi {
  border-top: 3px solid var(--hc-brand-hover);
  margin-bottom: 0;
}
table.data.data--compact th,
table.data.data--compact td {
  padding: 0.4rem 0.55rem;
  font-size: 0.84rem;
}
table.data.data--ledger tbody tr:nth-child(even) {
  background: #f8fafc;
}
table.data.data--ledger tbody tr:hover {
  background: #ecfdf5;
}

.chat-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 900px) {
  .chat-workspace {
    grid-template-columns: 1fr;
  }
}
.chat-sidebar {
  position: sticky;
  top: 4.5rem;
  max-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}
.chat-sidebar .table-wrap {
  flex: 1;
  min-height: 200px;
  max-height: 52vh;
  overflow: auto;
  margin-bottom: 0;
}
.chat-sidebar tr.is-active {
  background: var(--hc-brand-soft);
  outline: 1px solid var(--hc-brand-border);
}
.chat-main-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.chat-patient-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0 0.65rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.35rem;
}

.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: var(--hc-brand-soft); border-color: var(--hc-brand-border); color: var(--hc-brand-hover); }
.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;
}
/* مركز التيلي سيلز: ترتيب البطاقات يبدأ من اليمين (أول عنصر في المصفوفة يميناً في الشبكة) */
.telesales-hub-grid {
  direction: rtl;
}
.telesales-hub-grid .hub-card {
  text-align: right;
}
/* لوحة المودريشن: أربع اختصارات بنفس الارتفاع — صف واحد على الشاشة العريضة (أول بطاقة يميناً في RTL) */
.moderator-hub-shortcuts .hub-grid--classic {
  align-items: stretch;
}
.moderator-hub-shortcuts .hub-card--classic {
  min-height: 11.25rem;
  height: 100%;
  grid-template-rows: auto 1fr auto;
}
.moderator-hub-shortcuts .hub-card--classic .hub-card-desc {
  align-self: start;
}
@media (min-width: 640px) {
  .hub-grid,
  .hub-grid--classic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .moderator-hub-shortcuts .hub-grid--classic {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}
/* مركز التأكيدات — شبكة وبطاقات بنفس منطق المودريشن، مع 4 أعمدة على الشاشة العريضة */
.clinical-hub-dashboard .hub-grid--classic {
  direction: rtl;
  align-items: stretch;
}
.clinical-hub-dashboard .hub-card--classic {
  min-height: 11.25rem;
  height: 100%;
  grid-template-rows: auto 1fr auto;
}
.clinical-hub-dashboard .hub-card--classic .hub-card-desc {
  align-self: start;
}
@media (min-width: 1024px) {
  .clinical-hub-dashboard .hub-grid--classic {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}
.clinical-hub-extras-wrap .clinical-hub-dashboard--extras .hub-card--classic {
  min-height: 10rem;
}
.confirmation-ops-strip {
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  box-shadow: var(--hc-shadow);
}
.hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.15rem 1.2rem;
  background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid #bae6fd;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--hc-shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 8.5rem;
}
.hub-card--classic {
  min-height: 10.5rem;
  padding: 1.1rem 1.15rem 1rem;
  border-radius: 12px;
  border: 1px solid #e8ecf1;
  box-shadow: var(--hc-shadow);
  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: var(--hc-brand);
  box-shadow: var(--hc-shadow-md);
}
.hub-card--classic:hover {
  border-color: var(--hc-brand-border);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
}
.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, #fef3c7 0%, #e0f2fe 40%, #fce7f3 100%);
  border-radius: 14px;
  border: 1px solid #bae6fd;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.12);
}
.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: var(--hc-text);
  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: var(--hc-muted);
  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: var(--hc-brand);
  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.52rem 0.85rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--hc-brand-hover);
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
  border: 1px solid #bae6fd;
  box-shadow: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hub-card:hover .hub-card-enter-btn {
  background: linear-gradient(135deg, #fef3c7 0%, #e0f2fe 100%);
  border-color: var(--hc-brand);
  color: #0369a1;
}
.hub-card--enter-cyan .hub-card-enter-btn { border-inline-start: 3px solid #0891b2; }
.hub-card--enter-blue .hub-card-enter-btn { border-inline-start: 3px solid #3b82f6; }
.hub-card--enter-green .hub-card-enter-btn { border-inline-start: 3px solid #22c55e; }
.hub-card--enter-royal .hub-card-enter-btn { border-inline-start: 3px solid var(--hc-brand); }
.hub-card--enter-slate .hub-card-enter-btn { border-inline-start: 3px solid #64748b; }
.hub-card--enter-red .hub-card-enter-btn { border-inline-start: 3px solid #ef4444; }
.hub-card--enter-yellow .hub-card-enter-btn { border-inline-start: 3px solid #ca8a04; }
.hub-card--classic:hover .hub-card-enter-btn {
  filter: none;
}
.hub-back { margin: 0 0 0.85rem; }

/* بوابة الفريق: شبكة أوضح + زر «الدخول» صغير بجانب العنوان */
.team-portal-shortcuts .hub-grid--classic {
  gap: 0.55rem;
}
@media (min-width: 720px) {
  .team-portal-shortcuts .hub-grid--classic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .team-portal-shortcuts .hub-grid--classic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.team-portal-shortcuts .hub-card--classic {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.85rem;
  row-gap: 0.15rem;
  align-items: center;
  min-height: 0;
  padding: 0.7rem 0.95rem;
  border-radius: var(--hc-radius);
}
.team-portal-shortcuts .hub-card-top--classic {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin: 0;
}
.team-portal-shortcuts .hub-card-icon {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 9px;
}
.team-portal-shortcuts .hub-card--classic .hub-card-title {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  font-size: 0.93rem;
  font-weight: 700;
}
.team-portal-shortcuts .hub-card--classic .hub-card-desc {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  font-size: 0.76rem;
  color: var(--hc-muted);
  line-height: 1.4;
}
.team-portal-shortcuts .hub-card--classic .hub-card-enter {
  grid-column: 3;
  grid-row: 1 / span 2;
  padding: 0;
  margin: 0;
  justify-self: end;
}
.team-portal-shortcuts .hub-card-enter-btn {
  width: auto;
  min-width: 4.25rem;
  padding: 0.36rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 8px;
}
.team-portal-shortcuts .hub-card--enter-cyan .hub-card-enter-btn,
.team-portal-shortcuts .hub-card--enter-blue .hub-card-enter-btn,
.team-portal-shortcuts .hub-card--enter-green .hub-card-enter-btn,
.team-portal-shortcuts .hub-card--enter-royal .hub-card-enter-btn,
.team-portal-shortcuts .hub-card--enter-slate .hub-card-enter-btn,
.team-portal-shortcuts .hub-card--enter-red .hub-card-enter-btn,
.team-portal-shortcuts .hub-card--enter-yellow .hub-card-enter-btn {
  border-inline-start-width: 1px;
  border-color: var(--hc-border);
}
.team-portal-shortcuts .marketing-section-head--inline {
  margin-bottom: 0.75rem;
}

/* صفحات التسويق — توضيح مسار الإعلان + تنسيق أوضح */
#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: #0369a1;
  background: linear-gradient(135deg, #fef3c7 0%, #e0f2fe 100%);
  border: 1px solid #7dd3fc;
}
.web-shell--panel .team-portal-user-chip {
  color: #7c3aed;
  background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%);
  border-color: #c4b5fd;
}

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

.portal-tip-card {
  margin-bottom: 0;
  background: linear-gradient(135deg, #fffbeb 0%, #e0f2fe 55%, #fce7f3 100%);
  border: 1px solid #bae6fd;
}
.web-shell--panel .portal-tip-card {
  background: linear-gradient(135deg, #ffffff 0%, #fef9c3 35%, #e0f2fe 100%);
}
.portal-tip-card__head {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.portal-tip-card__badge {
  background: linear-gradient(145deg, #fef3c7 0%, #fda4af 100%);
  border-color: #fb923c;
  box-shadow: 0 4px 14px rgba(251, 146, 60, 0.25);
}

.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.5rem 0.75rem;
  list-style: none;
  background: linear-gradient(135deg, #fffbeb 0%, #e0f2fe 100%);
  border: 1px solid #fde68a;
  border-radius: 12px;
}
.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: var(--hc-brand);
  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(14, 165, 233, 0.12);
  color: var(--hc-brand-hover);
}
.web-shell--panel .marketing-breadcrumb__link {
  color: var(--hc-brand);
}
.web-shell--panel .marketing-breadcrumb__link:hover {
  background: rgba(14, 165, 233, 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 var(--hc-brand-border);
  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, #fef3c7 0%, #bae6fd 45%, #fbcfe8 100%);
  border: 1px solid #7dd3fc;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.2);
}
.marketing-new-campaign-card .marketing-section-head__badge {
  background: linear-gradient(145deg, #fef9c3 0%, #a5f3fc 50%, #f5d0fe 100%);
  border-color: #38bdf8;
}
.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 var(--hc-border);
  box-shadow: var(--hc-shadow);
  background: #fff;
  border-inline-start: 3px solid var(--hc-brand);
  margin-bottom: 1.15rem;
}
.web-shell--panel .marketing-new-campaign-card {
  border-inline-start-color: var(--hc-brand);
  background: #fff;
}

.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: #818cf8;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 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: none;
}
.marketing-btn-primary:hover {
  box-shadow: none;
}

.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: #fafbff;
}
.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: 3px solid var(--hc-brand);
  background: #fff;
}
.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 var(--hc-border);
}
.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: var(--hc-brand-soft);
  border: 1px solid var(--hc-brand-border);
  color: var(--hc-brand-hover);
  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: 3px solid var(--hc-brand);
}
.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: var(--hc-brand-soft);
  border-color: var(--hc-brand-border);
}
.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;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.marketing-campaign-summary-card .marketing-summary-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem 1.5rem;
  margin: 0.75rem 0 0;
}
.marketing-summary-dl > div {
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.marketing-summary-dl dt {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 0.35rem;
  font-weight: 600;
}
.marketing-summary-dl dd {
  margin: 0;
  font-size: 1.15rem;
}

.marketing-campaign-form__row--ad-daily {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.75rem 1.25rem;
  align-items: end;
}

.marketing-ad-hidden-form {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
}

.marketing-ad-row-forms {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.marketing-ads-edit-table .marketing-ad-col-num {
  min-width: 7.5rem;
}
.marketing-ads-edit-table .marketing-ad-col-action {
  width: 1%;
  white-space: nowrap;
}
.marketing-ad-cell-input .marketing-ad-row-form__input {
  width: 100%;
  max-width: 8rem;
  min-width: 4.5rem;
}
.marketing-ad-cell-input {
  vertical-align: middle;
}
.marketing-ad-cell-action {
  vertical-align: middle;
}

.card-reminders { border-color: #bae6fd; background: linear-gradient(180deg, #fff 0%, #f0f9ff 100%); }
.row-highlight { background: var(--hc-brand-soft) !important; }
.queue-lead--touched { background: #f1f5f9 !important; }
.queue-lead--touched .muted { color: #64748b; }
.queue-lead-actions { white-space: normal; }
.queue-lead-actions .inline-form { display: inline-block; vertical-align: middle; margin-inline-start: 0.25rem; }
.queue-lead-action-call { display: inline-flex; align-items: center; gap: 0.35rem; }
.queue-lead-action-ico { display: inline-flex; opacity: 0.92; }
/* صفحة طابور التيلي سيلز — بطاقة مودريشن + فلاتر */
.workflow-surface--telesales-queues {
  max-width: 1220px;
  margin-inline: auto;
}
.page-hero--telesales-queue {
  background: linear-gradient(118deg, #fffbeb 0%, #e0f2fe 42%, #ffedd5 100%);
  border: 1px solid #fde68a;
  border-radius: var(--hc-radius-lg);
  padding: 1.05rem 1.35rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--hc-shadow);
}
.page-hero--telesales-queue .page-title {
  margin: 0 0 0.35rem 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: #0c4a6e;
  letter-spacing: -0.02em;
}
.page-hero--telesales-queue .page-lead-tight {
  margin: 0;
  color: #475569;
  font-size: 0.92rem;
}
.queue-who-callout {
  margin: 0 0 1rem 0;
  padding: 0.9rem 1rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.95) 0%, rgba(224, 242, 254, 0.65) 50%, rgba(254, 243, 199, 0.5) 100%);
  box-shadow: 0 2px 12px rgba(14, 165, 233, 0.06);
}
.queue-who-callout__title {
  margin: 0 0 0.5rem 0;
  font-weight: 800;
  font-size: 1rem;
  color: #92400e;
}
.queue-who-callout__list {
  margin: 0;
  padding-inline-start: 1.15rem;
  line-height: 1.65;
  color: var(--hc-text);
  font-size: 0.88rem;
}
.queue-who-callout__list li + li {
  margin-top: 0.4rem;
}
.queue-who-callout__foot {
  margin: 0.65rem 0 0 0;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(14, 165, 233, 0.25);
}
.card--telesales-handoff {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--hc-joy-warm) 45%, var(--hc-brand-border));
  box-shadow:
    0 12px 40px rgba(14, 165, 233, 0.11),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  background: linear-gradient(170deg, #ffffff 0%, #f8fafc 35%, #fffbeb 100%);
  padding-top: 1.15rem;
}
.card--telesales-handoff::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--hc-joy-strip);
  opacity: 0.95;
}
.card--telesales-handoff .section-title {
  position: relative;
  margin-top: 0.2rem;
  font-size: 1.18rem;
  font-weight: 800;
  color: #0f172a;
}
.queue-filter-bar.queue-filter-bar--handoff {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 0.85rem 1rem;
  align-items: end;
  margin-bottom: 1.2rem !important;
  padding: 1.05rem 1.15rem !important;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(224, 242, 254, 0.4) 100%);
  box-shadow: 0 2px 14px rgba(14, 165, 233, 0.07);
  border-bottom: none;
}
.queue-filter-bar.queue-filter-bar--handoff .queue-filter-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  grid-column: 1 / -1;
  margin-top: 0.15rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(14, 165, 233, 0.2);
}
.queue-filter-bar.queue-filter-bar--priority {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
  margin-bottom: 1rem !important;
  padding: 1rem 1.1rem !important;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid var(--hc-border);
  border-bottom: none;
}
.queue-filter-bar.queue-filter-bar--priority .queue-filter-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  grid-column: 1 / -1;
  margin-top: 0.1rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--hc-border);
}
.queue-filter-bar__actions .queue-filter-submit {
  background: linear-gradient(135deg, var(--hc-brand) 0%, #22d3ee 100%);
  color: #fff !important;
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 12px var(--hc-brand-glow);
}
.queue-filter-bar__actions .queue-filter-submit:hover {
  filter: brightness(1.05);
}
.table-wrap--telesales-handoff {
  border-radius: var(--hc-radius);
  overflow: hidden;
  border: 1px solid rgba(14, 165, 233, 0.15);
  box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
}
.data.data--handoff-queue thead th {
  background: linear-gradient(180deg, #e0f2fe 0%, #f0f9ff 100%);
  color: #0c4a6e;
  font-weight: 700;
  border-bottom: 2px solid #bae6fd;
}
.data.data--handoff-queue tbody tr:hover {
  background: rgba(224, 242, 254, 0.35);
}

/* صفحة قائمة المكالمات — إطار مميز يتجاوز شكل اللوحة الافتراضي */
.web-main .page-telesales-queue {
  margin: 0.4rem -0.25rem 1.75rem;
  padding: 1.3rem 1.15rem 1.85rem;
  border-radius: 22px;
  background:
    radial-gradient(880px 420px at 100% -8%, rgba(251, 191, 36, 0.45), transparent 58%),
    radial-gradient(700px 380px at 0% 108%, rgba(45, 212, 191, 0.3), transparent 52%),
    radial-gradient(600px 300px at 48% 35%, rgba(244, 114, 182, 0.16), transparent 56%),
    linear-gradient(168deg, #fff7ed 0%, #e0f2fe 34%, #fef9c3 68%, #dcfce7 100%);
  border: 2px solid rgba(251, 146, 60, 0.45);
  box-shadow:
    0 14px 44px rgba(14, 165, 233, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.web-shell--panel .web-main .page-telesales-queue {
  margin-inline: 0;
}
@media (min-width: 900px) {
  .web-main .page-telesales-queue {
    margin-inline: -0.35rem;
    padding-inline: 1.4rem;
  }
}
.web-main .page-telesales-queue .workflow-surface--telesales-queues {
  max-width: 1140px;
  margin-inline: auto;
}
.web-main .page-telesales-queue .page-hero--telesales-queue {
  border-width: 2px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.18);
}
.web-main .page-telesales-queue .card.table-card-tight {
  background: linear-gradient(185deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid rgba(14, 165, 233, 0.22);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}
.queue-lead-actions-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  max-width: 15rem;
}
.queue-lead-action-first {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, var(--hc-brand) 0%, #38bdf8 100%);
  color: #fff !important;
  border: none;
  font-weight: 600;
  box-shadow: 0 2px 10px var(--hc-brand-glow);
}
.queue-lead-action-first:hover {
  filter: brightness(1.06);
}
.queue-lead-convert-form {
  margin: 0;
  display: block;
}
.queue-lead-convert-form .queue-lead-action-first {
  width: 100%;
}
.queue-lead-action-alt {
  font-size: 0.82rem;
  color: var(--hc-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.queue-lead-action-alt:hover {
  color: var(--hc-brand);
}
.queue-lead-note {
  display: block;
  line-height: 1.35;
}
.pill-subtle { font-size: 0.78rem; padding: 0.12rem 0.45rem; background: #e2e8f0; color: #475569; border: 1px solid #cbd5e1; }
.telesales-lead-touch-title-icon { display: inline-block; vertical-align: -0.25rem; margin-inline-end: 0.35rem; }
.queue-filter-bar { display: flex; flex-wrap: wrap; gap: 0.65rem 1rem; align-items: flex-end; margin-bottom: 1rem; padding: 0.75rem 0; border-bottom: 1px solid #e2e8f0; }
.queue-filter-bar .field-grow { flex: 1; min-width: 10rem; }
.queue-filter-bar label { display: block; font-size: 0.8rem; margin-bottom: 0.2rem; color: #64748b; }
.data th.th-sort { white-space: nowrap; }
.data th.th-sort a { color: inherit; text-decoration: none; font-weight: 600; border-bottom: 1px dashed currentColor; }
.data th.th-sort a:hover { color: var(--hc-brand); }
.data th.th-sort .sort-ind { font-size: 0.75em; opacity: 0.7; margin-inline-start: 0.2rem; }
.call-conditional { margin-top: 0.65rem; }

.visit-pipeline-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  min-width: 8.5rem;
}
.visit-pipeline-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.visit-pipeline-step-dot {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.visit-pipeline-step-dot.is-done {
  color: #047857;
  background: #d1fae5;
  border-color: #6ee7b7;
}
.visit-pipeline-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.15rem;
}
.visit-pipeline-btn {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.visit-pipeline-btn--confirm {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%) !important;
  color: #fff !important;
}
.visit-pipeline-btn--hazir {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
  color: #fff !important;
}
.visit-pipeline-btn--wasl {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%) !important;
  color: #fff !important;
}
.visit-pipeline-btn--svc {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #fff !important;
}
.visit-pipeline-btn--done {
  background: #f1f5f9 !important;
  color: #64748b !important;
  box-shadow: none !important;
  pointer-events: none;
}
.visit-pipeline-finish {
  margin-top: 0.25rem;
}
.visit-pipeline-pay {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 0.45rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #fcd34d;
  display: inline-block;
}
.visit-pipeline-pay.is-muted {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #e2e8f0;
}

@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: linear-gradient(180deg, rgba(255, 251, 235, 0.96) 0%, rgba(255, 255, 255, 0.96) 100%);
  border-top: 2px solid #fde68a;
  box-shadow: 0 -8px 32px rgba(14, 165, 233, 0.1);
  backdrop-filter: blur(12px);
}
.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: var(--hc-brand);
  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: #ecfdf5;
  outline: none;
}
.patient-suggest-item--active {
  background: var(--hc-brand-soft);
}
.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: var(--hc-brand-hover);
  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: var(--hc-brand-soft);
  border-color: var(--hc-brand-border);
  color: var(--hc-brand-hover);
}

/* نوافذ منبثقة */
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%, var(--hc-brand-soft) 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: var(--hc-brand-hover);
}
.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%, #ecfdf5 100%);
  border-inline-start: 3px solid var(--hc-brand);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.12s, transform 0.12s;
}
.booking-cal-slot:hover {
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
  transform: translateY(-1px);
}
.booking-cal-time {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--hc-brand-hover);
  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, var(--hc-brand-hover) 0%, var(--hc-brand) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
}
.leads-workspace .tab-btn:focus-visible {
  outline: 2px solid var(--hc-brand-border);
  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: #b2f5ea; 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: var(--hc-brand-hover);
}

/* ——— ملف المريض (تبويبات) ——— */
.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: var(--hc-brand-hover);
  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: var(--hc-brand-hover);
  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, var(--hc-brand-hover) 0%, var(--hc-brand) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 12px rgba(14, 165, 233, 0.32);
}
.patient-chart-shell .tab-btn:focus-visible {
  outline: 2px solid var(--hc-brand-border);
  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: var(--hc-brand-soft);
  color: #047857;
  border: 1px solid var(--hc-brand-border);
}
.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: var(--hc-brand);
}
.patient-tag-chip:has(input:checked) {
  background: var(--hc-brand-soft);
  border-color: #6ee7b7;
  color: #065f46;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 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: var(--hc-brand);
  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(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.12);
}
.patient-pay-finance__kv--costs li {
  background: rgba(14, 165, 233, 0.05);
  border-color: rgba(14, 165, 233, 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: var(--hc-brand-border);
  background: linear-gradient(180deg, var(--hc-brand-soft) 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: var(--hc-brand-hover);
}
.patient-pay-finance__pill--net .patient-pay-finance__pill-v {
  color: var(--hc-brand);
}
.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, #ecfdf5 0%, var(--hc-brand-soft) 100%);
  border: 1px solid var(--hc-brand-border);
}
.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 var(--hc-brand-border);
  font-weight: 800;
}
.ppm-live-summary__margin {
  font-weight: 800;
  color: var(--hc-brand-hover) !important;
}
.ppm-live-summary__margin strong {
  color: var(--hc-brand-hover) !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;
}

/* ============================================================
   هلا كير — تحسينات بسيطة فقط (آخر إضافات)
   ============================================================ */

/* أيقونة في زر/لينك: تتمحور تلقائياً */
.btn svg, .web-sidebar-link svg, .web-user-area svg, .hub-card-icon svg {
  vertical-align: middle;
  flex-shrink: 0;
}

/* كل أيقونة في الزر تترك مسافة صغيرة */
.btn svg + *, .web-sidebar-link svg + * {
  margin-inline-start: 0.3rem;
}

/* أيقونة في رابط السايد بار: حجم صغير + لون أزرق فاتح */
.web-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.web-sidebar-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  flex-shrink: 0;
}
.web-sidebar-link:hover .web-sidebar-link-icon { color: var(--hc-brand); }
.web-sidebar--panel .web-sidebar-link.active .web-sidebar-link-icon { color: var(--hc-brand); }
.web-sidebar-link-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* اسم المستخدم في الهيدر — يخفي على الشاشات الصغيرة */
@media (max-width: 720px) {
  .web-user-area .web-user-name { display: none; }
}

/* أيقونة الكارت في الـ hub — صغيرة ومتوسطة */
.hub-card .hub-card-icon svg {
  width: 22px;
  height: 22px;
}
.hub-card .hub-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

