/* =========================================================
   WASM STORE — لوحة الأدمن — نفس ألوان اللوجو
   ========================================================= */

:root {
  --bg: #07142a;
  --bg-soft: #0c1f3d;
  --panel: #102a4c;
  --panel-border: #1c3b64;
  --cyan: #2fe6c9;
  --blue: #2f7ef0;
  --orange: #f7941e;
  --orange-2: #f4632e;
  --text: #eaf3ff;
  --text-dim: #9db3cf;
  --radius: 12px;
  --font: "Tajawal", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  direction: rtl;
}

a { color: inherit; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

input, select, textarea {
  font-family: inherit;
  background: var(--bg-soft);
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.9rem;
  width: 100%;
}

textarea { resize: vertical; min-height: 80px; }

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 5px;
  margin-top: 12px;
}

/* ---------- Login page ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-box {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 34px 30px;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-box img { width: 64px; margin: 0 auto 14px; }
.login-box h1 { font-size: 1.2rem; margin: 0 0 22px; }

.btn-primary {
  width: 100%;
  margin-top: 18px;
  padding: 11px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  color: #05121f;
  font-weight: 800;
  font-size: 0.95rem;
}

.error-msg { color: var(--orange-2); font-size: 0.85rem; margin-top: 12px; min-height: 18px; }

/* ---------- Dashboard layout ---------- */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--panel-border);
  background: var(--bg-soft);
}

.admin-header .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.admin-header .brand img { width: 32px; height: 32px; }

.btn-logout {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 16px 22px 0;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}

.tab-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }

.tab-content { padding: 20px 22px 60px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel-columns {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .panel-columns { grid-template-columns: 1fr; }
}

.card-box {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 18px;
}

.card-box h3 { margin-top: 0; font-size: 1rem; }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--panel-border);
}

.list-row:last-child { border-bottom: none; }

.list-row .info { display: flex; align-items: center; gap: 10px; }
.list-row img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--bg-soft); }
.list-row .name { font-weight: 700; font-size: 0.9rem; }
.list-row .meta { color: var(--text-dim); font-size: 0.78rem; }

.icon-btn {
  background: var(--bg-soft);
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
}

.icon-btn.danger { color: var(--orange-2); }
.icon-btn.edit { color: var(--cyan); }

.form-actions { display: flex; gap: 10px; margin-top: 16px; }

.btn-save {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  color: #05121f;
  font-weight: 800;
}

.btn-cancel {
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
}

.thumb-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.thumb-preview .thumb-item {
  position: relative;
  width: 60px;
  height: 60px;
}

.thumb-preview img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
}

.thumb-preview .remove-thumb {
  position: absolute;
  top: -6px;
  left: -6px;
  background: var(--orange-2);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  line-height: 1;
}

.breadcrumb-btn {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 0.85rem;
  margin-bottom: 12px;
  padding: 0;
}

.hint { color: var(--text-dim); font-size: 0.78rem; margin-top: 4px; }

.empty-note { color: var(--text-dim); text-align: center; padding: 20px; font-size: 0.85rem; }

.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; }
