/* PDFArrow — site styles.
   Layout uses CSS logical properties (inline-start/end) so the same rules
   work for English (LTR) and Hebrew (RTL). */

:root {
  --brand: #0f766e;
  --brand-strong: #115e59;
  --brand-soft: #ccfbf1;
  --accent: #f59e0b;
  --bg: #ffffff;
  --bg-alt: #f5f7f8;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #5b6676;
  --border: #e2e8f0;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --success: #15803d;
  --success-soft: #dcfce7;
  --warn-soft: #fef3c7;
  --shadow: 0 1px 2px rgb(15 23 42 / 0.06), 0 8px 24px rgb(15 23 42 / 0.06);
  --radius: 14px;
  --font: "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #2dd4bf;
    --brand-strong: #5eead4;
    --brand-soft: #134e4a;
    --bg: #0b1120;
    --bg-alt: #111827;
    --surface: #151e2e;
    --text: #e5e7eb;
    --muted: #9aa5b5;
    --border: #253045;
    --danger: #f87171;
    --danger-soft: #3b1515;
    --success: #4ade80;
    --success-soft: #12301d;
    --warn-soft: #3a2c0b;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }

img, svg { max-width: 100%; }

[hidden] { display: none !important; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.container.narrow { width: min(760px, 100% - 32px); }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.65em 1.2em;
  border: 2px solid var(--brand);
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
@media (prefers-color-scheme: dark) { .btn { color: #042f2e; } }
.btn:hover { background: var(--brand-strong); border-color: var(--brand-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn:focus-visible, .link:focus-visible, a:focus-visible, .dropzone:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.btn-small { padding: 0.35em 0.85em; font-size: 0.9rem; }
.btn-large { padding: 0.8em 1.5em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); color: var(--brand-strong); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--border); }
.btn-light { background: #fff; border-color: #fff; color: var(--brand-strong); }
.btn-light:hover { background: #f0fdfa; border-color: #f0fdfa; }

.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  direction: ltr; /* the product name is always written left to right */
}
.brand:hover { text-decoration: none; }
.header-inner > .brand { flex-shrink: 0; }
.brand b { color: var(--brand); }
.logo-mark { width: 30px; height: 30px; }
.logo-back { fill: var(--brand-soft); }
.logo-front { fill: var(--brand); }
.logo-lines { stroke: var(--bg); stroke-width: 2; stroke-linecap: round; fill: none; }

.site-nav { display: flex; align-items: center; gap: 1.25rem; margin-inline-start: auto; }
.site-nav a:not(.btn), .site-nav .link { color: var(--text); font-weight: 500; }
.site-nav a:not(.btn):hover, .site-nav .link:hover { color: var(--brand); text-decoration: none; }
.nav-sep { width: 1px; height: 22px; background: var(--border); }
.nav-user { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.nav-user small { font-size: 0.75rem; color: var(--muted); }
.nav-user bdi { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; font-weight: 500; }
@media (min-width: 861px) {
  .site-nav > a, .site-nav > .link { white-space: nowrap; }
}
@media (min-width: 861px) and (max-width: 1100px) {
  /* Narrow desktops: keep everything on one line. */
  .site-nav { gap: 0.9rem; }
  .nav-user small { display: none; }
  .nav-user bdi { max-width: 120px; }
}
@media (min-width: 861px) and (max-width: 980px) {
  .nav-user { display: none; } /* still on the account page and in the phone menu */
}
.lang-switch {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.25em 0.9em;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.lang-switch:hover { border-color: var(--brand); }

.menu-toggle {
  display: none;
  margin-inline-start: auto;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.menu-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--text); border-radius: 2px; }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 64px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 16px 1rem;
    background: var(--bg);
    border-block-end: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav > * { padding-block: 0.6rem; }
  .site-nav .btn { margin-block: 0.4rem; }
  .nav-sep { width: 100%; height: 1px; padding: 0; margin-block: 0.25rem; }
  .nav-user { flex-direction: row; flex-wrap: wrap; gap: 0.35em; align-items: baseline; }
  .nav-user small { font-size: 0.9rem; }
  .nav-user bdi { max-width: 100%; }
  .site-nav .link { text-align: start; }
  .lang-switch { align-self: flex-start; margin-block-start: 0.5rem; padding-block: 0.25em; }
}

/* ---------- hero ---------- */

.hero {
  padding-block: 72px 80px;
  background:
    radial-gradient(900px 400px at 85% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent),
    var(--bg);
}
[dir="rtl"] .hero {
  background:
    radial-gradient(900px 400px at 15% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent),
    var(--bg);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; }
[dir="rtl"] .hero h1 { letter-spacing: 0; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.badge {
  display: inline-block;
  padding: 0.3em 0.9em;
  margin-block-end: 1rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 700;
  font-size: 0.85rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 1.5rem 0.75rem; }

.hero-visual { display: flex; align-items: center; justify-content: center; gap: 16px; }
.page-demo { margin: 0; text-align: center; }
.page-demo figcaption { margin-block-start: 14px; font-weight: 700; color: var(--muted); }
.sheet {
  width: 170px;
  aspect-ratio: 1 / 1.414;
  padding: 22px 18px;
  background: #fff;
  border: 1px solid #d9dee5;
  border-radius: 4px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.sheet i { display: block; height: 7px; border-radius: 3px; background: #cbd5e1; }
.sheet i.h { height: 12px; width: 60%; background: #64748b; margin-block-end: 6px; }
.sheet i.s { width: 70%; }
.page-demo.before .sheet { transform: rotate(-7deg); background: #fbfaf6; }
.page-demo.after .sheet { border-color: var(--brand); }
.page-demo.after .sheet i.h { background: var(--brand); }
.demo-arrow { width: 48px; flex: none; stroke: var(--brand); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .demo-arrow { transform: scaleX(-1); }
[dir="rtl"] .hero-visual { flex-direction: row; }

@media (max-width: 860px) {
  .hero { padding-block: 48px 56px; }
  .hero-inner { grid-template-columns: 1fr; }
  .sheet { width: 130px; padding: 16px 13px; gap: 7px; }
}

/* ---------- sections ---------- */

.section { padding-block: 80px; }
.section-alt { background: var(--bg-alt); }
.section-title { text-align: center; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; }
.section-sub { text-align: center; color: var(--muted); max-width: 40em; margin: 0 auto 0.5rem; font-size: 1.1rem; }

.steps {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.steps li { text-align: center; padding: 8px 16px; }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-block-end: 12px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
}
.steps p { color: var(--muted); margin: 0; }

.features {
  margin-block-start: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feature svg {
  width: 40px;
  height: 40px;
  padding: 8px;
  margin-block-end: 12px;
  border-radius: 10px;
  background: var(--brand-soft);
  stroke: var(--brand-strong);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); margin: 0; }

@media (max-width: 860px) {
  .section { padding-block: 56px; }
  .steps, .features { grid-template-columns: 1fr; }
}
@media (min-width: 600px) and (max-width: 860px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- pricing ---------- */

.trial-note {
  text-align: center;
  color: var(--success);
  font-weight: 700;
  margin-block: 0.5rem 0;
}
.auth-card .trial-note { text-align: start; margin-block: -0.25rem 1rem; }
.plans {
  margin-block-start: 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.plan h3 { font-size: 1.3rem; }
.plan > p { margin: 0 0 1rem; min-height: 3.2em; }
.plan-featured { border: 2px solid var(--brand); }
.plan-badge {
  position: absolute;
  top: -13px;
  inset-inline-start: 24px;
  padding: 0.15em 0.8em;
  border-radius: 999px;
  background: var(--accent);
  color: #3b2300;
  font-size: 0.8rem;
  font-weight: 800;
}
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.4rem; margin-block-end: 1rem; }
.plan-price .amount { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.plan-price .unit { color: var(--muted); }
.plan-features { list-style: none; padding: 0; margin: 0 0 1.5rem; flex: 1; }
.plan-features li { display: flex; gap: 0.5rem; align-items: flex-start; padding-block: 0.3rem; }
.plan-features svg { width: 20px; height: 20px; flex: none; margin-block-start: 2px; stroke: var(--brand); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.plan-options { display: grid; gap: 10px; }
.plan-options .btn { justify-content: space-between; }
.plan-options .btn:only-child { justify-content: center; }
.opt-price { font-weight: 800; }

@media (max-width: 960px) {
  .plans { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .plan > p { min-height: 0; }
}

/* ---------- FAQ ---------- */

.faq { margin-block-start: 32px; display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 20px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding-block: 16px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* ---------- CTA & footer ---------- */

.cta-band { background: linear-gradient(120deg, #0f766e, #0e7490); color: #fff; padding-block: 56px; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: 1.9rem; }
.cta-band p { margin: 0; opacity: 0.9; }

.site-footer { border-block-start: 1px solid var(--border); padding-block: 32px; background: var(--bg); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 32px; }
.footer-inner p { margin: 0.25rem 0 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: var(--muted); }
.footer-inner > p.small { flex-basis: 100%; }

/* ---------- app pages ---------- */

.page { padding-block: 40px 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 24px; }
.page-head h1 { margin: 0; font-size: 2rem; }
.sub-title { font-size: 1.3rem; margin-block: 40px 16px; }
.jobs-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 12px; }
.jobs-bulk { display: flex; gap: 6px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.auth-card, .checkout-card { max-width: 440px; margin: 24px auto; }
.auth-card h1, .checkout-card h1 { font-size: 1.6rem; }
.btn-google { background: #fff; color: #1f1f1f; border: 1px solid #747775; gap: 12px; }
.btn-google:hover { background: #f8faff; color: #1f1f1f; text-decoration: none; }
.btn-google svg { width: 20px; height: 20px; flex: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin-block: 1.25rem; color: var(--muted); font-size: 0.9rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-switch { text-align: center; margin-block: 1.25rem 0; color: var(--muted); }
.auth-switch a { margin-inline-start: 0.35em; font-weight: 700; }

.field { display: grid; gap: 6px; margin-block-end: 16px; font-weight: 500; }
.field input, .field textarea {
  font: inherit;
  padding: 0.7em 0.85em;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
}
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.field textarea { resize: vertical; min-height: 9em; }
.field .optional { color: var(--muted); font-weight: 400; }
/* A field people never see, for spam bots to fill in. */
.trap { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-card { max-width: 560px; }
.forgot-link { justify-self: end; font-weight: 500; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.danger-zone p { margin-block-start: 0; }
.swal-pdfarrow .swal-input { font: inherit; color: var(--text); background: var(--surface); border-color: var(--border); }
.swal-pdfarrow .swal2-validation-message { background: var(--bg-alt); color: var(--text); }
.form-error {
  padding: 0.7em 1em;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 500;
}

.balance-chip {
  padding: 0.4em 1em;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 700;
  font-size: 0.9rem;
}
.balance-chip:empty { display: none; }

.dropzone {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 48px 24px;
  border: 2px dashed color-mix(in srgb, var(--brand) 50%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--brand-soft) 35%, var(--surface));
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 70%, var(--surface)); }
.dropzone svg { width: 56px; height: 56px; stroke: var(--brand); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dropzone p { margin: 0; }
.drop-title { font-size: 1.25rem; font-weight: 700; }
.dropzone .btn { margin-block: 6px; }

.upload-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.upload-list:empty { display: none; }
.upload-item { padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.upload-item .progress-thin { width: 100%; margin-block: 6px 0; }
.upload-head { display: flex; align-items: baseline; gap: 12px; }
.upload-name { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-done .upload-state { color: var(--success); }
.upload-failed { border-color: var(--danger); background: var(--danger-soft); }
.upload-held { border-color: #f59e0b; background: var(--warn-soft); }
.upload-failed .upload-state { color: var(--danger); white-space: normal; }
.upload-cancel { padding: 0.15em 0.7em; font-size: 0.85rem; }
.upload-dismiss { border: 0; background: none; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.progress { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress-thin { height: 5px; margin-block: 6px 2px; width: 140px; max-width: 100%; }
.progress-bar { height: 100%; width: 0; background: var(--brand); border-radius: inherit; transition: width 0.3s; }

.alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-start: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--warn-soft);
}
.alert p { margin: 0; font-weight: 500; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 16px; text-align: start; vertical-align: top; border-block-end: 1px solid var(--border); }
.table th { font-size: 0.85rem; color: var(--muted); font-weight: 700; background: var(--bg-alt); white-space: nowrap; }
.table tr:last-child td { border-block-end: 0; }
.table .file-name { font-weight: 500; word-break: break-word; max-width: 320px; }
.table .actions { white-space: nowrap; }
.table .actions .small { margin-block-start: 4px; }
.table .actions .btn + .btn, .table .actions a.btn + .btn { margin-inline-start: 6px; }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover { color: var(--danger); background: var(--danger-soft); }
.empty { text-align: center; padding: 24px; margin: 0; }

.pill {
  display: inline-block;
  padding: 0.1em 0.7em;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--bg-alt);
  color: var(--muted);
}
.pill-processing, .pill-queued { background: var(--warn-soft); color: #92400e; }
.pill-done, .pill-order-paid { background: var(--success-soft); color: var(--success); }
.pill-failed { background: var(--danger-soft); color: var(--danger); }
.pill-paused { background: var(--brand-soft); color: var(--brand-strong); }
.pill-awaiting_payment { background: var(--warn-soft); color: #92400e; }
@media (prefers-color-scheme: dark) { .pill-awaiting_payment { color: #fcd34d; } }
@media (prefers-color-scheme: dark) { .pill-processing, .pill-queued { color: #fcd34d; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat {
  display: grid;
  gap: 4px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-label { color: var(--muted); font-weight: 500; }
.stat-value { font-size: 2rem; font-weight: 800; }
.stat-value.stat-text { font-size: 1.05rem; font-weight: 700; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }

.test-banner {
  margin: -8px 0 20px;
  padding: 0.5em 0.9em;
  border-radius: 10px;
  background: var(--warn-soft);
  font-weight: 700;
  font-size: 0.9rem;
}
.summary { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 0 24px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; text-align: end; }
.summary .total { font-size: 1.5rem; }
.checkout-actions { display: grid; gap: 10px; }

/* ---------- legal pages ---------- */

.prose h1 { font-size: 2rem; }
.prose h2 { font-size: 1.2rem; margin-block-start: 1.6em; }
.lang-en, .lang-fr, .lang-de, .lang-he { display: none; }
html[lang="en"] .lang-en, html[lang="fr"] .lang-fr, html[lang="de"] .lang-de, html[lang="he"] .lang-he { display: block; }

/* ---------- admin ---------- */

.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-alt); }
.tab { font: inherit; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 0.4em 1.1em; border-radius: 999px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.admin-h2 { font-size: 1.15rem; margin: 0 0 12px; }
.admin-grant { margin-block-end: 24px; }
.grant-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-block-end: 16px; }
.grant-kind label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.grant-kind select, .admin-search input {
  font: inherit; padding: 0.45em 0.7em; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text);
}
.grant-custom { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 16px; }
.admin-grant .field input { width: 100%; }
.admin-search { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block-end: 12px; }
.admin-search input { flex: 1 1 260px; max-width: 420px; }
.admin-table .link { font-weight: 600; text-align: start; }
.admin-table tr.row-open td { background: var(--brand-soft); }
#more { margin-block-start: 12px; }
.admin-detail { margin-block-start: 24px; }
.admin-detail h3 { font-size: 1rem; margin: 24px 0 8px; }
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.detail-head .admin-h2 { margin: 0; word-break: break-all; }
.pill-order-granted { background: var(--brand-soft); color: var(--brand-strong); }
.tab-count { display: inline-block; min-width: 1.5em; margin-inline-start: 6px; padding: 0 0.4em; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 0.8rem; line-height: 1.5; text-align: center; }
.report-note { white-space: pre-wrap; word-break: break-word; max-width: 420px; }
.reports-table tr.row-handled td { color: var(--muted); }
.pill-reported { background: var(--brand-soft); color: var(--brand-strong); }
.swal-pdfarrow textarea.swal-input { min-height: 8em; }

/* ---------- dialogs and toasts (SweetAlert2, see js/dialogs.js) ---------- */

.swal-pdfarrow.swal2-popup {
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.swal-pdfarrow .swal2-title { color: var(--text); font-size: 1.25rem; }
.swal-pdfarrow .swal2-html-container { color: var(--muted); }
.swal-pdfarrow .swal-actions { gap: 8px; }
.swal2-toast.swal-pdfarrow .swal2-title { font-size: 0.95rem; font-weight: 500; }
.swal2-toast.swal-pdfarrow .swal2-timer-progress-bar { background: var(--brand); }
.swal2-container.swal2-backdrop-show { background: rgb(15 23 42 / 0.45); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); border-color: color-mix(in srgb, var(--danger) 85%, #000); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
.merchant-note { margin-block-start: 16px; text-align: center; }
.plans-unavailable { margin-block-start: 24px; justify-content: center; text-align: center; }

/* Admin queue */
.queue-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.queue-updated { margin-inline-start: auto; }
#panel-queue .admin-h2 { margin-top: 1.5rem; }
.file-links { display: inline-flex; gap: 0 10px; flex-wrap: wrap; }
