@font-face { font-family: 'Noto Naskh'; src: url(/fonts/naskh-arabic-400.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: 'Noto Naskh'; src: url(/fonts/naskh-arabic-700.woff2) format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: 'Noto Naskh'; src: url(/fonts/naskh-latin-400.woff2) format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'Noto Naskh'; src: url(/fonts/naskh-latin-700.woff2) format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }

:root { --blue: #2F80E4; --blue-600: #1B5FB8; --blue-900: #0A2550; --gold: #F5C400; --gold-50: #FFF8DB; --ink: #16202E; --muted: #64748B; --line: #E3E8EF; --bg: #F4F7FB; --red: #D93636; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-family: 'Noto Naskh', Tahoma, Arial, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.7; font-size: 18px; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.2rem; margin: 24px 0 12px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--blue-900); color: #fff; }
.top .brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.1rem; }
.top .brand img { background: #fff; border-radius: 10px; padding: 3px; }
.who { margin-inline-start: auto; font-size: .85rem; opacity: .75; direction: ltr; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shell { display: grid; grid-template-columns: 1fr; max-width: 1200px; margin: 0 auto; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.tabs button { flex: none; font: inherit; font-weight: 700; border: 0; background: none; padding: 10px 14px; border-radius: 10px; cursor: pointer; color: var(--muted); }
.tabs button.active { background: #EAF3FE; color: var(--blue-600); }
@media (min-width: 900px) {
  .shell { grid-template-columns: 230px 1fr; gap: 24px; padding: 24px 16px; }
  .tabs { flex-direction: column; background: none; border: 0; padding: 0; position: sticky; top: 80px; align-self: start; }
  .tabs button { text-align: start; }
}
.view { padding: 20px 16px 80px; min-width: 0; }
@media (min-width: 900px) { .view { padding: 0 0 80px; } }
.view-head { margin-bottom: 18px; }
.view-head.row, .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.notice { background: var(--gold-50); border-color: #F3DE85; }
.notice.error { background: #FDECEC; border-color: #F5B5B5; }
.empty { text-align: center; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; border-radius: 10px; padding: 10px 18px; min-height: 44px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline { background: #fff; color: var(--blue-600); border-color: var(--blue); }
.btn-danger { background: #fff; color: var(--red); border-color: #F5B5B5; }
.btn:disabled { opacity: .6; cursor: progress; }
.link-btn { background: none; border: 0; color: var(--blue-600); font: inherit; font-weight: 700; cursor: pointer; padding: 0; margin-bottom: 4px; }

details.group { padding: 0; }
details.group > summary { cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; }
details.group > summary::after { content: '+'; color: var(--blue); font-size: 1.4rem; line-height: 1; }
details.group[open] > summary::after { content: '−'; }
details.group > summary::-webkit-details-marker { display: none; }
details.group > form { padding: 0 18px 18px; border-top: 1px solid var(--line); padding-top: 16px; }

.field { display: block; margin-bottom: 18px; }
.label { display: block; font-weight: 700; margin-bottom: 4px; }
.hint { display: block; color: var(--muted); margin-bottom: 6px; font-size: .85rem; }
.bilingual { display: grid; gap: 10px; }
@media (min-width: 720px) { .bilingual { grid-template-columns: 1fr 1fr; } }
.bilingual > label { display: block; }
.lang-tag { display: inline-block; font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
input:not([type=checkbox]):not([type=file]), textarea, select { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1.5px solid #D5DDE8; border-radius: 10px; background: #FBFCFE; color: var(--ink); }
input:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 128, 228, .15); background: #fff; }
textarea { resize: vertical; }
.form-actions { display: flex; gap: 10px; position: sticky; bottom: 0; background: linear-gradient(transparent, #fff 30%); padding-top: 14px; }

.switch-row { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 18px; font-weight: 700; }
.switch-row input { position: absolute; opacity: 0; }
.switch { width: 46px; height: 26px; border-radius: 99px; background: #CBD5E1; position: relative; flex: none; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch-row input:checked + .switch { background: #22A55B; }
.switch-row input:checked + .switch::after { transform: translateX(-20px); }
.switch-row input:focus-visible + .switch { outline: 3px solid var(--gold); }

.img-field .row { justify-content: flex-start; margin-top: 8px; }
.img-preview { width: 220px; max-width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; border: 1.5px dashed #C3CFDF; display: grid; place-items: center; overflow: hidden; background: #FBFCFE; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview.loading { opacity: .5; }
.img-field label.btn { position: relative; }

.list-item { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.thumb { width: 72px; height: 54px; border-radius: 8px; object-fit: cover; flex: none; }
.thumb.ph { background: #EAF3FE; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 200px; }
.album-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.album-card { display: flex; flex-direction: column; gap: 6px; text-align: start; font: inherit; cursor: pointer; }
.album-card img, .album-card .ph { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 10px; }
.photo-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photo-item { position: relative; }
.photo-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.photo-item > .btn { position: absolute; bottom: 8px; inset-inline-start: 8px; }
.photo-num { position: absolute; top: 6px; inset-inline-start: 6px; background: var(--blue-900); color: #fff; border-radius: 99px; min-width: 24px; height: 24px; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.photo-tools { display: flex; gap: 4px; justify-content: center; margin-top: 6px; }
.photo-tools .btn { padding: 4px 10px; min-height: 32px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 2rem; color: var(--blue-600); }
.stat.warn strong { color: #C77700; }
.table-wrap { overflow-x: auto; padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
.table th { background: #F8FAFC; }

.top form { margin: 0; }
@media (max-width: 560px) {
  .top { flex-wrap: wrap; gap: 8px; }
  .top .brand strong { white-space: nowrap; font-size: 1rem; }
  .who { display: none; }
  .top .btn-sm { padding: 6px 10px; }
  .top a.btn-sm { margin-inline-start: auto; }
}
.btn-whatsapp { background: #25D366; color: #fff; }
.link-box { display: grid; gap: 10px; }
.link-box p { margin: 0; }
.list-item .grow small { display: block; }
.small { font-size: .9rem; }
.btn-block { width: 100%; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, #1B5FB8, #0A2550); }
.auth-card { width: 100%; max-width: 400px; padding: 28px; text-align: start; }
.auth-card h1 { text-align: center; margin-bottom: 18px; }
.auth-logo { display: block; margin: 0 auto 10px; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: .75rem; margin-inline-start: 4px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip-btn { font: inherit; font-weight: 700; border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.chip-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.review-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.review-body { white-space: pre-wrap; margin: 10px 0 14px; }
.stars { color: #F5B400; letter-spacing: 2px; }
.stars-off { color: #D5DDE8; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 120px); background: #14532D; color: #fff; padding: 12px 22px; border-radius: 12px; font-weight: 700; transition: transform .2s; z-index: 100; max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }
.toast.error { background: var(--red); }
