/* CRM اختصاصی تجهیزات پزشکی — Help UI
   Font: Vazirmatn FD (local only — no CDN) */

@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/Vazirmatn-FD-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/Vazirmatn-FD-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/Vazirmatn-FD-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("fonts/Vazirmatn-FD-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg0: #eef3f1;
  --bg1: #f7faf8;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --ink: #142428;
  --muted: #5d7278;
  --line: #d5e2df;
  --brand: #0f766e;
  --brand-2: #0b5f5a;
  --brand-deep: #083f3c;
  --brand-soft: #dff3f0;
  --accent: #c2410c;
  --accent-soft: #fff4ed;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --warn: #a16207;
  --danger: #b91c1c;
  --sidebar-w: 300px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(8, 63, 60, 0.08);
  --shadow-soft: 0 8px 24px rgba(8, 63, 60, 0.05);
  --font: "Vazirmatn", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.95;
  direction: rtl;
  text-align: right;
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(15, 118, 110, 0.16), transparent 55%),
    radial-gradient(900px 420px at 0% 100%, rgba(194, 65, 12, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-2); text-decoration: underline; }

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  background:
    linear-gradient(165deg, rgba(255,255,255,0.08), transparent 40%),
    linear-gradient(180deg, #062e2c 0%, #0b5f5a 48%, #0f766e 100%);
  color: #f0fdfa;
  padding: 26px 18px 40px;
  box-shadow: 8px 0 40px rgba(6, 46, 44, 0.18);
}

.brand {
  padding: 6px 8px 20px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.brand .name {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: -0.01em;
}
.brand .tag {
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.78;
}

.nav-group { margin: 16px 0 8px; }
.nav-group-title {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.58;
  padding: 0 12px 8px;
}
.nav a {
  display: block;
  color: #ecfeff;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  margin: 3px 0;
  transition: background .15s ease, transform .15s ease;
}
.nav a:hover {
  background: rgba(255,255,255,0.1);
  text-decoration: none;
  transform: translateX(-2px);
}
.nav a.active {
  background: rgba(255,255,255,0.2);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.main {
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 34px 48px 72px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.crumb {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-soft);
  color: var(--brand-2);
  border: 1px solid #b7e0da;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.55;
  color: var(--brand-deep);
  letter-spacing: -0.02em;
}
h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 36px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(15, 118, 110, 0.12);
  color: var(--brand-deep);
}
h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 22px 0 8px;
  color: #1f3a3a;
}

.lead {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: none;
}

.card {
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
  margin: 14px 0;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  box-shadow: var(--shadow);
}
.card.tip {
  border-right: 5px solid var(--brand);
  background: linear-gradient(90deg, #f3fbfa, #ffffff);
}
.card.warn {
  border-right: 5px solid var(--accent);
  background: linear-gradient(90deg, var(--accent-soft), #ffffff);
}
.card.ok {
  border-right: 5px solid var(--ok);
  background: linear-gradient(90deg, var(--ok-soft), #ffffff);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.role-pill {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand-2);
  border-radius: 999px;
  padding: 5px 12px;
  margin: 4px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid #c5e8e3;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface-solid);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  font-size: 13.5px;
  margin: 14px 0 20px;
  box-shadow: var(--shadow-soft);
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  vertical-align: top;
  text-align: right;
}
th {
  background: linear-gradient(180deg, #eef8f6, #e7f3f1);
  color: var(--brand-deep);
  font-weight: 700;
}
tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(15, 118, 110, 0.03); }

ol.steps, ul.clean { padding-right: 22px; margin: 8px 0; }
ol.steps li, ul.clean li { margin: 8px 0; }

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}
.flow .box {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}
.flow .arrow {
  color: var(--brand);
  font-weight: 700;
  opacity: 0.7;
}

.stage {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 700;
  margin: 3px;
}
.stage.new { background: #fff7cc; color: #854d0e; }
.stage.initial { background: #e0efff; color: #1d4ed8; }
.stage.follow { background: #dff8e8; color: #166534; }
.stage.deposit { background: #ffedd5; color: #9a3412; }
.stage.final { background: #f3e8ff; color: #6b21a8; }
.stage.won { background: #dcfce7; color: #166534; }
.stage.lost { background: #fee2e2; color: #991b1b; }
.stage.progress { background: #eef2f5; color: #334155; }

.footer-note {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 9px 14px;
  font-family: var(--font);
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(700px 240px at 0% 0%, rgba(15,118,110,.18), transparent 60%),
    radial-gradient(500px 200px at 100% 100%, rgba(194,65,12,.10), transparent 55%),
    linear-gradient(145deg, #ffffff, #edf7f5);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px 30px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(15, 118, 110, 0.08);
  pointer-events: none;
}
.hero h1 { margin: 10px 0 12px; font-size: 30px; }
.hero p { margin: 0; color: var(--muted); font-size: 15px; font-weight: 500; max-width: none; }

.checklist li::marker { content: "✓ "; color: var(--ok); font-weight: 700; }

.home-link-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.home-link-card:hover { text-decoration: none; }
.home-link-card .card {
  height: 100%;
  margin: 0;
}
.home-link-card .card:hover {
  transform: translateY(-3px);
  border-color: #b7dcd7;
}
.home-link-card b {
  display: block;
  color: var(--brand-deep);
  margin-bottom: 6px;
  font-size: 15px;
}
.home-link-card span {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: min(88vw, 310px);
    z-index: 40;
    transform: translateX(105%);
    transition: transform .22s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: inline-block; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .main { padding: 18px 16px 52px; }
  .hero { padding: 24px 18px; }
  .hero h1 { font-size: 24px; }
  .backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6, 46, 44, .42);
    z-index: 30;
  }
  .backdrop.show { display: block; }
}

/* Laravel help extras */
.help-back-crm { display:inline-flex; align-items:center; gap:6px; margin-top:10px; font-size:12.5px; color:rgba(255,255,255,.85); }
.help-back-crm:hover { color:#fff; }
.toc-mini { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 6px; }
.toc-mini a { display:inline-block; padding:7px 12px; border-radius:999px; background:var(--brand-soft); color:var(--brand-deep); font-size:12.5px; font-weight:600; text-decoration:none; }
.toc-mini a:hover { background:var(--brand); color:#fff; text-decoration:none; }
.callout-warn { border-right:4px solid var(--warn); background:#fffbeb; }
.kbd { display:inline-block; padding:1px 7px; border:1px solid var(--line); border-radius:6px; background:#fff; font-size:12px; }
