@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap");
:root {
  --bg: #0e1420;
  --card: #17202f;
  --card2: #1e2a3d;
  --text: #e8edf5;
  --muted: #93a1b5;
  --accent: #19c37d;
  --accent2: #0ea5e9;
  --danger: #ef4444;
  --radius: 14px;
  --border: #26344a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Tahoma, system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6; min-height: 100vh;
}
a { color: var(--accent2); text-decoration: none; }
header.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(14,20,32,.92); backdrop-filter: blur(8px); z-index: 10;
}
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); }
.brand span { color: var(--accent); }
.topbar nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.container { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
.hero { text-align: center; padding: 48px 16px 32px; }
.hero h1 { font-size: 2rem; margin-bottom: 10px; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto 20px; }
.btn {
  display: inline-block; border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 18px; cursor: pointer; font-size: .95rem; background: var(--card2); color: var(--text);
  transition: transform .05s ease, background .15s;
}
.btn:hover { background: #273750; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #062012; font-weight: 700; }
.btn.primary:hover { background: #22d58b; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { padding: 5px 12px; font-size: .85rem; }
.filters { display: flex; gap: 8px; margin: 20px 0; flex-wrap: wrap; }
.filters .chip {
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 16px;
  cursor: pointer; color: var(--muted); background: transparent;
}
.filters .chip.active { background: var(--accent); color: #062012; border-color: var(--accent); font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
.card h3 { font-size: 1.05rem; }
.card .desc { color: var(--muted); font-size: .9rem; flex: 1; }
.card .meta { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--muted); }
.card .price { font-weight: 800; color: var(--accent); font-size: 1.1rem; }
.card .tag { background: var(--card2); border-radius: 6px; padding: 2px 8px; font-size: .75rem; }
.detail { display: grid; gap: 18px; }
.detail .box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.kbd { background: var(--card2); border: 1px solid var(--border); border-bottom-width: 3px; border-radius: 8px; padding: 2px 10px; font-family: monospace; direction: ltr; display: inline-block; }
pre.steps { white-space: pre-wrap; font-family: inherit; color: var(--text); }
form.stack { display: grid; gap: 12px; max-width: 420px; }
input, select, textarea {
  background: var(--card2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); padding: 10px 14px; font-size: .95rem; width: 100%; font-family: inherit;
}
textarea { min-height: 90px; resize: vertical; }
label { font-size: .85rem; color: var(--muted); display: block; margin-bottom: 4px; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: start; padding: 10px; border-bottom: 1px solid var(--border); font-size: .9rem; }
table.list th { color: var(--muted); font-weight: 600; }
.badge { border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 700; }
.badge.pending { background: #b45309; color: #fff; }
.badge.approved, .badge.paid { background: var(--accent); color: #062012; }
.badge.rejected, .badge.cancelled { background: var(--danger); color: #fff; }
.paybox { background: var(--card2); border: 1px dashed var(--accent); border-radius: var(--radius); padding: 16px; text-align: center; }
.paybox .dest { font-size: 1.2rem; font-weight: 800; direction: ltr; }
.paybox .ref { font-size: 1.4rem; letter-spacing: 3px; font-weight: 800; color: var(--accent); direction: ltr; }
#toast {
  position: fixed; bottom: 24px; inset-inline: 0; margin: 0 auto; width: fit-content;
  background: var(--accent); color: #062012; font-weight: 700; padding: 10px 22px;
  border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 50;
}
#toast.show { opacity: 1; }
#toast.err { background: var(--danger); color: #fff; }
footer { text-align: center; color: var(--muted); padding: 30px; border-top: 1px solid var(--border); font-size: .85rem; }
.langbar { display: flex; align-items: center; gap: 6px; }
.langbar select { width: auto; padding: 5px 8px; font-size: .8rem; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat .num { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.stat .lbl { color: var(--muted); font-size: .85rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
h2.section { margin: 28px 0 14px; font-size: 1.15rem; }
.notice { background: var(--card2); border-inline-start: 4px solid var(--accent2); padding: 12px 16px; border-radius: 10px; color: var(--muted); font-size: .9rem; }

/* mobile pass */
@media (max-width: 640px) {
  .hero { padding: 32px 12px 24px; }
  .hero h1 { font-size: 1.5rem; }
  .container { padding: 16px 12px 48px; }
  .list { display: block; overflow-x: auto; white-space: nowrap; }
  form.stack { max-width: none; }
  .stack [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .topbar { padding: 10px 12px; }
  .btn { padding: 8px 14px; font-size: .9rem; }
  .ctl { flex-wrap: wrap; }
  .paybox .dest, .paybox .ref { word-break: break-all; }
}

.pagehead { max-width: 1180px; margin: 8px auto 0; padding: 0 20px; } .home .pagehead { padding: 0; margin-top: 18px; } .pagehead h1 { font-size: 1.8rem; }
.pmut { color: var(--muted); }
.hgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-top: 26px; }
.hcard { position: relative; display: flex; flex-direction: column; gap: 6px; justify-content: center; min-height: 170px; padding: 24px; border-radius: 18px; background: linear-gradient(145deg, var(--card), var(--card2)); border: 1px solid var(--border); color: var(--text); transition: transform .12s ease, border-color .15s; }
.hcard:hover { transform: translateY(-3px); border-color: var(--accent); }
.hcard .hi { font-size: 2.6rem; line-height: 1; }
.hcard b { font-size: 1.3rem; }
.hcard small { color: var(--muted); font-size: .9rem; }
.hcard .hbal { position: absolute; top: 16px; inset-inline-end: 18px; font-weight: 800; color: var(--accent); font-size: 1.2rem; }
.backbar { max-width: 1180px; margin: 0 auto; padding: 14px 20px 0; }
.backbar a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; padding: 9px 18px; border-radius: 12px; background: var(--card2); border: 1px solid var(--border); color: var(--text); }
.backbar a:hover { border-color: var(--accent); }
html[dir=rtl] .backbar a::before { content: "→"; } html[dir=ltr] .backbar a::before { content: "←"; }


/* ===== visual upgrade v2 ===== */
:root { --accent: #1fd18a; --accent2: #38bdf8; --violet: #8b5cf6; --glow: 0 0 0 1px rgba(31,209,138,.35), 0 10px 40px -10px rgba(31,209,138,.45); }
body { font-family: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif; background-color: #0a0f1a;
  background-image: radial-gradient(900px 500px at 85% -10%, rgba(56,189,248,.16), transparent 60%), radial-gradient(800px 500px at 0% 0%, rgba(31,209,138,.14), transparent 55%), radial-gradient(700px 600px at 50% 110%, rgba(139,92,246,.12), transparent 60%), linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: auto, auto, auto, 44px 44px, 44px 44px; background-attachment: fixed; }
header.topbar { background: rgba(10,15,26,.72); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid rgba(255,255,255,.07); }
.brand { display: inline-flex; align-items: center; gap: 0; direction: ltr; unicode-bidi: isolate; font-size: 1.35rem; letter-spacing: .2px; }
.brand::before { content: ""; margin-inline-end: 10px; width: 32px; height: 32px; border-radius: 9px; background: url("/logo.svg") center/cover; box-shadow: 0 6px 18px -6px rgba(31,209,138,.7); }
.brand span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.btn { border-radius: 12px; background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); transition: transform .15s ease, background .2s, box-shadow .2s, border-color .2s; }
.btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #1fd18a, #19b4c9); border: 0; color: #04210f; box-shadow: 0 8px 24px -8px rgba(31,209,138,.7); }
.btn.primary:hover { background: linear-gradient(135deg, #34e29d, #2cc6dc); box-shadow: 0 12px 30px -8px rgba(31,209,138,.85); }
.btn.lg { padding: 13px 28px; font-size: 1.05rem; border-radius: 14px; font-weight: 700; }
.filters .chip { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); transition: all .2s; font-family: inherit; }
.filters .chip:hover { border-color: var(--accent); color: var(--text); }
.filters .chip.active { background: linear-gradient(135deg, #1fd18a, #19b4c9); border: 0; box-shadow: 0 6px 20px -6px rgba(31,209,138,.7); }
.card, .detail .box, .stat { background: linear-gradient(160deg, rgba(30,42,61,.75), rgba(20,28,43,.75)); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 10px 30px -18px rgba(0,0,0,.8); backdrop-filter: blur(6px); }
.grid > .card { position: relative; overflow: hidden; transition: transform .2s ease, border-color .2s, box-shadow .2s; }
.grid > .card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2), var(--violet)); opacity: .85; }
.grid > .card:hover { transform: translateY(-4px); border-color: rgba(31,209,138,.5); box-shadow: 0 22px 44px -22px rgba(31,209,138,.45); }
.card h3 { font-size: 1.12rem; font-weight: 700; }
.card .tag { background: rgba(56,189,248,.12); color: var(--accent2); border: 1px solid rgba(56,189,248,.25); }
.card .price { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.2rem; }
input, select, textarea { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,209,138,.2); }
.paybox { background: rgba(31,209,138,.06); }
.notice { background: rgba(56,189,248,.07); }
footer { border-top: 1px solid rgba(255,255,255,.07); background: rgba(0,0,0,.18); }
table.list th, table.list td { border-bottom-color: rgba(255,255,255,.07); }
.badge.approved, .badge.paid { background: linear-gradient(135deg, #1fd18a, #19b4c9); }
.pagehead h1 { background: linear-gradient(90deg, #fff, #b6e9ff); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.backbar a { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); transition: all .2s; }
.backbar a:hover { border-color: var(--accent); transform: translateY(-1px); }
.stat .num { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* home hero */
.vhero { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 20px; padding: 34px 10px 10px; }
.vhero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.15; font-weight: 800; margin-bottom: 14px; background: linear-gradient(100deg, #fff 20%, #7be8bd 60%, #7dd3fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vhero p { color: var(--muted); font-size: 1.1rem; max-width: 540px; margin-bottom: 24px; }
.vhero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.vhero .art { width: 100%; max-width: 460px; justify-self: center; filter: drop-shadow(0 20px 50px rgba(31,209,138,.25)); }
.vchips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.vchips span { font-size: .8rem; color: var(--muted); border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); padding: 4px 12px; border-radius: 999px; }
.art .pulse { animation: pls 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.art .pulse:nth-of-type(2n) { animation-delay: .8s; } .art .pulse:nth-of-type(3n) { animation-delay: 1.6s; }
@keyframes pls { 0%,100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.35); } }
.art .flow { stroke-dasharray: 6 8; animation: flw 3s linear infinite; }
@keyframes flw { to { stroke-dashoffset: -56; } }
@media (prefers-reduced-motion: reduce) { .art .pulse, .art .flow { animation: none; } }

.hgrid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.hcard { min-height: 150px; border-radius: 20px; background: linear-gradient(160deg, rgba(30,42,61,.8), rgba(18,26,40,.8)); border: 1px solid rgba(255,255,255,.08); overflow: hidden; transition: transform .2s ease, border-color .2s, box-shadow .2s; }
.hcard::after { content: ""; position: absolute; width: 180px; height: 180px; inset-inline-end: -70px; bottom: -80px; border-radius: 50%; background: radial-gradient(circle, var(--hc, rgba(31,209,138,.28)), transparent 70%); transition: transform .3s; }
.hcard:hover { transform: translateY(-5px); border-color: var(--hcb, rgba(31,209,138,.6)); box-shadow: 0 24px 50px -24px var(--hcb, rgba(31,209,138,.6)); }
.hcard:hover::after { transform: scale(1.4); }
.hcard .hi { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; font-size: 1.6rem; margin-bottom: 6px; background: linear-gradient(135deg, var(--hc1, #1fd18a), var(--hc2, #19b4c9)); box-shadow: 0 10px 24px -10px var(--hc1, #1fd18a); color: #04210f; }
.hcard .hi svg { width: 28px; height: 28px; stroke: #04210f; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hcard b { font-size: 1.2rem; position: relative; z-index: 1; } .hcard small { position: relative; z-index: 1; }
.hcard:nth-child(2) { --hc1:#a78bfa; --hc2:#6366f1; --hc:rgba(139,92,246,.3); --hcb:rgba(139,92,246,.6); }
.hcard:nth-child(3) { --hc1:#fbbf24; --hc2:#f97316; --hc:rgba(251,146,60,.28); --hcb:rgba(251,146,60,.6); }
.hcard:nth-child(4) { --hc1:#fde047; --hc2:#f59e0b; --hc:rgba(250,204,21,.25); --hcb:rgba(250,204,21,.55); }
.hcard:nth-child(5) { --hc1:#38bdf8; --hc2:#3b82f6; --hc:rgba(56,189,248,.28); --hcb:rgba(56,189,248,.6); }
.hcard:nth-child(6) { --hc1:#f472b6; --hc2:#e11d48; --hc:rgba(244,114,182,.26); --hcb:rgba(244,114,182,.55); }
@media (max-width: 800px) { .vhero { grid-template-columns: 1fr; text-align: center; padding-top: 18px; } .vhero p { margin-inline: auto; } .vhero .cta, .vchips { justify-content: center; } .vhero .art { max-width: 300px; order: -1; } }
@media (max-width: 640px) { .hgrid { grid-template-columns: 1fr 1fr; gap: 12px; } .hcard { min-height: 130px; padding: 16px; } .hcard b { font-size: 1rem; } .hcard small { font-size: .78rem; } }
@media (max-width: 640px) { header.topbar { flex-wrap: wrap; gap: 8px; } .topbar nav { flex: 1; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; } .brand { font-size: 1.15rem; } .brand::before { width: 28px; height: 28px; } .topbar .btn { padding: 6px 10px; font-size: .85rem; } .langbar select { max-width: 96px; } }

.navmenu-btn { display: none; width: 42px; height: 40px; place-items: center; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: var(--text); cursor: pointer; }
@media (max-width: 640px) {
  header.topbar { flex-wrap: nowrap; position: sticky; }
  .topbar nav { flex: 0 1 auto; flex-wrap: nowrap; justify-content: flex-end; gap: 8px; }
  .navmenu-btn { display: grid; }
  #navAuth { display: none; position: absolute; top: calc(100% + 6px); inset-inline: 12px; z-index: 30; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(14,20,32,.97); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 24px 50px -10px rgba(0,0,0,.8); max-height: 78vh; overflow-y: auto; }
  header.navopen #navAuth { display: flex; }
  #navAuth .btn, #navAuth .badge { width: 100%; text-align: center; padding: 11px 14px; font-size: .95rem; }
  #navAuth .badge { align-self: stretch !important; }
}

.vchips a { font-size: .85rem; color: var(--text); border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); padding: 5px 14px; border-radius: 999px; transition: all .2s; }
.vchips a:hover { border-color: var(--accent); background: rgba(31,209,138,.12); transform: translateY(-1px); }

.chead { display: flex; align-items: flex-start; gap: 12px; }
.cico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 8px 18px -8px rgba(0,0,0,.6); }
.cico svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* unified home */
.vhero.compact { padding: 18px 6px 4px; grid-template-columns: 1.2fr .8fr; }
.vhero.compact h1 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); margin-bottom: 10px; }
.vhero.compact p { margin-bottom: 0; }
.vhero.compact .art { max-width: 320px; }
.hgrid.mini { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 18px; margin-bottom: 8px; }
.hgrid.mini .hcard { min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 4px 12px; padding: 14px 16px; border-radius: 16px; }
.hgrid.mini .hcard .hi { width: 42px; height: 42px; margin: 0; border-radius: 12px; flex: none; }
.hgrid.mini .hcard .hi svg { width: 22px; height: 22px; }
.hgrid.mini .hcard b { font-size: 1rem; line-height: 1.2; }
.hgrid.mini .hcard small { flex-basis: 100%; font-size: .78rem; padding-inline-start: 54px; margin-top: -4px; }
.hgrid.mini .hcard .hbal { position: static; margin-inline-start: auto; font-size: .95rem; }
.hgrid.mini .hcard::after { width: 120px; height: 120px; }
.hgrid.mini .c-games { --hc1:#fbbf24; --hc2:#f97316; --hc:rgba(251,146,60,.28); --hcb:rgba(251,146,60,.6); }
.hgrid.mini .c-points { --hc1:#fde047; --hc2:#f59e0b; --hc:rgba(250,204,21,.25); --hcb:rgba(250,204,21,.55); }
.hgrid.mini .c-friends { --hc1:#38bdf8; --hc2:#3b82f6; --hc:rgba(56,189,248,.28); --hcb:rgba(56,189,248,.6); }
.hgrid.mini .c-acct { --hc1:#f472b6; --hc2:#e11d48; --hc:rgba(244,114,182,.26); --hcb:rgba(244,114,182,.55); }
.hgrid.mini .c-sell { --hc1:#1fd18a; --hc2:#19b4c9; }
.hgrid.mini .c-admin { --hc1:#a78bfa; --hc2:#6366f1; --hc:rgba(139,92,246,.3); --hcb:rgba(139,92,246,.6); }
.home .filters { margin: 22px 0 16px; }
@media (max-width: 800px) { .vhero.compact { grid-template-columns: 1fr; } .vhero.compact .art { max-width: 190px; } }
@media (max-width: 640px) { .hgrid.mini { grid-template-columns: 1fr 1fr; } .hgrid.mini .hcard { padding: 12px; } .hgrid.mini .hcard small { display: none; } .hgrid.mini .hcard .hi { width: 38px; height: 38px; } }
.hgrid.mini.after { margin-top: 34px; margin-bottom: 10px; }
.vhero.compact { padding-bottom: 0; }
.hgrid.mini.quad { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.hgrid.mini .c-courses { --hc1:#a78bfa; --hc2:#6366f1; --hc:rgba(139,92,246,.3); --hcb:rgba(139,92,246,.6); }
@media (max-width: 640px) { .hgrid.mini.quad { grid-template-columns: 1fr 1fr; } .hgrid.mini.quad .hcard { flex-direction: column; align-items: center; text-align: center; justify-content: center; gap: 8px; padding: 18px 10px; } .hgrid.mini.quad .hcard small { display: none; } .hgrid.mini.quad .hcard .hi { width: 48px; height: 48px; } .hgrid.mini.quad .hcard b { font-size: .95rem; } }
.hgrid.mini.quad { margin-top: 18px; margin-bottom: 4px; }
.home .filters { margin-top: 22px; }
.hgrid.mini .c-tools { --hc1:#1fd18a; --hc2:#38bdf8; }
.hgrid.mini .hcard.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(31,209,138,.35), 0 10px 28px rgba(31,209,138,.15); }
#catalog { margin-top: 6px; scroll-margin-top: 12px; }
