/* RTL Fix — Agile-ERP product. Design tokens + components.
   Navy #0A1024 / brand blue #0071BC, light work surfaces, Heebo (Hebrew-first). */

:root {
  --navy: #0A1024;
  --navy-2: #131B36;
  --blue: #0071BC;
  --blue-hover: #005A96;
  --blue-soft: #E8F2FA;
  --bg: #F6F8FB;
  --surface: #FFFFFF;
  --border: #E1E6EE;
  --border-strong: #C9D2DF;
  --text: #0A1024;
  --text-2: #3D4860;
  --muted: #5A6478;
  --on-dark: #FFFFFF;
  --on-dark-2: #B8C2D6;

  --success: #0E7A4B;   --success-bg: #E8F5EE;
  --warning: #9A5B00;   --warning-bg: #FDF3E1;
  --danger:  #B42318;   --danger-bg:  #FDECEA;
  --info:    #0071BC;   --info-bg:    #E8F2FA;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(10,16,36,.06), 0 4px 16px rgba(10,16,36,.05);
  --focus: 0 0 0 3px rgba(0,113,188,.35);
  --container: 1160px;
  --font: 'Heebo', 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65;
  color: var(--text); background: var(--bg); direction: rtl;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.num, bdi.num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; white-space: nowrap; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.filename { unicode-bidi: plaintext; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 16px; top: -48px; background: var(--navy); color: #fff;
  padding: 8px 14px; border-radius: var(--radius-sm); z-index: 200; }
.skip-link:focus { top: 8px; color: #fff; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.container-narrow { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: 24px; }
@media (max-width: 600px) { .container, .container-narrow { padding-inline: 16px; } }

/* ── Header ───────────────────────────────────────────── */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand img { height: 44px; width: auto; min-width: 180px; display: block; }
.brand-product { font-weight: 700; font-size: 1.05rem; padding-inline-start: 14px; border-inline-start: 1px solid var(--border-strong); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: var(--radius-sm); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; background: var(--blue); padding: 10px 18px; }
.nav a.btn-primary:hover { background: var(--blue-hover); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--text); cursor: pointer; }
.inline-form { display: inline; margin: 0; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .brand-product { display: none; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--surface);
    border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 12px 16px 16px; gap: 2px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav-actions { flex-direction: column; align-items: stretch; margin-top: 8px; }
  .nav-actions .btn { width: 100%; }
}
@media (max-width: 400px) { .brand img { min-width: 0; height: 40px; } }

/* ── Buttons ──────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600;
  font-size: .97rem; line-height: 1.2; padding: 12px 20px; min-height: 44px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--text-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-on-dark { background: #fff; color: var(--navy); }
.btn-on-dark:hover { background: var(--blue-soft); color: var(--navy); }
.btn-outline-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-outline-dark:hover { border-color: #fff; color: #fff; }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #E7B4AE; }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; min-height: 50px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn .spinner { display: none; }
.btn.is-busy .spinner { display: inline-block; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } * { scroll-behavior: auto !important; } }

/* ── Surfaces ─────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.card-tight { padding: 20px; }
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.15rem; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; color: var(--blue); letter-spacing: .02em; margin-bottom: 10px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.divider { height: 1px; background: var(--border); border: 0; margin: 24px 0; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; padding: 4px 10px;
  border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-success { color: var(--success); background: var(--success-bg); }
.badge-warning { color: var(--warning); background: var(--warning-bg); }
.badge-danger  { color: var(--danger);  background: var(--danger-bg); }
.badge-info    { color: var(--info);    background: var(--info-bg); }
.badge-neutral { color: var(--text-2);  background: #EEF1F5; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid; font-size: .95rem; margin-bottom: 16px; }
.alert p:last-child { margin-bottom: 0; }
.alert-success { color: #0B5E3A; background: var(--success-bg); border-color: #B7DEC9; }
.alert-error   { color: #8F1C13; background: var(--danger-bg);  border-color: #F1C0BA; }
.alert-warning { color: #774600; background: var(--warning-bg); border-color: #F0D49E; }
.alert-info    { color: #064D80; background: var(--info-bg);    border-color: #BBD7EE; }
.alert svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }

/* ── Forms ────────────────────────────────────────────── */
.form-grid { display: grid; gap: 18px; }
.field label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.field .error { font-size: .86rem; color: var(--danger); margin-top: 6px; }
.input { width: 100%; font: inherit; font-size: 1rem; padding: 11px 14px; min-height: 46px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: #fff; color: var(--text); }
.input:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input.ltr-input { direction: ltr; text-align: right; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; line-height: 1.5; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--blue); flex-shrink: 0; }

.auth-wrap { padding: 56px 0 80px; }
.auth-card { max-width: 440px; margin-inline: auto; }
.auth-card h1 { font-size: 1.6rem; }
.auth-foot { text-align: center; margin-top: 20px; font-size: .93rem; color: var(--muted); }

/* ── Page header (app pages) ──────────────────────────── */
.page-head { padding: 40px 0 24px; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2rem); margin-bottom: 6px; }
.page-head p { color: var(--muted); margin: 0; }
.page-body { padding-bottom: 72px; }

/* ── Workspace ────────────────────────────────────────── */
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .workspace-grid { grid-template-columns: 1fr; } }
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: var(--radius); background: var(--bg); padding: 40px 24px;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--blue); background: var(--blue-soft); }
.dropzone.is-disabled { cursor: not-allowed; opacity: .6; }
.dropzone-icon { width: 44px; height: 44px; color: var(--blue); margin: 0 auto 12px; display: block; }
.dropzone-title { font-weight: 600; font-size: 1.05rem; margin-bottom: 4px; }
.dropzone-limits { font-size: .88rem; color: var(--muted); }
.file-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: #fff; margin-top: 16px; }
.file-row svg { width: 28px; height: 28px; color: var(--blue); flex-shrink: 0; }
.file-row .file-meta { min-width: 0; flex: 1; }
.file-row .file-name { font-weight: 600; display: block; overflow-wrap: anywhere; text-align: start; }
.fname-ext { unicode-bidi: isolate; direction: ltr; }
.steps-inline { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; padding: 0; list-style: none; font-size: .86rem; }
.steps-inline li { padding: 6px 12px; border-radius: 999px; background: #EEF1F5; color: var(--text-2); }
.steps-inline li[aria-current="step"] { background: var(--navy); color: #fff; }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: .94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; text-align: start; }
.gate { text-align: center; padding: 40px 24px; }
.gate h2 { font-size: 1.3rem; }

/* ── Tables ───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; background: #fff; }
.table th, .table td { text-align: start; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { font-weight: 600; color: var(--muted); background: var(--bg); font-size: .84rem; }
.table tr:last-child td { border-bottom: 0; }

/* ── Marketing ────────────────────────────────────────── */
.hero { background: var(--navy); color: var(--on-dark); padding: 88px 0 96px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 20px; }
.hero .lead { font-size: 1.15rem; color: var(--on-dark-2); max-width: 34em; margin-bottom: 32px; }
.hero .eyebrow { color: #7CC4F2; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: .9rem; color: var(--on-dark-2); }
@media (max-width: 900px) { .hero { padding: 56px 0 64px; } .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.section { padding: 88px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); font-weight: 800; }
.section-head p { color: var(--text-2); font-size: 1.05rem; margin: 0; }
@media (max-width: 700px) { .section { padding: 60px 0; } }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.step-num { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; background: var(--blue-soft); color: var(--blue); margin-bottom: 14px; }
.feature h3, .step h3 { font-size: 1.08rem; margin-bottom: 6px; }
.feature p, .step p { color: var(--text-2); margin: 0; font-size: .97rem; }
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.feature-list .feature { padding: 22px 0; border-top: 1px solid var(--border); }
@media (max-width: 760px) { .feature-list { grid-template-columns: 1fr; } }

/* Document mock — an illustration of how Word displays the file */
.doc-frame { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); }
.doc-frame-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px;
  background: var(--bg); border-bottom: 1px solid var(--border); font-size: .84rem; }
.doc-page { padding: 24px 28px; font-size: .92rem; line-height: 1.75; min-height: 250px; }
.doc-page h4 { font-size: 1.02rem; margin-bottom: 8px; }
.doc-page p { margin-bottom: 8px; }
.doc-page ol { margin: 0 0 8px; padding-inline-start: 22px; }
.doc-page table { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 6px; }
.doc-page td, .doc-page th { border: 1px solid var(--border-strong); padding: 4px 8px; }
.doc-page.is-broken { direction: ltr; text-align: left; }
.doc-page.is-broken h4, .doc-page.is-broken p, .doc-page.is-broken li, .doc-page.is-broken td, .doc-page.is-broken th { unicode-bidi: embed; direction: ltr; text-align: left; }
.doc-page.is-fixed { direction: rtl; text-align: right; }
.hero .doc-frame { box-shadow: 0 24px 48px rgba(0,0,0,.28); border-color: transparent; }
.compare-caption { font-size: .86rem; color: var(--muted); margin-top: 12px; }

/* Pricing */
.price-card { display: flex; flex-direction: column; }
.price-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.price { font-size: 2.1rem; font-weight: 800; margin: 14px 0 2px; }
.price-unit { font-size: .95rem; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 24px; flex: 1; }
.price-card li { padding: 7px 0; padding-inline-start: 26px; position: relative; color: var(--text-2); font-size: .95rem; }
.price-card li::before { content: ''; position: absolute; inset-inline-start: 2px; top: 13px; width: 12px; height: 7px;
  border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
.price-card.is-featured { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.price-pending { font-size: 1.15rem; font-weight: 700; color: var(--text-2); margin: 14px 0 2px; }

.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 1.02rem; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--blue); font-weight: 400; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq .answer { padding: 0 0 20px; color: var(--text-2); }

.cta-band { background: var(--navy); color: #fff; padding: 72px 0; }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.cta-band p { color: var(--on-dark-2); max-width: 36em; }

/* ── Prose (legal) ────────────────────────────────────── */
.prose h2 { font-size: 1.15rem; margin-top: 32px; }
.prose ul { padding-inline-start: 22px; }
.prose li { margin-bottom: 6px; }

/* ── Footer ───────────────────────────────────────────── */
.site-footer { background: var(--navy); color: var(--on-dark-2); padding: 56px 0 28px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.site-footer a { color: var(--on-dark-2); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-logo { height: 44px; width: auto; min-width: 180px; display: block; margin-bottom: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; font-size: .85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* Dev-only banner */
.dev-banner { background: #FFF4CC; color: #5C4300; text-align: center; font-size: .85rem; padding: 6px 16px; border-bottom: 1px solid #F0D98A; }
