/* ==========================================================================
   بحرنا — أوراق الصفحات الداخلية (v4.2)
   تنقل الصفحات القديمة إلى هوية الموقع الجديد بلا مساس بمنطقها أو معرّفاتها:
   الأسماء الصنفية كما هي (يعتمد عليها الجافاسكربت) والمظهر وحده يُعاد بناؤه
   على رموز style.css نفسها — نفس البحر، نفس الذهب، نفس الخطوط المحلية.
   ========================================================================== */

/* ------------------------------------------------------------- هيكل الصفحة */
.page-hero {
  position: relative;
  padding: clamp(5.5rem, 12vw, 8rem) 0 clamp(2.5rem, 6vw, 4rem);
  background:
    radial-gradient(120% 90% at 70% 0%, rgba(0, 167, 181, 0.20) 0%, transparent 60%),
    linear-gradient(170deg, var(--deep) 0%, var(--ink) 100%);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.page-hero__wrap { max-width: 780px; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.25; color: var(--inktext); margin: 0.6rem 0 0.9rem;
}
.page-hero h1 span { color: var(--gold); }
.page-hero p { color: var(--text-dim); max-width: 56ch; margin-inline: auto; }
.eyebrow {
  display: inline-block; font-weight: 700; font-size: 0.86rem; color: var(--gold);
  border: 1px solid var(--line-gold); border-radius: 999px; padding: 0.3rem 1rem;
  background: rgba(216, 181, 109, 0.07);
}
.benefits-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.4rem;
  margin-top: 1.6rem;
}
.benefit-item { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text); font-size: 0.92rem; }
.benefit-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex: none; }

.form-wrap {
  max-width: 860px; margin-inline: auto;
  padding: clamp(1.6rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem) clamp(3rem, 8vw, 5rem);
}

/* ------------------------------------------------------------- شريط الخطوات */
.steps-bar { display: flex; align-items: center; justify-content: center; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.step-item { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; flex: none; }
.step-bubble {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-num); font-weight: 700;
  color: var(--text-dim); background: var(--surface);
  border: 1px solid var(--line); transition: all 0.35s var(--ease-out);
}
.step-bubble.active { color: var(--on-gold); background: var(--gold); border-color: var(--gold); box-shadow: var(--shadow-gold); }
.step-label { font-size: 0.78rem; color: var(--text-dim); white-space: nowrap; }
.step-label.active { color: var(--gold); font-weight: 700; }
.step-line { flex: 1 1 auto; height: 1px; background: var(--line); margin: 0 0.5rem; margin-bottom: 1.4rem; min-width: 18px; }
.step-num { font-family: var(--font-num); }

/* ------------------------------------------------------------- بطاقات النموذج */
.form-card {
  background: linear-gradient(165deg, var(--surface) 0%, var(--deep) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 3.5vw, 2rem);
  margin-bottom: clamp(1rem, 2.5vw, 1.6rem);
}
.card-header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.3rem; }
.card-header h2, .card-header h3 { font-family: var(--font-display); font-size: 1.15rem; color: var(--inktext); margin: 0; }
.card-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm); flex: none;
  display: grid; place-items: center;
  background: rgba(0, 167, 181, 0.14); color: var(--cyan); border: 1px solid var(--line);
}
.card-icon svg { width: 20px; height: 20px; }

.fields-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem 1.2rem; }
.field-group { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field-label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.field-label .req { color: var(--coral); margin-inline-start: 0.15rem; }
.en-hint { color: var(--text-dim); font-weight: 400; font-size: 0.82rem; }
.field-hint { font-size: 0.78rem; color: var(--text-dim); }

.field-input, .field-select, .field-textarea {
  width: 100%; font: inherit; color: var(--text);
  background: rgba(3, 25, 35, 0.55);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.72rem 0.9rem; transition: border-color 0.25s, box-shadow 0.25s;
}
.field-textarea { min-height: 110px; resize: vertical; }
.field-input::placeholder, .field-textarea::placeholder { color: rgba(157, 185, 200, 0.6); }
.field-input:focus, .field-select:focus, .field-textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 167, 181, 0.18);
}
.field-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%); background-position: left 1.1rem center, left 0.85rem center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.phone-wrap { display: flex; align-items: stretch; gap: 0; direction: ltr; }
.phone-wrap .field-input { border-start-end-radius: 0; border-end-end-radius: 0; text-align: left; }
.phone-prefix {
  display: grid; place-items: center; padding: 0 0.85rem;
  font-family: var(--font-num); color: var(--text-dim);
  background: var(--surface-2); border: 1px solid var(--line); border-inline-start: none;
  border-start-start-radius: var(--radius-sm); border-end-start-radius: var(--radius-sm);
}
.field-error, .type-error { display: none; font-size: 0.8rem; color: var(--coral); }
.field-error.show, .type-error.show { display: block; }

/* ------------------------------------------------------------- أنواع الخدمة */
.service-types-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 0.8rem; }
.service-type-card {
  position: relative; cursor: pointer;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem; border-radius: var(--radius-sm);
  background: rgba(3, 25, 35, 0.45); border: 1px solid var(--line);
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease-out);
}
.service-type-card:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.service-type-card.active { border-color: var(--gold); background: rgba(216, 181, 109, 0.10); }
.service-type-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--cyan); flex: none; }
.service-type-icon svg { width: 22px; height: 22px; }
.service-type-body { display: flex; flex-direction: column; min-width: 0; }
.service-type-ar { font-weight: 700; color: var(--inktext); font-size: 0.95rem; }
.service-type-en { font-size: 0.75rem; color: var(--text-dim); }
.service-type-check {
  position: absolute; inset-inline-end: 0.6rem; inset-block-start: 0.6rem;
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 0.7rem; color: transparent;
}
.service-type-card.active .service-type-check { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

/* ------------------------------------------------------------- رفع الصورة */
.upload-zone {
  position: relative; text-align: center; cursor: pointer;
  padding: clamp(1.2rem, 4vw, 2rem);
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  background: rgba(3, 25, 35, 0.4); transition: border-color 0.25s, background 0.25s;
}
.upload-zone:hover { border-color: var(--teal); background: rgba(0, 167, 181, 0.06); }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-icon { color: var(--cyan); margin-bottom: 0.5rem; }
.upload-icon svg { width: 30px; height: 30px; }
.upload-text { color: var(--text); font-weight: 600; }
.upload-hint { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.25rem; }
.upload-preview { display: none; }
.upload-preview.show { display: block; }
.upload-preview img { max-width: 100%; max-height: 260px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.remove-photo { display: inline-block; margin-top: 0.6rem; font-size: 0.82rem; color: var(--coral); cursor: pointer; }

/* ------------------------------------------------------------- الإرسال */
.form-error-banner {
  display: none; margin-bottom: 1rem; padding: 0.85rem 1rem;
  border-radius: var(--radius-sm); border: 1px solid rgba(255, 107, 74, 0.4);
  background: rgba(255, 107, 74, 0.10); color: #ffb9a6; font-size: 0.9rem;
}
.form-error-banner.show { display: block; }
.submit-wrap { text-align: center; }
.btn-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  font: inherit; font-weight: 800; cursor: pointer;
  color: var(--on-gold); background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  border: none; border-radius: 999px; padding: 0.95rem 2.4rem;
  box-shadow: var(--shadow-gold); transition: transform 0.25s var(--ease-out), filter 0.25s;
}
.btn-submit:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.05); }
.btn-submit:disabled { opacity: 0.65; cursor: not-allowed; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%; display: none;
  border: 2px solid rgba(36, 26, 6, 0.35); border-top-color: var(--on-gold);
  animation: pg-spin 0.8s linear infinite;
}
.spinner.show { display: inline-block; }
@keyframes pg-spin { to { transform: rotate(360deg); } }
.submit-note { margin-top: 0.9rem; font-size: 0.82rem; color: var(--text-dim); }

/* ------------------------------------------------------------- شاشة النجاح */
.success-screen { display: none; text-align: center; padding: clamp(1.5rem, 5vw, 3rem) 0; }
.success-screen.show { display: block; }
.success-icon { width: 74px; height: 74px; margin: 0 auto 1.2rem; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 167, 181, 0.15); border: 1px solid var(--line); color: var(--cyan); }
.success-icon svg { width: 38px; height: 38px; }
.success-screen h2 { font-family: var(--font-display); color: var(--inktext); margin-bottom: 0.6rem; }
.ref-box { display: inline-block; margin: 1.2rem auto; padding: 0.9rem 1.6rem; border-radius: var(--radius-sm); background: rgba(3, 25, 35, 0.6); border: 1px solid var(--line-gold); }
.ref-label { display: block; font-size: 0.8rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.ref-code { font-family: var(--font-num); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.08em; color: var(--gold); }
.success-steps { display: grid; gap: 0.7rem; max-width: 460px; margin: 1.4rem auto 2rem; text-align: start; }
.success-step { display: flex; gap: 0.6rem; color: var(--text); font-size: 0.92rem; }
.btn-home {
  display: inline-block; font-weight: 700; text-decoration: none;
  color: var(--inktext); border: 1px solid var(--line-gold); border-radius: 999px;
  padding: 0.75rem 1.9rem; transition: background 0.25s, color 0.25s;
}
.btn-home:hover { background: var(--gold); color: var(--on-gold); }

@media (max-width: 620px) {
  .steps-bar { overflow-x: auto; justify-content: flex-start; padding-bottom: 0.4rem; }
  .step-label { font-size: 0.7rem; }
}

/* --------------------------------------------------- الصفحات الداخلية: القائمة
   الرئيسية تُصلّب قائمتها بالجافاسكربت عند التمرير (main.js)، والصفحات الداخلية
   لا تحمّل ذلك المحرك ⇒ كانت القائمة شفافة والمحتوى يمرّ تحتها فيتداخل النص. */
.page .nav { background: rgba(3, 25, 35, 0.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
/* مربّع الاختيار الأصلي يُخفى — البطاقة نفسها هي عنصر الاختيار (وتبقى قابلة للتبويب) */
.service-type-card input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.service-type-card:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 181, 109, 0.18); }
.service-type-icon .ic { width: 22px; height: 22px; }
.card-icon .ic { width: 20px; height: 20px; }

/* حالة الاختيار: الصفحة القديمة كانت تعتمد CSS خالصاً (لا جافاسكربت يضيف صنفاً)،
   فالحالة تُقرأ من :checked مباشرةً — والعلامة مرسومة بالحدود لا بمحرف قد يغيب من الخط. */
.service-type-card:has(input:checked) { border-color: var(--gold); background: rgba(216, 181, 109, 0.10); }
.service-type-card:has(input:checked) .service-type-check { background: var(--gold); border-color: var(--gold); }
.service-type-check::after {
  content: ""; width: 5px; height: 9px; margin-top: -2px;
  border: solid var(--on-gold); border-width: 0 2px 2px 0;
  transform: rotate(45deg); opacity: 0;
}
.service-type-card:has(input:checked) .service-type-check::after { opacity: 1; }

/* ==================================================== صفحة المزوّدين (v4.2) */
.filters-wrap {
  max-width: var(--container); margin-inline: auto;
  padding: clamp(1.4rem, 4vw, 2.2rem) clamp(1rem, 4vw, 2rem) 0;
  display: grid; gap: 0.8rem;
}
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.filter-label { font-size: 0.86rem; font-weight: 700; color: var(--text-dim); margin-inline-end: 0.3rem; }
.chip {
  font: inherit; font-size: 0.88rem; cursor: pointer;
  color: var(--text); background: rgba(3, 25, 35, 0.5);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.42rem 1rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.chip:hover { border-color: var(--line-gold); }
.chip.active { color: var(--on-gold); background: var(--gold); border-color: var(--gold); font-weight: 700; }
.chip .ic { width: 1.05em; height: 1.05em; }

.map-section {
  max-width: var(--container); margin: clamp(1.4rem, 4vw, 2.2rem) auto 0;
  padding-inline: clamp(1rem, 4vw, 2rem);
}
.map-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.map-header-title { font-family: var(--font-display); font-size: 1.1rem; color: var(--inktext); }
.map-header-badge {
  font-size: 0.8rem; color: var(--gold); border: 1px solid var(--line-gold);
  border-radius: 999px; padding: 0.25rem 0.85rem; background: rgba(216, 181, 109, 0.07);
}
#baharna-map {
  height: clamp(260px, 42vh, 420px); border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden; background: var(--surface);
  display: grid; place-items: center;
}
.map-loading, .loading-state, .empty-state {
  display: grid; place-items: center; gap: 0.7rem;
  color: var(--text-dim); text-align: center; padding: 2rem 1rem;
}
.loading-spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--teal);
  animation: pg-spin 0.9s linear infinite;
}
.empty-state h3 { font-family: var(--font-display); color: var(--inktext); }
.empty-icon { color: var(--cyan); }
.empty-icon .ic { width: 40px; height: 40px; }

.providers-wrap { max-width: var(--container); margin-inline: auto; padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1rem, 4vw, 2rem) clamp(3rem, 8vw, 5rem); }
.providers-meta { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1rem; }
.providers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: clamp(0.9rem, 2.5vw, 1.4rem); }

.cta-banner {
  margin-top: clamp(2rem, 5vw, 3rem); text-align: center;
  padding: clamp(1.6rem, 4vw, 2.6rem);
  border-radius: var(--radius); border: 1px solid var(--line-gold);
  background: linear-gradient(150deg, rgba(216, 181, 109, 0.10) 0%, var(--surface) 70%);
}
.cta-banner h3 { font-family: var(--font-display); font-size: clamp(1.2rem, 3vw, 1.6rem); color: var(--inktext); margin-bottom: 0.5rem; }
.cta-banner p { color: var(--text-dim); max-width: 52ch; margin: 0 auto 1.3rem; }
.btn-gold {
  display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
  font-weight: 800; color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  border-radius: 999px; padding: 0.85rem 2rem; box-shadow: var(--shadow-gold);
  transition: transform 0.25s var(--ease-out), filter 0.25s;
}
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* شريط المدن — بديل محلي لخريطة خارجية (هوية + صفر اتصال) */
.coast-strip { max-width: var(--container); margin: clamp(1.4rem,4vw,2.2rem) auto 0; padding-inline: clamp(1rem,4vw,2rem); }
.coast-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,180px),1fr)); gap: 0.8rem; }
.coast-city {
  display: grid; gap: 0.25rem; text-decoration: none; padding: 1rem;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--surface) 0%, var(--deep) 100%);
  transition: border-color .25s, transform .25s var(--ease-out);
}
.coast-city:hover { border-color: var(--line-gold); transform: translateY(-2px); }
.coast-city__n { font-family: var(--font-display); font-size: 1.05rem; color: var(--inktext); }
.coast-city__r { font-size: 0.76rem; color: var(--text-dim); }
.coast-city__c { font-size: 0.85rem; color: var(--text); margin-top: 0.3rem; }
.coast-city__c b { font-family: var(--font-num); color: var(--gold); font-size: 1.05rem; }
.coast-note { margin-top: 0.9rem; font-size: 0.82rem; color: var(--text-dim); text-align: center; }

/* بطاقات المزوّدين (تُبنى بالجافاسكربت) */
.prov-card {
  display: flex; flex-direction: column; gap: 0.75rem;
  padding: clamp(1rem, 2.5vw, 1.4rem); border-radius: var(--radius);
  border: 1px solid var(--line); background: linear-gradient(165deg, var(--surface) 0%, var(--deep) 100%);
  box-shadow: var(--shadow); transition: border-color .25s, transform .25s var(--ease-out);
}
.prov-card:hover { border-color: var(--line-gold); transform: translateY(-3px); }
.prov-card__head { display: flex; align-items: center; gap: 0.7rem; }
.prov-avatar {
  width: 44px; height: 44px; flex: none; border-radius: var(--radius-sm);
  display: grid; place-items: center; color: var(--cyan);
  background: rgba(0, 167, 181, 0.14); border: 1px solid var(--line);
}
.prov-avatar svg, .prov-avatar .ic { width: 22px; height: 22px; }
.prov-card__info { min-width: 0; }
.prov-card__name { font-family: var(--font-display); font-size: 1rem; color: var(--inktext); line-height: 1.35; }
.prov-card__city { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--text-dim); margin-top: 0.2rem; }
.prov-card__city svg { width: 13px; height: 13px; }
.prov-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.prov-tag {
  font-size: 0.75rem; color: var(--text); padding: 0.2rem 0.6rem;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(3, 25, 35, 0.5);
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.prov-tag .ic { width: 0.95em; height: 0.95em; }
.prov-card__desc { font-size: 0.88rem; color: var(--text-dim); flex: 1 1 auto; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prov-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.prov-price strong { font-family: var(--font-num); color: var(--gold); }
.btn-contact {
  display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none;
  font-size: 0.85rem; font-weight: 700; color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  border-radius: 999px; padding: 0.45rem 1.1rem; white-space: nowrap;
}
.btn-contact svg { width: 15px; height: 15px; }
.chip__n { font-family: var(--font-num); font-size: 0.78rem; opacity: 0.75; }

/* ===================================================== بوابة المزوّدين (v4.2) */
.portal-cta { margin-top: 1.6rem; }
.portal-benefits, .portal-steps { max-width: var(--container); margin-inline: auto; padding: clamp(2rem,5vw,3.4rem) clamp(1rem,4vw,2rem) 0; }
.benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,220px),1fr)); gap: clamp(0.9rem,2.5vw,1.4rem); }
.benefit-card {
  padding: clamp(1.1rem,3vw,1.6rem); border-radius: var(--radius);
  border: 1px solid var(--line); background: linear-gradient(165deg, var(--surface) 0%, var(--deep) 100%);
  box-shadow: var(--shadow); text-align: center;
}
.benefit-icon { width: 46px; height: 46px; margin: 0 auto 0.8rem; border-radius: var(--radius-sm); display: grid; place-items: center; color: var(--cyan); background: rgba(0,167,181,.14); border: 1px solid var(--line); }
.benefit-icon .ic { width: 22px; height: 22px; }
.benefit-card h3 { font-family: var(--font-display); font-size: 1.02rem; color: var(--inktext); margin-bottom: 0.4rem; }
.benefit-card p { font-size: 0.88rem; color: var(--text-dim); }
.portal-steps { text-align: center; padding-bottom: clamp(3rem,8vw,5rem); }
.portal-steps__list { list-style: none; display: grid; gap: 0.9rem; max-width: 620px; margin: 1.6rem auto 0; text-align: start; }
.portal-steps__list li { display: flex; gap: 0.9rem; align-items: flex-start; padding: 1rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: rgba(3,25,35,.45); }
.portal-steps__n { font-family: var(--font-num); font-weight: 800; color: var(--on-gold); background: var(--gold); width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.portal-steps__list h3 { font-family: var(--font-display); font-size: 1rem; color: var(--inktext); margin-bottom: 0.2rem; }
.portal-steps__list p { font-size: 0.88rem; color: var(--text-dim); }

/* ==========================================================================
   صفحات التطبيق (لوحة المزوّد · الإدارة) — هوية الموقع بلا قائمة تسويقية
   ========================================================================== */
/* خلفية صفحات التطبيق: الجذر يحمل اللون، والجسم شفاف كي يظهر مشهد الأعماق خلفه
   (كان الجسم معتماً فيغطّي الكانفاس — رصده أحمد: «وين الخلفية الـ3D»). */
html:has(body.app) { background: var(--ink); }
body.app { background: transparent; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background: radial-gradient(120% 80% at 70% 0%, rgba(0,167,181,.18) 0%, transparent 60%), linear-gradient(170deg, var(--deep) 0%, var(--ink) 100%); }
.login-card { width: min(100%, 420px); padding: clamp(1.4rem,4vw,2.2rem); border-radius: var(--radius);
  border: 1px solid var(--line); background: linear-gradient(165deg, var(--surface) 0%, var(--deep) 100%); box-shadow: var(--shadow); }
.login-logo { text-align: center; margin-bottom: 1.4rem; }
.login-logo .anchor, .login-logo .ic { color: var(--gold); }
.login-logo .ic { width: 34px; height: 34px; }
.login-logo h1 { font-family: var(--font-display); font-size: 1.25rem; color: var(--inktext); margin: 0.5rem 0 0.2rem; }
.login-logo p { font-size: 0.85rem; color: var(--text-dim); }
.login-btn, .toggle-btn, .logout-btn {
  font: inherit; font-weight: 700; cursor: pointer; border: none; border-radius: 999px;
  padding: 0.75rem 1.6rem; color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  transition: transform .25s var(--ease-out), filter .25s;
}
.login-btn { width: 100%; margin-top: 0.6rem; }
.login-btn:hover, .toggle-btn:hover, .logout-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.logout-btn { background: transparent; color: var(--text); border: 1px solid var(--line); }
.err-msg { display: none; margin-top: 0.8rem; font-size: 0.85rem; color: #ffb9a6; }
.err-msg.show { display: block; }
.back-link { margin-top: 1.1rem; text-align: center; font-size: 0.85rem; }
.back-link a { color: var(--cyan); text-decoration: none; }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem clamp(1rem,4vw,2rem); background: rgba(3,25,35,.94);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.topbar-brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); color: var(--inktext); }
.topbar-brand .ic { color: var(--gold); width: 22px; height: 22px; }
.topbar-actions { display: flex; align-items: center; gap: 0.6rem; }
.dashboard { display: none; }
.dashboard.show { display: block; }
.content { max-width: var(--container); margin-inline: auto; padding: clamp(1.2rem,3.5vw,2rem) clamp(1rem,4vw,2rem) 4rem; }

.provider-header { display: flex; align-items: center; gap: 1rem; padding: clamp(1rem,3vw,1.6rem);
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--surface) 0%, var(--deep) 100%); margin-bottom: 1.2rem; }
.provider-avatar { width: 54px; height: 54px; flex: none; border-radius: var(--radius-sm); display: grid; place-items: center;
  color: var(--cyan); background: rgba(0,167,181,.14); border: 1px solid var(--line); font-family: var(--font-display); }
.provider-info h2 { font-family: var(--font-display); font-size: 1.1rem; color: var(--inktext); }
.provider-badge, .verified-badge, .badge {
  display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.76rem; font-weight: 700;
  padding: 0.2rem 0.7rem; border-radius: 999px; border: 1px solid var(--line-gold);
  color: var(--gold); background: rgba(216,181,109,.08);
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,170px),1fr)); gap: 0.9rem; margin-bottom: 1.4rem; }
.stat-card { padding: 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--surface) 0%, var(--deep) 100%); }
.stat-icon { color: var(--cyan); margin-bottom: 0.5rem; }
.stat-icon .ic { width: 20px; height: 20px; }
.stat-val { font-family: var(--font-num); font-size: 1.6rem; font-weight: 800; color: var(--gold); line-height: 1.1; }
.stat-label { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.2rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.1rem; }
.tab-btn { font: inherit; font-size: 0.9rem; cursor: pointer; color: var(--text); background: rgba(3,25,35,.5);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 1.1rem; }
.tab-btn.active { color: var(--on-gold); background: var(--gold); border-color: var(--gold); font-weight: 700; }
.tab-panel { display: none; } .tab-panel.active { display: block; }
.card { padding: clamp(1rem,2.5vw,1.4rem); border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--surface) 0%, var(--deep) 100%); margin-bottom: 1rem; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.9rem; }
.loading { display: grid; place-items: center; gap: 0.6rem; padding: 2rem; color: var(--text-dim); }
.not-provider { text-align: center; padding: 3rem 1rem; color: var(--text-dim); }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.9rem; }
.form-group label { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; font: inherit; color: var(--text); background: rgba(3,25,35,.55);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.7rem 0.9rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,167,181,.18);
}

/* ------------------------------------------------ لوحة الإدارة (app · محمية) */
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background: radial-gradient(120% 80% at 70% 0%, rgba(0,167,181,.18) 0%, transparent 60%), linear-gradient(170deg, var(--deep) 0%, var(--ink) 100%); }
.login-box { width: min(100%, 400px); padding: clamp(1.4rem,4vw,2.2rem); border-radius: var(--radius);
  border: 1px solid var(--line); background: linear-gradient(165deg, var(--surface) 0%, var(--deep) 100%); box-shadow: var(--shadow); }
.login-box .logo, .brand { font-family: var(--font-display); color: var(--inktext); text-align: center; }
.sidebar { background: rgba(3,25,35,.92); border-inline-start: 1px solid var(--line); }
.sidebar a, .bottom-nav a { color: var(--text-dim); text-decoration: none; }
.sidebar a.active, .bottom-nav a.active { color: var(--gold); }
.bottom-nav { position: fixed; inset-inline: 0; bottom: 0; display: flex; justify-content: space-around;
  padding: 0.6rem; background: rgba(3,25,35,.96); border-top: 1px solid var(--line); backdrop-filter: blur(10px); z-index: 40; }
.main-content { max-width: var(--container); margin-inline: auto; padding: clamp(1.2rem,3.5vw,2rem) clamp(1rem,4vw,2rem) 5rem; }
.section { margin-bottom: 1.6rem; }
.btn-primary, .btn-danger, .btn-sm, .refresh-btn {
  font: inherit; font-weight: 700; cursor: pointer; border-radius: 999px; border: 1px solid transparent;
  padding: 0.5rem 1.2rem; color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
}
.btn-sm { font-size: 0.82rem; padding: 0.35rem 0.9rem; }
.btn-danger { color: #ffb9a6; background: rgba(255,107,74,.12); border-color: rgba(255,107,74,.4); }
.refresh-btn { background: transparent; color: var(--text); border-color: var(--line); }
.badge-green { color: var(--cyan); border-color: var(--line); background: rgba(0,167,181,.12); }
.badge-red { color: #ffb9a6; border-color: rgba(255,107,74,.4); background: rgba(255,107,74,.10); }
.badge-blue { color: var(--cyan); border-color: var(--line); background: rgba(111,231,242,.10); }
.badge-yellow { color: var(--gold); border-color: var(--line-gold); background: rgba(216,181,109,.10); }
.trend { font-size: 0.78rem; color: var(--text-dim); }
.value { font-family: var(--font-num); font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.label, .sub { font-size: 0.82rem; color: var(--text-dim); }
.err { color: #ffb9a6; font-size: 0.85rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); text-align: start; color: var(--text); }
th { color: var(--text-dim); font-weight: 700; font-size: 0.82rem; }
tbody tr:hover { background: rgba(0,167,181,.05); }

/* صندوق دخول الإدارة: الصفحة القديمة نسّقت العناصر بمحدّدات داخل <style> أزلناها،
   فبقيت الحقول بشكل النظام. هذه بدائلها على رموز الهوية. */
.login-box .logo .ic { width: 30px; height: 30px; color: var(--gold); }
.login-box .brand, .login-box h1 { font-size: 1.3rem; margin: 0.6rem 0 0.2rem; }
.login-box .sub { display: block; text-align: center; margin-bottom: 1.2rem; }
.login-box input {
  width: 100%; font: inherit; color: var(--text); background: rgba(3,25,35,.55);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.72rem 0.9rem; margin-bottom: 0.7rem;
}
.login-box input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,167,181,.18); }
.login-box button { width: 100%; margin-top: 0.3rem; }
.err { display: none; margin-top: 0.7rem; text-align: center; }
.login-box .logo { text-align: center; }
.login-box .brand { display: block; text-align: center; }
.login-box button {
  font: inherit; font-weight: 800; cursor: pointer; border: none; border-radius: 999px;
  padding: 0.8rem 1.6rem; color: var(--on-gold);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  box-shadow: var(--shadow-gold);
}
.login-box button:hover { filter: brightness(1.05); }
.beach__still { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ------------------------------------- أدوات المزوّد الذكية (v4.5) */
.genbox__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.5rem; }
.genout { margin-top: 0.9rem; }
.gen-card { padding: 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line-gold); background: rgba(216,181,109,.06); }
.gen-card h4 { font-family: var(--font-display); color: var(--inktext); margin-bottom: 0.4rem; }
.gen-desc { color: var(--text); margin-bottom: 0.6rem; }
.gen-hl { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.7rem; }
.gen-hl li { font-size: 0.78rem; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.6rem; }
.gen-price { font-size: 0.86rem; color: var(--text-dim); }
.gen-price b { font-family: var(--font-num); color: var(--gold); }
.gen-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.8rem; }
.gen-note { font-size: 0.78rem; color: var(--text-dim); }

.portal-pulse { max-width: var(--container); margin: clamp(2rem,5vw,3rem) auto 0; padding-inline: clamp(1rem,4vw,2rem); }
.pulse-filters { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1rem; }
.pulse-filters label { display: grid; gap: 0.3rem; font-size: 0.85rem; color: var(--text-dim); }
.pulse-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 0.8rem; }
.pulse-stat { text-align: center; padding: 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--surface) 0%, var(--deep) 100%); }
.pulse-stat span { display: block; font-size: 0.8rem; color: var(--text-dim); }
.pulse-stat b { font-family: var(--font-num); font-size: 1.7rem; color: var(--inktext); }
.pulse-stat i { font-style: normal; font-size: 0.8rem; color: var(--text-dim); margin-inline-start: 0.2rem; }
.pulse-stat--mid b { color: var(--gold); }
.pulse-basis, .pulse-top { margin-top: 0.7rem; font-size: 0.85rem; color: var(--text-dim); }
.pulse-basis b, .pulse-top b { font-family: var(--font-num); color: var(--cyan); }
/* صفحات التطبيق: مشهد الأعماق خلفيةٌ هادئة خلف البطاقات — لا يزاحم قراءة الجداول */
.page.app .scene3d { opacity: 0.5; }

/* ------------------------------------------- صفحة دليل المصداقية (v4.6) */
.verify { max-width: var(--container); margin-inline: auto; padding: clamp(1.6rem,4vw,2.6rem) clamp(1rem,4vw,2rem) clamp(3rem,8vw,5rem); }
.verify__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,240px),1fr)); gap: 0.9rem; margin-bottom: clamp(1.6rem,4vw,2.4rem); }
.verify__card { padding: 1.1rem; border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--surface) 0%, var(--deep) 100%); }
.verify__card h3 { font-family: var(--font-display); font-size: 1rem; color: var(--gold); margin-bottom: 0.5rem; }
.verify__card p { font-size: 0.9rem; color: var(--text-dim); }
.verify__card strong { color: var(--text); }
.verify__card--warn { border-color: var(--line-gold); background: linear-gradient(165deg, rgba(216,181,109,.10) 0%, var(--deep) 100%); }
.verify__table-head { margin-bottom: 0.9rem; }
.verify__table { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(3,25,35,.55); }
.verify__table table { min-width: 640px; }
.verify__note { margin-top: 0.9rem; font-size: 0.85rem; color: var(--text-dim); }
.verify__note b { font-family: var(--font-num); color: var(--cyan); }
