/* ==========================================================================
   شركة آفاق البيئة الخضراء للاستشارات والخدمات البيئية ذ.م.م
   الهوية البصرية المستخرجة من الشعار الرسمي: #136b43 | #5b9452 | #cf9c3e
   تصميم متجاوب من الهواتف حتى شاشات 4K/2K
   ========================================================================== */

:root {
  --brand-primary: #136b43;
  --brand-primary-dark: #0a3f27;
  --brand-deep: #072919;
  --brand-leaf: #5b9452;
  --brand-leaf-soft: #e9f3ec;
  --brand-gold: #cf9c3e;
  --brand-gold-soft: #fbf5e8;
  --surface-bg: #f6faf7;
  --surface-white: #ffffff;
  --ink-main: #12241b;
  --ink-muted: #4b6156;
  --border-subtle: rgba(19, 107, 67, 0.13);
  --shadow-sm: 0 4px 16px rgba(7, 41, 25, 0.06);
  --shadow-md: 0 14px 36px rgba(7, 41, 25, 0.09);
  --shadow-lg: 0 24px 60px rgba(7, 41, 25, 0.14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --container-max: 1280px;
  --font-ar: "Cairo", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-en: "Inter", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-ar);
  background: var(--surface-bg);
  color: var(--ink-main);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(92%, var(--container-max));
  margin-inline: auto;
}

/* Large 2K / 4K / 55–64 inch TV scaling */
@media (min-width: 1920px) {
  html { font-size: 18px; }
  :root { --container-max: 1560px; }
}
@media (min-width: 2560px) {
  html { font-size: 21px; }
  :root { --container-max: 1840px; }
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.98);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 82px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(19, 107, 67, 0.14);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-primary-dark);
}

.brand-sub {
  font-size: 0.74rem;
  font-family: var(--font-en);
  direction: ltr;
  unicode-bidi: isolate;
  color: var(--brand-leaf);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-main);
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--brand-leaf-soft);
  color: var(--brand-primary);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 6px 18px rgba(19, 107, 67, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(19, 107, 67, 0.32);
}

.mobile-menu-btn {
  display: none;
  background: var(--brand-leaf-soft);
  border: 1px solid var(--border-subtle);
  color: var(--brand-primary-dark);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .mobile-menu-btn { display: inline-flex; }
  .header-cta { display: none; }
  .primary-nav {
    position: fixed;
    top: 82px;
    right: 0;
    left: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.25s ease;
  }
  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-link {
    padding: 0.85rem 1rem;
    border-radius: 12px;
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: clamp(540px, 76vh, 820px);
  display: flex;
  align-items: center;
  background: var(--brand-deep);
  color: #fff;
  overflow: hidden;
  padding-block: 4.5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(7, 41, 25, 0.94) 0%, rgba(19, 107, 67, 0.72) 55%, rgba(7, 41, 25, 0.62) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(207, 156, 62, 0.16);
  border: 1px solid rgba(207, 156, 62, 0.45);
  color: #f4d492;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  line-height: 1.25;
  font-weight: 800;
}

.hero p {
  margin: 0 0 2rem;
  font-size: clamp(1.02rem, 1.4vw, 1.22rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.88rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.96rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-gold {
  background: linear-gradient(135deg, #d8a547, #b98324);
  color: #0b2216;
  box-shadow: 0 10px 28px rgba(207, 156, 62, 0.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(207, 156, 62, 0.45); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: #fff;
  box-shadow: 0 10px 24px rgba(19, 107, 67, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-glass {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.2); }

/* Trust Strip */
.trust-strip {
  background: var(--surface-white);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: 1.5rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 0.75rem;
}

.trust-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-leaf-soft);
  color: var(--brand-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.trust-label {
  font-size: 0.78rem;
  color: var(--ink-muted);
  display: block;
}

.trust-val {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--brand-primary-dark);
}

/* Page Banner (Subpages) */
.page-banner {
  background: linear-gradient(125deg, var(--brand-deep) 0%, var(--brand-primary) 100%);
  color: #fff;
  padding-block: 4rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.page-banner::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-leaf), var(--brand-gold));
}

.page-banner h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 800;
}

.page-banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  max-width: 720px;
  font-size: 1.06rem;
}

/* Sections */
.section {
  padding-block: clamp(3.5rem, 6vw, 5.5rem);
}

.section-alt {
  background: var(--surface-white);
}

.section-header {
  max-width: 740px;
  margin-bottom: 2.75rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--brand-primary);
  background: var(--brand-leaf-soft);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.6rem, 2.8vw, 2.35rem);
  color: var(--brand-deep);
  line-height: 1.3;
}

.section-header p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.02rem;
}

/* Cards & Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--surface-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(19, 107, 67, 0.28);
}

.card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--brand-leaf-soft);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.5rem;
}

.card-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--brand-primary);
  background: var(--brand-leaf-soft);
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  color: var(--brand-deep);
  line-height: 1.4;
}

.card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

/* Filter Pills */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2.2rem;
}

.filter-btn {
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #fff;
  color: var(--ink-main);
  font-family: var(--font-ar);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.is-active,
.filter-btn:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

/* Split Feature Layout */
.split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.feature-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid #fff;
}

.feature-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Legal Table & Statutory List */
.legal-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}

.legal-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.15rem;
  margin-bottom: 2rem;
}

.legal-meta-box {
  background: var(--surface-bg);
  border: 1px solid var(--border-subtle);
  border-right: 4px solid var(--brand-primary);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
}

.legal-meta-box.gold-accent {
  border-right-color: var(--brand-gold);
  background: var(--brand-gold-soft);
}

.legal-meta-box small {
  display: block;
  color: var(--ink-muted);
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.legal-meta-box strong {
  font-size: 1rem;
  color: var(--brand-deep);
}

.statutory-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.9rem;
}

.statutory-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  background: var(--surface-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}

.statutory-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Contact Form & Map */
.contact-form {
  display: grid;
  gap: 1.1rem;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--brand-deep);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.82rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(19, 107, 67, 0.22);
  background: #fff;
  font-family: var(--font-ar);
  font-size: 0.95rem;
  color: var(--ink-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(19, 107, 67, 0.14);
}

.form-feedback {
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: 0.4rem;
}
.form-feedback.is-success { color: var(--brand-primary); }
.form-feedback.is-success a { text-decoration: underline; color: var(--brand-primary-dark); }
.form-feedback.is-error { color: #b42318; }

.map-frame-wrap iframe {
  width: 100%;
  height: 360px;
  border: 0;
  border-radius: var(--radius-md);
  margin-top: 1.25rem;
}

/* CTA Band */
.cta-band {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-primary));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 4.5vw, 3.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.cta-band h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  max-width: 580px;
}

/* Unified Footer */
.site-footer {
  background: var(--brand-deep);
  color: rgba(255, 255, 255, 0.86);
  padding-top: 4rem;
  border-top: 4px solid var(--brand-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 2.25rem;
  padding-bottom: 3rem;
}

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.footer-brand img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
}

.footer-brand strong {
  display: block;
  color: #fff;
  font-size: 1.02rem;
}

.footer-brand span {
  font-family: var(--font-en);
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 0.78rem;
  color: #a9d6b8;
}

.footer-col h4 {
  color: #fff;
  margin: 0 0 1rem;
  font-size: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 34px;
  height: 2px;
  background: var(--brand-gold);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
  transition: color 0.2s ease, padding-right 0.2s ease;
}

.footer-links a:hover {
  color: #f4d492;
  padding-right: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
}

.footer-contact-item .dot-gold {
  color: var(--brand-gold);
  flex-shrink: 0;
}

.ltr-num {
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--font-en);
  font-weight: 700;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.74);
}

.wijha-credit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #f4d492;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(207, 156, 62, 0.3);
  transition: background 0.2s ease, color 0.2s ease;
}

.wijha-credit:hover {
  background: rgba(207, 156, 62, 0.2);
  color: #fff;
}

.wijha-code {
  font-family: var(--font-en);
  direction: ltr;
  unicode-bidi: isolate;
  color: #8ce0ad;
}

/* Floating WhatsApp Button (3-Second Scroll-Triggered, Compact Circular) */
.floating-wa {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 950;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.88);
  transition: opacity 0.3s ease, transform 0.3s ease, bottom 0.2s ease;
}

.floating-wa.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.floating-wa:hover {
  transform: scale(1.07);
  background: #1ebe5d;
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* === CMS, YOUTUBE FACADE & ADMIN DASHBOARD === */
.yt-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a1f14;
}
.yt-facade {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
}
.yt-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.35s ease, opacity 0.25s ease;
}
.yt-facade:hover img { transform: scale(1.04); opacity: 1; }
.yt-play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  border: 3px solid var(--brand-gold);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}
.yt-facade:hover .yt-play-btn { transform: scale(1.08); }
.yt-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Admin Dashboard Styling */
.admin-shell {
  padding-block: 2.2rem 4rem;
}
.admin-topbar {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-primary));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.admin-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(207, 156, 62, 0.2);
  border: 1px solid rgba(207, 156, 62, 0.5);
  color: #f4d492;
  font-size: 0.82rem;
  font-weight: 700;
}
.admin-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 1.75rem;
  align-items: start;
}
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
}
.admin-sidebar {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: grid;
  gap: 0.4rem;
  position: sticky;
  top: 96px;
}
.admin-tab-btn {
  text-align: right;
  padding: 0.78rem 1rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-family: var(--font-ar);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-main);
  cursor: pointer;
  transition: all 0.2s ease;
}
.admin-tab-btn:hover { background: var(--brand-leaf-soft); color: var(--brand-primary); }
.admin-tab-btn.is-active { background: var(--brand-primary); color: #fff; }
.admin-panel { display: none; }
.admin-panel.is-active { display: block; }
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-stat-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-right: 4px solid var(--brand-primary);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}
.admin-stat-card small { color: var(--ink-muted); display: block; }
.admin-stat-card strong { font-size: 1.75rem; color: var(--brand-deep); }
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.admin-item-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface-bg);
  margin-bottom: 0.75rem;
}
.admin-item-info { flex: 1; min-width: 220px; }
.admin-item-info strong { display: block; color: var(--brand-deep); margin-bottom: 0.25rem; }
.admin-item-info p { margin: 0; font-size: 0.88rem; color: var(--ink-muted); }
.admin-item-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.btn-sm {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-family: var(--font-ar);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-outline { background: #fff; border-color: var(--brand-primary); color: var(--brand-primary); }
.btn-outline:hover { background: var(--brand-leaf-soft); }
.btn-danger { background: #fef2f2; border-color: #fecaca; color: #b42318; }
.btn-danger:hover { background: #fee2e2; }
.status-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
}
.status-pill.is-pub { background: #dcfce7; color: #166534; }
.status-pill.is-draft { background: #fef3c7; color: #92400e; }
.status-pill.is-yt { background: #fee2e2; color: #991b1b; }
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
.media-tile {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.media-tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.media-tile-meta { padding: 0.7rem; }
.media-tile-meta strong { display: block; font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-tile-meta small { color: var(--ink-muted); font-size: 0.75rem; display: block; }
.admin-toast {
  position: fixed;
  top: 96px;
  left: 24px;
  z-index: 1200;
  padding: 0.85rem 1.3rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.25s ease;
}
.admin-toast.is-show { opacity: 1; transform: translateY(0); }
.admin-toast.is-ok { background: var(--brand-primary-dark); color: #fff; }
.admin-toast.is-error { background: #b42318; color: #fff; }
