/* =========================================================
   منصة قطع الغيار — واجهة الصفحة الرئيسية وبوابات الدخول
   ملف الصفحة الرئيسية وصفحات الدخول والتسجيل وصفحة مسح كود الورشة
   ========================================================= */

:root {
    --ink: #17222D;
    --ink-2: #213141;
    --ink-3: #2C3E50;
    --steel: #5B6B7A;
    --line: #DCE1E6;
    --surface: #F1F3F5;
    --card: #FFFFFF;
    --copper: #B8682A;
    --copper-dark: #97531E;
    --manila: #ECD7A6;
    --manila-edge: #CDB074;
    --ok: #2E7D5B;
    --ok-bg: #E4F2EA;
    --info: #2F6FB0;
    --info-bg: #E5EEF8;
    --warn: #9A6412;
    --warn-bg: #FBF0DC;
    --bad: #B23B3B;
    --bad-bg: #FBE7E7;
    --text: #17222D;
    --muted: #5B6B7A;
    --accent: var(--copper);
    --font: "Tajawal", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 22px;
    border-radius: 10px; border: 1.5px solid transparent;
    font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--ghost-light { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--ink); }
.btn--block { width: 100%; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand__mark {
    width: 34px; height: 34px; border-radius: 8px; background: var(--ink); color: var(--manila);
    display: grid; place-items: center;
}
.brand__mark svg { width: 20px; height: 20px; }

/* =========================================================
   HOME
   ========================================================= */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(241,243,245,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav__in { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.nav__links { display: flex; gap: 24px; margin-inline-start: auto; list-style: none; }
.nav__links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; }
.nav__links a:hover { color: var(--ink); }
.nav .btn { min-height: 42px; padding: 0 18px; }
@media (max-width: 1000px) { .nav__links { display: none; } .nav .btn { margin-inline-start: auto; } }

/* ---- Hero ---- */
.hero { padding: 64px 0 80px; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 {
    font-size: clamp(36px, 5.2vw, 62px); line-height: 1.22; font-weight: 700; letter-spacing: -.5px;
    max-width: 15ch;
}
.hero__lead { margin-top: 22px; font-size: 19px; color: var(--muted); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__aside { margin-top: 26px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.hero__aside svg { width: 18px; height: 18px; color: var(--copper); }

/* pegboard + hanging tag (the signature element) */
.board {
    position: relative; min-height: 520px; border-radius: 18px; overflow: hidden;
    background-color: var(--ink);
    background-image: radial-gradient(circle, rgba(255,255,255,.09) 2.2px, transparent 2.6px);
    background-size: 26px 26px; background-position: 13px 13px;
    padding: 46px 40px 40px;
}
.board__peg { position: absolute; top: 30px; inset-inline-start: 50%; width: 14px; height: 14px; border-radius: 50%; background: #8A99A8; box-shadow: 0 2px 0 rgba(0,0,0,.4); transform: translateX(50%); }
.board__string { position: absolute; top: 37px; inset-inline-start: 50%; width: 2px; height: 34px; background: #C9B98F; transform: translateX(50%); }

.tag {
    position: relative; margin: 26px auto 0; width: min(340px, 100%);
    background: var(--manila); color: #3A2E14; border-radius: 6px 6px 10px 10px;
    padding: 34px 24px 20px; box-shadow: 0 18px 30px -12px rgba(0,0,0,.55);
    clip-path: polygon(14% 0, 86% 0, 100% 9%, 100% 100%, 0 100%, 0 9%);
    transform: rotate(-2deg); transform-origin: 50% 0;
}
.tag__hole { position: absolute; top: 12px; inset-inline-start: 50%; transform: translateX(50%); width: 14px; height: 14px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px var(--manila-edge); }
.tag__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: #6B5A33; border-bottom: 1.5px dashed var(--manila-edge); padding-bottom: 10px; }
.tag__code { font-family: var(--mono); font-weight: 600; letter-spacing: .5px; direction: ltr; }
.tag__part { font-size: 30px; font-weight: 700; margin-top: 12px; line-height: 1.3; color: #2B210C; }
.tag__specs { display: grid; grid-template-columns: repeat(3, auto); gap: 4px 18px; margin-top: 10px; font-size: 13px; }
.tag__specs dt { color: #7A6740; }
.tag__specs dd { font-weight: 600; color: #2B210C; }
.tag__note { margin-top: 12px; font-size: 14px; color: #5A4A24; }
.tag__track { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 16px; font-size: 11.5px; text-align: center; }
.tag__track li { padding-top: 10px; border-top: 3px solid rgba(58,46,20,.18); color: #7A6740; }
.tag__track li.done { border-color: #3A2E14; color: #3A2E14; }
.tag__track li.now { border-color: var(--copper); color: var(--copper-dark); font-weight: 700; }

.slips { display: grid; gap: 10px; width: min(360px, 100%); margin: 22px auto 0; }
.slip {
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
    background: #fff; border-radius: 10px; padding: 12px 16px; font-size: 14px;
    border-inline-start: 4px solid var(--line);
}
.slip b { font-weight: 600; }
.slip small { color: var(--muted); font-size: 12.5px; grid-column: 1; }
.slip strong { grid-row: 1 / span 2; grid-column: 2; font-size: 18px; font-weight: 700; white-space: nowrap; }
.slip--pick { border-inline-start-color: var(--ok); }
.slip--pick small { color: var(--ok); font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
    .tag { animation: swing 1.6s cubic-bezier(.3,1.6,.5,1) both; }
    .slip { opacity: 0; animation: slipIn .45s ease-out forwards; animation-delay: var(--d, .8s); }
    @keyframes swing { from { transform: rotate(5deg); } to { transform: rotate(-2deg); } }
    @keyframes slipIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 960px) {
    .hero { padding-top: 40px; }
    .hero__grid { grid-template-columns: 1fr; gap: 40px; }
    .board { min-height: 0; padding: 40px 18px 26px; }
}

/* ---- Section shell ---- */
.sec { padding: 92px 0; }
.sec--white { background: var(--card); border-block: 1px solid var(--line); }
.sec__head { max-width: 640px; margin-bottom: 48px; }
.sec__head h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.3; font-weight: 700; }
.sec__head p { margin-top: 12px; font-size: 17.5px; color: var(--muted); }

/* ---- Steps (a real sequence) ---- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: st; position: relative; }
.steps li { position: relative; padding: 0 0 0 28px; counter-increment: st; }
.steps li::before {
    content: counter(st); display: grid; place-items: center;
    width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--manila);
    font-weight: 700; font-size: 18px; position: relative; z-index: 1;
}
.steps li::after { content: ""; position: absolute; top: 22px; inset-inline: 44px 0; height: 2px; background: repeating-linear-gradient(to left, var(--line) 0 8px, transparent 8px 14px); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 19px; font-weight: 700; margin-top: 18px; }
.steps p { font-size: 15.5px; color: var(--muted); margin-top: 6px; max-width: 30ch; }
.steps .who { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--copper-dark); }
@media (max-width: 860px) {
    .steps { grid-template-columns: 1fr; gap: 30px; }
    .steps li { padding: 0; display: grid; grid-template-columns: 44px 1fr; column-gap: 18px; }
    .steps li::before { grid-row: 1 / span 3; }
    .steps li::after { top: 48px; bottom: -30px; inset-inline: 21px auto; width: 2px; height: auto; background: var(--line); }
    .steps h3 { margin-top: 6px; }
}

/* ---- Stats: instrument cluster ---- */
.stats { background: var(--ink); color: #fff; padding: 92px 0 100px; }
.stats__head { text-align: center; max-width: 560px; margin: 0 auto 44px; }
.stats__head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; line-height: 1.3; }
.stats__head p { margin-top: 10px; color: #9FB0BF; font-size: 17px; }
.cluster {
    background: #0F1820; border: 1px solid rgba(255,255,255,.07);
    border-radius: 200px 200px 28px 28px / 120px 120px 28px 28px;
    padding: 56px clamp(20px, 4vw, 56px) 0; overflow: hidden;
}
.cluster__dials { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: center; gap: 24px; }

.gauge { position: relative; text-align: center; max-width: 300px; justify-self: center; width: 100%; }
.gauge svg { width: 100%; overflow: visible; }
.gauge__track, .gauge__fill { fill: none; stroke-width: 10; stroke-linecap: round; }
.gauge__track { stroke: rgba(255,255,255,.1); }
.gauge__fill { stroke: var(--copper); stroke-dasharray: var(--v) 100; transition: stroke-dasharray 1.6s cubic-bezier(.2,.8,.2,1); }
.gauge__ticks line { stroke: rgba(255,255,255,.35); stroke-width: 1.5; }
.gauge__ticks line.mj { stroke: rgba(255,255,255,.7); stroke-width: 2.5; }
.gauge__end { fill: #6F8091; font-size: 11px; text-anchor: middle; font-family: var(--font); }
.gauge__needle { transform-origin: 100px 95px; transform: rotate(var(--a)); transition: transform 1.6s cubic-bezier(.3,1.25,.4,1); }
.gauge__needle line { stroke: #F08A3C; stroke-width: 3.5; stroke-linecap: round; }
.gauge__needle circle { fill: #0F1820; stroke: #F08A3C; stroke-width: 3; }
.gauge__dial { position: relative; }
.gauge__read { position: absolute; inset-inline: 0; top: 82%; transform: translateY(-50%); }
.gauge__read strong { font-size: clamp(30px, 3vw, 40px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge__read small { font-size: .5em; color: #9FB0BF; margin-inline-start: 2px; }
.gauge figcaption, .odo-wrap figcaption { margin-top: 14px; display: grid; gap: 2px; }
.gauge figcaption b, .odo-wrap figcaption b { font-size: 16px; font-weight: 600; }
.gauge figcaption span, .odo-wrap figcaption span { font-size: 13.5px; color: #8496A7; }

.odo-wrap { text-align: center; }
.odo { display: inline-flex; gap: 6px; padding: 10px; border-radius: 14px; background: #070D12; border: 1px solid rgba(255,255,255,.08); }
.odo__cell {
    width: clamp(44px, 5vw, 64px); height: clamp(64px, 7vw, 92px); border-radius: 8px; overflow: hidden;
    background: linear-gradient(#1C2832, #2A3844 50%, #1C2832);
    font-family: var(--mono); font-weight: 600; font-size: clamp(40px, 4.6vw, 60px); color: var(--manila);
    box-shadow: inset 0 6px 8px rgba(0,0,0,.45), inset 0 -6px 8px rgba(0,0,0,.45);
}
.odo__cell.is-lead { color: #4D5E6D; }
.odo__reel { display: flex; flex-direction: column; transform: translateY(calc(var(--n) * -10%)); transition: transform 2s cubic-bezier(.2,.75,.2,1); }
.odo__reel i { font-style: normal; height: clamp(64px, 7vw, 92px); display: grid; place-items: center; }
.odo__cell:nth-child(1) .odo__reel { transition-delay: .0s; }
.odo__cell:nth-child(2) .odo__reel { transition-delay: .1s; }
.odo__cell:nth-child(3) .odo__reel { transition-delay: .2s; }
.odo__cell:nth-child(4) .odo__reel { transition-delay: .3s; }
.odo__cell:nth-child(5) .odo__reel { transition-delay: .4s; }

.cluster.is-pre .gauge__needle { transform: rotate(-120deg); }
.cluster.is-pre .gauge__fill { stroke-dasharray: 0 100; }
.cluster.is-pre .odo__reel { transform: translateY(0); }

.trip { display: grid; grid-template-columns: repeat(4, 1fr); margin: 48px calc(-1 * clamp(20px, 4vw, 56px)) 0; border-top: 1px solid rgba(255,255,255,.08); }
.trip > div { padding: 22px 24px 26px; border-inline-start: 1px solid rgba(255,255,255,.08); }
.trip > div:first-child { border-inline-start: 0; }
.trip dt { font-size: 13.5px; color: #8496A7; }
.trip dd { font-size: 28px; font-weight: 700; margin-top: 4px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.trip dd small { font-size: 14px; font-weight: 500; color: #9FB0BF; }

@media (max-width: 900px) {
    .cluster { border-radius: 28px; padding-top: 36px; }
    .cluster__dials { grid-template-columns: 1fr 1fr; row-gap: 36px; }
    .odo-wrap { grid-column: 1 / -1; order: -1; }
    .trip { grid-template-columns: 1fr 1fr; }
    .trip > div:nth-child(3) { border-inline-start: 0; }
    .trip > div:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.08); }
}
@media (max-width: 480px) {
    .gauge figcaption span { display: none; }
    .trip dd { font-size: 23px; }
}

/* ---- Screens showcase ---- */
.shots__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.shots__tab {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
    border-radius: 999px; border: 1.5px solid var(--line); background: var(--card);
    font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer;
}
.shots__tab .ico { width: 18px; height: 18px; }
.shots__tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.shots__panel { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.shots__panel[hidden] { display: none; }
.shots__copy h3 { font-size: 24px; font-weight: 700; line-height: 1.4; }
.shots__copy p { margin-top: 12px; color: var(--muted); }
.shots__copy ul { list-style: none; margin-top: 18px; display: grid; gap: 10px; font-size: 15px; }
.shots__copy li { display: flex; gap: 10px; }
.shots__copy li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 10px; border-radius: 2px; background: var(--copper); }
@media (max-width: 960px) { .shots__panel { grid-template-columns: 1fr; gap: 24px; } }

/* browser-like frame */
.frame { background: var(--card); border-radius: 14px; border: 1px solid var(--line); overflow: hidden; box-shadow: 0 30px 60px -30px rgba(23,34,45,.35); }
.frame__bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #E7EBEF; border-bottom: 1px solid var(--line); }
.frame__url { flex: 1; max-width: 360px; margin-inline: auto; background: #fff; border-radius: 6px; padding: 3px 12px; font-size: 12px; color: var(--muted); direction: ltr; text-align: center; font-family: var(--mono); }
.frame__body { display: grid; grid-template-columns: 170px 1fr; min-height: 420px; font-size: 13.5px; }
.frame__scroll { overflow-x: auto; }
.frame__scroll .frame__body { min-width: 700px; }
.app-side { background: var(--ink); color: #B9C4CE; padding: 18px 12px; display: grid; align-content: start; gap: 4px; }
.app-side b { color: #fff; font-size: 14px; padding: 0 10px 14px; }
.app-side span { padding: 7px 10px; border-radius: 7px; }
.app-side span.on { background: rgba(255,255,255,.1); color: #fff; }
.app-main { padding: 20px 22px; background: #F7F8FA; display: grid; align-content: start; gap: 16px; }
.app-title { display: flex; justify-content: space-between; align-items: center; }
.app-title h4 { font-size: 17px; font-weight: 700; }
.mini-btn { background: var(--accent); color: #fff; border-radius: 7px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.mini-btn--line { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.mini-btn--ok { background: var(--ok); }
.mini-btn--bad { background: transparent; color: var(--bad); border: 1px solid #EBC3C3; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi strong { display: block; font-size: 22px; font-weight: 700; line-height: 1.3; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips span { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 11px; font-size: 12px; color: var(--muted); }
.chips span.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tbl { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tbl__row { display: grid; grid-template-columns: 1.4fr 1.4fr 1fr .8fr; gap: 10px; padding: 10px 14px; border-top: 1px solid #EEF1F4; align-items: center; }
.tbl__row:first-child { border-top: 0; background: #FAFBFC; color: var(--muted); font-size: 12px; }
.tbl__row b { font-weight: 600; }
.badge { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap; justify-self: start; }
.badge--wait { background: var(--warn-bg); color: var(--warn); }
.badge--proc { background: var(--info-bg); color: var(--info); }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--bad { background: var(--bad-bg); color: var(--bad); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; align-content: start; }
.box h5 { font-size: 14px; font-weight: 700; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.field i { font-style: normal; display: block; border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; color: var(--text); font-size: 13px; background: #fff; }

.chat { display: grid; gap: 8px; }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.6; }
.msg small { display: block; font-size: 11px; color: var(--muted); }
.msg--them { background: #fff; border: 1px solid var(--line); justify-self: start; border-start-start-radius: 4px; }
.msg--me { background: var(--info-bg); justify-self: end; border-start-end-radius: 4px; }
.offer-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid #EEF1F4; }
.offer-row:first-of-type { border-top: 0; }
.offer-row small { display: block; color: var(--muted); font-size: 11.5px; }
.offer-row strong { font-size: 15px; }

/* phone frame for client tracking */
.phone-stage { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.phone { width: 270px; border-radius: 34px; background: var(--ink); padding: 10px; box-shadow: 0 30px 60px -30px rgba(23,34,45,.5); }
.phone__screen { background: #F7F8FA; border-radius: 26px; overflow: hidden; font-size: 12.5px; }
.phone__top { background: var(--ink); color: #fff; padding: 16px 16px 14px; }
.phone__top small { color: #9FB0BF; display: block; font-size: 11px; }
.phone__top b { font-size: 15px; }
.phone__body { padding: 14px; display: grid; gap: 12px; }
.vtrack { list-style: none; display: grid; gap: 0; }
.vtrack li { position: relative; padding: 0 22px 12px 0; color: var(--muted); }
.vtrack li::before { content: ""; position: absolute; inset-inline-start: 0; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #C8D0D8; }
.vtrack li::after { content: ""; position: absolute; inset-inline-start: 4px; top: 18px; bottom: 0; width: 2px; background: #DDE3E8; }
.vtrack li:last-child::after { display: none; }
.vtrack li.done { color: var(--text); }
.vtrack li.done::before { background: var(--ok); }
.vtrack li.now { color: var(--text); font-weight: 700; }
.vtrack li.now::before { background: var(--copper); box-shadow: 0 0 0 4px rgba(184,104,42,.2); }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.pcard__top { display: flex; justify-content: space-between; align-items: baseline; }
.pcard__top strong { font-size: 16px; }
.pcard__acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; text-align: center; }
.phone-notes h4 { font-size: 18px; font-weight: 700; }
.phone-notes p { color: var(--muted); margin-top: 8px; font-size: 15px; max-width: 40ch; }
@media (max-width: 700px) { .phone-stage { grid-template-columns: 1fr; justify-items: center; padding: 22px 14px; } }

/* ---- Portals list ---- */
.portal-list { list-style: none; border-top: 1px solid var(--line); }
.portal-list li { border-bottom: 1px solid var(--line); }
.portal-list a {
    display: grid; grid-template-columns: 52px 200px 1fr auto; gap: 22px; align-items: center;
    padding: 22px 6px; text-decoration: none; transition: background-color .15s;
}
.portal-list a:hover { background: var(--surface); }
.portal-list .pi { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--pc); }
.portal-list .pi .ico { width: 26px; height: 26px; }
.portal-list h3 { font-size: 20px; font-weight: 700; }
.portal-list p { color: var(--muted); font-size: 15.5px; max-width: 60ch; }
.portal-list .go { font-weight: 600; font-size: 15px; color: var(--pc); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.portal-list .go .ico { width: 18px; height: 18px; }
@media (max-width: 760px) {
    .portal-list a { grid-template-columns: 52px 1fr; gap: 6px 16px; }
    .portal-list .pi { grid-row: 1 / span 3; }
    .portal-list .go { grid-column: 2; }
}

/* ---- Testimonials ---- */
.quotes { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto auto; gap: 18px; }
.quote {
    position: relative; display: flex; flex-direction: column; gap: 22px; justify-content: space-between;
    background: var(--surface); border-radius: 16px; padding: 28px 28px 24px;
    border-inline-start: 4px solid var(--pc);
}
.quote--lead { grid-row: 1 / span 2; background: var(--ink); color: #fff; padding: 40px 40px 32px; border-inline-start: 0; }
.quote__mark { width: 34px; height: 26px; fill: var(--pc); opacity: .9; }
.quote--lead .quote__mark { width: 48px; height: 36px; fill: var(--manila); }
.quote blockquote { font-size: 17px; line-height: 1.85; flex: 1; }
.quote--lead blockquote { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.7; font-weight: 500; max-width: 30ch; }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.quote figcaption b { display: block; font-weight: 700; font-size: 15px; line-height: 1.4; }
.quote figcaption small { display: block; color: var(--muted); font-size: 13.5px; }
.quote--lead figcaption small { color: #9FB0BF; }
.quote__avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--pc); color: #fff; font-weight: 700; }
.quote--lead .quote__avatar { background: var(--manila); color: var(--ink); }
.quote__role { margin-inline-start: auto; font-size: 12.5px; font-weight: 600; color: var(--pc); border: 1px solid currentColor; border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
.quote--lead .quote__role { color: var(--manila); }
@media (max-width: 860px) {
    .quotes { grid-template-columns: 1fr; }
    .quote--lead { grid-row: auto; padding: 30px 24px 24px; }
}

/* ---- FAQ ---- */
.faq { display: grid; grid-template-columns: 320px 1fr; gap: 56px; align-items: start; }
.faq__side { position: sticky; top: 100px; }
.faq__side h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.3; font-weight: 700; }
.faq__side p { margin-top: 12px; color: var(--muted); font-size: 17px; }
.faq__contact { margin-top: 22px; display: grid; gap: 8px; justify-items: start; }
.faq__contact a { font-weight: 600; text-decoration: none; color: var(--copper-dark); }
.faq__contact a:hover { text-decoration: underline; }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
    padding: 22px 4px; font-size: 18px; font-weight: 600;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--copper-dark); }
.faq__plus { position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1.5px solid var(--line); }
.faq__plus::before, .faq__plus::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 11px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); transition: transform .2s; }
.faq__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item[open] .faq__plus { background: var(--ink); border-color: var(--ink); color: #fff; }
.faq__item[open] .faq__plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq__item p { padding: 0 4px 24px; color: var(--muted); font-size: 16px; max-width: 64ch; }
@media (max-width: 860px) {
    .faq { grid-template-columns: 1fr; gap: 28px; }
    .faq__side { position: static; }
}

/* ---- QR band ---- */
.qr-band { background: var(--ink); color: #fff; border-radius: 20px; padding: 56px; display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.qr-band h2 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.35; font-weight: 700; max-width: 18ch; }
.qr-band p { margin-top: 14px; color: #B9C4CE; max-width: 48ch; font-size: 17px; }
.qr-band .hero__cta { margin-top: 28px; }
.qr-card { background: var(--manila); border-radius: 14px; padding: 18px 18px 14px; color: #3A2E14; text-align: center; transform: rotate(2deg); }
.qr-card svg { width: 168px; height: 168px; background: #fff; border-radius: 8px; padding: 10px; }
.qr-card b { display: block; margin-top: 10px; font-size: 14px; }
.qr-card small { font-size: 12px; color: #6B5A33; }
@media (max-width: 860px) { .qr-band { grid-template-columns: 1fr; padding: 36px 24px; } .qr-card { justify-self: center; } }

/* ---- Footer ---- */
.foot { padding: 48px 0 40px; color: var(--muted); font-size: 14.5px; }
.foot__in { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.foot__legal { width: 100%; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; }

/* =========================================================
   AUTH (login + portal chooser)
   ========================================================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--card); }
.auth__form { display: flex; flex-direction: column; padding: 32px clamp(24px, 6vw, 88px); }
.auth__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth__home { font-size: 14px; color: var(--muted); text-decoration: none; }
.auth__home:hover { color: var(--ink); }
.auth__body { width: 100%; max-width: 460px; margin: auto 0; padding: 40px 0; }

.switcher { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 36px; }
.switcher::-webkit-scrollbar { display: none; }
.switcher a {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; white-space: nowrap; flex: none;
    font-size: 13.5px; font-weight: 500; color: var(--muted); text-decoration: none; border: 1px solid var(--line);
}
.switcher a:hover { color: var(--ink); border-color: #C5CCD3; }
.switcher a.is-active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.switcher .ico { width: 16px; height: 16px; }

.auth__icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); }
.auth__icon .ico { width: 28px; height: 28px; }
.auth h1 { font-size: 32px; font-weight: 700; line-height: 1.3; margin-top: 18px; }
.auth__lead { color: var(--muted); margin-top: 8px; font-size: 16px; }
.auth__ctx { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 14px; }
.auth__ctx b { font-weight: 600; }

.alert { margin-top: 22px; padding: 12px 14px; border-radius: 10px; background: var(--bad-bg); color: #7E2424; font-size: 14.5px; border-inline-start: 4px solid var(--bad); }
.alert--ok { background: var(--ok-bg); color: #1E5A40; border-color: var(--ok); }

.form { margin-top: 28px; display: grid; gap: 18px; }
.form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.input {
    width: 100%; height: 50px; padding: 0 14px; border-radius: 10px;
    border: 1.5px solid var(--line); background: #fff; font-size: 16px;
    transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: #C5CCD3; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.input--ltr { direction: ltr; text-align: right; }
.pw { position: relative; }
.pw .input { padding-inline-end: 64px; }
.pw__toggle { position: absolute; inset-inline-end: 6px; top: 6px; height: 38px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 7px; }
.pw__toggle:hover { color: var(--ink); background: var(--surface); }
.field-err { color: var(--bad); font-size: 13px; margin-top: 6px; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form .btn--solid { margin-top: 4px; min-height: 52px; font-size: 16px; }
.auth__links { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 22px; font-size: 14.5px; }
.auth__links a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth__links a:hover { text-decoration: underline; }
.auth__note { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.auth__foot { font-size: 13px; color: var(--muted); }

/* visual side */
.auth__panel {
    position: relative; overflow: hidden; color: #fff; padding: 56px clamp(28px, 5vw, 72px);
    display: flex; flex-direction: column; justify-content: center; gap: 36px;
    background-color: var(--ink);
    background-image: radial-gradient(circle, rgba(255,255,255,.08) 2.2px, transparent 2.6px);
    background-size: 26px 26px; background-position: 13px 13px;
}
.auth__panel::before { content: ""; position: absolute; inset-block: 0; inset-inline-end: 0; width: 6px; background: var(--accent); }
.auth__panel .tag { margin: 0; transform: rotate(-2.5deg); width: min(320px, 100%); }
.auth__panel .tag__status { margin-top: 14px; display: inline-block; background: #3A2E14; color: var(--manila); font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 6px; }
.auth__panel h2 { font-size: 22px; font-weight: 700; }
.feat { list-style: none; display: grid; gap: 12px; margin-top: 14px; }
.feat li { display: flex; gap: 12px; align-items: flex-start; color: #D3DBE2; font-size: 15.5px; }
.feat li svg { width: 20px; height: 20px; margin-top: 4px; color: var(--accent); flex: none; filter: brightness(1.35); }

@media (max-width: 920px) {
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth__panel { display: none; }
    .auth__body { margin: 0 auto; padding-top: 28px; }
    .switcher { margin-bottom: 26px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
}

/* portal chooser */
.chooser { min-height: 100vh; display: flex; flex-direction: column; }
.chooser__in { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: 48px; }
.chooser h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; line-height: 1.3; }
.chooser__lead { color: var(--muted); margin-top: 10px; font-size: 17.5px; max-width: 52ch; }
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 40px; }
.door {
    position: relative; display: flex; flex-direction: column; gap: 10px; padding: 24px 22px 22px;
    background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; text-decoration: none;
    transition: border-color .15s, transform .15s;
}
.door:hover { border-color: var(--pc); transform: translateY(-2px); }
.door .pi { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--pc); }
.door h2 { font-size: 20px; font-weight: 700; margin-top: 6px; }
.door p { font-size: 14.5px; color: var(--muted); flex: 1; }
.door .go { font-size: 14.5px; font-weight: 600; color: var(--pc); display: inline-flex; gap: 6px; align-items: center; }
.door .go .ico { width: 18px; height: 18px; }
.door--feature { background: var(--ink); border-color: var(--ink); color: #fff; }
.door--feature p { color: #B9C4CE; }
.door--feature .go { color: var(--manila); }
section[id] { scroll-margin-top: 72px; }

/* register extras */
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form__row:has(> div:only-child) { grid-template-columns: 1fr; }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }
.opt { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-inline-start: 4px; }
.hint { font-size: 13px; color: var(--muted); margin-top: -8px; }
.hint.is-bad { color: var(--bad); }
.hint.is-ok { color: var(--ok); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.auth__note a { color: var(--accent); font-weight: 600; }
.flow { list-style: none; counter-reset: fl; display: grid; gap: 0; margin-top: 16px; }
.flow li { counter-increment: fl; position: relative; padding: 0 44px 18px 0; color: #D3DBE2; font-size: 15.5px; }
.flow li::before { content: counter(fl); position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; filter: brightness(1.2); }
.flow li::after { content: ""; position: absolute; inset-inline-start: 13px; top: 30px; bottom: 2px; width: 1.5px; background: rgba(255,255,255,.14); }
.flow li:last-child { padding-bottom: 0; }
.flow li:last-child::after { display: none; }

/* بطاقة الورشة في صفحة مسح الكود */
.ws-card { display: flex; gap: 18px; align-items: flex-start; background: var(--ink); color: #fff; border-radius: 18px; padding: 24px; margin-bottom: 36px; }
.ws-card__mark { flex: none; width: 56px; height: 56px; border-radius: 14px; background: var(--pc); display: grid; place-items: center; }
.ws-card__mark .ico { width: 28px; height: 28px; color: #fff; }
.ws-card small { color: #9FB0BF; font-size: 14px; }
.ws-card h1 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.3; margin-top: 2px; color: #fff; }
.ws-card p { color: #C9D3DC; margin-top: 6px; max-width: 60ch; }
.ws-card__facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font-size: 14.5px; color: #D3DBE2; }
.ws-card__facts li { display: inline-flex; align-items: center; gap: 6px; }
.ws-card__facts .ico { width: 17px; height: 17px; color: var(--manila); }
.ws-card__facts a { text-decoration: none; }
.chooser__q { font-size: clamp(22px, 2.8vw, 30px); font-weight: 700; line-height: 1.3; }
@media (max-width: 560px) { .ws-card { flex-direction: column; padding: 20px; } }
