/* ===== تصميم لوحة التحكم — عربي RTL داكن ===== */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Arial, sans-serif; }
body { background: #0f1222; color: #e8eaf6; min-height: 100vh; direction: rtl; }

/* ---- صفحة الدخول ---- */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: radial-gradient(circle at 30% 20%, #1b2350 0%, #0f1222 60%); }
.login-card { background: #171b33; border: 1px solid #2a3160; border-radius: 16px; padding: 40px;
  width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.login-card h1 { font-size: 22px; margin-bottom: 6px; color: #fff; }
.login-card p.sub { color: #8b93c9; font-size: 13px; margin-bottom: 24px; }

label { display: block; font-size: 13px; color: #aab1e0; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=url] {
  width: 100%; padding: 12px 14px; background: #0f1222; border: 1px solid #2a3160;
  border-radius: 10px; color: #fff; font-size: 14px; outline: none; transition: .2s; }
input:focus { border-color: #5b6cff; box-shadow: 0 0 0 3px rgba(91,108,255,.15); }

.btn { display: inline-block; width: 100%; padding: 12px; margin-top: 20px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #5b6cff, #8b5cf6); color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: .2s; text-decoration: none; text-align: center; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(91,108,255,.35); }
.btn-sm { width: auto; padding: 8px 16px; margin: 0; font-size: 13px; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); }
.btn-ghost { background: transparent; border: 1px solid #2a3160; color: #aab1e0; }

.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-error   { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.12);  border: 1px solid rgba(34,197,94,.4);  color: #86efac; }

/* ---- هيكل اللوحة ---- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 240px; background: #141830; border-left: 1px solid #242b52; padding: 24px 16px;
  position: sticky; top: 0; height: 100vh; }
.sidebar .logo { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 28px; padding: 0 8px; }
.sidebar .logo span { color: #5b6cff; }
.sidebar a.nav { display: block; padding: 11px 14px; border-radius: 10px; color: #9aa3d8;
  text-decoration: none; font-size: 14px; margin-bottom: 4px; transition: .15s; }
.sidebar a.nav:hover, .sidebar a.nav.active { background: #1d2450; color: #fff; }
.sidebar .logout { position: absolute; bottom: 24px; width: calc(100% - 32px); color: #f87171 !important; }

.main { flex: 1; padding: 32px; }
.main h2 { font-size: 22px; margin-bottom: 4px; color: #fff; }
.main .desc { color: #8b93c9; font-size: 13px; margin-bottom: 24px; }

.card { background: #171b33; border: 1px solid #2a3160; border-radius: 14px; padding: 24px; margin-bottom: 24px; }

/* ---- جداول ---- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: right; color: #8b93c9; font-weight: 600; padding: 12px 10px; border-bottom: 1px solid #2a3160; }
td { padding: 14px 10px; border-bottom: 1px solid #222952; vertical-align: middle; }
tr:hover td { background: rgba(91,108,255,.05); }
.badge { background: #1d2450; color: #8ea0ff; padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.actions a, .actions button { margin-left: 6px; }

/* ---- نتيجة الرفع ---- */
.result-box { background: #10142a; border: 1px solid #2a3160; border-radius: 12px; padding: 20px; margin-top: 10px; }
.result-box .row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.result-box code { flex: 1; min-width: 200px; background: #0a0d1f; padding: 10px 14px; border-radius: 8px;
  direction: ltr; text-align: left; font-size: 13px; color: #a5b4fc; overflow-x: auto; white-space: nowrap; }
.copy-btn { padding: 9px 16px; border: none; border-radius: 8px; background: #2a3160; color: #fff;
  cursor: pointer; font-size: 13px; transition: .15s; }
.copy-btn:hover { background: #5b6cff; }

.file-icon { width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(135deg,#5b6cff33,#8b5cf633);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px; margin-left: 10px; }

.empty { text-align: center; padding: 50px; color: #5c649a; font-size: 15px; }

@media (max-width: 768px) {
  .sidebar { width: 70px; }
  .sidebar .logo, .sidebar a.nav span { display: none; }
  .main { padding: 16px; }
  table { font-size: 12px; }
}
