/* ═══════════════════════════════════════════════
   كوماندو هوست — CommandO Host
   ثيم: بانل تحكم تقني (Pterodactyl Style)
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
    --accent: #ff1e3c;
    --accent-bright: #ff3355;
    --accent-dark: #b3122b;
    --accent-glow: rgba(255, 30, 60, .4);

    --bg: #131419;
    --bg-deep: #0d0e12;
    --sidebar: #181a21;
    --sidebar-active: #20232d;
    --card: #1b1d24;
    --card-hover: #20232c;
    --border: #2a2d38;
    --border-strong: #3a3d4a;

    --text: #d6d8e0;
    --text-bright: #f2f3f7;
    --muted: #8b8e9b;
    --muted-2: #5c5f6b;

    --green: #3ddc84;
    --green-bg: rgba(61, 220, 132, .12);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, .12);
    --yellow: #f5b544;
    --blue: #3b82f6;
    --purple: #a78bfa;

    --radius: 10px;
    --mono: 'JetBrains Mono', 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dark); }

::selection { background: rgba(255, 30, 60, .35); color: #fff; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-deep);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.7;
    font-size: 14px;
}

/* ════════ الشريط الجانبي (Pterodactyl Style) ════════ */

.panel {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 230px;
    background: var(--sidebar);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    transition: transform .25s ease;
}

.sidebar-logo {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 17px;
    color: var(--text-bright);
    text-decoration: none;
}
.sidebar-logo .logo-fire { font-size: 22px; animation: firePulse 2.4s ease-in-out infinite; }
.sidebar-logo span {
    background: linear-gradient(135deg, var(--accent-bright), var(--accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
@keyframes firePulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px var(--accent-glow)); }
    50% { transform: scale(1.12); filter: drop-shadow(0 0 14px var(--accent-glow)); }
}

.sidebar-nav { flex: 1; padding: 14px 10px; overflow-y: auto; }
.sidebar-section {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--muted-2);
    padding: 14px 12px 6px;
    text-transform: uppercase;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 13.5px;
    transition: all .15s;
    margin-bottom: 2px;
    border: 1px solid transparent;
}
.sidebar-link .s-icon { font-size: 17px; width: 20px; text-align: center; }
.sidebar-link:hover { color: var(--text-bright); background: var(--sidebar-active); }
.sidebar-link.active {
    color: var(--text-bright);
    background: var(--sidebar-active);
    border-color: var(--border);
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-user {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-avatar {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-bright), var(--accent-dark));
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; color: #fff; font-size: 15px;
    flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { color: var(--text-bright); font-weight: 800; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-plan { color: var(--muted); font-size: 11px; }

/* زر فتح القائمة للجوال */
.sidebar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 20px;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
}

/* المحتوى الرئيسي */
.main {
    flex: 1;
    margin-right: 230px;
    padding: 24px 30px 40px;
    min-width: 0;
}

/* ════════ شريط علوي للمحتوى ════════ */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.topbar h1 {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 10px;
}
.topbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { color: var(--muted); font-size: 12px; margin-top: 2px; }
.breadcrumb b { color: var(--accent-bright); }

/* ════════ البطاقات ════════ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--border-strong); }

/* ════════ شريط إحصائيات أعلى اللوحة ════════ */
.stat-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 26px;
}
.stat-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color .2s;
}
.stat-box:hover { border-color: var(--accent-dark); }
.stat-box .stat-ico {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.stat-box .stat-val { font-size: 19px; font-weight: 900; color: var(--text-bright); line-height: 1.2; }
.stat-box .stat-lbl { font-size: 11px; color: var(--muted); }

/* ════════ بطاقات السيرفرات (شبكة) ════════ */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}
.server-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: all .18s;
    position: relative;
    overflow: hidden;
}
.server-card::before {
    content: "";
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: var(--muted-2);
    transition: background .3s;
}
.server-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.server-card.running::before { background: var(--green); box-shadow: 0 0 12px var(--green); }
.server-card.stopped::before { background: var(--muted-2); }
.server-card.error::before { background: var(--red); }

.server-card-head { display: flex; align-items: center; gap: 12px; }
.server-card-ico {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 21px;
    flex-shrink: 0;
}
.server-card-name { font-weight: 800; color: var(--text-bright); font-size: 15px; line-height: 1.3; }
.server-card-meta { color: var(--muted); font-size: 12px; }

.server-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.server-card-stat { text-align: center; }
.server-card-stat .v { font-weight: 800; color: var(--text-bright); font-size: 14px; font-family: var(--mono); }
.server-card-stat .l { font-size: 10px; color: var(--muted); }

.server-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* نقاط الحالة */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}
.status-pill .p-dot { width: 7px; height: 7px; border-radius: 50%; }
.status-pill.running { background: var(--green-bg); color: var(--green); }
.status-pill.running .p-dot { background: var(--green); box-shadow: 0 0 8px var(--green); animation: dotPulse 1.6s ease-in-out infinite; }
.status-pill.stopped { background: rgba(139, 142, 155, .12); color: var(--muted); }
.status-pill.stopped .p-dot { background: var(--muted-2); }
.status-pill.error { background: var(--red-bg); color: var(--red); }
.status-pill.error .p-dot { background: var(--red); animation: dotPulse 1s ease-in-out infinite; }
@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* ════════ الأزرار ════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: all .15s;
    color: var(--text);
    background: var(--card-hover);
    white-space: nowrap;
}
.btn:hover { border-color: var(--accent-dark); color: var(--text-bright); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-red { background: linear-gradient(135deg, var(--accent-bright), var(--accent-dark)); border-color: transparent; color: #fff; box-shadow: 0 2px 14px rgba(255, 30, 60, .25); }
.btn-red:hover { box-shadow: 0 4px 22px rgba(255, 30, 60, .45); color: #fff; }
.btn-green { background: #1f9d55; border-color: transparent; color: #fff; }
.btn-green:hover { background: #23b05f; color: #fff; }
.btn-blue { background: #2563eb; border-color: transparent; color: #fff; }
.btn-blue:hover { background: #2f6df0; color: #fff; }
.btn-danger { background: var(--red-bg); border-color: rgba(239, 68, 68, .35); color: var(--red); }
.btn-danger:hover { background: rgba(239, 68, 68, .22); border-color: var(--red); color: var(--red); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }

/* ════════ النماذج ════════ */
label { display: block; font-size: 13px; font-weight: 800; color: var(--text-bright); margin: 14px 0 6px; }
input, textarea, select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    transition: all .15s;
    outline: none;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--accent-dark);
    box-shadow: 0 0 0 2px rgba(255, 30, 60, .12);
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
textarea { min-height: 240px; font-family: var(--mono); direction: ltr; text-align: left; resize: vertical; background: #0a0a0e; }
input[type=file] { padding: 8px; }
input[type=checkbox], input[type=radio] { width: auto; }

/* نوع السيرفر */
.type-select { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.type-option {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all .15s;
    background: var(--bg-deep);
    color: var(--muted);
}
.type-option:hover { border-color: var(--accent-dark); }
.type-option.selected { border-color: var(--accent); background: var(--red-bg); color: var(--text-bright); box-shadow: 0 0 14px rgba(255, 30, 60, .12); }
.type-option .t-icon { font-size: 22px; display: block; margin-bottom: 4px; }
.type-option input { display: none; }

/* ════════ التنبيهات ════════ */
.alert { padding: 11px 16px; border-radius: 8px; margin: 12px 0; font-size: 13px; font-weight: 700; border: 1px solid; }
.alert-error { background: var(--red-bg); color: #ff8a8a; border-color: rgba(239, 68, 68, .3); }
.alert-success { background: var(--green-bg); color: var(--green); border-color: rgba(61, 220, 132, .3); }
.msg-success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(61, 220, 132, .3); padding: 11px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; font-weight: 700; animation: fadeUp .3s ease both; }
.msg-error { background: var(--red-bg); color: #ff8a8a; border: 1px solid rgba(239, 68, 68, .3); padding: 11px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; font-weight: 700; animation: fadeUp .3s ease both; }

/* الشارات */
.badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-basic { background: rgba(139, 142, 155, .15); color: #c3c6d1; border: 1px solid rgba(139, 142, 155, .3); }
.badge-gold { background: rgba(245, 181, 68, .15); color: var(--yellow); border: 1px solid rgba(245, 181, 68, .3); }
.badge-premium { background: var(--red-bg); color: var(--accent-bright); border: 1px solid rgba(255, 30, 60, .3); }

/* ════════ صفحة الهبوط ════════ */
.landing { max-width: 1080px; margin: 0 auto; padding: 30px 22px 50px; }

.landing-hero {
    text-align: center;
    padding: 56px 0 40px;
    position: relative;
}
.landing-hero .hero-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-bright);
    background: var(--red-bg);
    border: 1px solid rgba(255, 30, 60, .3);
    padding: 5px 18px;
    border-radius: 30px;
    margin-bottom: 18px;
    font-family: var(--mono);
}
.landing-hero h1 {
    font-size: 46px;
    font-weight: 900;
    color: var(--text-bright);
    line-height: 1.25;
    margin-bottom: 16px;
}
.landing-hero h1 .grad {
    background: linear-gradient(135deg, var(--accent-bright), var(--accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 18px var(--accent-glow));
}
.landing-hero p { color: var(--muted); font-size: 16px; max-width: 620px; margin: 0 auto 26px; line-height: 1.9; }
.landing-hero .hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.landing-hero .hero-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 34px;
    flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .hv { font-size: 24px; font-weight: 900; color: var(--text-bright); font-family: var(--mono); }
.hero-stat .hv.green { color: var(--green); }
.hero-stat .hl { font-size: 11px; color: var(--muted); letter-spacing: 1px; }

/* محاكاة نافذة طرفية في الهيرو */
.terminal-window {
    max-width: 640px;
    margin: 40px auto 0;
    background: #0a0a0e;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    overflow: hidden;
    text-align: right;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: var(--sidebar);
    border-bottom: 1px solid var(--border);
}
.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-dot.r { background: #f25c54; }
.t-dot.y { background: #f5b544; }
.t-dot.g { background: #3ddc84; }
.terminal-bar .t-title { margin-right: 10px; color: var(--muted); font-size: 11px; font-family: var(--mono); }
.terminal-body {
    padding: 18px;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.9;
    direction: ltr;
    text-align: left;
    color: #9fd3a9;
    min-height: 140px;
}
.terminal-body .t-cmd { color: var(--text-bright); }
.terminal-body .t-prefix { color: var(--accent-bright); }
.terminal-body .t-ok { color: var(--green); }
.terminal-body .t-muted { color: var(--muted-2); }
.terminal-cursor { display: inline-block; width: 8px; height: 14px; background: var(--green); vertical-align: middle; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* المميزات */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 30px 0; }
.feature-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px; }
.feature-item .f-ico {
    width: 38px; height: 38px;
    border-radius: 9px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.feature-item h4 { color: var(--text-bright); font-size: 14px; margin-bottom: 3px; }
.feature-item p { color: var(--muted); font-size: 12.5px; line-height: 1.7; }

/* تفعيل الكود */
.redeem-box { max-width: 520px; margin: 20px auto 50px; text-align: right; }
.redeem-box .card { padding: 30px; }
.redeem-box h2 { color: var(--accent-bright); margin-bottom: 4px; text-align: center; font-size: 20px; font-weight: 900; }
.redeem-box .sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; text-align: center; }
.redeem-box .steps {
    background: var(--bg-deep);
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--muted);
    line-height: 2;
    font-family: var(--mono);
    direction: ltr;
    text-align: left;
}
.redeem-box .steps b { color: var(--accent-bright); }

/* الخطط */
.plans-title { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 20px; letter-spacing: 2px; font-family: var(--mono); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 50px; }
.plan-card { text-align: center; padding: 26px 20px; transition: all .2s; position: relative; }
.plan-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.plan-card .emoji { font-size: 34px; margin-bottom: 8px; }
.plan-card h3 { font-size: 18px; margin-bottom: 4px; color: var(--text-bright); }
.plan-card .price { color: var(--accent-bright); font-size: 19px; font-weight: 900; margin-bottom: 14px; font-family: var(--mono); }
.plan-card .price small { font-size: 11px; color: var(--muted); font-weight: 400; font-family: 'Cairo', sans-serif; }
.plan-card ul { list-style: none; text-align: right; margin-bottom: 18px; }
.plan-card li { padding: 6px 0; color: var(--muted); font-size: 13px; border-bottom: 1px dashed var(--border); display: flex; align-items: center; gap: 6px; }
.plan-card li:last-child { border-bottom: none; }
.plan-card li b { color: var(--text-bright); }
.plan-featured { border: 1px solid var(--accent) !important; box-shadow: 0 0 24px rgba(255, 30, 60, .15); }
.plan-featured::before {
    content: "⭐ الأكثر شعبية";
    position: absolute;
    top: -11px;
    right: 50%;
    transform: translateX(50%);
    background: linear-gradient(135deg, var(--accent-bright), var(--accent-dark));
    color: #fff;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 4px 14px var(--accent-glow);
}

/* الأسئلة الشائعة */
.faq-box { max-width: 680px; margin: 0 auto 50px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.faq-item:hover { border-color: var(--border-strong); }
.faq-q { padding: 14px 18px; cursor: pointer; font-weight: 800; font-size: 14px; color: var(--text-bright); display: flex; justify-content: space-between; align-items: center; user-select: none; }
.faq-q .faq-arrow { transition: transform .3s; color: var(--accent-bright); }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 18px 16px; color: var(--muted); font-size: 13px; line-height: 2; }
code { background: var(--bg-deep); border: 1px solid var(--border); padding: 1px 7px; border-radius: 5px; font-family: var(--mono); font-size: 12px; color: var(--accent-bright); }

/* ════════ صفحة السيرفر ════════ */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.tab {
    padding: 10px 20px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
    color: var(--muted);
    border: 1px solid transparent;
    border-bottom: none;
    transition: all .15s;
    background: transparent;
    font-family: inherit;
}
.tab:hover { color: var(--text-bright); background: var(--card); }
.tab.active { color: var(--accent-bright); background: var(--card); border-color: var(--border); position: relative; top: 1px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .25s ease; }

/* الكونسول */
.console-status { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.console {
    background: #0a0a0e;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    padding: 18px;
    font-family: var(--mono);
    font-size: 12.5px;
    min-height: 320px;
    max-height: 440px;
    overflow-y: auto;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
    direction: ltr;
    text-align: left;
    color: #9fd3a9;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, .4);
}
.console .empty { color: var(--muted-2); text-align: center; padding: 70px 0; direction: rtl; font-family: 'Cairo', sans-serif; }

/* الإحصائيات الحية */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.meter { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; }
.meter .meter-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.meter .meter-label b { color: var(--text-bright); font-family: var(--mono); font-size: 12px; }
.meter-bar { height: 7px; background: var(--bg-deep); border-radius: 8px; overflow: hidden; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--accent-dark), var(--accent-bright)); border-radius: 8px; transition: width .5s ease; box-shadow: 0 0 8px var(--accent-glow); }
.meter-fill.high { background: linear-gradient(90deg, #f59e0b, #ef4444); box-shadow: 0 0 8px rgba(239, 68, 68, .5); }

/* أمر التشغيل */
.cmd-box {
    background: #0a0a0e;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 14px;
    font-family: var(--mono);
    font-size: 12px;
    color: #9fd3a9;
    direction: ltr;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    overflow-x: auto;
}
.cmd-box code { white-space: nowrap; background: none; border: none; padding: 0; color: #9fd3a9; }
.copy-btn { background: var(--card-hover); border: 1px solid var(--border); color: var(--muted); border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 11px; font-family: inherit; transition: all .15s; flex-shrink: 0; }
.copy-btn:hover { color: var(--accent-bright); border-color: var(--accent-dark); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

/* الملفات */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12px; }
.crumb {
    color: var(--muted);
    text-decoration: none;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--mono);
}
.crumb:hover { color: var(--accent-bright); border-color: var(--accent-dark); }
.crumb.current { color: var(--accent-bright); border-color: var(--accent-dark); }

.file-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 7px; transition: all .15s; flex-wrap: wrap; }
.file-item:hover { border-color: var(--border-strong); }
.file-item.folder-item { cursor: pointer; }
.file-item.folder-item:hover { border-color: var(--yellow); background: rgba(245, 181, 68, .04); }
.file-name { font-family: var(--mono); font-size: 13px; display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.file-name .f-ico { font-size: 16px; flex-shrink: 0; }
.file-size { color: var(--muted-2); font-size: 11px; font-family: var(--mono); }
.file-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.upload-box { border: 2px dashed var(--border-strong); border-radius: 10px; padding: 22px; text-align: center; margin-bottom: 16px; transition: all .2s; }
.upload-box:hover, .upload-box.dragover { border-color: var(--accent); background: var(--red-bg); }
.upload-box.dragover { box-shadow: 0 0 20px rgba(255, 30, 60, .15); transform: scale(1.005); }
.upload-box form { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.upload-box input[type=file] { width: auto; margin: 0; }
.upload-hint { font-size: 11px; color: var(--muted-2); margin-top: 10px; }

.editor-box { display: none; }
.editor-box.active { display: block; animation: fadeUp .25s ease; }
.editor-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.editor-toolbar h3 { color: var(--accent-bright); font-size: 15px; }

.badge-file { font-family: var(--mono); font-size: 10px; padding: 2px 8px; border-radius: 6px; background: var(--bg-deep); border: 1px solid var(--border); color: var(--muted); text-transform: uppercase; }
.main-flag { color: var(--yellow); font-size: 11px; }

/* ════════ تسجيل الدخول ════════ */
body.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-wrap { width: 100%; max-width: 400px; padding: 20px; }
.login-box { padding: 34px 30px; text-align: center; }
.login-box .logo-big { font-size: 46px; margin-bottom: 8px; filter: drop-shadow(0 0 18px var(--accent-glow)); animation: firePulse 2.4s ease-in-out infinite; }
.login-box h1 { color: var(--accent-bright); margin-bottom: 4px; font-size: 22px; font-weight: 900; }
.login-box .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-box form { text-align: right; }
.back-link { display: block; margin-top: 18px; font-size: 13px; color: var(--muted); text-decoration: none; transition: color .15s; }
.back-link:hover { color: var(--accent-bright); }

/* ════════ التوست ════════ */
#toastBox { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: var(--card-hover);
    border: 1px solid var(--border-strong);
    border-right: 4px solid var(--accent);
    padding: 11px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
    animation: toastIn .3s ease both;
    max-width: 320px;
}
.toast.success { border-right-color: var(--green); }
.toast.error { border-right-color: var(--red); }
.toast.out { animation: toastOut .3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(50px); } }

/* ════════ حركات ════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .35s ease both; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* حالة فارغة */
.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-state .big { font-size: 42px; margin-bottom: 10px; }
.empty-state h3 { color: var(--text-bright); font-size: 16px; }
.empty-state p { font-size: 13px; margin: 8px 0 18px; }

/* التذييل */
.footer { text-align: center; padding: 24px 0; color: var(--muted-2); font-size: 12.5px; border-top: 1px solid var(--border); margin-top: 30px; }
.footer b { color: var(--accent-bright); }

/* شريط تنقل بسيط للصفحة الرئيسية (بدون شريط جانبي) */
.navbar {
    background: var(--sidebar);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 150;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; padding: 12px 22px; max-width: 1080px; margin: 0 auto; }
.logo { font-size: 18px; font-weight: 900; display: flex; align-items: center; gap: 8px; color: var(--text-bright); text-decoration: none; }
.logo .logo-fire { font-size: 20px; animation: firePulse 2.4s ease-in-out infinite; }
.logo span { background: linear-gradient(135deg, var(--accent-bright), var(--accent-dark)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; transition: all .15s; padding: 5px 9px; border-radius: 7px; }
.nav-links a:hover { color: var(--text-bright); background: var(--sidebar-active); }

/* ════════ الاستجابة ════════ */
@media (max-width: 900px) {
    .sidebar { transform: translateX(100%); box-shadow: 0 0 40px rgba(0, 0, 0, .6); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-right: 0; padding: 18px; }
    .sidebar-toggle { display: inline-flex; }
    .grid-3 { grid-template-columns: 1fr; }
    .landing-hero h1 { font-size: 32px; }
    .server-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
    .landing-hero { padding-top: 36px; }
}
