/* ==========================================================================
   SamPro Tool — Secure User Portal
   Design system: "security seal" — graphite/carbon surface, teal + amber
   dual-accent (verified / pending), monospace for codes & HWID, circuit-trace
   motif as the signature background element.
   ========================================================================== */

:root{
  --bg:#090c0f;
  --bg-2:#0d1114;
  --surface:#12171b;
  --surface-2:#171d22;
  --surface-hover:#1c2329;
  --border:rgba(233,238,240,.09);
  --border-strong:rgba(233,238,240,.16);
  --text:#eef2f3;
  --muted:#8b98a0;
  --muted-2:#5f6b72;

  --teal:#2fd4c0;
  --teal-dim:#1a3a37;
  --amber:#e8a33d;
  --amber-dim:#3a2c15;
  --danger:#f2596b;
  --danger-dim:#3a1620;

  --font-ar-display:Tahoma,Arial,sans-serif;
  --font-ar-body:Tahoma,Arial,sans-serif;
  --font-en:Arial,Helvetica,sans-serif;
  --font-mono:'Courier New',monospace;

  --radius-s:10px;
  --radius-m:16px;
  --radius-l:24px;
  --shadow-card:0 24px 60px -20px rgba(0,0,0,.55);
}

[data-theme="light"]{
  --bg:#f3f2ee;
  --bg-2:#eae8e2;
  --surface:#fffdfa;
  --surface-2:#f6f4ef;
  --surface-hover:#efece5;
  --border:rgba(20,24,26,.10);
  --border-strong:rgba(20,24,26,.18);
  --text:#14181a;
  --muted:#5c6a70;
  --muted-2:#8a9599;
  --teal-dim:#dcf5f1;
  --amber-dim:#fbeed7;
  --danger-dim:#fbe2e5;
  --shadow-card:0 20px 50px -22px rgba(20,24,26,.20);
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(1100px 500px at 85% -10%, color-mix(in srgb, var(--teal) 10%, transparent), transparent 60%),
    radial-gradient(900px 500px at 5% 10%, color-mix(in srgb, var(--amber) 7%, transparent), transparent 55%),
    var(--bg);
  color:var(--text);
  font-family:var(--font-ar-body);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
[dir="ltr"] body{font-family:var(--font-en)}
h1,h2,h3,.brand,.eyebrow,.btn,.stat strong,.hero h1{font-family:var(--font-ar-display)}
[dir="ltr"] h1,[dir="ltr"] h2,[dir="ltr"] h3,[dir="ltr"] .brand{font-family:var(--font-en)}
code,.mono,.hwid code,td.mono,.req-id{font-family:var(--font-mono)}
a{color:inherit;text-decoration:none}
::selection{background:var(--teal);color:#04211c}
:focus-visible{outline:2px solid var(--teal);outline-offset:2px;border-radius:6px}
@media (prefers-reduced-motion: reduce){*{animation-duration:.01ms !important;transition-duration:.01ms !important}}

/* -------------------------------- circuit motif -------------------------------- */
.circuit-bg{position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.5}
[data-theme="light"] .circuit-bg{opacity:.28}
.circuit-bg svg{width:100%;height:100%}
.circuit-bg .trace{stroke:var(--border-strong);stroke-width:1;fill:none}
.circuit-bg .node{fill:var(--teal);opacity:.35}
.circuit-bg .node.amber{fill:var(--amber)}
.circuit-bg .pulse{stroke:var(--teal);stroke-width:1.4;fill:none;stroke-dasharray:6 340;animation:trace-run 7s linear infinite}
@keyframes trace-run{to{stroke-dashoffset:-346}}

/* -------------------------------- topbar -------------------------------- */
.topbar{
  height:72px;display:flex;align-items:center;justify-content:space-between;
  padding:0 5%;border-bottom:1px solid var(--border);
  backdrop-filter:blur(18px) saturate(140%);
  position:sticky;top:0;z-index:40;
  background:color-mix(in srgb, var(--bg) 78%, transparent);
}
.brand{display:flex;gap:10px;align-items:center;font-weight:900;font-size:19px;letter-spacing:.01em}
.brand-mark{
  width:36px;height:36px;border-radius:10px;display:grid;place-items:center;
  background:linear-gradient(155deg,var(--teal),#1aa89a);color:#04211c;font-weight:900;
  box-shadow:0 0 0 1px var(--border-strong), 0 8px 20px -6px color-mix(in srgb, var(--teal) 60%, transparent);
  position:relative;
}
.brand-mark::after{content:"";position:absolute;inset:-4px;border:1px solid color-mix(in srgb, var(--teal) 45%, transparent);border-radius:14px}

.topbar nav{display:flex;gap:6px;align-items:center}
.topbar nav a{
  display:flex;align-items:center;gap:7px;color:var(--muted);font-size:14px;font-weight:600;
  padding:9px 14px;border-radius:10px;transition:background .15s,color .15s;
}
.topbar nav a:hover{color:var(--text);background:var(--surface-2)}
.topbar nav a.active{color:var(--teal);background:var(--teal-dim)}
.topbar nav a svg{width:16px;height:16px;flex:none}
.nav-tools{display:flex;align-items:center;gap:8px}
.icon-btn{
  width:38px;height:38px;border-radius:10px;border:1px solid var(--border);background:var(--surface);
  color:var(--muted);display:grid;place-items:center;cursor:pointer;transition:.15s;
}
.icon-btn:hover{color:var(--text);border-color:var(--border-strong)}
.icon-btn svg{width:17px;height:17px}
.nav-toggle{display:none}
[data-theme="light"] .icon-sun{display:none}
[data-theme="dark"] .icon-moon,body:not([data-theme]) .icon-moon{display:none}
[data-theme="light"] .icon-moon{display:inline}

/* -------------------------------- layout -------------------------------- */
.container{width:min(1140px,92%);margin:0 auto;padding:52px 0}
.eyebrow{
  letter-spacing:.18em;font-size:11px;color:var(--teal);font-weight:800;
  display:inline-flex;align-items:center;gap:8px;text-transform:uppercase;
}
.eyebrow::before{content:"";width:16px;height:1px;background:var(--teal)}

/* -------------------------------- hero -------------------------------- */
.hero{min-height:70vh;display:grid;grid-template-columns:1.4fr 1fr;gap:56px;align-items:center;padding:20px 0 40px}
.hero h1{font-size:clamp(36px,5.4vw,62px);line-height:1.12;margin:16px 0;font-weight:900}
.hero h1 span{background:linear-gradient(95deg,var(--teal),#8fe8db 60%,var(--amber));-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p{color:var(--muted);font-size:16.5px;line-height:1.85;max-width:52ch}
.actions{display:flex;gap:12px;margin-top:30px;flex-wrap:wrap}
.trust-row{display:flex;gap:22px;margin-top:34px;flex-wrap:wrap}
.trust-row div{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--muted-2);font-family:var(--font-mono)}
.trust-row svg{width:15px;height:15px;color:var(--teal)}

/* security-seal card — signature element */
.seal-card{
  background:linear-gradient(155deg,var(--surface-2),var(--surface));
  border:1px solid var(--border);border-radius:var(--radius-l);
  box-shadow:var(--shadow-card);padding:34px;position:relative;overflow:hidden;
}
.seal-card::before{
  content:"";position:absolute;inset:0;
  background:repeating-linear-gradient(115deg,transparent 0 26px, color-mix(in srgb, var(--teal) 4%, transparent) 26px 27px);
  pointer-events:none;
}
.seal-ring{
  width:64px;height:64px;border-radius:50%;display:grid;place-items:center;margin-bottom:18px;
  background:conic-gradient(from 0deg, var(--teal), var(--amber), var(--teal));
  padding:2px;position:relative;
}
.seal-ring::after{content:"";position:absolute;inset:2px;border-radius:50%;background:var(--surface-2)}
.seal-ring svg{width:26px;height:26px;color:var(--teal);position:relative;z-index:1}
.seal-card h3{margin:0 0 6px;font-size:19px}
.seal-card p{color:var(--muted);font-size:13.5px;line-height:1.75;margin:0}
.seal-meta{display:flex;flex-direction:column;gap:11px;margin-top:22px;padding-top:20px;border-top:1px dashed var(--border-strong)}
.seal-meta div{display:flex;justify-content:space-between;font-size:12.5px;font-family:var(--font-mono);color:var(--muted-2)}
.seal-meta strong{color:var(--teal);font-weight:600}

/* -------------------------------- buttons -------------------------------- */
.btn{
  border:0;border-radius:12px;padding:13px 22px;font-weight:800;font-size:14.5px;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;gap:9px;transition:transform .12s,box-shadow .12s,background .15s,border-color .15s;
  font-family:var(--font-ar-display);
}
[dir="ltr"] .btn{font-family:var(--font-en)}
.btn svg{width:17px;height:17px}
.btn.primary{background:linear-gradient(135deg,var(--teal),#1aa89a);color:#04211c;box-shadow:0 12px 26px -10px color-mix(in srgb, var(--teal) 65%, transparent)}
.btn.primary:hover{transform:translateY(-1px);box-shadow:0 16px 32px -10px color-mix(in srgb, var(--teal) 75%, transparent)}
.btn.ghost{background:transparent;border:1px solid var(--border-strong);color:var(--text)}
.btn.ghost:hover{background:var(--surface-2);border-color:var(--teal)}
.btn.amber{background:linear-gradient(135deg,var(--amber),#c9821f);color:#2a1a03}
.btn.danger{background:var(--danger-dim);color:var(--danger)}
.btn.danger:hover{background:color-mix(in srgb, var(--danger) 22%, var(--danger-dim))}
.btn.small{padding:9px 14px;font-size:12.5px;border-radius:9px}
.btn.full{width:100%;margin-top:6px}
.btn:disabled{opacity:.45;cursor:not-allowed;transform:none !important}

/* -------------------------------- cards / panels -------------------------------- */
.panel,.stat,.hero-card{
  background:linear-gradient(160deg,var(--surface-2),var(--surface));
  border:1px solid var(--border);border-radius:var(--radius-m);box-shadow:var(--shadow-card);
}
.panel{padding:30px;margin-top:22px}
.panel.highlight{border-color:color-mix(in srgb, var(--teal) 30%, var(--border))}
.panel-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:6px;flex-wrap:wrap}
.panel-title h2{margin:0}
h2{font-size:22px;margin:0 0 10px}

/* -------------------------------- auth card -------------------------------- */
.auth-wrap{min-height:calc(100vh - 72px);display:flex;align-items:center;justify-content:center;padding:40px 0}
.auth-card{width:min(460px,100%);margin:0 auto;padding:38px 34px}
.auth-card h1{font-size:30px;margin:12px 0 6px}
.auth-card .muted{margin-bottom:6px}
.auth-card form,.form-grid{display:grid;gap:13px;margin-top:22px}
label{font-size:13px;color:var(--muted);margin-top:6px;font-weight:600;display:block}
input,select,textarea{
  width:100%;padding:13px 14px;border:1px solid var(--border-strong);border-radius:11px;
  background:var(--bg-2);color:var(--text);outline:none;font-size:14.5px;font-family:var(--font-ar-body);
  transition:border-color .15s,box-shadow .15s;margin-top:6px;
}
[dir="ltr"] input,[dir="ltr"] select,[dir="ltr"] textarea{font-family:var(--font-en)}
input:focus,select:focus,textarea:focus{border-color:var(--teal);box-shadow:0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent)}
textarea{min-height:100px;resize:vertical}
input[type="file"]{padding:10px 12px;cursor:pointer}
.field-hint{font-size:11.5px;color:var(--muted-2);margin-top:5px;display:flex;align-items:center;gap:6px}
.field-hint svg{width:13px;height:13px;flex:none}
h1 svg,h2 svg{width:.78em;height:.78em;vertical-align:-.08em;margin-inline-end:.15em;color:var(--teal)}
.links{display:flex;justify-content:space-between;gap:15px;margin-top:20px;font-size:13px}
.links a{color:var(--teal);font-weight:600}
.links a:hover{text-decoration:underline}

.cf-turnstile{margin:4px 0}

/* -------------------------------- alerts -------------------------------- */
.alert{padding:14px 16px;border-radius:12px;margin:16px 0;font-size:13.5px;display:flex;gap:10px;align-items:flex-start;border:1px solid transparent}
.alert.error{background:var(--danger-dim);color:#ffb4bf;border-color:color-mix(in srgb, var(--danger) 35%, transparent)}
.alert.success{background:var(--teal-dim);color:#a8f1e6;border-color:color-mix(in srgb, var(--teal) 35%, transparent)}

/* -------------------------------- dashboard -------------------------------- */
.dashboard-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px;flex-wrap:wrap}
.dashboard-head h1{font-size:34px;margin:6px 0 4px}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.stat{padding:22px;position:relative;overflow:hidden}
.stat span{color:var(--muted);font-size:12px;display:flex;align-items:center;gap:7px;font-weight:600}
.stat span svg{width:14px;height:14px}
.stat strong{display:block;margin-top:10px;font-size:22px;font-weight:800}
.ok{color:var(--teal)}
.warn{color:var(--amber)}
.bad{color:var(--danger)}
.status-pill{display:inline-flex;align-items:center;gap:7px;padding:5px 12px;border-radius:999px;font-size:12px;font-weight:800}
.status-pill.ok{background:var(--teal-dim);color:var(--teal)}
.status-pill.warn{background:var(--amber-dim);color:var(--amber)}
.status-pill.bad{background:var(--danger-dim);color:var(--danger)}
.status-pill::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 8px currentColor}

/* HWID */
.hwid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:6px}
.hwid > div{padding:18px;border:1px solid var(--border);border-radius:14px;background:var(--bg-2)}
.hwid small{display:block;color:var(--muted);margin-bottom:10px;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.06em}
.hwid code{word-break:break-all;font-size:13px;color:var(--teal)}
.hwid code:empty::after{content:"— غير مسجل —";color:var(--muted-2);font-family:var(--font-ar-body)}
.inline-form{display:flex;gap:10px;margin-top:16px;flex-wrap:wrap}
.inline-form input{margin-top:0;flex:1;min-width:180px}
.notice{padding:15px 16px;border-radius:12px;background:var(--amber-dim);color:var(--amber);font-size:13.5px;display:flex;align-items:center;gap:10px}
.notice svg{width:17px;height:17px;flex:none}

/* payment */
.payment-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:24px 0}
.payment-method{padding:22px;border:1px solid var(--border);border-radius:16px;background:var(--bg-2);transition:border-color .15s}
.payment-method:hover{border-color:var(--border-strong)}
.payment-method h3{margin:0 0 10px;display:flex;align-items:center;gap:9px;font-size:16px}
.payment-method h3 svg{width:18px;height:18px;color:var(--amber)}
.payment-method p{color:var(--muted);font-size:13px;line-height:1.75;margin:0;white-space:pre-line}
.price-tag{display:inline-flex;align-items:baseline;gap:6px;background:var(--teal-dim);color:var(--teal);padding:10px 18px;border-radius:12px;font-family:var(--font-mono);font-weight:700;margin:6px 0 18px}
.price-tag b{font-size:22px}

/* steps list */
.steps-list{list-style:none;margin:18px 0;padding:0;display:grid;gap:10px}
.steps-list li{display:flex;gap:12px;align-items:flex-start;font-size:13.5px;color:var(--muted);line-height:1.7}
.steps-list li b{flex:none;width:24px;height:24px;border-radius:7px;background:var(--surface-2);border:1px solid var(--border);color:var(--teal);display:grid;place-items:center;font-size:12px;font-family:var(--font-mono)}

/* -------------------------------- table -------------------------------- */
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse}
th,td{padding:14px 12px;border-bottom:1px solid var(--border);text-align:right;white-space:nowrap;font-size:13.5px}
[dir="ltr"] th,[dir="ltr"] td{text-align:left}
th{color:var(--muted);font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;font-weight:700}
tbody tr{transition:background .12s}
tbody tr:hover{background:var(--surface-2)}
td.req-id{color:var(--teal)}

.badge{display:inline-flex;padding:6px 12px;border-radius:999px;background:var(--surface-2);color:var(--muted);font-size:11px;font-weight:700;border:1px solid var(--border)}
.badge.pending{background:var(--amber-dim);color:var(--amber);border-color:transparent}
.badge.processing{background:var(--teal-dim);color:var(--teal);border-color:transparent}
.badge.completed{background:var(--teal-dim);color:var(--teal);border-color:transparent}
.badge.rejected{background:var(--danger-dim);color:var(--danger);border-color:transparent}

.admin-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.admin-actions input{width:150px;padding:9px 11px;margin-top:0;font-size:12.5px}

/* empty state */
.empty-state{padding:60px 20px;text-align:center;color:var(--muted)}
.empty-state svg{width:44px;height:44px;color:var(--muted-2);margin-bottom:14px}
.empty-state p{margin:0;font-size:14px}

/* -------------------------------- footer -------------------------------- */
footer{text-align:center;padding:40px 20px 30px;color:var(--muted-2);font-size:12px;border-top:1px solid var(--border);margin-top:40px}
footer .foot-links{display:flex;justify-content:center;gap:18px;margin-bottom:14px;flex-wrap:wrap}
footer .foot-links a{color:var(--muted);font-weight:600}
footer .foot-links a:hover{color:var(--teal)}

/* -------------------------------- responsive -------------------------------- */
@media(max-width:900px){
  .hero{grid-template-columns:1fr;min-height:auto;gap:38px}
  .grid{grid-template-columns:1fr 1fr}
  .payment-grid{grid-template-columns:1fr}
  .dashboard-head{align-items:flex-start;flex-direction:column}
  .hwid{grid-template-columns:1fr}
  .topbar nav{position:fixed;inset-inline-start:0;top:72px;width:100%;flex-direction:column;align-items:stretch;
    background:var(--bg);border-bottom:1px solid var(--border);padding:10px;gap:2px;
    transform:translateY(-8px);opacity:0;pointer-events:none;transition:.18s;}
  .topbar nav a{padding:13px 14px}
  .topbar.nav-open nav{transform:translateY(0);opacity:1;pointer-events:auto}
  .nav-toggle{display:grid;width:38px;height:38px;place-items:center;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text)}
  .nav-toggle svg{width:18px;height:18px}
}
@media(max-width:560px){
  .container{padding:32px 0}
  .hero h1{font-size:36px}
  .auth-card{padding:28px 22px}
  .inline-form{flex-direction:column}
  .links{flex-direction:column;gap:8px}
  .grid{grid-template-columns:1fr}
  .seal-card{padding:26px}
}
.proof-thumb{display:block;width:82px;height:82px;object-fit:cover;border-radius:10px;border:1px solid var(--border);background:var(--bg-2)}
.lang-switch{display:inline-flex;align-items:center;justify-content:center;padding:8px 10px;border:1px solid var(--border);border-radius:9px;color:var(--text);font-size:12px;font-weight:700;background:var(--surface)}

/* Lightweight mobile-safe country combobox. It avoids a huge <datalist> DOM. */
.country-picker{position:relative}
.country-picker input{width:100%}
.country-results{position:absolute;z-index:30;left:0;right:0;top:calc(100% + 6px);max-height:260px;overflow:auto;background:var(--surface);border:1px solid var(--border-strong);border-radius:12px;box-shadow:var(--shadow-card);padding:6px;display:none}
.country-results.open{display:block}
.country-option{display:block;width:100%;border:0;background:transparent;color:var(--text);text-align:start;padding:10px 12px;border-radius:8px;cursor:pointer;font:inherit}
.country-option:hover,.country-option:focus{background:var(--surface-hover);outline:none}
.country-option small{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.country-empty{padding:12px;color:var(--muted);font-size:13px}
.timeline{display:grid;gap:10px;margin-top:18px}
.timeline-item{display:flex;gap:12px;align-items:flex-start;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2)}
.timeline-dot{width:10px;height:10px;border-radius:50%;background:var(--teal);margin-top:7px;flex:none}
.status-card{display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap}
.download-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
@media(max-width:640px){.download-grid{grid-template-columns:1fr}.country-results{max-height:220px}}
