/* style.css — تصميم "One Million" الفاخر: كحلي داكن + ذهبي، RTL بالكامل
   مقتبس من التصميم المرجعي اللي بعته (كحلي #0b0e1c + ذهبي #f5c400) */

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

:root {
    --gold: #f5c400;
    --gold-soft: rgba(245,196,0,0.1);
    --bg: #0b0e1c;
    --panel: #0d1120;
    --card: #111629;
    --border: rgba(255,255,255,0.07);
    --border-strong: rgba(255,255,255,0.14);
    --text: #ffffff;
    --muted: rgba(255,255,255,0.45);
    --muted-soft: rgba(255,255,255,0.28);
    --green: #22c55e;
    --red: #ef4444;
    --orange: #f97316;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
}
a { color: inherit; text-decoration: none; }
input, select, button { font-family: 'Cairo', sans-serif; }
input::placeholder { color: rgba(255,255,255,0.3); }
select option { background: var(--panel); color: #fff; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(245,196,0,0.25); border-radius: 3px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 7px; justify-content: center;
    padding: 11px 22px; border-radius: 8px; font-weight: 800; font-size: 14px;
    cursor: pointer; border: none; transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--gold); color: #000; }
.btn-primary:hover { background: #ffd633; }
.btn-outline { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid var(--border-strong); font-weight: 600; }
.btn-ghost { background: transparent; color: var(--muted); font-weight: 600; }

/* ---------- Landing ---------- */
.landing-hero {
    min-height: 100vh; position: relative; overflow: hidden;
    background: radial-gradient(ellipse at 50% 22%, #1b2d4f 0%, #0d1224 55%, #080b14 100%);
}
.landing-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 48px; position: relative; z-index: 10;
}
.landing-brand { color: var(--gold); font-weight: 900; font-size: 20px; letter-spacing: -0.5px; }
.landing-actions { display: flex; gap: 10px; }
.landing-center {
    display: flex; flex-direction: column; align-items: center;
    padding: 64px 40px 48px; text-align: center; position: relative; z-index: 5;
}
.landing-title {
    font-family: 'Playfair Display', serif; font-weight: 900; line-height: 0.9; letter-spacing: -3px;
}
.landing-title .line1 { font-size: clamp(64px, 11vw, 140px); color: var(--gold); }
.landing-title .line2 { font-size: clamp(64px, 11vw, 140px); color: #fff; }
.landing-divider { width: 80px; height: 2px; background: var(--gold); margin: 28px auto; }
.landing-sub1 { color: rgba(255,255,255,0.8); font-size: 17px; margin-bottom: 8px; }
.landing-sub2 { color: var(--gold); font-size: 16px; font-weight: 700; margin-bottom: 42px; }
.landing-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.landing-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    padding: 0 48px 60px; max-width: 1200px; margin: 0 auto;
}
.landing-stat {
    background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 12px;
    padding: 26px 16px; text-align: center;
}
.landing-stat .num { color: var(--gold); font-size: 26px; font-weight: 900; margin-top: 8px; }
.landing-stat .label { color: var(--muted); font-size: 13px; margin-top: 4px; }
@media (max-width: 720px) { .landing-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Auth ---------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: radial-gradient(ellipse at 50% 15%, #1b2d4f 0%, #0d1224 55%, #080b14 100%); }
.auth-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    padding: 34px; width: 100%; max-width: 420px;
}
.auth-card h2 { text-align: center; margin-bottom: 8px; color: var(--gold); font-weight: 900; }
.auth-card label { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--muted); }
.auth-card input, .auth-card select {
    width: 100%; padding: 11px 14px; border-radius: 8px; border: 1px solid var(--border-strong);
    background: rgba(255,255,255,0.04); color: var(--text); font-size: 15px;
}
.auth-card input:focus, .auth-card select:focus { outline: none; border-color: var(--gold); }
.auth-card .btn { width: 100%; margin-top: 22px; }
.auth-links { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.auth-links a { color: var(--gold); font-weight: 700; }
.alert-error {
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.35); color: #ff9ca3;
    padding: 10px 14px; border-radius: 8px; margin-bottom: 10px; font-size: 13px;
}
.setup-icon { text-align: center; font-size: 30px; color: var(--gold); margin-bottom: 6px; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- App shell ---------- */
.app-shell { display: flex; height: 100vh; overflow: hidden; background: var(--bg); }

.sidebar { width: 210px; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-brand {
    padding: 16px 14px 14px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.sidebar-brand .badge-logo {
    width: 38px; height: 38px; border-radius: 50%; background: var(--gold);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #000; font-weight: 900;
}
.sidebar-brand .brand-text { text-align: right; }
.sidebar-brand .brand-text .name { color: var(--gold); font-weight: 900; font-size: 15px; letter-spacing: -0.3px; }
.sidebar-brand .brand-text .sub { color: rgba(255,255,255,0.35); font-size: 11px; margin-top: 1px; }

.sidebar nav { flex: 1; overflow-y: auto; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
    display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 8px;
    color: rgba(255,255,255,0.65); font-size: 13.5px; font-weight: 600; transition: background 0.12s ease, color 0.12s ease;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.04); color: #fff; }
.sidebar nav a.active { background: var(--gold-soft); color: var(--gold); font-weight: 800; }
.sidebar-logout {
    margin: 10px 8px; padding: 9px 12px; border-top: 1px solid var(--border); padding-top: 14px;
    color: rgba(255,255,255,0.35); font-size: 13px; display: block;
}

.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.topbar {
    height: 56px; background: var(--panel); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; padding: 0 22px; flex-shrink: 0;
}
.topbar .brand { display: flex; align-items: center; gap: 8px; color: var(--gold); font-weight: 900; font-size: 16px; }
.topbar .user { display: flex; align-items: center; gap: 10px; }
.topbar .user .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); display: flex; align-items: center; justify-content: center; color: #000; font-weight: 800; }

.content { flex: 1; overflow-y: auto; padding: 22px; animation: fadeIn 0.25s ease; }
.content h1 { margin-bottom: 18px; font-size: 20px; font-weight: 800; }

/* ---------- Stats / Cards ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 12px;
    padding: 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.stat-card:hover { border-color: rgba(245,196,0,0.35); transform: translateY(-2px); }
.stat-card.wide { grid-column: 1 / -1; }
.stat-card .stat-label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.stat-num { color: #fff; font-size: 28px; font-weight: 900; line-height: 1.1; }
.stat-card .stat-icon {
    width: 42px; height: 42px; background: var(--gold-soft); border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gold); font-size: 18px;
}

/* ---------- Tables ---------- */
.data-table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 13px 16px; text-align: right; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 14px; }
.data-table tbody tr { transition: background 0.12s ease; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.data-table th { color: var(--gold); font-weight: 700; font-size: 12px; background: rgba(255,255,255,0.03); }
.data-table tr:last-child td { border-bottom: none; }
.data-table .empty { text-align: center; color: var(--muted); padding: 34px; }

.badge { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); }
.badge-active { background: rgba(34,197,94,0.15); color: var(--green); border: 1px solid rgba(34,197,94,0.3); }
.badge-pending { background: rgba(245,196,0,0.12); color: var(--gold); border: 1px solid rgba(245,196,0,0.3); }
.badge-suspended { background: rgba(239,68,68,0.12); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.product-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px; transition: border-color 0.15s ease, transform 0.15s ease; }
.product-card:hover { border-color: rgba(245,196,0,0.3); transform: translateY(-2px); }
.product-card h3 { margin-bottom: 8px; font-size: 15px; }
.product-card p { color: var(--muted); font-size: 13px; margin-bottom: 10px; line-height: 1.5; }
.product-card .price { color: var(--gold); font-weight: 900; font-size: 15px; }

/* ---------- Search / filter bar ---------- */
.filter-bar {
    display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px 16px; margin-bottom: 16px;
}
.filter-bar input, .filter-bar select { background: transparent; border: none; color: #fff; font-size: 14px; outline: none; }
.filter-bar input { flex: 1; }

/* ---------- Forms / misc ---------- */
.inline-form { display: flex; gap: 10px; margin: 16px 0; flex-wrap: wrap; }
.inline-form input, .inline-form select {
    padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border-strong);
    background: rgba(255,255,255,0.04); color: var(--text);
}

.activity-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.activity-item { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 13px 16px; }
.activity-item strong { color: var(--gold); font-size: 13px; }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--muted); font-size: 14px; }

.pill-list { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; }
.pill-list li { border: 1px solid var(--border); border-right: 3px solid var(--gold); padding: 7px 16px; border-radius: 20px; background: var(--card); font-size: 13px; }

.page-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.page-actions .actions-left { display: flex; gap: 10px; }
