/* TableTop Help Center — same look as mo-enterprise.com: IBM Plex Sans Arabic,
   blue #2350e8 / teal #0fb5a4 on #f6f8fc, white rounded cards. */
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("fonts/IBMPlexSansArabic-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("fonts/IBMPlexSansArabic-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("fonts/IBMPlexSansArabic-Bold.ttf") format("truetype"); font-weight: 700 800; font-display: swap; }

:root {
  --ink: #0b1220; --ink-soft: #172033; --muted: #5a6678; --border: #e2e7f0; --bg: #f6f8fc; --card: #ffffff;
  --blue: #2d6a4f; --blue-dark: #1b4332; --blue-soft: #eaf5f0; --blue-line: #b7e4c7;
  --teal: #40916c; --teal-soft: #d8f3dc; --amber: #d48b28; --amber-soft: #fff4df; --red: #d93025; --red-soft: #fdecea;
  --radius: 20px; --shadow: 0 6px 20px rgba(11, 18, 32, 0.05); --shadow-hover: 0 14px 34px rgba(45, 106, 79, 0.14);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8edef; --ink-soft: #d0d8dd; --muted: #94a3aa; --border: #2e3c44; --bg: #151d22; --card: #1b252b;
    --blue: #7db08f; --blue-dark: #5e8e71; --blue-soft: #233038; --blue-line: #3e5a49;
    --teal: #86c79e; --teal-soft: #2a4335; --amber: #e2ae73; --amber-soft: #3a322b; --red: #e88276; --red-soft: #47302d;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.45); --shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.7);
  }
  .topbar, .footer { background: #0f1519 !important; }
  .top-search { background: #151d22 !important; }
  .nav a:hover { background: #233038 !important; }
  .hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(125, 176, 143, 0.2), transparent 60%), linear-gradient(135deg, #0f1519, #1b252b) !important; }
  .search { background: #233038 !important; }
  .search input { color: #e8edef !important; }
  .need-help { background: linear-gradient(135deg, #1b252b, #233038) !important; border-color: #2e3c44 !important; }
  .side-toggle { background: #1b252b !important; }
  .results mark { background: #453b29; color: #e2ae73; }
  .callout, .callout.note { background: #1b2631 !important; border-color: #2b3a4a !important; border-inline-start-color: #7db08f !important; }
  .callout.tip { background: #1c2b26 !important; border-color: #2a4335 !important; border-inline-start-color: #86c79e !important; }
  .callout.warning { background: #2f281e !important; border-color: #483d2a !important; border-inline-start-color: #e2ae73 !important; }
  .callout.important { background: #2a4335 !important; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; font-family: "IBM Plex Sans Arabic", "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.75; font-size: 16px; }
a { color: var(--blue); }
img { max-width: 100%; height: auto; }
.icon { width: 20px; height: 20px; flex: none; }
.icon.big { width: 40px; height: 40px; color: var(--blue); }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { inset-inline-start: 8px; }
:focus-visible { outline: 3px solid rgba(35, 80, 232, 0.35); outline-offset: 2px; border-radius: 8px; }

/* Top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-icon { width: 38px; height: 38px; border-radius: 11px; background: url(/assets/img/icon-192.png) center/cover no-repeat; color: transparent; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 0; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 18px; font-weight: 800; }
.brand-text small { color: var(--muted); font-size: 13px; font-weight: 600; }
.top-search { flex: 1 1 260px; max-width: 460px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px; color: var(--muted); }
.top-search input { border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); width: 100%; padding: 6px 0; outline: none; }
.home .top-search { visibility: hidden; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-inline-start: auto; }
.nav a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 999px; border: 1px solid transparent; }
.nav a .icon { width: 17px; height: 17px; }
.nav a:hover { background: #eaf0fc; color: var(--blue); border-color: var(--blue-line); }
.nav a.cta { background: var(--blue); color: #fff; }
.nav a.cta:hover { background: var(--blue-dark); color: #fff; }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(15, 181, 164, 0.35), transparent 60%), url("img/hero-pattern.jpg") center / cover no-repeat, linear-gradient(135deg, var(--blue-dark), var(--blue)); color: #fff; }
.hero-inner { max-width: 820px; margin: 0 auto; padding: 64px 20px 72px; text-align: center; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.3; margin: 0 0 10px; font-weight: 800; }
.hero p { margin: 0 auto 26px; max-width: 640px; opacity: 0.92; font-size: 17px; }

/* Search boxes */
.search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 6px 6px 6px 16px; box-shadow: var(--shadow); color: var(--muted); }
[dir="rtl"] .search { padding: 6px 16px 6px 6px; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; color: var(--ink); padding: 10px 0; background: transparent; }
.search button { border: 0; background: var(--blue); color: #fff; font: inherit; font-weight: 700; font-size: 15px; padding: 11px 22px; border-radius: 12px; cursor: pointer; }
.search button:hover { background: var(--blue-dark); }
.search.big { border: 0; padding-block: 8px; box-shadow: 0 18px 40px rgba(11, 18, 32, 0.25); }
.search.big input { font-size: 17px; }

/* Layout */
.container { max-width: 1180px; margin: 0 auto; padding: 28px 20px 8px; }
.container.narrow { max-width: 820px; }
.home .container { margin-top: -36px; position: relative; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin: 6px 0 20px; }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; transition: color .15s ease; }
.crumbs a:hover { color: var(--blue); }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }
.crumbs .sep { width: 14px; height: 14px; opacity: 0.6; }
[dir="rtl"] .crumbs .sep, [dir="rtl"] .pager .prev::before { transform: scaleX(-1); }

/* Category grid */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.cat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--blue-line); }
.cat-card h2 { font-size: 18px; margin: 6px 0 0; line-height: 1.4; }
.cat-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; flex: 1; }
.cat-card .count { font-size: 13px; color: var(--blue); font-weight: 700; margin-top: 6px; }
.cat-icon { width: 46px; height: 46px; padding: 10px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); }
.cat-card:nth-child(3n+2) .cat-icon { background: var(--teal-soft); color: #0b8e81; }
.cat-card:nth-child(3n) .cat-icon { background: var(--amber-soft); color: #b9720a; }

.popular, .section-card, .need-help, .article, .side-nav, .results li, .notfound { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.popular { margin-top: 24px; padding: 24px 26px; }
.popular h2, .section-card h2 { font-size: 19px; margin: 0 0 10px; }
.article-list { list-style: none; margin: 0; padding: 0; }
.article-list.two-col { columns: 2 300px; column-gap: 28px; }
.article-list li { break-inside: avoid; }
.article-list a { display: flex; align-items: flex-start; gap: 10px; padding: 9px 4px; color: var(--ink); text-decoration: none; border-bottom: 1px dashed var(--border); font-weight: 500; }
.article-list a .icon { color: var(--blue); margin-top: 4px; width: 18px; height: 18px; }
.article-list a:hover { color: var(--blue); }

.cat-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.cat-head h1 { margin: 0; font-size: clamp(24px, 4vw, 32px); line-height: 1.3; }
.cat-head p { margin: 2px 0 0; color: var(--muted); }
.sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.section-card { padding: 22px 24px; scroll-margin-top: 90px; }
.empty { color: var(--muted); }

.need-help { margin: 28px 0 20px; padding: 22px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(135deg, #f9fbff, #eef3ff); border-color: var(--blue-line); }
.need-help > div { display: flex; align-items: center; gap: 14px; }
.need-help h2 { margin: 0; font-size: 18px; }
.need-help p { margin: 0; color: var(--muted); font-size: 15px; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--blue); color: #fff; text-decoration: none; font-weight: 700; border-radius: 12px; padding: 11px 20px; }
.btn:hover { background: var(--blue-dark); }

/* Article */
.article-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.side-toggle { display: none; }
.side-nav { padding: 18px 18px 12px; }
.side-nav h2 { font-size: 16px; margin: 0 0 6px; }
.side-nav h3 { font-size: 13px; color: var(--muted); margin: 14px 0 4px; font-weight: 700; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.5; }
.side-nav a:hover { background: var(--bg); color: var(--blue); }
.side-nav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.article { padding: 30px clamp(18px, 4vw, 40px) 26px; min-width: 0; }
.article > h1 { font-size: clamp(25px, 4vw, 34px); line-height: 1.35; margin: 0 0 10px; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 12px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 14px; color: var(--muted); padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.console-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; background: var(--blue-soft); padding: 5px 12px; border-radius: 999px; }
.console-link .icon { width: 17px; height: 17px; }
.toc { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin-bottom: 22px; font-size: 15px; }
.toc ol { margin: 6px 0 0; padding-inline-start: 22px; }
.toc a { text-decoration: none; }
.prose h2 { font-size: 22px; margin: 30px 0 10px; line-height: 1.4; scroll-margin-top: 90px; }
.prose h3 { font-size: 18px; margin: 22px 0 8px; scroll-margin-top: 90px; }
.prose h4 { font-size: 16px; margin: 18px 0 6px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-inline-start: 24px; }
.prose li { margin: 4px 0; }
.prose ol.steps { list-style: none; counter-reset: step; padding: 0; }
.prose ol.steps > li { counter-increment: step; position: relative; padding-inline-start: 46px; margin: 12px 0; min-height: 32px; }
.prose ol.steps > li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 0; width: 32px; height: 32px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.prose code { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 0.9em; font-family: Consolas, "Courier New", monospace; direction: ltr; unicode-bidi: isolate; }
.prose strong { color: var(--ink-soft); }
.prose img { display: block; border: 1px solid var(--border); border-radius: 14px; margin: 14px 0 18px; box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--border); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
.prose th { background: var(--bg); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.callout { border-radius: 14px; padding: 16px 20px; margin: 0 0 20px; border: 1px solid var(--blue-line); background: #f4f7ff; border-inline-start: 5px solid var(--blue); }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout.tip { background: var(--teal-soft); border-color: #b5ebe4; border-inline-start-color: var(--teal); }
.callout.warning { background: var(--amber-soft); border-color: #f6d9a3; border-inline-start-color: var(--amber); }
.helpful { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 28px 0 8px; padding-top: 18px; border-top: 1px solid var(--border); font-weight: 600; }
.helpful button { font: inherit; font-size: 14px; border: 1px solid var(--blue-line); background: #fff; color: var(--blue); border-radius: 999px; padding: 5px 18px; cursor: pointer; }
.helpful button:hover, .helpful button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.helpful .thanks { color: #0b8e81; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.pager a { border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; text-decoration: none; color: var(--ink); font-weight: 600; display: flex; flex-direction: column; }
.pager a:hover { border-color: var(--blue-line); color: var(--blue); }
.pager small { color: var(--muted); font-weight: 600; }
.pager .next { text-align: end; }

/* Search results */
.search-title { font-size: 28px; margin: 0 0 14px; }
.search-status { color: var(--muted); margin: 16px 0 8px; }
.results { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.results li { padding: 16px 20px; }
.results a { font-weight: 700; font-size: 17px; text-decoration: none; }
.results .where { font-size: 13px; color: var(--muted); margin: 2px 0 4px; }
.results p { margin: 0; color: var(--muted); font-size: 15px; }
.results mark { background: #fff1c2; color: inherit; border-radius: 4px; padding: 0 2px; }
.notfound { padding: 40px 28px; text-align: center; margin-top: 30px; }
.notfound .search { margin: 18px 0; }

/* Footer */
.footer { margin-top: 40px; background: #fff; border-top: 1px solid var(--border); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 24px 20px 30px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { color: var(--ink); }
.footer-brand p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { text-decoration: none; font-weight: 600; }

/* Phones and tablets */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; overflow: visible; }
  .side-toggle { display: flex; width: 100%; align-items: center; gap: 10px; font: inherit; font-weight: 700; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; color: var(--ink); cursor: pointer; }
  .side-nav { display: none; margin-top: 8px; }
  .side.open .side-nav { display: block; }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 10px 16px; }
  .top-search { order: 3; flex-basis: 100%; max-width: none; }
  .home .top-search { display: none; }
  .nav { gap: 2px; }
  .nav a { padding: 6px 10px; font-size: 13px; }
  .container { padding: 20px 16px 4px; }
  .hero-inner { padding: 40px 16px 60px; }
  .search { padding-inline-start: 12px; }
  .search button { padding: 10px 14px; }
  .article { padding: 22px 16px 18px; }
  .pager { grid-template-columns: 1fr; }
  .need-help { padding: 18px; }
  .sections { grid-template-columns: 1fr; }
  .crumbs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; white-space: nowrap; scrollbar-width: none; }
  .crumbs::-webkit-scrollbar { display: none; }
}
@media print {
  .topbar, .footer, .side, .need-help, .helpful, .pager, .toc { display: none !important; }
  .article-layout { display: block; }
  .article { border: 0; box-shadow: none; padding: 0; }
  body { background: #fff; }
}

.header-anchor { opacity: 0; margin-inline-start: 8px; color: var(--blue); text-decoration: none; font-weight: 400; font-size: 0.85em; transition: opacity .15s ease, color .15s ease; }
.prose h2:hover .header-anchor, .prose h3:hover .header-anchor, .header-anchor:focus { opacity: 1; }
.header-anchor:hover { color: var(--ink); }

.top-search, .search { position: relative; }
.search-dropdown { position: absolute; top: calc(100% + 6px); inset-inline-start: 0; inline-size: 100%; max-inline-size: 520px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); z-index: 1000; overflow: hidden; list-style: none; padding: 6px; margin: 0; }
.search-dropdown:empty { display: none; }
.search-dropdown li a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 14px; line-height: 1.35; transition: background .12s ease; }
.search-dropdown li a:hover, .search-dropdown li a:focus { background: var(--blue-soft); color: var(--blue); }
.search-dropdown .drop-cat { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
