* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  direction: rtl;
  background: #f4f6f8;
  margin: 0;
  color: #1a1a1a;
}
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-box {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 380px;
}
.login-box h1 {
  text-align: center;
  color: #0f766e;
  margin-bottom: 5px;
}
.login-box .subtitle {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-bottom: 25px;
}
input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
}
button {
  width: 100%;
  padding: 12px;
  background: #0f766e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}
button:hover { background: #0d5f58; }
.error-msg {
  color: #dc2626;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
  display: none;
}

/* Admin Layout */
.admin-wrapper { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px;
  background: #0f172a;
  color: white;
  padding: 20px 0;
  flex-shrink: 0;
}
.sidebar h2 { padding: 0 20px; color: #5eead4; margin-bottom: 30px; }
.sidebar a {
  display: block;
  padding: 12px 20px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
}
.sidebar a:hover, .sidebar a.active { background: #1e293b; color: white; }
.main-content { flex: 1; padding: 30px; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.logout-btn {
  background: none;
  border: 1px solid #ccc;
  color: #555;
  width: auto;
  padding: 8px 16px;
  border-radius: 6px;
}

/* --- i18n: عرض الترجمة الإنجليزية --- */
.en-line { color: #888; font-size: 13px; text-align: left; margin: 2px 0; }
.en-missing { color: #b45309; font-size: 12px; margin: 2px 0; }
.lang-label { display: block; font-size: 13px; color: #555; margin: 10px 0 4px; font-weight: bold; }

/* --- الاستشارات --- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; color: white; }
.muted { color: #888; font-size: 13px; }
.desc { white-space: pre-wrap; background: #f8fafc; padding: 10px; border-radius: 8px; }
.controls { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.controls label { font-size: 13px; color: #555; }
.controls select { padding: 6px; border-radius: 8px; border: 1px solid #ddd; font-family: inherit; }

/* --- إدارة المحتوى (مشترك) --- */
.card { background: white; padding: 20px; border-radius: 10px; margin-bottom: 20px; }
.card input, .card textarea, .card select { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ddd; border-radius: 8px; font-family: inherit; box-sizing: border-box; }
.card input[type=checkbox] { width: auto; margin: 0 0 0 6px; }
.item { padding: 12px; border: 1px solid #eee; border-radius: 8px; margin-bottom: 10px; }
.item.inactive { opacity: .6; background: #fafafa; }
.item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions button, .small-btn { width: auto; padding: 5px 10px; font-size: 13px; margin: 0; }
.btn-light { background: #e2e8f0; color: #1e293b; }
.btn-danger { background: #dc2626; }
button:disabled { opacity: .35; cursor: default; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #fef3c7; color: #92400e; margin-inline-start: 6px; }
.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-red { background: #fee2e2; color: #991b1b; }
.form-actions { display: flex; gap: 8px; }
.hidden { display: none !important; }
.thumb { max-width: 160px; max-height: 110px; border-radius: 6px; border: 1px solid #eee; display: block; margin: 6px 0; }
