/* EJA Services · licence server pages (landing, account, admin). Every colour, radius and shadow comes from
   eja/eja-tokens.css and the shared pieces from eja/eja-components.css; this file is layout only. */

html { -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
body { min-height: 100vh; line-height: 1.5; overflow-x: hidden; }
html[lang="ar"] body { line-height: 1.7; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, select, textarea { font-family: inherit; color: inherit; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.eja-input:focus-visible { outline: none; }
.eja-ic { flex: 0 0 auto; }
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* ------------------------------------------------------------ head: logo on its plate, one gold line */
.top { position: sticky; top: 0; z-index: 30; padding: max(10px, env(safe-area-inset-top, 0px)) 16px 10px; }
.top-in { display: flex; align-items: center; gap: var(--space-12); width: 100%; max-width: 1120px; margin: 0 auto; min-width: 0; }
.brand { display: flex; align-items: center; gap: var(--space-12); color: inherit; min-width: 0; flex: 1 1 auto; }
.brand:hover { text-decoration: none; }
.plate { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 auto; border-radius: var(--radius-14); background: var(--logo-plate); border: 1px solid var(--line); }
.plate img { width: 42px; height: 42px; object-fit: contain; border-radius: 0; background: none; }
.eja-head .plate img { width: 42px; height: 42px; }
.brand-text { min-width: 0; }
.brand-text b { display: block; font-size: 16px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { display: block; font-size: 12px; color: var(--muted2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-tools { display: flex; align-items: center; gap: var(--space-2); flex: 0 0 auto; }
.top-tools .eja-btn { margin-inline-end: 6px; }

.icon-btn {
  display: inline-grid; place-items: center; width: var(--tap-min); height: var(--tap-min); flex: 0 0 auto; padding: 0;
  border: 0; border-radius: var(--radius-12); background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--bg2); color: var(--text); }
.icon-btn .eja-ic { width: 20px; height: 20px; }
.eja-btn .eja-ic { width: 18px; height: 18px; }
.eja-btn:not(:disabled):hover { background-color: var(--bg2); text-decoration: none; }
.eja-btn-primary:not(:disabled):hover, .eja-btn-new:not(:disabled):hover { background-color: var(--brand-fill); filter: brightness(1.08); }
.eja-btn-wa:not(:disabled):hover { background-color: var(--whatsapp); filter: brightness(1.05); }
.eja-btn-danger:not(:disabled):hover { background-color: var(--bad-fill); filter: brightness(1.08); }
.eja-btn-sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: var(--radius-10); gap: 6px; }
.eja-btn-sm .eja-ic { width: 16px; height: 16px; }
.eja-btn-quiet { color: var(--brand); }
.eja-btn-bad { color: var(--bad); }
.pill { border-radius: var(--radius-pill); }
a.eja-btn { text-decoration: none; }
.eja-btn[aria-disabled="true"] { opacity: .6; pointer-events: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.ic-plate { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: var(--radius-12); background: var(--brand-soft); color: var(--brand); }
.ic-plate .eja-ic { width: 22px; height: 22px; }
.muted { color: var(--muted); }
.quiet { font-size: 12.5px; color: var(--muted2); }
.mono { font-family: var(--font-mono); }
.key { font-family: var(--font-mono); font-weight: 700; letter-spacing: .02em; direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere; }
.section-t { font-size: 22px; font-weight: 800; line-height: 1.25; }
.section-sub { color: var(--muted); margin-top: 4px; }

/* ------------------------------------------------------------ landing */
.hero { display: grid; gap: 28px; padding: 32px 0 12px; align-items: center; }
.hero h1 { font-size: clamp(27px, 6vw, 42px); line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
html[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.35; }
.hero .lead { font-size: 17px; color: var(--muted); margin-top: 14px; max-width: 36em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 24px; }
.btn-xl { min-height: 56px; padding: 0 28px; font-size: 17px; border-radius: var(--radius-pill); box-shadow: var(--shadow-fill); }
.btn-xl .eja-ic { width: 22px; height: 22px; }
.dl-meta { font-size: 13.5px; color: var(--muted2); }
.trial-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 14px; }
.trial-pill .eja-ic { width: 18px; height: 18px; }
.shot { border-radius: var(--radius-16); border: 1px solid var(--line); box-shadow: var(--shadow-pop); overflow: hidden; background: var(--card); }
.shot img { width: 100%; height: auto; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; padding: 56px 0 24px; }
}

.block { padding: 36px 0 8px; display: grid; gap: 18px; }
.grid-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature b { display: block; font-size: 15.5px; }
.feature p { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

.steps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px;
  border-radius: 50%; background: var(--brand-fill); color: var(--on-brand); font-weight: 800; }
.step b { display: block; }
.step p { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

.plans { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.plan-name { font-size: 17px; font-weight: 800; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.price b { font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--brand); direction: ltr; unicode-bidi: isolate; }
.price span { color: var(--muted); font-weight: 600; }
.plan-desc { color: var(--muted); font-size: 14px; }
.ticks { display: grid; gap: 6px; font-size: 14px; }
.ticks li { display: flex; gap: 8px; align-items: flex-start; }
.ticks .eja-ic { width: 18px; height: 18px; color: var(--brand); margin-top: 3px; }
.plan .eja-btn { margin-top: auto; width: 100%; border-radius: var(--radius-pill); }
.contact-line { color: var(--muted); font-size: 14px; }
.note-line { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 14px; }
.note-line .eja-ic { width: 20px; height: 20px; color: var(--brand); margin-top: 1px; }

.foot { margin-top: 48px; border-top: 1px solid var(--line); background: var(--card); }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 22px 16px calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; gap: 10px 24px;
  align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--muted2); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ------------------------------------------------------------ forms */
.form { display: grid; gap: 14px; }
.eja-field { align-content: start; }
input[type="file"].eja-input { padding: 8px 10px; }
input[type="file"]::file-selector-button { margin-inline-end: 12px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-10);
  background: var(--card); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
textarea.eja-input { min-height: 84px; resize: vertical; line-height: 1.45; }
select.eja-input { appearance: auto; }
.eja-input[type="date"] { min-height: var(--field-min); }
.check { display: flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14.5px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand-fill); flex: 0 0 auto; }
.checks { display: grid; gap: 2px 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.inline-input { display: flex; gap: 8px; }
.inline-input .eja-input { flex: 1 1 auto; min-width: 0; }
.form-error { color: var(--bad); font-size: 14px; font-weight: 600; }
.form-error:empty { display: none; }
.hint { font-size: 12.5px; color: var(--muted2); }
.secret { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-12); background: var(--brand-soft); }
.secret .key { flex: 1 1 auto; font-size: 17px; }

/* ------------------------------------------------------------ cards, rows, badges */
.card-head { display: flex; align-items: center; gap: var(--space-12); margin-bottom: var(--space-12); }
.card-head > div { min-width: 0; flex: 1 1 auto; }
.eja-card-t { font-size: 15.5px; font-weight: 700; margin: 0; }
.eja-card-m { font-size: 12.5px; color: var(--muted); }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.list { display: grid; gap: 10px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-14); box-shadow: var(--shadow-card); padding: 12px 14px;
  display: grid; gap: 8px; min-width: 0; }
.item-top { display: flex; align-items: flex-start; gap: 8px 12px; flex-wrap: wrap; }
.item-main { flex: 1 1 220px; min-width: 0; }
.item-title { font-weight: 700; overflow-wrap: anywhere; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.item-sub { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.item-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted2); }
.item-meta b { color: var(--muted); font-weight: 600; }
.item-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.item.clickable { cursor: pointer; color: inherit; text-decoration: none; }
.item.clickable:hover { border-color: var(--brand); text-decoration: none; }
.item.clickable .item-title { color: var(--text); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 700;
  white-space: nowrap; line-height: 1.6; }
.badge.ok { background: var(--brand-soft); color: var(--brand); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.wait { background: rgba(224, 161, 30, .16); color: var(--wait); }
.badge.off { background: var(--bg2); color: var(--muted); border: 1px solid var(--line); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted2); font-size: 14.5px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar .search { flex: 1 1 240px; min-width: 0; position: relative; display: flex; align-items: center; }
.toolbar .search .eja-ic { position: absolute; inset-inline-start: 14px; width: 18px; height: 18px; color: var(--muted2); pointer-events: none; }
.toolbar .search .eja-input { padding-inline-start: 42px; min-height: 44px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .eja-chip { min-height: 36px; padding: 0 12px; }
.progress { height: 10px; border-radius: var(--radius-pill); background: var(--bg2); overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; width: 0; background: var(--brand-fill); transition: width .2s; }
.events { display: grid; }
.events li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.events li:last-child { border-bottom: 0; }
.events time { color: var(--muted2); font-size: 12.5px; white-space: nowrap; }
.events .kind { font-weight: 700; color: var(--brand); margin-inline-end: 6px; }
.events .kind.refused { color: var(--bad); }
.events span { overflow-wrap: anywhere; }
.devices { display: grid; gap: 8px; }
.device { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-12); background: var(--bg2); flex-wrap: wrap; }
.device > div { flex: 1 1 160px; min-width: 0; }
.device b { display: block; overflow-wrap: anywhere; }
.device span { font-size: 12.5px; color: var(--muted2); }
.lic-key { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; font-size: 14px; }
.kv dt { color: var(--muted2); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.grow { flex: 1 1 auto; min-width: 0; }
.pre { white-space: pre-wrap; }
.spacer { height: 4px; }
.sub-t { margin: 16px 0 8px; font-size: 14px; }
.kv + .sub-t { margin-top: 18px; }
.hint { margin-top: 10px; }
.form .hint { margin-top: 0; }
.stat-link { display: block; color: inherit; text-decoration: none; border: 1px solid transparent; }
.stat-link:hover { text-decoration: none; border-color: var(--brand); }
.key.small { font-size: 13px; font-weight: 600; }

/* ------------------------------------------------------------ popups and toast */
.pop-dialog { padding: 0; border: 0; background: transparent; width: min(560px, calc(100vw - 20px)); max-width: none; max-height: calc(100dvh - 20px);
  overflow: visible; color: var(--text); }
.pop-dialog.wide { width: min(760px, calc(100vw - 20px)); }
.pop-dialog::backdrop { background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.pop-dialog .eja-pop { display: flex; flex-direction: column; max-height: calc(100dvh - 20px); }
.eja-pop-hd { display: flex; align-items: center; gap: var(--space-10); padding-inline-end: 12px; }
.eja-pop-hd > span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pop-x { margin: -8px 0; width: 40px; height: 40px; }
.eja-pop-bd.form-bd { white-space: normal; overflow-y: auto; display: grid; gap: var(--space-12); font-size: 15px; padding-bottom: var(--space-12); }
.eja-pop-ft { align-items: center; flex-wrap: wrap; }
.eja-pop-b:disabled { opacity: .6; cursor: default; }
.confirm-text { color: var(--muted); }
.toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  max-width: min(520px, calc(100vw - 32px)); padding: 12px 16px; border-radius: var(--radius-14); background: var(--card); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow-pop); font-size: 14px; font-weight: 600; }
.toast.bad { color: var(--bad); }

/* ------------------------------------------------------------ account */
.narrow { max-width: 460px; margin: 32px auto 0; }
.signin-card { padding: 24px; }
.signin-card h1 { font-size: 22px; font-weight: 800; }
.signin-card .section-sub { margin-bottom: 18px; }
.acc { display: grid; gap: 16px; padding-top: 24px; }
.acc-hello { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.acc-hello h1 { font-size: 22px; font-weight: 800; }
@media (min-width: 900px) {
  .acc-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
}
.acc-grid { display: grid; gap: 16px; }

/* ------------------------------------------------------------ admin */
.admin-shell { min-height: 100vh; }
.side { display: none; }
.side-brand { display: flex; align-items: center; gap: var(--space-12); padding: var(--space-16); position: relative; color: inherit; }
.side-brand:hover { text-decoration: none; }
.side-brand::after { content: ""; position: absolute; inset-inline: var(--space-16); bottom: 0; height: 2px; background: var(--gold); }
.side-brand b { display: block; font-size: 16px; font-weight: 700; }
.side-brand span span { display: block; font-size: 12px; color: var(--muted2); }
.side-nav { display: grid; align-content: start; gap: var(--space-2); padding: var(--space-12) var(--space-10); overflow-y: auto; flex: 1 1 auto; }
.side-nav a { display: flex; align-items: center; gap: var(--space-12); min-height: var(--tap-min); padding: 0 var(--space-12); border-radius: var(--radius-12);
  color: var(--text); font-size: 14.5px; font-weight: 600; text-decoration: none; }
.side-nav a:hover { background: var(--bg2); }
.side-nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.side-nav a .eja-ic { width: 20px; height: 20px; }
.side-foot { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); padding: var(--space-12) var(--space-16) var(--space-16); border-top: 1px solid var(--line); }
.side-foot .eja-btn { padding: 0 10px; font-size: 13.5px; }
.side-foot .wide { grid-column: 1 / -1; }
.main { min-width: 0; }
.page-head .top-in { max-width: none; }
.page-title { flex: 1 1 auto; min-width: 0; }
.page-title h1 { font-size: 17px; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.page-title span { display: block; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.phone-nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none; background: var(--bg); border-bottom: 1px solid var(--line); }
.phone-nav::-webkit-scrollbar { display: none; }
.phone-nav .eja-chip { flex: 0 0 auto; min-height: 38px; text-decoration: none; }
.content { display: grid; gap: 16px; padding: 16px 16px 48px; max-width: 1200px; margin: 0 auto; min-width: 0; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(420px, 100%); padding: 28px 24px 24px; display: grid; gap: 16px; position: relative; overflow: hidden; }
.login-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--gold); }
html[dir="ltr"] .back .eja-ic { transform: scaleX(-1); }
.login-card .plate { width: 64px; height: 64px; margin: 0 auto; }
.login-card .plate img { width: 56px; height: 56px; }
.login-card h1 { text-align: center; font-size: 20px; font-weight: 800; }
.login-card .lang-row { display: flex; justify-content: center; gap: 8px; }
.two-col { display: grid; gap: 16px; }
.release-form .src { display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 1100px) { .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

@media (min-width: 900px) {
  body.admin { background: var(--desk-bg); }
  .admin-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--card); border-inline-end: 1px solid var(--line); }
  .phone-nav, .page-head .phone-only { display: none; }
  .page-head { padding-inline: 32px; }
  .page-title h1 { font-size: 20px; }
  .content { padding: 22px 32px 48px; }
}
.phone-only-inline { display: none; }
@media (max-width: 560px) {
  .wide-only { display: none !important; }
  .phone-only-inline { display: inline-grid; }
  .top { padding-inline: 12px; }
  .brand-text span { display: none; }
  .section-t { font-size: 20px; }
  .item-actions .eja-btn-sm { flex: 1 1 auto; }
}

/* ------------------------------------------------------------ how to subscribe, questions */
.steps-4 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.faq { display: grid; gap: 10px; }
.faq details { padding: 0; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; min-height: 48px;
  font-weight: 700; font-size: 15px; cursor: pointer; list-style: none; border-radius: inherit; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: 0 0 auto; width: 9px; height: 9px; margin-top: -4px; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.faq summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.faq details p { padding: 0 16px 14px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.block { scroll-margin-top: 76px; }
