/* Apex Store — لوحة الرخص */
body.portal { background: #04060b; }

/* تسجيل الدخول */
.login { min-height: calc(100vh - 67px); display: grid; place-items: center; padding: 40px 16px; }
.login-box { width: min(460px, 100%); text-align: center; padding: 36px 30px; border-radius: 26px; background: var(--card); border: 1px solid var(--hair); box-shadow: 0 40px 80px -40px rgba(56,189,248,.35); animation: rise .5s ease both; }
.login-box img { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 14px; box-shadow: 0 0 40px -6px rgba(56,189,248,.6); }
.login-box h1 { font-size: 30px; font-weight: 900; line-height: 1.2; }
.login-box > p { color: var(--muted); font-size: 16.5px; margin: 8px 0 22px; line-height: 1.7; }
.login-box .btn { width: 100%; }
.login-pts { list-style: none; display: grid; gap: 8px; margin-top: 22px; text-align: start; }
.login-pts li { display: flex; gap: 9px; align-items: center; font-size: 15px; color: var(--muted); font-weight: 700; }
.login-pts svg { color: var(--s); }
.demo-tag { display: inline-flex; margin-top: 18px; font-size: 13px; font-weight: 800; color: var(--amber); padding: 3px 11px; border-radius: 999px; background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.25); }


/* التخطيط */
.play { display: grid; grid-template-columns: 250px minmax(0,1fr); min-height: calc(100vh - 67px); }
.pside { position: sticky; top: 67px; height: calc(100vh - 67px); overflow-y: auto; padding: 16px 12px; background: #070a11; border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.pn-g { font-size: 13px; font-weight: 800; color: var(--dim); padding: 12px 10px 4px; }
.pn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 12px; font-size: 16px; font-weight: 700; color: var(--muted); transition: .2s; white-space: nowrap; text-align: start; }
.pn svg { font-size: 18px; }
.pn:hover { color: var(--fg); background: rgba(255,255,255,.04); }
.pn.on { color: var(--ink); background: var(--grad); }
.pn .n { margin-inline-start: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 7px; font-size: 12px; font-weight: 900; display: grid; place-items: center; background: rgba(251,191,36,.16); color: #fcd34d; }
.pn.on .n { background: rgba(0,0,0,.2); color: var(--ink); }
.pside-foot { margin-top: auto; padding: 14px; border-radius: 16px; background: rgba(56,189,248,.06); border: 1px solid rgba(56,189,248,.18); font-size: 14px; }
.pside-foot b { display: flex; align-items: center; gap: 7px; font-size: 15px; }
.pside-foot b svg { color: var(--s); }
.pside-foot p { color: var(--muted); margin: 4px 0 10px; line-height: 1.5; }
.pside-foot .btn { width: 100%; }
.pmain { padding: 28px clamp(16px, 3vw, 40px) 100px; min-width: 0; width: 100%; max-width: 1240px; margin-inline: auto; }
.pg-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.pg-h h2 { font-size: 28px; font-weight: 900; display: flex; align-items: center; gap: 10px; line-height: 1.2; }
.pg-h h2 svg { color: var(--s); }
.pg-x { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* غطاء الـ IP */
.ipv { filter: blur(5px); cursor: pointer; user-select: none; transition: filter .2s; border-radius: 4px; }
.ipv:hover { filter: blur(3.5px); }
.ipv.show, body.ip-show .ipv { filter: none; user-select: text; }
.pg-h p { color: var(--muted); font-size: 16px; margin-top: 2px; }
.page { animation: rise .3s ease both; }
.page > * + * { margin-top: 16px; }

/* الأرقام */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.kpi { padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--hair); position: relative; overflow: hidden; transition: transform .3s, border-color .3s; }
.kpi::after { content: ''; position: absolute; top: -30px; inset-inline-end: -30px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 24%, transparent), transparent 70%); pointer-events: none; }
.kpi .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 17px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.kpi small { color: var(--muted); font-size: 14px; font-weight: 700; display: block; margin-top: 10px; }
.kpi b { font-size: 28px; font-weight: 900; line-height: 1.1; }

.box { padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--hair); min-width: 0; }
.box h3 { font-size: 17px; font-weight: 900; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.box h3 svg { color: var(--s); }
.box h3 a { margin-inline-start: auto; font-size: 14px; font-weight: 700; color: var(--muted); }
.box h3 a:hover { color: var(--s); }
.cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }

/* سطر رخصة مختصر */
.lrow { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; transition: background .2s; cursor: pointer; }
.lrow:hover { background: rgba(255,255,255,.03); }
.lrow + .lrow { border-top: 1px solid var(--line); }
.lrow .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); flex-shrink: 0; }
.lrow b { display: block; font-size: 16px; font-weight: 800; line-height: 1.25; }
.lrow small { color: var(--dim); font-size: 13.5px; font-weight: 700; }
.lrow .end { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }

/* بطاقات الرخص */
.lic-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lic-tools .search { flex: 1; min-width: 220px; }
.lics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.lic { border-radius: 20px; background: var(--card); border: 1px solid var(--hair); overflow: hidden; display: flex; flex-direction: column; transition: border-color .25s; animation: rise .35s ease both; }
.lic.off { opacity: .8; }
.lic-top { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line);
  background: radial-gradient(70% 140% at 100% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%); }
.lic-top .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); flex-shrink: 0; }
.lic-top h3 { font-size: 19px; font-weight: 900; line-height: 1.2; }
.lic-top small { color: var(--dim); font-size: 13.5px; font-weight: 700; direction: ltr; display: block; text-align: start; }
html[dir="rtl"] .lic-top small { text-align: right; }
.lic-top .pill-st { margin-inline-start: auto; }
.lic-b { padding: 14px 18px; display: grid; gap: 10px; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.kv > div { padding: 9px 12px; border-radius: 12px; background: rgba(0,0,0,.28); border: 1px solid var(--line); min-width: 0; }
.kv small { display: block; color: var(--dim); font-size: 12.5px; font-weight: 800; }
.kv b { font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv b .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); flex-shrink: 0; }
.kv b .dot.off { background: #556070; box-shadow: none; }
.key { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 12px; background: rgba(0,0,0,.4); border: 1px dashed rgba(56,189,248,.25); }
html[dir="rtl"] .key { padding: 8px 12px 8px 8px; }
.key svg.k { color: var(--s); }
.key code { flex: 1; font-family: var(--mono); font-size: 14px; color: #d6ecfb; direction: ltr; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.key .ibtn { width: 32px; height: 32px; font-size: 15px; }
.upd { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(251,191,36,.07); border: 1px solid rgba(251,191,36,.22); font-size: 15px; font-weight: 700; color: #fde68a; }
.upd.force { background: rgba(251,113,133,.07); border-color: rgba(251,113,133,.25); color: #fecdd3; }
.upd svg { font-size: 18px; flex-shrink: 0; }
.upd .mono { font-size: 13.5px; }
.lic-f { display: flex; gap: 8px; padding: 14px 18px 18px; margin-top: auto; flex-wrap: wrap; }
.lic-f .btn { flex: 1; }
.lic-f .ibtn { width: auto; padding: 0 13px; }

/* تغيير IP */
.ipg { padding: 8px 10px 10px; }
.ipg-h { display: flex; align-items: center; gap: 12px; padding: 10px 6px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ipg-h .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; color: var(--s); background: rgba(56,189,248,.1); flex-shrink: 0; }
.ipg-h b { display: block; font-size: 17px; font-weight: 900; line-height: 1.25; }
.ipg-h small { color: var(--muted); font-size: 13.5px; }
.ipg-h .pill-st { margin-inline-start: auto; }

/* التحديثات */
.ups { display: grid; gap: 12px; }
.up { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--hair); flex-wrap: wrap; }
.up .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); flex-shrink: 0; }
.up b { display: block; font-size: 17px; font-weight: 900; }
.up .vers { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); font-weight: 700; direction: ltr; }
.up .vers .new { color: var(--s2); }
.up .end { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }

/* الجداول */
.tbl-w { overflow-x: auto; border-radius: 18px; border: 1px solid var(--hair); background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th { text-align: start; font-size: 13.5px; font-weight: 800; color: var(--dim); padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.2); }
.tbl td { padding: 12px 16px; font-size: 15.5px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: rgba(255,255,255,.02); }
.tbl .mono { font-size: 13.5px; color: var(--muted); }

.act { display: grid; gap: 4px; }
.act-r { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 12px; }
.act-r:hover { background: rgba(255,255,255,.025); }
.act-r .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.act-r b { font-size: 15.5px; font-weight: 800; display: block; line-height: 1.25; }
.act-r small { color: var(--dim); font-size: 13px; font-weight: 700; }
.act-r time { font-size: 12.5px; color: var(--dim); white-space: nowrap; font-weight: 700; }

.p-empty { text-align: center; padding: 50px 14px; color: var(--dim); font-weight: 700; border: 1px dashed var(--line); border-radius: 18px; }
.p-empty svg { font-size: 34px; color: var(--ok); margin-bottom: 6px; }

/* تفاصيل الرخصة */
.det-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.dl-ok { display: grid; gap: 10px; text-align: center; padding: 6px 0; }
.dl-ok .big { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-size: 30px; color: var(--ink); background: var(--grad); }
.dl-ok b { font-size: 20px; font-weight: 900; }
.dl-ok p { color: var(--muted); font-size: 15.5px; }
.timer { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--s); direction: ltr; }
.warn-line { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(251,191,36,.07); border: 1px solid rgba(251,191,36,.2); color: #fde68a; font-size: 14.5px; font-weight: 700; line-height: 1.55; margin-top: 12px; }
.warn-line svg { margin-top: 3px; }

@media (max-width: 1100px) { .lics { grid-template-columns: 1fr; } .cols { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .play { grid-template-columns: 1fr; }
  .pside { position: sticky; top: 67px; z-index: 30; height: auto; flex-direction: row; overflow-x: auto; padding: 8px; gap: 4px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .pn-g, .pside-foot { display: none; }
  .pn { width: auto; flex-shrink: 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .det-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 520px) { .det-grid { grid-template-columns: 1fr 1fr; } .lic-b, .lic-top, .lic-f { padding-inline: 14px; } }
