/* ─────────────────────────────────────────────
   RAMTECH — E-Invoicing portal
   Same tokens as ramtech.one (ramtech-landing/app/globals.css)
   ───────────────────────────────────────────── */

/* ─── DARK (default) ─── */
:root {
  --bg:            #0A0F2C;
  --bg-2:          #0F1E4D;
  --bg-raised:     #13245a;
  --bg-card:       rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border:        rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text:          #ffffff;
  --text-2:        #cbd5e1;
  --muted:         #64748b;
  --accent:        #1DB5C3;
  --accent-strong: #3ccbd8;
  --accent-2:      #6366f1;
  --accent-glow:   rgba(29, 181, 195, 0.15);
  --on-accent:     #ffffff;
  --shadow:        0 25px 50px rgba(0, 0, 0, 0.5);
  --grid-line:     rgba(255, 255, 255, 0.04);
  --ok:            #34d399;
  --error:         #f87171;
  --input-bg:      rgba(255, 255, 255, 0.05);
}

/* ─── LIGHT ─── */
html.light {
  --bg:            #f0f4ff;
  --bg-2:          #ffffff;
  --bg-raised:     #ffffff;
  --bg-card:       rgba(255, 255, 255, 0.80);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --border:        rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --text:          #0f172a;
  --text-2:        #334155;
  --muted:         #64748b;
  --accent:        #0ea5b8;
  --accent-strong: #0b8fa0;
  --accent-2:      #6366f1;
  --accent-glow:   rgba(14, 165, 184, 0.12);
  --on-accent:     #ffffff;
  --shadow:        0 25px 50px rgba(99, 102, 241, 0.10);
  --grid-line:     rgba(15, 23, 42, 0.05);
  --ok:            #059669;
  --error:         #dc2626;
  --input-bg:      #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background .3s ease, color .3s ease;
  overflow-x: hidden;
}
/* Cairo carries the whole page in Arabic — as on ramtech.one */
html[lang="ar"] body, html[lang="ar"] input, html[lang="ar"] button, html[lang="ar"] select {
  font-family: "Cairo", "Geist", sans-serif;
  letter-spacing: 0 !important;
}
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 999px; }
a { color: var(--accent); }

/* ─── Brand devices ─── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .85rem; font-weight: 500; color: var(--accent);
  background: var(--accent-glow); border: 1px solid var(--accent);
  padding: 7px 14px; border-radius: 999px; margin: 0 0 22px;
}
.eyebrow svg { width: 14px; height: 14px; }
.core-grid {
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
}
.strata-seam { height: 1px; background: var(--border); }

/* ─── Navbar (mirrors ramtech.one) ─── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--bg-2) 85%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { max-width: 1180px; width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 900; font-size: .85rem; font-family: "Geist", sans-serif;
}
.brand-logo::before { content: "R"; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: "Geist", sans-serif; font-weight: 900; font-size: 1.25rem; letter-spacing: -.02em; color: var(--text); }
.brand-name b { color: var(--accent); font-weight: 900; }
.brand-sub { font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  color: var(--text-2); text-decoration: none; font-size: .9rem; font-weight: 500;
  padding: 8px 14px; border-radius: 12px; transition: color .2s, background .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); background: var(--accent-glow); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--accent); transition: transform .2s;
}
.icon-btn:hover { transform: scale(1.1); }
.icon-btn svg { width: 16px; height: 16px; }
html.light .icon-sun, html:not(.light) .icon-moon { display: none; }
.lang-switch {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  color: var(--accent); text-decoration: none; padding: 8px 14px; border-radius: 12px;
  border: 1px solid var(--accent); transition: transform .2s;
}
.lang-switch:hover { transform: scale(1.05); }
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--on-accent); text-decoration: none; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .9rem; padding: 9px 20px; border: 0; border-radius: 12px;
  box-shadow: 0 4px 24px var(--accent-glow); transition: transform .2s, box-shadow .2s;
}
.btn-gold:hover { transform: scale(1.04); box-shadow: 0 8px 32px var(--accent-glow); }
@media (max-width: 900px) { .nav-links, .nav-cta { display: none; } }

/* ─── Page ─── */
.page { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 48px 24px 72px; }
.hero { position: relative; margin-bottom: 36px; }
.hero h1 {
  margin: 0 0 14px; font-weight: 900; letter-spacing: -.03em; line-height: 1.05;
  font-size: clamp(2.1rem, 4.8vw, 3.6rem); color: var(--text);
}
html[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.3; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); text-shadow: 0 0 40px var(--accent-glow); }
.lede { color: var(--muted); max-width: 60ch; margin: 0 0 18px; font-size: 1.1rem; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600;
  color: var(--accent); background: var(--accent-glow); border: 1px solid var(--border); padding: 7px 14px; border-radius: 999px;
}
.bloom {
  position: absolute; inset-inline-end: -10%; top: -30%; width: 34rem; height: 34rem; border-radius: 50%;
  background: var(--accent); opacity: .18; filter: blur(120px); pointer-events: none; z-index: -1;
}
.bloom-2 {
  position: absolute; inset-inline-start: -15%; bottom: -30%; width: 26rem; height: 26rem; border-radius: 50%;
  background: var(--accent-2); opacity: .14; filter: blur(120px); pointer-events: none; z-index: -1;
}
.two-col { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; padding: 32px;
  box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.card h2 {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text); margin: 28px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
html[lang="ar"] .card h2 { letter-spacing: 0; font-size: .95rem; }
.card h2:first-of-type { margin-top: 0; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } .card { padding: 22px; } .page { padding-top: 28px; } }

.field label { display: block; font-weight: 500; margin-bottom: 6px; font-size: .92rem; color: var(--text-2); }
.field input, .filters input, .filters select, .actions input, .danger-zone input {
  width: 100%; padding: 11px 13px; font: inherit; color: var(--text); background: var(--input-bg);
  border: 1px solid var(--border-strong); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.field.has-error input { border-color: var(--error); }
.hint { margin: 6px 0 0; color: var(--muted); font-size: .84rem; }
.hint.ok { color: var(--ok); }
.error { margin: 6px 0 0; color: var(--error); font-size: .84rem; }
.error.banner { margin: 0 0 16px; padding: 10px 14px; background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.3); border-radius: 12px; font-size: .95rem; }

.logo-field { grid-column: 1 / -1; }
.optional { color: var(--muted); font-weight: 400; font-size: .8rem; }
.dropzone {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: 12px; background: var(--input-bg);
  color: var(--text-2); font-size: .9rem; transition: border-color .15s;
}
.dropzone:hover { border-color: var(--accent); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: #fff; }
.has-error .dropzone { border-color: var(--error); }

.subdomain-input { display: flex; align-items: stretch; }
.subdomain-input input { border-start-end-radius: 0; border-end-end-radius: 0; }
.subdomain-input .suffix {
  display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-size: .85rem; font-weight: 500;
  background: var(--bg-2); border: 1px solid var(--border-strong); border-inline-start: 0;
  border-start-end-radius: 12px; border-end-end-radius: 12px; white-space: nowrap;
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; margin-top: 28px; width: 100%;
  background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; font-size: 1rem;
  border: 0; border-radius: 16px; padding: 15px 20px; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 32px var(--accent-glow); transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: scale(1.02); box-shadow: 0 12px 40px var(--accent-glow); }
.terms { color: var(--muted); font-size: .8rem; text-align: center; margin: 14px 0 0; }

/* value props next to the form */
.props { display: grid; gap: 12px; margin-top: 26px; }
.prop {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; backdrop-filter: blur(12px);
}
.prop .bar { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; background: var(--accent-glow); }
.prop strong { display: block; color: var(--text); font-size: .98rem; }
.prop span { color: var(--muted); font-size: .9rem; }
.stats { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 30px; }
.stat b { display: block; font-size: 1.6rem; font-weight: 900; color: var(--accent); }
.stat span { font-size: .78rem; color: var(--muted); }

/* ─── Status page ─── */
.status { text-align: center; max-width: 600px; margin: 30px auto; }
.status h1 { color: var(--text); font-size: 1.7rem; margin: 16px 0 10px; font-weight: 800; }
.status p { color: var(--text-2); font-size: 1.02rem; }
.status .btn-primary { width: auto; padding: 12px 36px; }
.orbit { position: relative; width: 72px; height: 72px; margin: 0 auto 6px; }
.orbit span { position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--accent); animation: spin 1.4s cubic-bezier(.5,.1,.5,.9) infinite; }
.orbit span:nth-child(2) { inset: 10px; border-top-color: var(--accent-2); animation-duration: 1.1s; animation-direction: reverse; }
.orbit span:nth-child(3) { inset: 20px; border-top-color: var(--text-2); animation-duration: .9s; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 10px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; margin: 26px 0 8px; }
.progress-bar {
  height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, var(--accent) 0 50%, var(--accent-2) 100%);
  background-size: 200% 100%; animation: shimmer 2.4s linear infinite; transition: width .5s ease-out;
}
[dir="rtl"] .progress-bar { float: right; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.progress-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .95rem; }
.progress-meta .current { color: var(--text); font-weight: 500; text-align: start; }
.progress-meta .pct { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.steps-list { list-style: none; padding: 0; margin: 22px auto 0; max-width: 420px; text-align: start; }
.steps-list li { display: flex; align-items: center; gap: 12px; padding: 7px 0; color: var(--muted); font-size: .95rem; transition: color .3s; }
.steps-list .dot { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; font-size: .7rem; transition: all .3s; }
.steps-list .st-running { color: var(--text); font-weight: 500; }
.steps-list .st-running .dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); animation: pulse 1.2s ease-in-out infinite; }
.steps-list .st-ok { color: var(--text-2); }
.steps-list .st-ok .dot { background: var(--accent); border-color: var(--accent); }
.steps-list .st-ok .dot::after { content: "✓"; color: #fff; font-weight: 700; }
.steps-list .st-failed { color: var(--error); }
.steps-list .st-failed .dot { background: var(--error); border-color: var(--error); }
.steps-list .st-failed .dot::after { content: "✕"; color: #fff; font-weight: 700; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px transparent; } }
.check { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 1.8rem; font-weight: 700; box-shadow: 0 0 40px var(--accent-glow); }
.check.pop { animation: pop .5s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ─── Footer (mirrors ramtech.one) ─── */
.footer { position: relative; background: var(--bg-2); border-top: 1px solid var(--border); color: var(--muted); margin-top: auto; overflow: hidden; }
.footer::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 600px; height: 200px; border-radius: 50%; background: var(--accent); opacity: .08; filter: blur(100px); pointer-events: none; }
.footer-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 56px 24px 32px; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 520px) { .footer-inner { grid-template-columns: 1fr; } }
.footer p { font-size: .9rem; max-width: 34ch; margin: 14px 0 0; line-height: 1.6; }
.footer h4 { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text); margin: 0 0 18px; }
html[lang="ar"] .footer h4 { letter-spacing: 0; font-size: .95rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .9rem; }
.footer li { display: flex; align-items: center; gap: 8px; }
.footer li svg { width: 14px; height: 14px; color: var(--accent); flex: 0 0 auto; }
.footer a { color: var(--muted); text-decoration: none; transition: color .2s, transform .2s; display: inline-block; }
.footer a:hover { color: var(--accent); transform: translateX(3px); }
[dir="rtl"] .footer a:hover { transform: translateX(-3px); }
.footer-bottom {
  position: relative; max-width: 1180px; margin: 0 auto; padding: 22px 24px 28px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .78rem; color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
