/* ==================================================================
   FOXER V1.2 — الأنماط
   مبادئ الأداء (60 إطارًا/ث): الحركة بـ transform و opacity فقط، بلا تمويه ثقيل،
   طبقات مستقلّة للخلفية المتحرّكة، content-visibility للقوائم الطويلة، واحترام «تقليل الحركة».
   ================================================================== */
:root {
    --bg: #07080d; --bg2: #0b0d14; --panel: #10131c; --panel2: #161a26; --panel3: #1c2130;
    --line: #232839; --line2: #323a52;
    --text: #eef0f8; --muted: #8d95ad; --faint: #5d657f;
    --accent: #ff7a1a; --accent2: #ffb36b; --pink: #ff4d7d; --violet: #7c5cff; --teal: #22d3b0;
    --ok: #2ecc71; --bad: #ff5468; --warn: #ffcc4d;
    --grad: linear-gradient(135deg, #ff7a1a 0%, #ff4d7d 100%);
    --grad2: linear-gradient(135deg, #7c5cff 0%, #22d3b0 100%);
    --r: 16px; --r-sm: 11px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --font: "Segoe UI", "SF Pro Text", system-ui, -apple-system, "Noto Sans Arabic", "Noto Kufi Arabic", Tahoma, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Consolas, monospace;
    color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--bg); color: var(--text); font: 15px/1.65 var(--font);
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; background: var(--panel3); padding: 2px 7px; border-radius: 7px; }
::selection { background: rgba(255, 122, 26, .35); }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.muted { color: var(--muted); }
.wrap { width: min(1220px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(560px, 100% - 32px); margin-top: 60px; }

/* ----- اللغة ----- */
html.l-ar .en, html.l-en .ar { display: none !important; }
html.l-en { --font: "Segoe UI", "SF Pro Text", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; }

/* ----- الخلفية المتحرّكة (طبقة مركّبة مستقلّة) ----- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: strict; }
.aurora::before, .aurora::after {
    content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
    will-change: transform; transform: translate3d(0, 0, 0);
}
.aurora::before {
    inset-block-start: -28vmax; inset-inline-start: -18vmax;
    background: radial-gradient(circle at 50% 50%, rgba(255, 122, 26, .20), transparent 62%);
    animation: drift1 26s ease-in-out infinite alternate;
}
.aurora::after {
    inset-block-end: -34vmax; inset-inline-end: -20vmax;
    background: radial-gradient(circle at 50% 50%, rgba(124, 92, 255, .20), transparent 62%);
    animation: drift2 32s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate3d(14vmax, 10vmax, 0) scale(1.08); } }
@keyframes drift2 { to { transform: translate3d(-12vmax, -8vmax, 0) scale(1.1); } }

/* ----- الانتقال بين الصفحات (سلس بلا وميض) ----- */
@view-transition { navigation: auto; }


/* ----- الشريط العلوي ----- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(7, 8, 13, .92); border-bottom: 1px solid var(--line); }
.topbar-in { width: min(1220px, 100% - 32px); margin-inline: auto; height: 64px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: .04em; }
.brand em { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: var(--grad); color: #fff; letter-spacing: 0; }
.topnav { display: flex; gap: 4px; margin-inline-start: 10px; }
.topnav a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; transition: color .15s, background-color .15s; }
.topnav a:hover { color: var(--text); background: var(--panel2); }
.topnav a.on { color: var(--text); background: var(--panel3); }
.topbar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }

.lang-btn { display: inline-flex; align-items: center; background: var(--panel2); border: 1px solid var(--line2); border-radius: 11px; padding: 6px 12px; cursor: pointer; transition: transform .15s var(--ease), border-color .15s; }
.lang-btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.lang-btn:active { transform: scale(.97); }
.lang-btn span { display: inline-flex; align-items: center; gap: 8px; }
.lang-btn img { width: 24px; height: 16px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.lang-btn b { font-size: 13px; font-weight: 700; }

.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
html[dir=rtl] .chip.user { padding: 4px 4px 4px 12px; }
.chip img { border-radius: 50%; }

/* ----- الأزرار ----- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
    padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel2);
    font-weight: 700; font-size: 14px; white-space: nowrap; user-select: none;
    transition: transform .15s var(--ease), background-color .15s, border-color .15s, filter .15s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--faint); }
.btn:active { transform: translateY(0) scale(.97); }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 24px -8px rgba(255, 90, 60, .6); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(255, 84, 104, .12); border-color: rgba(255, 84, 104, .45); color: #ff8294; }
.btn.sm { padding: 6px 13px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 14px 26px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .ico { flex: none; }

/* ----- بطاقات ----- */
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card.fx { transition: transform .25s var(--ease), border-color .25s; }
.card.fx::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 140, 60, .13), transparent 45%);
}
.card.fx:hover { transform: translateY(-3px); border-color: var(--line2); }
.card.fx:hover::after { opacity: 1; }
.grid { display: grid; gap: 16px; }

/* ----- الكشف عند التمرير ----- */
.js .reveal { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ----- الصفحة الرئيسية ----- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center; padding-block: 56px 36px; min-height: calc(100vh - 140px); }
.pill { display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px; border-radius: 99px; background: rgba(255, 122, 26, .1); border: 1px solid rgba(255, 122, 26, .35); color: var(--accent2); font-weight: 700; font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.pill .dot { background: var(--accent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .5; } }
.hero h1 { font-size: clamp(34px, 5.4vw, 62px); font-weight: 900; margin: 20px 0 16px; line-height: 1.18; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 17px; color: var(--muted); max-width: 580px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-stats { display: flex; gap: 34px; margin-top: 38px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 30px; font-weight: 900; }
.hero-stats span { color: var(--muted); font-size: 13px; font-weight: 600; }
.hero-art img { width: 100%; height: auto; animation: float 7s ease-in-out infinite; will-change: transform; }
@keyframes float { 50% { transform: translate3d(0, -14px, 0); } }

.section { padding-block: 60px; }
.sec-head { text-align: center; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; margin-bottom: 10px; }
.feats { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feat-ico { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: rgba(255, 122, 26, .12); color: var(--accent2); margin-bottom: 14px; }
.feat:nth-child(3n+2) .feat-ico { background: rgba(124, 92, 255, .14); color: #b3a2ff; }
.feat:nth-child(3n) .feat-ico { background: rgba(34, 211, 176, .12); color: var(--teal); }
.feat h3 { font-size: 18px; margin-bottom: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps li { text-align: center; padding: 28px 20px; }
.steps b { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 20px; margin-bottom: 14px; }
.steps h3 { margin-bottom: 6px; }
.lang-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 28px; }
.lang-card h2 { font-size: 24px; margin-bottom: 8px; }
.flag-pair { display: flex; gap: 14px; }
.flag-tile { display: grid; justify-items: center; gap: 8px; padding: 14px 18px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line2); }
.flag-tile img { border-radius: 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.final { text-align: center; padding: 48px 20px; background: linear-gradient(180deg, rgba(255, 122, 26, .09), var(--panel)); }
.final h2 { font-size: 30px; font-weight: 900; margin-bottom: 8px; }
.final .btn { margin-top: 20px; }

/* ----- الخوادم ----- */
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; padding-block: 36px 22px; }
.page-head h1 { font-size: 30px; font-weight: 900; }
.search input { width: min(280px, 100%); padding: 10px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line2); }
.servers { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); padding-bottom: 50px; }
.srv { display: grid; gap: 16px; animation: rise .5s var(--ease) both; animation-delay: var(--d, 0ms); }
.srv-top { display: flex; align-items: center; gap: 14px; }
.srv-ico { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; flex: none; background: var(--panel3); }
.srv-ico.ph { display: grid; place-items: center; font-size: 24px; font-weight: 900; background: var(--grad2); color: #fff; }
.srv-meta h3 { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--faint); }
.status.on { color: var(--ok); }
.notice { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }
.notice.warn { background: rgba(255, 204, 77, .1); border: 1px solid rgba(255, 204, 77, .4); color: var(--warn); }
.empty { display: grid; justify-items: center; gap: 12px; padding: 50px 20px; color: var(--muted); }

.foot { border-top: 1px solid var(--line); margin-top: 40px; }
.foot-in { width: min(1220px, 100% - 32px); margin-inline: auto; padding: 22px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brandline { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }

@keyframes rise { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }

/* ==================================================================
   لوحة التحكم (الخادم + المالك)
   ================================================================== */
.shell-wrap { padding-block: 22px 10px; }
.shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 22px; align-items: start; }
.boot { grid-column: 1 / -1; display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.side { position: sticky; top: 80px; display: grid; gap: 14px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 4px; }
.side-head { display: flex; align-items: center; gap: 12px; padding: 14px; }
.side-head img, .side-head .ph { width: 46px; height: 46px; border-radius: 14px; flex: none; object-fit: cover; }
.side-head .ph { display: grid; place-items: center; font-weight: 900; font-size: 20px; background: var(--grad2); color: #fff; }
.side-head h3 { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.side-head small { color: var(--muted); font-size: 12px; }
.nav { display: grid; gap: 4px; padding: 10px; }
.nav h6 { margin: 10px 10px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 800; }
.nav h6:first-child { margin-top: 2px; }
.nav button {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; cursor: pointer;
    padding: 10px 12px; border-radius: 11px; border: 0; background: transparent; color: var(--muted); font-weight: 650;
    transition: background-color .15s, color .15s, transform .15s var(--ease);
}
.nav button:hover { background: var(--panel2); color: var(--text); }
.nav button:active { transform: scale(.98); }
.nav button.on { background: linear-gradient(135deg, rgba(255, 122, 26, .2), rgba(255, 77, 125, .12)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 122, 26, .35); }
.nav button.on .ico { color: var(--accent2); }
.nav .badge { margin-inline-start: auto; }
.back-link { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 10px; color: var(--muted); font-weight: 650; border-radius: 11px; border: 1px dashed var(--line2); transition: color .15s, border-color .15s; }
.back-link:hover { color: var(--text); border-color: var(--faint); }

.view { min-width: 0; animation: viewIn .32s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
.view > * { animation: rise .42s var(--ease) both; }
.view > *:nth-child(2) { animation-delay: .04s; } .view > *:nth-child(3) { animation-delay: .08s; }
.view > *:nth-child(4) { animation-delay: .12s; } .view > *:nth-child(5) { animation-delay: .16s; }
.view > *:nth-child(n+6) { animation-delay: .2s; }
.vhead { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.vhead .vico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 122, 26, .13); color: var(--accent2); flex: none; }
.vhead h2 { font-size: 24px; font-weight: 900; }
.vhead p { color: var(--muted); font-size: 13.5px; }
.stack { display: grid; gap: 16px; }
.card h4 { font-size: 15px; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }

/* إحصاءات */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 16px; }
.stat .sico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: rgba(255, 122, 26, .12); color: var(--accent2); flex: none; }
.stat:nth-child(4n+2) .sico { background: rgba(124, 92, 255, .14); color: #b3a2ff; }
.stat:nth-child(4n+3) .sico { background: rgba(34, 211, 176, .12); color: var(--teal); }
.stat:nth-child(4n) .sico { background: rgba(255, 77, 125, .13); color: #ff8aa8; }
.stat b { display: block; font-size: 24px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12.5px; font-weight: 600; }

/* قائمة الإعداد */
.setup { display: grid; grid-template-columns: 150px 1fr; gap: 22px; align-items: center; }
.ring { position: relative; width: 140px; height: 140px; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.ring .bg { stroke: var(--panel3); }
.ring .fg { stroke: url(#ringGrad); transition: stroke-dashoffset 1s var(--ease); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; font-weight: 900; }
.todo { display: grid; gap: 8px; }
.todo button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; background: var(--panel2); border: 1px solid var(--line); cursor: pointer; text-align: start; font-weight: 650; transition: transform .15s var(--ease), border-color .15s; }
.todo button:hover { transform: translateX(3px); border-color: var(--line2); }
html[dir=rtl] .todo button:hover { transform: translateX(-3px); }
.todo .tick { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--panel3); color: transparent; flex: none; }
.todo .done .tick { background: var(--ok); color: #04210f; }
.todo .done { color: var(--muted); }
.quick { display: flex; gap: 10px; flex-wrap: wrap; }

/* حقول */
.field { display: grid; gap: 7px; }
.field > label, .lbl { font-weight: 700; font-size: 13.5px; }
.field small { color: var(--muted); font-size: 12px; }
input[type=text], input[type=number], input[type=search], input:not([type]), select, textarea {
    width: 100%; padding: 10px 13px; border-radius: 11px; background: var(--bg2); border: 1px solid var(--line2);
    transition: border-color .15s, background-color .15s; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: #0e1018; }
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-inline-end: 34px; cursor: pointer; }
html[dir=rtl] select { background-position: 18px 55%, 13px 55%; }
select option { background: var(--panel); }

/* مفاتيح التبديل */
.sw { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 13px; background: var(--panel2); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, background-color .15s; }
.sw:hover { border-color: var(--line2); }
.sw .sw-t { display: flex; align-items: center; gap: 11px; min-width: 0; }
.sw .sw-t .ico { color: var(--muted); flex: none; }
.sw-title { display: block; font-size: 14px; font-weight: 700; }
.sw-desc { color: var(--muted); font-size: 12px; display: block; line-height: 1.45; margin-top: 2px; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.track { position: relative; flex: none; width: 46px; height: 26px; border-radius: 99px; background: var(--panel3); border: 1px solid var(--line2); transition: background-color .2s; }
.track::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .22s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.sw input:checked + .track { background: var(--grad); border-color: transparent; }
html[dir=ltr] .sw input:checked + .track::after { transform: translate3d(20px, 0, 0); }
html[dir=rtl] .sw input:checked + .track::after { transform: translate3d(-20px, 0, 0); }
.sw input:focus-visible + .track { outline: 2px solid var(--accent2); outline-offset: 2px; }

/* اختيار اللغة بالأعلام */
.lang-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lang-opt { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; font-weight: 800; text-align: start; transition: transform .15s var(--ease), border-color .15s, background-color .15s; }
.lang-opt:hover { transform: translateY(-2px); }
.lang-opt img { width: 44px; height: 30px; border-radius: 5px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.lang-opt.on { border-color: var(--accent); background: rgba(255, 122, 26, .1); }

/* اختيار القنوات (شارات) */
.picker { display: grid; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; align-items: center; }
.chipx { display: inline-flex; align-items: center; gap: 7px; padding: 5px 6px 5px 12px; border-radius: 99px; background: var(--panel3); border: 1px solid var(--line2); font-weight: 650; font-size: 13px; animation: pop .22s var(--ease) both; }
html[dir=rtl] .chipx { padding: 5px 12px 5px 6px; }
.chipx button { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s; }
.chipx button:hover { background: var(--bad); color: #fff; }
.chip-all { color: var(--muted); font-weight: 650; font-size: 13px; padding: 5px 12px; border-radius: 99px; border: 1px dashed var(--line2); }
@keyframes pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.scope { display: grid; gap: 4px; }
.scope h4 { display: flex; align-items: center; gap: 9px; }
.scope h4 .ico { color: var(--accent2); }

/* محرّر الصفوف */
.rows { display: grid; gap: 10px; }
.row { display: grid; gap: 10px; padding: 12px; border-radius: 13px; background: var(--panel2); border: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 70px; }
.row.sc { grid-template-columns: minmax(110px, 1fr) minmax(150px, 1.4fr) auto; align-items: center; }
.row.rp { grid-template-columns: minmax(120px, 1fr) 130px minmax(160px, 2fr) auto; align-items: start; }
.row.qn { grid-template-columns: 34px minmax(160px, 1fr) 120px auto; align-items: center; }
.row .num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-size: 13px; }
.rm { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line2); background: transparent; color: var(--muted); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.rm:hover { background: rgba(255, 84, 104, .14); color: var(--bad); border-color: rgba(255, 84, 104, .5); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .grow { flex: 1; min-width: 160px; }
.builtin { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--panel3); border: 1px solid var(--line2); font-size: 12px; font-weight: 650; color: var(--muted); }
.tag b { color: var(--text); }
.shop-item { display: grid; gap: 12px; padding: 14px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 150px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }

/* شارات حالة */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 800; background: var(--panel3); color: var(--muted); }
.badge.ok { background: rgba(46, 204, 113, .15); color: var(--ok); }
.badge.bad { background: rgba(255, 84, 104, .15); color: var(--bad); }
.badge.warn { background: rgba(255, 204, 77, .15); color: var(--warn); }
.badge.hot { background: var(--grad); color: #fff; }

/* معاينة رسالة ديسكورد */
.dc { background: #313338; border-radius: 12px; padding: 16px; display: grid; gap: 10px; border: 1px solid #1e1f22; }
.dc-bot { display: flex; align-items: center; gap: 10px; }
.dc-bot img { border-radius: 50%; }
.dc-bot b { font-size: 14.5px; }
.dc-bot i { font-style: normal; font-size: 10px; font-weight: 800; background: #5865f2; color: #fff; padding: 1px 5px; border-radius: 4px; }
.dc-embed { border-inline-start: 4px solid var(--accent); background: #2b2d31; border-radius: 6px; padding: 12px 14px; display: grid; gap: 6px; }
.dc-embed h5 { margin: 0; font-size: 15px; font-weight: 800; }
.dc-embed p { font-size: 13.5px; color: #dbdee1; white-space: pre-wrap; word-break: break-word; }
.dc-btn { justify-self: start; display: inline-flex; align-items: center; gap: 8px; background: #5865f2; color: #fff; font-weight: 700; font-size: 13.5px; padding: 7px 16px; border-radius: 6px; margin-top: 4px; }

/* قائمة الطلبات */
.apps { display: grid; gap: 8px; }
.app { border-radius: 13px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; }
.app > summary { display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; list-style: none; font-weight: 650; }
.app > summary::-webkit-details-marker { display: none; }
.app > summary small { margin-inline-start: auto; color: var(--muted); }
.app .qa { padding: 4px 14px 14px; display: grid; gap: 10px; }
.app .qa b { display: block; font-size: 12.5px; color: var(--accent2); }
.app .qa p { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }

/* شريط الحفظ */
.savebar { position: sticky; bottom: 14px; z-index: 20; display: flex; justify-content: flex-end; margin-top: 18px; pointer-events: none; }
.savebar .btn { pointer-events: auto; box-shadow: 0 12px 34px -10px rgba(0, 0, 0, .8), 0 8px 24px -8px rgba(255, 90, 60, .6); }

/* جداول المالك */
.table { display: grid; gap: 6px; }
.tr { display: grid; grid-template-columns: 44px minmax(120px, 2fr) 1fr 1fr; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 11px; background: var(--panel2); border: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: auto 46px; }
.tr .rk { font-weight: 900; color: var(--accent2); }
.tr.bl { grid-template-columns: minmax(120px, 1.4fr) minmax(120px, 2fr) auto; }
.tr.gl { grid-template-columns: 40px minmax(120px, 2fr) 1fr; }
.tr img { border-radius: 10px; }
.num-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; font-weight: 700; transition: transform .15s var(--ease), border-color .15s, background-color .15s; }
.seg button:hover { transform: translateY(-1px); }
.seg button.on { border-color: var(--accent); background: rgba(255, 122, 26, .12); color: var(--accent2); }
.log { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.log div { padding: 8px 12px; background: var(--panel2); border-radius: 10px; }

/* إشعارات */
.toasts { position: fixed; z-index: 100; inset-inline-end: 18px; bottom: 18px; display: grid; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; max-width: min(380px, calc(100vw - 36px)); padding: 12px 18px; border-radius: 13px; background: var(--panel3); border: 1px solid var(--line2); font-weight: 650; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8); animation: toastIn .3s var(--ease) both; }
.toast.ok { border-color: rgba(46, 204, 113, .6); }
.toast.err { border-color: rgba(255, 84, 104, .7); }
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translate3d(0, 16px, 0) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translate3d(0, 10px, 0); } }

/* ----- الاستجابة ----- */
@media (max-width: 980px) {
    .hero { grid-template-columns: 1fr; min-height: 0; text-align: center; padding-top: 34px; }
    .hero-copy { display: grid; justify-items: center; }
    .hero-art { order: -1; max-width: 460px; margin-inline: auto; }
    .hero-stats, .cta-row { justify-content: center; }
    .shell { grid-template-columns: 1fr; }
    .side { position: static; max-height: none; }
    .nav { display: flex; overflow-x: auto; gap: 6px; padding: 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
    .nav::-webkit-scrollbar { display: none; }
    .nav h6 { display: none; }
    .nav button { width: auto; flex: none; white-space: nowrap; scroll-snap-align: start; }
    .side-head { display: none; }
    .back-link { display: none; }
}
@media (max-width: 720px) {
    .topnav { display: none; }
    .chip.user { display: none; }
    .row.sc, .row.rp, .row.qn { grid-template-columns: 1fr; }
    .setup { grid-template-columns: 1fr; justify-items: center; }
    .lang-choice { grid-template-columns: 1fr; }
    .tr { grid-template-columns: 36px 1fr 1fr; }
    .tr > :nth-child(4) { display: none; }
    .lang-btn b { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .js .reveal { opacity: 1; transform: none; }
}

/* ==================================================================
   الإصدار 2 من الواجهة: حركات الانتقال • مفاتيح تبديل حيّة • تصميم الجوال • لوحة الأوامر
   ================================================================== */
:root { --dir: -1; --nav-h: 66px; --safe-b: env(safe-area-inset-bottom, 0px); }
html[dir=ltr] { --dir: 1; }

/* ----- انتقال الصفحات: View Transitions + بديل ----- */
::view-transition-old(root) { animation: vtOut .26s var(--ease) both; }
::view-transition-new(root) { animation: vtIn .42s var(--ease) both; }
@keyframes vtOut { to { opacity: 0; transform: scale(.985) translate3d(0, -8px, 0); } }
@keyframes vtIn { from { opacity: 0; transform: translate3d(0, 16px, 0) scale(1.008); } }
body { animation: pageIn .5s var(--ease) both; }
body.leaving { opacity: 0; transform: translate3d(0, -8px, 0); transition: opacity .18s ease, transform .18s ease; }
@keyframes pageIn { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }

/* شريط تقدّم التمرير */
.progress { position: fixed; z-index: 120; inset: 0 0 auto 0; height: 3px; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad); pointer-events: none; }
html[dir=rtl] .progress { transform-origin: 100% 50%; }

/* ----- الأزرار: لمعان عند التحويم ----- */
.btn.primary { position: relative; overflow: hidden; isolation: isolate; }
.btn.primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translate3d(-120%, 0, 0); transition: transform .7s var(--ease); }
html[dir=rtl] .btn.primary::after { transform: translate3d(120%, 0, 0); }
.btn.primary:hover::after { transform: translate3d(120%, 0, 0); }
html[dir=rtl] .btn.primary:hover::after { transform: translate3d(-120%, 0, 0); }
.btn.saved { background: linear-gradient(135deg, #2ecc71, #1fa95a) !important; box-shadow: 0 8px 26px -8px rgba(46, 204, 113, .7) !important; }
.btn.saved .ico { animation: pop .4s var(--ease) both; }

/* ----- مفاتيح التبديل الحيّة ----- */
.sw { position: relative; overflow: hidden; align-items: center; transition: border-color .25s, background-color .25s, transform .2s var(--ease); }
.sw::before { content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none; background: linear-gradient(90deg, rgba(255, 122, 26, .14), transparent 70%); transition: opacity .35s; }
html[dir=rtl] .sw::before { background: linear-gradient(270deg, rgba(255, 122, 26, .14), transparent 70%); }
.sw:active { transform: scale(.985); }
.sw:has(input:checked) { border-color: rgba(255, 122, 26, .5); }
.sw:has(input:checked)::before { opacity: 1; }
.sw:has(input:checked) .sw-t .ico { color: var(--accent2); transform: scale(1.12) rotate(-6deg); }
.sw .sw-t .ico { transition: color .25s, transform .35s var(--ease); }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; appearance: none; -webkit-appearance: none; pointer-events: none; }
.track { width: 52px; height: 30px; flex: none; overflow: hidden; transition: background-color .25s, border-color .25s, box-shadow .3s; }
.track::after { top: 3px; width: 22px; height: 22px; transition: transform .35s cubic-bezier(.3, 1.5, .5, 1), width .2s; }
.track::before { content: "OFF"; position: absolute; inset-block: 0; inset-inline-end: 6px; display: grid; place-items: center; font-size: 8.5px; font-weight: 900; letter-spacing: .04em; color: var(--faint); transition: opacity .2s; }
.sw input:checked + .track::before { content: "ON"; inset-inline-end: auto; inset-inline-start: 7px; color: #fff; }
.sw:active .track::after { width: 28px; }
.sw input:checked + .track { box-shadow: 0 0 18px -2px rgba(255, 122, 26, .65); }
html[dir=ltr] .sw input:checked + .track::after { transform: translate3d(22px, 0, 0); }
html[dir=rtl] .sw input:checked + .track::after { transform: translate3d(-22px, 0, 0); }
html[dir=ltr] .sw:active input:checked + .track::after { transform: translate3d(16px, 0, 0); }
html[dir=rtl] .sw:active input:checked + .track::after { transform: translate3d(-16px, 0, 0); }

/* ----- انتقال بين أقسام اللوحة (اتجاهي) ----- */
.view.out { animation: viewOut .14s ease forwards; }
.view.in-fwd { animation: viewFwd .38s var(--ease) both; }
.view.in-back { animation: viewBack .38s var(--ease) both; }
@keyframes viewOut { to { opacity: 0; transform: translate3d(calc(var(--dir) * -22px), 0, 0); } }
@keyframes viewFwd { from { opacity: 0; transform: translate3d(calc(var(--dir) * 34px), 0, 0); } to { opacity: 1; transform: none; } }
@keyframes viewBack { from { opacity: 0; transform: translate3d(calc(var(--dir) * -34px), 0, 0); } to { opacity: 1; transform: none; } }
.nav button { position: relative; }
.nav button.on::before { content: ""; position: absolute; inset-block: 9px; inset-inline-start: -10px; width: 4px; border-radius: 4px; background: var(--grad); animation: grow .35s var(--ease) both; }
@keyframes grow { from { transform: scaleY(0); } }

/* ----- هيكل التحميل (Skeleton) ----- */
.skel { display: grid; gap: 14px; width: 100%; grid-column: 1 / -1; }
.skel i { display: block; height: 78px; border-radius: var(--r); background: linear-gradient(100deg, var(--panel) 30%, var(--panel3) 50%, var(--panel) 70%); background-size: 220% 100%; animation: shimmer 1.3s linear infinite; }
.skel i:first-child { height: 52px; width: 46%; }
.skel i:nth-child(n+4) { height: 130px; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ----- مخطّط النشاط ----- */
.chart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 7px; align-items: end; height: 170px; padding-top: 10px; }
.bar { display: grid; gap: 6px; align-items: end; height: 100%; justify-items: center; grid-template-rows: 1fr auto; }
.bar i { display: block; width: 100%; max-width: 30px; border-radius: 9px 9px 4px 4px; background: var(--grad); transform-origin: 50% 100%; transform: scaleY(0); animation: grow2 .8s var(--ease) both; animation-delay: calc(var(--i) * 45ms); position: relative; min-height: 4px; }
.bar i::after { content: attr(data-v); position: absolute; inset-inline: -12px; bottom: 100%; margin-bottom: 4px; text-align: center; font-size: 10.5px; font-weight: 800; color: var(--text); opacity: 0; transform: translate3d(0, 4px, 0); transition: opacity .2s, transform .2s; pointer-events: none; }
.bar:hover i::after { opacity: 1; transform: none; }
.bar span { font-size: 10px; color: var(--faint); font-weight: 700; }
.bar:nth-child(odd) i { background: var(--grad2); }
@keyframes grow2 { to { transform: scaleY(1); } }
.lb { display: grid; gap: 8px; }
.lb .tr { grid-template-columns: 36px minmax(100px, 2fr) 1fr 1fr; }

/* ----- لوحة الأوامر (Ctrl+K) ----- */
.kbtn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 11px; border: 1px solid var(--line2); background: var(--panel2); color: var(--muted); cursor: pointer; font-weight: 700; font-size: 13px; transition: transform .15s var(--ease), border-color .15s; }
.kbtn:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--text); }
.kbtn kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--panel3); border: 1px solid var(--line2); }
.pal { position: fixed; inset: 0; z-index: 150; display: grid; align-items: start; justify-items: center; padding: 12vh 16px 16px; background: rgba(4, 5, 9, .72); animation: fade .18s ease both; }
.pal-box { width: min(560px, 100%); background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); animation: popIn .26s var(--ease) both; }
.pal-box input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 18px; font-size: 16px; background: transparent; }
.pal-list { max-height: 50vh; overflow-y: auto; padding: 8px; display: grid; gap: 2px; }
.pal-list button { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 0; border-radius: 11px; background: transparent; cursor: pointer; text-align: start; font-weight: 650; color: var(--muted); }
.pal-list button.hot, .pal-list button:hover { background: var(--panel3); color: var(--text); }
.pal-list button .ico { color: var(--accent2); }
@keyframes fade { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translate3d(0, -14px, 0) scale(.96); } }

/* ----- الشريط السفلي والورقة (الجوال فقط) ----- */
.mnav, .sheet, .sheet-back { display: none; }

/* ----- الصفحة الرئيسية: تحريك إضافي ----- */
.hero-art { perspective: 900px; }
.hero-art img { transform-style: preserve-3d; }
.hero::before { content: ""; position: absolute; inset: 10% auto auto 50%; width: 38vmin; height: 38vmin; border-radius: 50%; background: radial-gradient(circle, rgba(255, 77, 125, .16), transparent 65%); pointer-events: none; animation: float 9s ease-in-out infinite reverse; }
.hero { position: relative; }
.feat { overflow: hidden; }
.feat::before { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 122, 26, .16), transparent 70%); transition: transform .5s var(--ease); }
.feat:hover::before { transform: scale(1.8); }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-in { display: flex; gap: 10px; width: max-content; animation: slide 38s linear infinite; }
.marquee:hover .marquee-in { animation-play-state: paused; }
html[dir=rtl] .marquee-in { animation-name: slideR; }
@keyframes slide { to { transform: translate3d(-50%, 0, 0); } }
@keyframes slideR { to { transform: translate3d(50%, 0, 0); } }

/* ===== سطح المكتب: مساحات أوسع وتفاعل بالمؤشّر ===== */
@media (min-width: 861px) {
    .nav button:hover { transform: translateX(calc(var(--dir) * -3px)); }
    .view .cols { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
    .savebar { bottom: 18px; }
}
@media (hover: none) { .card.fx:hover { transform: none; } .btn:hover { transform: none; } }

/* ===== الجوال: تجربة تطبيق (شريط سفلي + ورقة سفلية + أحجام لمس) ===== */
@media (max-width: 860px) {
    body { font-size: 15.5px; }
    .wrap { width: calc(100% - 24px); }
    .shell-wrap { padding-block: 12px; }
    body:has(> .mnav) { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }   /* الفوتر لا يختبئ تحت الشريط السفلي */
    .mnav button span { text-align: center; line-height: 1.2; }
    .topbar-in { height: 56px; gap: 10px; }
    .brand span { font-size: 17px; }
    .side, .kbtn { display: none !important; }
    .shell { display: block; }

    .mnav { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; position: fixed; z-index: 60; inset-inline: 10px; bottom: calc(10px + var(--safe-b)); height: var(--nav-h); padding: 6px; gap: 2px; border-radius: 22px; background: rgba(16, 19, 28, .96); border: 1px solid var(--line2); box-shadow: 0 18px 44px -10px rgba(0, 0, 0, .85); animation: navUp .5s var(--ease) both .15s; }
    @keyframes navUp { from { opacity: 0; transform: translate3d(0, 30px, 0); } }
    .mnav::-webkit-scrollbar { display: none; }
    .mnav button { flex: 0 0 21%; min-width: 68px; scroll-snap-align: center; position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 800; cursor: pointer; transition: color .2s, background-color .2s, transform .15s var(--ease); -webkit-tap-highlight-color: transparent; }
    .mnav button:active { transform: scale(.9); }
    .mnav button .ico { transition: transform .3s var(--ease); }
    .mnav button.on { color: #fff; background: linear-gradient(135deg, rgba(255, 122, 26, .28), rgba(255, 77, 125, .18)); }
    .mnav button.on .ico { transform: translate3d(0, -2px, 0) scale(1.14); color: var(--accent2); }
    .mnav .badge { position: absolute; top: 4px; inset-inline-end: 14px; padding: 0 6px; font-size: 10px; }

    .sheet-back { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(4, 5, 9, .65); opacity: 0; pointer-events: none; transition: opacity .25s; }
    .sheet { display: grid; align-content: start; gap: 6px; position: fixed; z-index: 80; inset-inline: 0; bottom: 0; max-height: 78vh; overflow-y: auto; padding: 14px 14px calc(18px + var(--safe-b)); border-radius: 26px 26px 0 0; background: var(--panel); border: 1px solid var(--line2); border-bottom: 0; transform: translate3d(0, 105%, 0); transition: transform .38s var(--ease); }
    .sheet::before { content: ""; justify-self: center; width: 44px; height: 5px; border-radius: 5px; background: var(--line2); margin-bottom: 8px; }
    body.sheet-open .sheet { transform: none; }
    body.sheet-open .sheet-back { opacity: 1; pointer-events: auto; }
    .sheet h6 { margin: 10px 6px 2px; font-size: 11px; letter-spacing: .08em; color: var(--faint); font-weight: 800; text-transform: uppercase; }
    .sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .sheet-grid button { display: grid; justify-items: center; gap: 7px; padding: 14px 6px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-weight: 700; font-size: 12.5px; cursor: pointer; transition: transform .15s var(--ease), border-color .15s; }
    .sheet-grid button:active { transform: scale(.94); }
    .sheet-grid button.on { border-color: var(--accent); background: rgba(255, 122, 26, .12); }
    .sheet-grid button .ico { color: var(--accent2); }

    .savebar { bottom: calc(var(--nav-h) + var(--safe-b) + 22px); justify-content: stretch; }
    .savebar .btn, .savebar .quick { width: 100%; }
    .savebar .quick .btn { flex: 1; }
    .toasts { inset-inline: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
    .toast { max-width: none; }

    input[type=text], input[type=number], input[type=search], input:not([type]), select, textarea { min-height: 48px; font-size: 16px; }
    .btn { min-height: 46px; }
    .btn.sm { min-height: 38px; }
    .vhead h2 { font-size: 21px; }
    .vhead .vico { width: 40px; height: 40px; }
    .card { padding: 16px; border-radius: 18px; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
    .stat b { font-size: 22px; }
    .chart { height: 140px; gap: 4px; }
    .bar span:nth-child(2) { display: none; }

    /* الصفحة الرئيسية للجوال */
    .hero { padding-block: 18px 8px; gap: 8px; }
    .hero h1 { font-size: 31px; }
    .lead { font-size: 15px; }
    .cta-row .btn { flex: 1; }
    .hero-stats { gap: 22px; margin-top: 26px; }
    .feats { display: flex; overflow-x: auto; gap: 12px; padding: 4px 12px 14px; margin-inline: -12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .feats::-webkit-scrollbar { display: none; }
    .feats .feat { flex: 0 0 80%; scroll-snap-align: center; }
    .section { padding-block: 34px; }
    .lang-card { padding: 20px; }
    .foot-in { justify-content: center; text-align: center; }
    .servers { grid-template-columns: 1fr; }
    .page-head { padding-block: 20px 14px; }
    .search, .search input { width: 100%; }
}
@media (max-width: 380px) { .mnav button { font-size: 9.5px; flex-basis: 23%; } }

/* ----- شاشة الموافقة (أول دخول) ----- */
html.consent-pending, html.consent-pending body { overflow: hidden; }
.consent { position: fixed; inset: 0; z-index: 1000; display: flex; padding: 16px; background: rgba(7, 8, 13, .97); overflow-y: auto; }
.consent-card { margin: auto; width: min(500px, 100%); background: var(--panel); border: 1px solid var(--line2); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); animation: consentIn .35s var(--ease) both; }
@keyframes consentIn { from { opacity: 0; transform: translate3d(0, 14px, 0); } }
.consent-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.consent-top .brandline, .foot .brandline { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .04em; }
.consent-card h2 { font-size: 24px; }
.consent-check { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line2); border-radius: var(--r-sm); background: var(--panel2); cursor: pointer; font-weight: 600; transition: border-color .15s; }
.consent-check:hover, .consent-check:has(input:checked) { border-color: var(--accent); }
.consent-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }
.consent-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.consent-links a, .legal a:not(.btn), .foot-links a { color: var(--accent2); text-decoration: underline; text-underline-offset: 3px; }
.consent-links a:hover, .legal a:not(.btn):hover, .foot-links a:hover { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }

/* ----- صفحتا الشروط والخصوصية ----- */
.legal { width: min(820px, 100% - 32px); margin: 36px auto 10px; }
.legal-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.legal-tabs a { padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line2); color: var(--muted); font-weight: 600; text-decoration: none !important; }
.legal-tabs a.on { background: var(--panel3); color: var(--text); border-color: var(--accent); }
.legal-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.legal-card h1 { font-size: 28px; }
.legal-card .meta { color: var(--muted); font-size: 13px; margin: 6px 0 18px; }
.legal-card h2 { font-size: 18px; margin: 26px 0 8px; }
.legal-card p { margin: 8px 0; color: #d3d7e6; }
.legal-card ul { margin: 8px 0; padding-inline-start: 22px; color: #d3d7e6; }
.legal-card li { margin: 4px 0; }
.legal-card .closing { margin-top: 26px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 14px; }
@media (max-width: 640px) { .legal-card { padding: 20px; } .consent-card { padding: 20px; } }

/* ----- ملفي الشخصي ----- */
.prof-hero { display: flex; align-items: center; gap: 16px; }
.prof-hero h3 { font-size: 20px; margin-bottom: 6px; }
.prof-av { flex: none; width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--line2); object-fit: cover; }
.prog { height: 10px; border-radius: 99px; background: var(--panel3); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 99px; background: var(--grad); }

/* FOXER — refined surfaces + a dedicated sign-in experience */
:root { --r: 19px; --r-sm: 12px; }
.topbar { border-bottom-color: #ffffff0d; }
.btn { min-height: 42px; border-radius: 12px; transition: transform .2s, border-color .2s, background .2s, box-shadow .2s; }
.btn.primary { box-shadow: 0 5px 22px #ff7a1a1a; }
.btn.primary:hover { box-shadow: 0 8px 30px #ff7a1a33; }
.btn:disabled { cursor: not-allowed; transform: none; box-shadow: none; }
.card { border-color: #ffffff0d; box-shadow: 0 8px 32px #00000014; }
input:not([type=checkbox]):not([type=radio]), select, textarea { transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: #ff7a1a80; box-shadow: 0 0 0 3px #ff7a1a12; }
.savebar { gap: 12px; flex-wrap: wrap; }
.save-status { font-size: 12px; color: var(--muted); }
.save-status[data-state=dirty], .save-status[data-state=error] { color: var(--accent2); }
.save-status[data-state=saved] { color: var(--ok); }
.btn[aria-busy=true] { opacity: .75; cursor: progress; }
.auth-page { position: relative; max-width: 1220px; }
.auth-stage { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 84px); align-items: center; padding: 80px 0 72px; }
.auth-story { min-width: 0; animation: auth-enter .75s both; }
.auth-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: 1.5px; color: var(--accent2); font-weight: 700; margin-bottom: 23px; }
.auth-spark { display: inline-block; width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px #ff7a1a70; }
.auth-story h1 { font-size: clamp(42px, 5.2vw, 70px); letter-spacing: -2px; line-height: 1.22; font-weight: 800; }
html[dir=rtl] .auth-story h1 { letter-spacing: -1px; line-height: 1.4; }
.auth-lead { color: #a0a7ba; font-size: 16px; line-height: 1.9; margin-top: 22px; max-width: 490px; }
.auth-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 32px; }
.auth-tags>span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid #ffffff10; border-radius: 7px; color: #b9bfd0; font-size: 11px; }
.auth-tags svg { color: var(--accent2); }
.auth-console { position: relative; border: 1px solid #ffffff16; border-radius: 15px; background: linear-gradient(145deg, #151721, #0c0e16); box-shadow: 0 28px 60px #00000040; overflow: hidden; transform: perspective(1000px) rotateY(-4deg) rotateX(3deg); transition: transform .5s; }
.auth-console:hover { transform: perspective(1000px) rotateY(0) rotateX(0); }
.console-head { display: flex; align-items: center; gap: 16px; padding: 13px 17px; border-bottom: 1px solid #ffffff09; font: 9px/1.4 var(--mono); letter-spacing: 1px; color: #939aaf; direction: ltr; }
.console-dots { display: flex; gap: 5px; }
.console-dots i { width: 5px; height: 5px; border-radius: 100%; background: #51576b; }
.console-dots i:first-child { background: #ff7a1a; }
.preview-tag { margin-left: auto; color: #b3b8c7; font-family: var(--font); letter-spacing: 0; }
.console-body { display: flex; }
.console-rail { width: 48px; border-inline-end: 1px solid #ffffff09; padding: 23px 13px; display: flex; flex-direction: column; gap: 26px; color: #656d85; }
.console-rail svg:first-child { color: var(--accent); }
.console-content { flex: 1; min-width: 0; padding: 20px; }
.console-title { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 13px; margin-bottom: 18px; }
.console-title svg { color: var(--accent); }
.console-modules { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.console-module { padding: 16px 13px 10px; border: 1px solid #ff7a1a1c; border-radius: 10px; background: linear-gradient(160deg, #ff7a1a0d, transparent); }
.console-module>svg { color: #ff9c53; margin-bottom: 12px; }
.console-module>b, .console-module>span { display: block; }
.console-module>b { font-size: 11px; margin-bottom: 4px; }
.console-module>span { color: #8d95ad; font-size: 9px; }
.console-module.pink { border-color: #ff4d7d1c; background: linear-gradient(160deg, #ff4d7d0d, transparent); }
.console-module.pink>svg { color: #ff749b; }
.mini-bars { display: flex; height: 37px; align-items: end; gap: 5px; margin-top: 13px; }
.mini-bars i { flex: 1; height: 40%; background: linear-gradient(#ffac66aa, #ff7a1a25); border-radius: 3px 3px 0 0; }
.mini-bars i:nth-child(2n) { height: 68%; }.mini-bars i:nth-child(3n) { height: 52%; }.mini-bars i:last-child { height: 100%; }
.mini-thread { display: grid; gap: 6px; margin-top: 18px; }
.mini-thread i { height: 6px; border-radius: 8px; width: 92%; background: #ff749b22; }.mini-thread i:nth-child(2) { width: 65%; }.mini-thread i:nth-child(3) { width: 78%; }
.console-bottom { display: flex; align-items: center; gap: 7px; margin-top: 16px; color: #929ab0; font-size: 9px; }
.console-bottom .auth-spark { width: 4px; height: 4px; }
.auth-card-wrap { min-width: 0; animation: auth-enter .85s .12s both; }
.auth-card { position: relative; padding: clamp(24px, 3.2vw, 40px); border: 1px solid #ffffff18; border-radius: 25px; background: linear-gradient(155deg, #1b1c29 0%, #10121b 48%, #12131e 100%); box-shadow: 0 24px 80px #00000045, 0 0 90px #ff7a1a06; }
.auth-card::before { content: ''; position: absolute; top: -1px; inset-inline: 22%; height: 1px; background: linear-gradient(90deg, transparent, #ff7a1a, #ff4d7d, transparent); }
.auth-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.auth-card-top img { padding: 10px; width: 56px; height: 56px; border: 1px solid #ff7a1a30; background: #ff7a1a09; border-radius: 16px; }
.auth-step { font: 10px var(--mono); letter-spacing: 1px; color: #9097ad; }
.auth-card h2 { font-size: 30px; margin-bottom: 12px; letter-spacing: -.7px; }
.auth-card>.muted { font-size: 13px; line-height: 1.9; }
.auth-card .notice { margin-top: 18px; }
.auth-form { margin-top: 28px; }
.auth-consent { display: flex; align-items: start; gap: 10px; margin-bottom: 22px; color: #a6adbf; font-size: 12px; line-height: 1.9; cursor: pointer; }
.auth-consent input { width: 17px; height: 17px; flex-shrink: 0; margin-top: 4px; accent-color: var(--accent); }
.auth-consent a { color: #eef0f8; text-decoration: underline; text-decoration-color: #ffffff35; text-underline-offset: 4px; }
.auth-submit { display: flex; width: 100%; min-height: 56px; gap: 12px; font-weight: 700; font-size: 14px; border-radius: 12px; }
.auth-arrow { margin-inline-start: auto; font-size: 20px; }.auth-submit.is-loading .auth-arrow { animation: auth-pulse .7s alternate infinite; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: #929ab0; font-size: 9px; letter-spacing: .5px; margin: 28px 0 20px; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: #ffffff0b; }
.auth-permissions { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.auth-permissions li { display: flex; align-items: start; gap: 11px; font-size: 11px; color: #b4bbcd; line-height: 1.8; }
.auth-permissions svg { flex-shrink: 0; color: #9b7990; margin-top: 1px; }
.auth-help { margin-top: 25px; padding-top: 18px; border-top: 1px solid #ffffff09; font-size: 10px; text-align: center; color: #8d95ad; }
.auth-back { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 20px; font-size: 12px; color: #a0a7ba; }
.auth-back:hover { color: var(--accent2); }
.auth-details { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #ffffff0e; padding: 38px 0 62px; gap: 40px; }
.auth-detail>span { font: 11px var(--mono); color: var(--accent); }.auth-detail h3 { font-size: 16px; margin: 12px 0 9px; }.auth-detail p { color: #929ab0; font-size: 12px; line-height: 1.9; max-width: 300px; }
@keyframes auth-enter { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes auth-pulse { to { opacity: .3; } }
@media (min-width: 901px) { body[data-page=login] .aurora { opacity: .5; } }
@media (max-width: 900px) {
  .auth-stage { gap: 28px; padding-top: 44px; }.auth-story h1 { font-size: 43px; }.auth-lead { font-size: 14px; }.console-content { padding: 14px; }.console-rail { display: none; }.console-module { padding: 12px 9px; }.auth-card { padding: 25px; }
}
@media (max-width: 700px) {
  .auth-stage { grid-template-columns: 1fr; gap: 30px; padding: 35px 0 38px; }.auth-story { text-align: center; }.auth-eyebrow,.auth-tags { justify-content: center; }.auth-eyebrow { margin-bottom: 14px; }.auth-story h1 { font-size: 44px; }.auth-lead { margin: 16px auto 0; font-size: 14px; max-width: 440px; }.auth-tags { margin: 18px 0 0; }.auth-console { display: none; }.auth-card-wrap { width: 100%; max-width: 460px; margin: auto; }.auth-card { padding: 28px 25px; border-radius: 21px; }.auth-card-top { margin-bottom: 22px; }.auth-card h2 { font-size: 27px; }.auth-details { grid-template-columns: 1fr; gap: 26px; padding: 30px 8px 44px; }.auth-detail { padding-inline-start: 42px; position: relative; }.auth-detail>span { position: absolute; inset-inline-start: 0; top: 6px; }.auth-detail h3 { margin-top: 0; }.auth-detail p { max-width: none; } body[data-page=login] .topnav { display: none; } body[data-page=login] .topbar-end>.btn { display: none; }
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; }
}
@media (max-width: 360px) { .auth-story h1 { font-size: 38px; }.auth-card { padding: 23px 18px; }.auth-eyebrow { letter-spacing: .5px; }.auth-submit { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) {
 .auth-story,.auth-card-wrap,.auth-submit.is-loading .auth-arrow { animation: none !important; }.auth-console,.auth-console:hover { transform: none; transition: none; } .btn { transition: none; }
}
/* ==================================================================
   V1.1 — أزرار متطوّرة • بريميوم • المساعدة • قوائم الجوال • حركات إضافية
   ================================================================== */
:root { --gold: #ffcf5c; --gold2: #ff9d2e; --grad-gold: linear-gradient(135deg, #ffe08a 0%, #ffb02e 50%, #ff7a1a 100%); }

/* ----- أزرار متطوّرة ----- */
.btn { position: relative; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.rip { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255, 255, 255, .35); transform: scale(0); animation: ripple .65s var(--ease) forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.btn.gold { background: var(--grad-gold); color: #2a1500; border-color: transparent; box-shadow: 0 10px 30px -8px rgba(255, 170, 40, .65); font-weight: 800; }
.btn.gold:hover { filter: brightness(1.07); }
.btn.gold::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translate3d(-130%, 0, 0); animation: sheen 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes sheen { 60%, 100% { transform: translate3d(130%, 0, 0); } }
.btn.loading { pointer-events: none; color: transparent !important; }
.btn.loading > * { opacity: 0; }
.btn.loading::before { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; z-index: 2; }
.btn.ghost.loading::before, .btn.danger.loading::before { border-color: var(--line2); border-top-color: var(--accent); }
.btn.hold { --p: 0; }
.btn.hold::before { content: ""; position: absolute; inset: 0; background: rgba(255, 84, 104, .45); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
html[dir=rtl] .btn.hold::before { transform-origin: 100% 50%; }
.btn.hold.holding::before { animation: holdFill 1.1s linear forwards; }
@keyframes holdFill { to { transform: scaleX(1); } }
.btn.hold small { font-size: 10px; opacity: .7; font-weight: 600; margin-inline-start: 4px; }
.ibtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2); color: var(--muted); cursor: pointer; position: relative; transition: transform .15s var(--ease), color .15s, border-color .15s; }
.ibtn:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.ibtn:active { transform: scale(.9); }
.ibtn[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate3d(-50%, 4px, 0); padding: 4px 9px; border-radius: 8px; background: #000; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.ibtn[data-tip]:hover::after { opacity: 1; transform: translate3d(-50%, 0, 0); }
.ibtn.help { width: 38px; height: 38px; border-radius: 50%; font-weight: 900; font-size: 17px; color: var(--accent2); margin-inline-start: auto; animation: pulseRing 3s ease-out infinite; }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(255, 122, 26, .5); } 70%, 100% { box-shadow: 0 0 0 12px rgba(255, 122, 26, 0); } }
.fab { position: fixed; z-index: 55; inset-inline-end: 16px; bottom: 24px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 14px 34px -8px rgba(255, 90, 60, .7); opacity: 0; transform: translate3d(0, 20px, 0) scale(.8); pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.fab.show { opacity: 1; transform: none; pointer-events: auto; }
.fab:active { transform: scale(.9); }
.fab .ico { transform: rotate(90deg); }

/* ----- قصاصات الاحتفال ----- */
.confetti { position: fixed; z-index: 200; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; }

/* ----- نافذة منبثقة (المساعدة السياقية) ----- */
.modal-back { position: fixed; inset: 0; z-index: 160; display: grid; place-items: center; padding: 16px; background: rgba(4, 5, 9, .74); animation: fade .2s ease both; }
.modal { width: min(560px, 100%); max-height: 84vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 22px; padding: 22px; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .9); animation: popIn .32s var(--ease) both; }
.modal h3 { font-size: 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.modal ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 9px; color: var(--muted); }
.modal li b { color: var(--text); }
.modal .toolbar { margin-top: 18px; justify-content: flex-end; }
body.modal-open { overflow: hidden; }

/* ----- مركز المساعدة ----- */
.faq { display: grid; gap: 8px; }
.faq details { border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; transition: border-color .2s; }
.faq details[open] { border-color: rgba(255, 122, 26, .45); }
.faq summary { list-style: none; cursor: pointer; padding: 13px 16px; font-weight: 750; display: flex; align-items: center; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; margin-inline-start: auto; color: var(--accent2); font-weight: 900; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq .ans { padding: 0 16px 15px; color: var(--muted); animation: rise .35s var(--ease) both; white-space: pre-line; }
.cmd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.cmd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.cmd code { background: var(--panel3); }
.cmd span { color: var(--muted); font-size: 12.5px; text-align: end; }

/* ----- بريميوم ----- */
.prem-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.prem-card .feat-ico { background: rgba(255, 207, 92, .14) !important; color: var(--gold) !important; }
.prem-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 22px; padding: 22px 26px; border-radius: 20px; background: linear-gradient(120deg, rgba(255, 207, 92, .14), rgba(255, 122, 26, .08)); border: 1px solid rgba(255, 207, 92, .4); }
.prem-cta b { display: block; font-size: 20px; }
.gem { color: var(--gold) !important; }
.gem:hover { background: rgba(255, 207, 92, .1) !important; }
.prem-page { padding-block: 30px 40px; display: grid; gap: 18px; }
.prem-hero { position: relative; overflow: hidden; padding: 34px; border-radius: 26px; text-align: center; background: radial-gradient(120% 140% at 50% 0%, rgba(255, 207, 92, .2), var(--panel) 60%); border: 1px solid rgba(255, 207, 92, .35); }
.prem-hero h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 900; margin: 8px 0; }
.prem-hero .gem-big { font-size: 54px; display: inline-block; animation: float 4s ease-in-out infinite; filter: drop-shadow(0 10px 24px rgba(255, 176, 46, .6)); }
.prem-hero .btn { margin-top: 18px; }
.spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: 0; animation: spark 3.4s ease-in-out infinite; }
@keyframes spark { 0% { opacity: 0; transform: scale(0); } 40% { opacity: 1; transform: scale(1.4); } 100% { opacity: 0; transform: translate3d(0, -40px, 0) scale(.4); } }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; font-weight: 800; font-size: 13px; background: var(--panel3); }
.status-pill.on { background: rgba(255, 207, 92, .16); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 207, 92, .5); }
.locked { position: relative; }
.locked > * { opacity: .45; pointer-events: none; filter: grayscale(.5); }
.locked::after { content: "💎"; position: absolute; inset-block-start: 12px; inset-inline-end: 14px; font-size: 22px; opacity: 1; z-index: 3; }
.lock-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px; background: linear-gradient(120deg, rgba(255, 207, 92, .14), rgba(255, 122, 26, .06)); border: 1px solid rgba(255, 207, 92, .4); }
.lock-banner b { flex: 1; min-width: 180px; }
.limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.limit { padding: 12px 14px; border-radius: 13px; background: var(--panel2); border: 1px solid var(--line); }
.limit b { display: block; font-size: 18px; }
.limit small { color: var(--muted); }
.limit s { color: var(--faint); margin-inline-end: 6px; }
.quota { height: 10px; border-radius: 99px; background: var(--panel3); overflow: hidden; }
.quota i { display: block; height: 100%; border-radius: inherit; background: var(--grad-gold); transform-origin: 0 50%; animation: quotaIn 1s var(--ease) both; }
html[dir=rtl] .quota i { transform-origin: 100% 50%; }
@keyframes quotaIn { from { transform: scaleX(0); } }

/* ----- قوائم الجوال المرتّبة (الورقة السفلية) ----- */
.sheet-user { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--panel2); border: 1px solid var(--line); }
.sheet-user img { width: 46px; height: 46px; border-radius: 50%; }
.sheet-user b { display: block; }
.sheet-user small { color: var(--muted); }
.sheet-list { display: grid; gap: 6px; margin-top: 4px; }
.sheet-list > a, .sheet-list > button { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-weight: 700; text-align: start; cursor: pointer; transition: transform .15s var(--ease), border-color .15s; }
.sheet-list > a:active, .sheet-list > button:active { transform: scale(.98); }
.sheet-list .ico { color: var(--accent2); flex: none; }
.sheet-list .end { margin-inline-start: auto; color: var(--muted); font-size: 12.5px; display: inline-flex; align-items: center; gap: 8px; }
.sheet-list .end img { width: 22px; height: 15px; border-radius: 3px; }
.sheet-list .logout { color: #ff8294; border-color: rgba(255, 84, 104, .35); background: rgba(255, 84, 104, .08); }
.sheet-list .logout .ico { color: inherit; }
.sheet-list .gold-row { border-color: rgba(255, 207, 92, .45); background: rgba(255, 207, 92, .08); color: var(--gold); }
.sheet-list .gold-row .ico { color: var(--gold); }

/* ----- حركات إضافية للصفحة الرئيسية ----- */
.word { display: inline-block; opacity: 0; transform: translate3d(0, 24px, 0) rotate(2deg); animation: wordIn .7s var(--ease) forwards; animation-delay: calc(var(--w) * 70ms + 150ms); }
@keyframes wordIn { to { opacity: 1; transform: none; } }
.cursor-glow { position: fixed; z-index: -1; left: 0; top: 0; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255, 122, 26, .13), transparent 65%); will-change: transform; }
.grad { background-size: 200% 200%; animation: gradMove 6s ease-in-out infinite; }
@keyframes gradMove { 50% { background-position: 100% 50%; } }
.feat { transform-style: preserve-3d; }
.sec-head h2::after { content: ""; display: block; width: 64px; height: 4px; border-radius: 4px; margin: 12px auto 0; background: var(--grad); transform: scaleX(0); transition: transform .8s var(--ease) .2s; }
.sec-head.in h2::after { transform: scaleX(1); }
.chip-all { animation: rise .4s var(--ease) both; }
.tr, .row, .shop-item, .app, .cmd { animation: rise .45s var(--ease) both; }
.todo button { animation: rise .45s var(--ease) both; }
.todo button:nth-child(2) { animation-delay: .05s; } .todo button:nth-child(3) { animation-delay: .1s; } .todo button:nth-child(4) { animation-delay: .15s; } .todo button:nth-child(5) { animation-delay: .2s; } .todo button:nth-child(6) { animation-delay: .25s; }
.stats .stat { animation: rise .5s var(--ease) both; }
.stats .stat:nth-child(2) { animation-delay: .06s; } .stats .stat:nth-child(3) { animation-delay: .12s; } .stats .stat:nth-child(4) { animation-delay: .18s; } .stats .stat:nth-child(5) { animation-delay: .24s; } .stats .stat:nth-child(6) { animation-delay: .3s; }

@media (max-width: 860px) {
    .fab { bottom: calc(var(--nav-h) + var(--safe-b) + 28px); }
    .ibtn.help { width: 40px; height: 40px; }
    .prem-hero { padding: 24px 16px; }
    .prem-cta { padding: 18px; }
    .prem-cta .btn { width: 100%; }
    .cmd-grid { grid-template-columns: 1fr; }
}

/* ----- الشعار ----- */
.brand img, .brandline img { border-radius: 9px; object-fit: cover; }
.auth-card-top img { padding: 0 !important; border-radius: 16px; object-fit: cover; }
.hero-art { display: grid; place-items: center; }
.hero-logo { width: 100%; height: auto; border-radius: 26px; border: 1px solid rgba(80, 140, 255, .28); box-shadow: 0 30px 80px -24px rgba(40, 110, 255, .55), 0 0 0 1px #ffffff0a inset; animation: float 6s ease-in-out infinite; }
@media (max-width: 860px) { .hero-logo { border-radius: 20px; } }

/* ----- قائمة الجوال العلوية (تظهر على الشاشات الصغيرة فقط) ----- */
.menu-btn { display: none; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .15s var(--ease), border-color .15s; }
.menu-btn:active { transform: scale(.92); }
.menu-btn[aria-expanded=true] { border-color: var(--accent); }
.mmenu, .mmenu-back { display: none; }
@media (max-width: 720px) {
    .menu-btn { display: inline-grid; }
    .topbar-end form { display: none; }   /* الخروج صار داخل القائمة */
    .mmenu-back:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 88; background: rgba(4, 5, 9, .6); animation: fade .2s ease both; }
    .mmenu:not([hidden]) { display: grid; gap: 8px; position: fixed; z-index: 90; inset-inline: 10px; top: calc(60px + env(safe-area-inset-top, 0px)); max-height: calc(100vh - 80px); overflow-y: auto; padding: 12px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); animation: mmIn .28s var(--ease) both; }
    @keyframes mmIn { from { opacity: 0; transform: translate3d(0, -12px, 0) scale(.98); } }
    .mmenu a, .mmenu .mm-logout { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 16px; border-radius: 15px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: inherit; font-weight: 750; font-size: 16px; text-align: start; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .15s var(--ease), border-color .15s; }
    .mmenu a:active, .mmenu .mm-logout:active { transform: scale(.98); }
    .mmenu a.on { border-color: var(--accent); background: rgba(255, 122, 26, .1); }
    .mmenu .ico, .mmenu svg { flex: none; color: var(--accent2); }
    .mmenu .gold-row { border-color: rgba(255, 207, 92, .5); background: linear-gradient(120deg, rgba(255, 207, 92, .16), rgba(255, 122, 26, .06)); color: var(--gold, #ffcf5c); }
    .mmenu .gold-row svg { color: inherit; }
    .mmenu .mm-gem { font-size: 20px; line-height: 1; }
    .mmenu .owner-row { border-color: rgba(120, 160, 255, .5); background: rgba(80, 130, 255, .1); color: #a9c3ff; }
    .mmenu .owner-row svg { color: inherit; }
    .mmenu .mm-logout { color: #ff8294; border-color: rgba(255, 84, 104, .35); background: rgba(255, 84, 104, .08); }
    .mmenu .mm-logout svg { color: inherit; }
    .mm-user { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--panel3); }
    .mm-user img { border-radius: 50%; }
    .mm-user small { display: block; color: var(--muted); }
    body.menu-open { overflow: hidden; }
}
.sheet-list .owner-row { border-color: rgba(120, 160, 255, .5); background: rgba(80, 130, 255, .1); color: #a9c3ff; }
.sheet-list .owner-row .ico { color: inherit; }

/* ----- وضع الصيانة ----- */
.mbar { display: block; text-align: center; padding: 9px 14px; font-weight: 700; font-size: 13px; color: #1a1205; background: linear-gradient(90deg, #ffb347, #ff7a45); position: relative; z-index: 5; }
.maint { min-height: 70vh; display: flex; align-items: center; justify-content: center; margin-top: 0; }
.maint-card { text-align: center; width: 100%; }
.maint-logo { border-radius: 18px; margin: 0 auto 10px; display: block; }
.maint-note { margin: 12px 0; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--line2); background: rgba(255, 255, 255, .03); font-weight: 650; white-space: pre-wrap; }
.maint-sub { font-size: 13px; }
.maint-actions { justify-content: center; margin-top: 14px; }

/* ==================================================================
   تحسينات الجوال (شاملة): لا تمرير أفقي • شريط علوي صلب • أحجام لمس • مساحات آمنة
   ================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body { min-height: 100vh; min-height: 100dvh; overflow-x: clip; -webkit-tap-highlight-color: transparent; }
img, svg, video, canvas { max-width: 100%; }
.card, .grid > *, .stack > *, .cols > *, .num-grid > *, .stats > *, .row > *, .tr > *, .toolbar > * { min-width: 0; }
.card h3, .card h4, .tr b, .tr span, .srv-meta, code { overflow-wrap: anywhere; }
pre, .log { overflow-x: auto; max-width: 100%; }
.cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.num-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.modal { max-height: 84vh; max-height: 84dvh; }
.sheet { max-height: 78vh; max-height: 78dvh; }

/* الشريط العلوي: صلب بالكامل حتى لا يظهر النص من خلفه عند التمرير */
.topbar { background: #07080d; -webkit-backdrop-filter: none; backdrop-filter: none; padding-top: env(safe-area-inset-top, 0px); }
.srv-meta { min-width: 0; flex: 1; }
.srv-meta h3 { max-width: 100%; }

/* خانة البحث */
.search { position: relative; display: block; }
.search::before { content: "🔍"; position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: .65; pointer-events: none; }
.search input { padding-inline-start: 42px; }
.search input::-webkit-search-cancel-button { filter: invert(.8); }

@media (max-width: 860px) {
    input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; }   /* يمنع تكبير iOS عند الضغط */
    .btn, .seg button, .mnav button { touch-action: manipulation; }
    .btn { min-height: 44px; }
    .btn.sm { min-height: 38px; }
    .card { padding: 16px; }
    .page-head h1 { font-size: 25px; }
    .page-head > div, .page-head .search { flex: 1 1 100%; }
    .srv-top { gap: 12px; }
    .vhead h2 { font-size: 20px; }
    .seg { gap: 6px; }
    .seg button { padding: 9px 14px; }
    .toolbar .btn { flex: 1 1 auto; }
    .foot { margin-bottom: 8px; }
    .foot-links { justify-content: center; }
}
@media (max-width: 720px) {
    /* شريط العدّ التنازلي أصغر وأنظف */
    .lbar { font-size: 12.5px; padding: 7px 10px; gap: 4px 8px; }
    .lbar-time { font-size: 13px; padding: 1px 8px; }
    .lbar-flag { font-size: 15px; }
    .mbar { font-size: 12px; padding: 7px 10px; }
    .topbar-in { gap: 8px; }
    .brand em { font-size: 11px; }
    .menu-btn, .lang-btn { flex: none; }
    .maint { min-height: 60vh; }
}
@media (max-width: 380px) {
    .wrap { width: calc(100% - 16px); }
    .brand span { font-size: 15px; }
    .stats { grid-template-columns: 1fr 1fr; }
    .card { padding: 14px; }
}


/* آراء المستخدمين | reviews */
.reviews figure { margin: 0; }
.reviews blockquote { margin: 0 0 12px; font-size: 17px; line-height: 1.8; }
.reviews figcaption { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.reviews figcaption img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line2); }


/* ===== V1.2: الأوامر + الرموز التعبيرية + منشئ الإيمبد + خيارات التذكرة ===== */
.cmd-grp h4 { margin: 0 0 12px; }
.cmd-list { display: grid; gap: 8px; }
.cmd-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 13px; background: var(--panel2); border: 1px solid var(--line); transition: opacity .2s, border-color .15s; }
.cmd-row:hover { border-color: var(--line2); }
.cmd-row.is-off { opacity: .55; }
.cmd-name { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.cmd-name b { font-size: 14.5px; }
.cmd-name code { font-family: var(--mono); font-size: 12px; color: var(--accent2); direction: ltr; }
.cmd-name small { font-size: 12px; }
.ibtn.pen { color: var(--accent2); }
.sw-mini { position: relative; display: inline-flex; cursor: pointer; flex: none; }
.sw-mini input { position: absolute; opacity: 0; pointer-events: none; }
.sw-mini input:checked + .track { background: var(--grad); border-color: transparent; }
html[dir=ltr] .sw-mini input:checked + .track::after { transform: translate3d(20px, 0, 0); }
html[dir=rtl] .sw-mini input:checked + .track::after { transform: translate3d(-20px, 0, 0); }
.sw-mini input:disabled + .track { opacity: .5; cursor: not-allowed; }
.chip-w { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: var(--panel3); border: 1px solid var(--line2); color: var(--text); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.chip-w button { all: unset; cursor: pointer; color: var(--bad); font-weight: 800; padding: 0 2px; }
.chip-w.off { opacity: .45; text-decoration: line-through; }
.chip-w:disabled { opacity: .35; cursor: not-allowed; }
.modal h6, .emo-pop h6 { margin: 10px 0 6px; font-size: 12.5px; color: var(--muted); font-weight: 700; }

.emo { display: grid; gap: 8px; width: 100%; }
.emo-label { font-size: 13.5px; color: var(--muted); font-weight: 700; }
.emo-box { border: 2px dashed var(--line2); border-radius: 14px; padding: 12px; min-height: 104px; display: grid; align-content: center; background: rgba(255, 255, 255, .015); }
.emo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; max-height: 150px; overflow: auto; }
.emo-cell { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid transparent; border-radius: 10px; background: var(--panel2); cursor: pointer; }
.emo-cell:hover { border-color: var(--line2); }
.emo-cell.sel { border-color: var(--accent); background: rgba(255, 122, 26, .14); }
.emo-empty { text-align: center; color: var(--muted); display: grid; gap: 4px; }
.emo-empty b { font-size: 15px; }
.emo-empty small { font-size: 12.5px; color: var(--faint); }
.emo-row { display: flex; gap: 8px; align-items: center; }
.emo-row input { flex: 1; min-width: 0; }
.emo-cur { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; background: var(--panel3); border: 1px solid var(--line2); font-size: 20px; }
.emo-img { width: 24px; height: 24px; object-fit: contain; }
.modal h6 { margin: 10px 0 6px; font-size: 12.5px; color: var(--muted); font-weight: 700; }

.opt-row { display: flex; flex-direction: column; gap: 12px; align-items: stretch; padding: 14px; border-radius: 13px; background: var(--panel2); border: 1px solid var(--line); }
.opt-row > .rm { align-self: flex-end; }
.opt-f { flex: 1; min-width: 0; display: grid; gap: 8px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

.dc-content { margin: 0; font-size: 14px; color: #dbdee1; white-space: pre-wrap; word-break: break-word; }
.dc-embed .emb-author { color: #dbdee1; font-weight: 700; }
.emb-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.emb-f { grid-column: 1 / -1; display: grid; gap: 2px; font-size: 13px; }
.emb-f.inl { grid-column: auto; }
.emb-f b { font-size: 13px; }
.emb-f span { color: #dbdee1; white-space: pre-wrap; word-break: break-word; }
.emb-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 6px; }
.emb-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; justify-self: end; }
.emb-img.ph, .emb-thumb.ph { display: grid; place-items: center; background: #1e1f22; color: #949ba4; font-size: 12px; min-height: 48px; }
.emb-foot { color: #949ba4; font-size: 12px; }


/* إصلاح: كلمات التدرّج اللوني (.grad) كانت تختفي على بعض متصفحات الجوال → لون ثابت مضمون الظهور */
.grad { display: inline-block; -webkit-text-fill-color: transparent; }
@supports not ((background-clip: text) or (-webkit-background-clip: text)) {
    .grad { color: var(--accent2); -webkit-text-fill-color: currentColor; background: none; }
}
@media (max-width: 700px) {
    .grad { background: none; animation: none; color: var(--accent2); -webkit-text-fill-color: currentColor; }
}

/* ==================================================================
   V1.2 — الوضع النهاري / الليلي (data-theme على <html>)
   ================================================================== */
.theme-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; transition: transform .2s var(--ease), border-color .2s; -webkit-tap-highlight-color: transparent; }
.theme-btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.theme-btn:active { transform: scale(.94); }
.ico-sun { display: none !important; }
html[data-theme="light"] .ico-sun { display: inline-block !important; }
html[data-theme="light"] .ico-moon { display: none !important; }
.mm-theme { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 16px; border-radius: 15px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font-weight: 700; cursor: pointer; }
.mm-theme .ico-moon, .mm-theme .ico-sun { font-size: 20px; line-height: 1; }
@media (max-width: 720px) { .theme-btn { width: 40px; height: 40px; } .topbar-end .theme-btn { display: none; } }

html[data-theme="light"] {
    --bg: #f5f6fb; --bg2: #eceef6; --panel: #ffffff; --panel2: #f3f5fb; --panel3: #e7eaf4;
    --line: #dde1ee; --line2: #c6cce0;
    --text: #161a2b; --muted: #566082; --faint: #7f88a6;
    --accent: #f06a0c; --accent2: #c9540a; --pink: #e63868; --violet: #6a47f0; --teal: #0fa88a;
    --ok: #1f9d55; --bad: #d92d44; --warn: #b7791f;
    color-scheme: light;
}
html[data-theme="light"] ::selection { background: rgba(240, 106, 12, .25); }
html[data-theme="light"] .aurora::before { background: radial-gradient(circle at 50% 50%, rgba(255, 122, 26, .16), transparent 62%); }
html[data-theme="light"] .aurora::after { background: radial-gradient(circle at 50% 50%, rgba(124, 92, 255, .13), transparent 62%); }
html[data-theme="light"] .topbar { background: var(--bg); border-bottom-color: var(--line); }
html[data-theme="light"] .card { border-color: var(--line); box-shadow: 0 8px 28px rgba(30, 40, 90, .07); }
html[data-theme="light"] .nav button.on { color: var(--accent2); background: linear-gradient(135deg, rgba(255, 122, 26, .16), rgba(255, 77, 125, .08)); }
html[data-theme="light"] .mnav { background: rgba(255, 255, 255, .97); box-shadow: 0 14px 34px -10px rgba(30, 40, 90, .28); }
html[data-theme="light"] .mnav button.on { color: var(--accent2); background: linear-gradient(135deg, rgba(255, 122, 26, .2), rgba(255, 77, 125, .1)); }
html[data-theme="light"] .mmenu:not([hidden]),
html[data-theme="light"] .consent-card,
html[data-theme="light"] .pal-box,
html[data-theme="light"] .modal { box-shadow: 0 30px 70px -20px rgba(30, 40, 90, .35); }
html[data-theme="light"] .savebar .btn { box-shadow: 0 12px 30px -10px rgba(30, 40, 90, .35), 0 8px 24px -8px rgba(255, 90, 60, .5); }
html[data-theme="light"] .chipx button { background: rgba(20, 30, 70, .08); }
html[data-theme="light"] .lang-btn img, html[data-theme="light"] .lang-opt img, html[data-theme="light"] .flag-tile img { box-shadow: 0 0 0 1px rgba(20, 30, 70, .18); }
html[data-theme="light"] .maint-note { background: rgba(20, 30, 70, .04); }
html[data-theme="light"] .emo-box { background: rgba(20, 30, 70, .025); }
html[data-theme="light"] .auth-tags > span { border-color: var(--line2); color: var(--muted); }
html[data-theme="light"] .auth-console { border-color: var(--line2); background: linear-gradient(145deg, #ffffff, #eef0f8); box-shadow: 0 24px 50px rgba(30, 40, 90, .14); }
html[data-theme="light"] .console-head { border-bottom-color: var(--line); color: var(--muted); }
html[data-theme="light"] .console-rail { border-inline-end-color: var(--line); color: var(--faint); }
html[data-theme="light"] .auth-card { border-color: var(--line2); background: linear-gradient(155deg, #ffffff 0%, #f6f7fc 55%, #eff1f9 100%); box-shadow: 0 24px 60px rgba(30, 40, 90, .16); }
html[data-theme="light"] .auth-consent a { color: var(--text); text-decoration-color: var(--faint); }
html[data-theme="light"] .auth-divider::before, html[data-theme="light"] .auth-divider::after { background: var(--line); }
html[data-theme="light"] .auth-help { border-top-color: var(--line); color: var(--muted); }
html[data-theme="light"] .auth-details { border-top-color: var(--line); }
html[data-theme="light"] .hero-logo { box-shadow: 0 30px 70px -26px rgba(40, 110, 255, .35), 0 0 0 1px rgba(20, 30, 70, .06) inset; }
html[data-theme="light"] .lov-gift, html[data-theme="light"] .launch-clock > div { background: rgba(20, 30, 70, .04); }
/* معاينة ديسكورد تبقى داكنة عمدًا لأنها تحاكي واجهة ديسكورد | Discord preview stays dark on purpose */
