:root {
  --bg: #FAF8F3;
  --ink: #17263B;
  --ink-soft: #4B5A6E;
  --gold: #B8863B;
  --gold-deep: #8F6425;
  --teal: #2C6E62;
  --line: #E3DCC9;
  --card: #FFFFFF;
  --danger: #A5432F;
  --success: #2C6E62;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  line-height: 1.7;
}
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--gold-deep));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 17px; font-family: Arial, sans-serif;
}
.logo-text { font-weight: 700; font-size: 19px; }
.logo-text small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-soft); }
nav.actions { display: flex; gap: 10px; align-items: center; }

.btn {
  padding: 10px 20px; border-radius: 8px; font-size: 14.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; display: inline-block;
  font-family: inherit;
}
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-gold { background: var(--gold-deep); color: #1A1102; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

main { padding: 40px 0 70px; min-height: 60vh; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px;
}

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14.5px; }
.alert-error { background: #FBEAE6; color: var(--danger); border: 1px solid #E9C2B6; }
.alert-success { background: #E7F1EE; color: var(--success); border: 1px solid #BFDCD3; }

form.stack { display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
form.stack.wide { max-width: 680px; }
label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=file],
select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 14.5px; background: var(--card); color: var(--ink);
}
textarea { min-height: 120px; resize: vertical; }

.section-head { margin-bottom: 26px; }
.section-head h1, .section-head h2 { font-size: 24px; margin: 0 0 6px; font-weight: 700; }
.section-head p { color: var(--ink-soft); margin: 0; font-size: 15px; }

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 40px; }
@media (max-width: 760px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
.cat { border: 1px solid var(--line); border-radius: 10px; padding: 18px 14px; background: var(--card); text-decoration: none; display: block; }
.cat .ic { font-size: 22px; margin-bottom: 8px; display: block; }
.cat h3 { font-size: 14.5px; margin: 0; font-weight: 600; color: var(--ink); }

.listing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .listing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .listing-grid { grid-template-columns: 1fr; } }
.listing-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); text-decoration: none; display: block; }
.listing-thumb { width: 100%; aspect-ratio: 4/3; background: var(--line); display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--ink-soft); }
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-body { padding: 14px 16px; }
.listing-body h3 { margin: 0 0 6px; font-size: 15.5px; }
.badge { display: inline-block; font-size: 11.5px; padding: 3px 9px; border-radius: 20px; font-weight: 600; }
.badge-plan { background: var(--gold-deep); color: #1A1102; }
.badge-status { background: var(--line); color: var(--ink-soft); }
.price { color: var(--teal); font-weight: 700; font-size: 15px; margin-top: 6px; }

table.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.admin-table th, table.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; }
table.admin-table th { color: var(--ink-soft); font-weight: 600; font-size: 13px; }

.stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.stat-box { border: 1px solid var(--line); border-radius: 10px; padding: 16px 22px; background: var(--card); }
.stat-box b { display: block; font-size: 24px; }
.stat-box span { font-size: 13px; color: var(--ink-soft); }

.tabs { display: flex; gap: 8px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 4px; text-decoration: none; color: var(--ink-soft); font-size: 14.5px; font-weight: 600; border-bottom: 2px solid transparent; margin-inline-end: 18px; }
.tabs a.active { color: var(--ink); border-color: var(--gold-deep); }

footer.site { border-top: 1px solid var(--line); padding: 30px 0; font-size: 13px; color: var(--ink-soft); text-align: center; }
