/* Taalim News — Professional Arabic RTL Website */

:root {
  --primary: #FFD400;
  --primary-dark: #1E1E1E;
  --charcoal: #1E1E1E;
  --primary-light: #FFE034;
  --accent: #FFE566;
  --accent-sky: #FFF176;
  --gold: #FFD400;
  --mint: #10B981;
  --purple: #7C3AED;
  --bg: #FFFEF5;
  --bg-alt: #FFF9DB;
  --surface: #FFFFFF;
  --text: #1E1E1E;
  --text-secondary: #4A4538;
  --text-muted: #7A7360;
  --stroke: #EFE4A8;
  --shadow-sm: 0 2px 8px rgba(30, 30, 30, 0.05);
  --shadow-md: 0 8px 24px rgba(30, 30, 30, 0.08);
  --shadow-lg: 0 16px 48px rgba(30, 30, 30, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 78px;
  --ticker-h: 44px;
  --container: 1200px;
  --header-container: 1680px;
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  direction: rtl;
  min-height: 100vh;
}

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

.media-frame-img {
  max-width: none;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: none;
  box-shadow: none;
}

.site-header > .container.header-inner {
  width: min(100% - 40px, var(--header-container));
  max-width: var(--header-container);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: clamp(16px, 2.2vw, 36px);
  height: var(--header-h);
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
  flex-shrink: 0;
  min-width: 0;
  grid-column: 1;
}

.logo span,
.logo .logo-title {
  font-family: "Amiri", "Traditional Arabic", "Cairo", serif;
  font-weight: 700;
  font-size: clamp(1rem, 1.55vw, 1.32rem);
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  max-width: none;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  background: #000;
}

.nav-desktop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  grid-column: 2;
}

.nav-desktop::-webkit-scrollbar {
  display: none;
}

.nav-desktop a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--primary);
  background: var(--bg-alt);
}

.nav-desktop a.nav-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  overflow: visible;
  line-height: 0;
}

.nav-home-icon {
  display: block;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  overflow: visible;
}

.mobile-nav a.nav-home {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-nav a.nav-home .nav-home-icon {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-inline-start: 0;
  justify-self: end;
  grid-column: 3;
}

/* Far visual-left in RTL header */
.header-inner > .notif-bell {
  grid-column: 4;
  justify-self: start;
  flex-shrink: 0;
}

.header-auth-group,
.header-app-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#auth-widget {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.auth-signin-btn {
  display: inline-flex !important;
  visibility: visible !important;
  white-space: nowrap;
}

.auth-signin-btn.auth-signin-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.auth-signin-btn.auth-signin-icon svg {
  display: block;
}

.header-app-group {
  margin-inline-start: 12px;
  padding-inline-start: 12px;
  border-inline-start: 1px solid var(--stroke);
}

.app-qr-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  flex-shrink: 0;
  position: relative;
  line-height: 0;
}

.app-qr-box:hover {
  border-color: var(--accent-sky);
  box-shadow: var(--shadow-md);
}

.app-qr-img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: block;
  image-rendering: pixelated;
}

.app-qr-box::after {
  content: "امسح لتحميل التطبيق";
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 50%;
  transform: translateX(50%) translateY(4px);
  background: var(--primary-dark);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: var(--transition);
  z-index: 120;
  box-shadow: var(--shadow-md);
}

[dir="rtl"] .app-qr-box::after {
  transform: translateX(50%) translateY(4px);
}

.app-qr-box:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(50%) translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--charcoal);
  box-shadow: 0 4px 14px rgba(30, 30, 30, 0.12);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30, 30, 30, 0.16);
  filter: brightness(1.03);
}

.btn-outline {
  background: transparent;
  color: var(--charcoal);
  border: 2px solid var(--stroke);
}

.btn-outline:hover { border-color: var(--primary); background: var(--bg-alt); color: var(--charcoal); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #E6BF00);
  color: var(--primary-dark);
}

.btn-mint {
  background: linear-gradient(135deg, var(--mint), #059669);
  color: #fff;
}

[data-admin-only] {
  display: none !important;
}

[data-admin-only].is-admin-visible {
  display: inline-flex !important;
}

a[data-admin-only].is-admin-visible {
  display: inline-flex !important;
}

.footer-col a[data-admin-only].is-admin-visible,
.mobile-nav a[data-admin-only].is-admin-visible {
  display: block !important;
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: var(--text);
  border: 2px solid var(--stroke);
  font-weight: 700;
}

.btn-google:hover {
  border-color: var(--primary);
  background: var(--bg-alt);
}

.auth-user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.auth-user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--bg-alt);
  border-radius: 999px;
  border: 1px solid var(--stroke);
  white-space: nowrap;
  flex-shrink: 0;
}

.auth-user-photo,
.auth-user-initial {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.auth-user-initial {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
}

.auth-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.mobile-auth-slot {
  padding: 4px 8px 12px;
  border-bottom: 1px solid var(--stroke);
  margin-bottom: 4px;
}

.mobile-auth-slot .btn,
.mobile-auth-slot .auth-user-menu {
  width: 100%;
  justify-content: center;
}

.comments-section {
  margin-top: 40px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.comments-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
}

.comments-count {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.comments-login-prompt {
  text-align: center;
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.comments-login-prompt p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 0.92rem;
}

.comment-composer {
  margin-bottom: 24px;
}

.comment-composer textarea {
  margin-bottom: 10px;
}

.comment-composer .admin-textarea,
.comments-section .admin-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--stroke);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}

.comment-thread {
  padding: 16px 0;
  border-bottom: 1px solid var(--stroke);
}

.comment-thread:last-child { border-bottom: none; }

.comment-thread .comment-card {
  padding: 0;
  border-bottom: none;
}

.comment-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--stroke);
}

.comment-card:last-child { border-bottom: none; }

.comment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.comment-card-header strong {
  font-size: 0.92rem;
  color: var(--text);
}

.comment-card-header span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.comment-card-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 10px;
}

.comment-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.comment-replies {
  margin-top: 12px;
  margin-inline-start: 12px;
  padding-inline-start: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-official-reply {
  display: grid;
  grid-template-columns: 4px 1fr;
  gap: 12px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.08), rgba(15, 23, 42, 0.03));
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  overflow: hidden;
}

.comment-official-reply-rail {
  border-radius: 999px;
  background: linear-gradient(180deg, #c9a227, #8b6914);
  min-height: 100%;
}

.comment-official-reply-body {
  min-width: 0;
}

.comment-official-reply-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.comment-official-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #5c4508;
  background: rgba(201, 162, 39, 0.22);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 999px;
  padding: 2px 10px;
}

.comment-official-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary, #1a2744);
}

.comment-official-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-inline-start: auto;
}

.comment-reply-composer,
.comment-edit-form {
  margin-top: 8px;
  padding: 12px;
  background: var(--bg-alt, #f7f5ef);
  border: 1px solid var(--stroke);
  border-radius: 12px;
}

.comment-reply-composer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.comment-reply-as {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.comment-reply-composer textarea,
.comment-edit-form textarea {
  width: 100%;
  margin-bottom: 10px;
}

.comment-reply-composer-actions,
.comment-edit-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-danger-outline {
  color: #B91C1C !important;
  border-color: #FECACA !important;
}

.comments-empty,
.comments-loading {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.ad-comment-actions {
  display: inline-flex;
  gap: 4px;
  margin-inline-start: 6px;
  vertical-align: middle;
}

.ad-comment-action {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 2px 4px;
}

.ad-comment-reply {
  margin-top: 8px;
  margin-inline-start: 8px;
  padding: 8px 10px;
  border-inline-start: 3px solid #c9a227;
  background: rgba(201, 162, 39, 0.08);
  border-radius: 0 8px 8px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 0.85rem;
}

.ad-comment-reply strong {
  color: var(--primary, #1a2744);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
  padding: 8px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 12px 16px 20px;
  border-top: 1px solid var(--stroke);
  background: var(--surface);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  padding: 12px 8px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  border-bottom: 1px solid var(--stroke);
}

/* ── Desk menubar (under ticker) ── */
.desk-top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  width: 100%;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFEF8 100%);
  box-shadow: 0 10px 28px rgba(30, 30, 30, 0.05);
}
.desk-top-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: max-content;
}
.desk-top-side .ticker-label {
  flex: 0 0 var(--ticker-h);
  height: var(--ticker-h);
}
.desk-top-side-under {
  flex: 1 1 auto;
  min-height: 52px;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFEF8 100%);
  border-bottom: 1px solid rgba(30, 30, 30, 0.08);
}
.desk-top-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ticker-bar-track {
  background: var(--primary-dark);
  color: #fff;
  height: var(--ticker-h);
  overflow: hidden;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}
.desk-menubar {
  position: relative;
  z-index: 260;
  overflow: visible;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFEF8 100%);
  border-top: 0;
  border-bottom: 1px solid rgba(30, 30, 30, 0.08);
  margin-top: 0;
}
.desk-menubar-shell {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 52px;
  width: 100%;
  padding: 0;
  margin: 0;
}
.desk-menubar-home {
  position: relative;
  flex: 0 0 56px;
  width: 56px;
  align-self: stretch;
  display: grid;
  place-items: center;
  margin: 0;
  background: var(--charcoal);
  color: var(--primary);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.desk-menubar-ico {
  flex-shrink: 0;
  opacity: 0.9;
}
.desk-menubar-home:hover {
  background: #2A2A2A;
  color: #FFE566;
}
.desk-menubar-home.is-active .desk-menubar-home-line,
.desk-menubar-home:hover .desk-menubar-home-line {
  opacity: 1;
  transform: scaleX(1);
}
.desk-menubar-home-line {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 8px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.85;
  transform: scaleX(0.7);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.desk-menubar-scroll {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  /* browsers coerce overflow-y to auto when overflow-x scrolls — panels use position:fixed */
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 212, 0, 0.55) transparent;
}
.desk-menubar-list {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin: 0;
  padding: 0 8px;
  list-style: none;
  min-height: 52px;
  width: max-content;
  min-width: 100%;
  overflow: visible;
}
.desk-menubar-item {
  position: relative;
  display: flex;
  align-items: stretch;
  overflow: visible;
}
.desk-menubar-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #1E1E1E;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
  height: 100%;
  cursor: pointer;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.desk-menubar-trigger::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}
.desk-menubar-item:hover .desk-menubar-trigger,
.desk-menubar-item.is-open .desk-menubar-trigger {
  color: #7A6A00;
  background: rgba(255, 212, 0, 0.12);
}
.desk-menubar-item:hover .desk-menubar-trigger::after,
.desk-menubar-item.is-open .desk-menubar-trigger::after {
  transform: scaleX(1);
}
.desk-menubar-chevron {
  opacity: 0.55;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.desk-menubar-item.is-open .desk-menubar-chevron,
.desk-menubar-item:hover .desk-menubar-chevron {
  opacity: 1;
  transform: rotate(180deg);
  color: #B59A00;
}
.desk-menubar-panel {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 24px));
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(30, 30, 30, 0.08);
  border-top: 3px solid var(--primary);
  border-radius: 14px 0 14px 14px;
  box-shadow: 0 18px 40px rgba(30, 30, 30, 0.18);
  display: grid;
  gap: 2px;
  z-index: 280;
  animation: deskMenuIn 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top left;
}
/* Invisible bridge so the pointer can move from the trigger into the panel without closing it */
.desk-menubar-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 16px;
}
.desk-menubar-panel[hidden] {
  display: none !important;
  animation: none;
}
.desk-menubar-item.is-open .desk-menubar-trigger {
  color: #7A6A00;
  background: rgba(255, 212, 0, 0.16);
}
.desk-menubar-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #1E1E1E;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, padding-inline-start 0.18s ease;
}
.desk-menubar-panel a:hover {
  background: rgba(255, 212, 0, 0.16);
  color: #7A6A00;
  padding-inline-start: 16px;
}

.desk-contact-panel {
  min-width: 320px;
  max-width: min(400px, calc(100vw - 24px));
  max-height: min(78vh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  gap: 4px;
  scrollbar-width: thin;
}

.desk-contact-head {
  padding: 8px 10px 6px;
  font-size: 0.78rem;
  font-weight: 900;
  color: #7A6A00;
  letter-spacing: 0.01em;
}

.desk-contact-divider {
  margin: 6px 4px 2px;
  padding: 6px 8px 4px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #8A8070;
  border-top: 1px solid rgba(30, 30, 30, 0.08);
}

/* Physical layout: phone on the LEFT, name/place on the RIGHT */
.desk-menubar-panel .desk-contact-row {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  padding: 8px 10px !important;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  direction: ltr;
}

.desk-contact-row.is-regional {
  background: linear-gradient(135deg, rgba(30, 90, 160, 0.1), rgba(255, 212, 0, 0.12));
  border: 1px solid rgba(30, 90, 160, 0.18);
  margin-bottom: 2px;
}

.desk-menubar-panel .desk-contact-phone {
  grid-column: 1;
  justify-self: start;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #059669;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

.desk-menubar-panel .desk-contact-meta {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
  text-align: right;
  direction: rtl;
}

.desk-contact-place,
.desk-contact-role {
  font-size: 0.72rem;
  font-weight: 800;
  color: #8A8070;
  line-height: 1.3;
  width: 100%;
  text-align: right;
}

.desk-contact-row.is-regional .desk-contact-role {
  color: #1E5A9A;
}

.desk-contact-name {
  font-size: 0.88rem;
  font-weight: 900;
  color: #1E1E1E;
  line-height: 1.35;
  width: 100%;
  text-align: right;
}

.desk-menubar-panel .desk-contact-row:hover {
  background: rgba(255, 212, 0, 0.16) !important;
  padding-inline-start: 10px !important;
  color: inherit;
}

.desk-contact-row:hover .desk-contact-phone {
  color: #047857;
}

.desk-contact-footer {
  display: grid;
  gap: 2px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(30, 30, 30, 0.08);
}

.desk-contact-footer a {
  font-size: 0.82rem;
}

@keyframes deskMenuIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (max-width: 720px) {
  .desk-menubar-shell { min-height: 48px; }
  .desk-menubar-home { flex-basis: 48px; width: 48px; }
  .desk-menubar-trigger {
    font-size: 0.88rem;
    padding: 0 12px;
  }
  .desk-menubar-panel {
    max-width: calc(100vw - 24px);
    border-radius: 14px;
    border-top-width: 3px;
  }
}

/* ── Ticker ── */
.ticker-bar {
  background: var(--primary-dark);
  color: #fff;
  height: var(--ticker-h);
  overflow: hidden;
  display: flex;
  align-items: center;
  margin: 0;
  border: 0;
  border-bottom: 0;
}

.ticker-label {
  flex-shrink: 0;
  background: var(--gold);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  white-space: nowrap;
}

.ticker-track-wrap {
  overflow: hidden;
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.ticker-track {
  --ticker-shift: 50%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 36px;
  width: max-content;
  min-width: 0;
  margin: 0;
  padding: 0 8px;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
  color: #fff;
  will-change: transform;
  /* Keep marquee math stable on RTL pages */
  direction: ltr;
}

.ticker-track-wrap:hover .ticker-track,
.ticker-track-wrap:focus-within .ticker-track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none !important;
    transform: none !important;
  }
}

.ticker-item {
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  flex-shrink: 0;
  direction: rtl;
  text-decoration: none;
}

.ticker-news {
  unicode-bidi: plaintext;
}

.ticker-news::before {
  content: "●";
  color: var(--accent);
  font-size: 0.5rem;
}

.ticker-contact {
  /* رقم | صفة | اسم | أيقونة */
  direction: ltr;
  unicode-bidi: isolate;
  flex-direction: row;
  gap: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 212, 0, 0.14);
  border: 1px solid rgba(255, 212, 0, 0.35);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ticker-contact-phone {
  order: 1;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI", monospace;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--gold);
  direction: ltr;
  unicode-bidi: isolate;
}

.ticker-contact-role {
  order: 2;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.78;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: rtl;
  unicode-bidi: plaintext;
}

.ticker-contact-name {
  order: 3;
  font-size: 0.86rem;
  font-weight: 800;
  color: #fff;
  direction: rtl;
  unicode-bidi: plaintext;
}

.ticker-contact-ico {
  order: 4;
  font-size: 0.72rem;
  color: var(--gold);
  opacity: 0.95;
  line-height: 1;
}

.ticker-contact:hover {
  background: rgba(255, 212, 0, 0.28);
  border-color: rgba(255, 212, 0, 0.7);
  transform: translateY(-1px);
}

@keyframes ticker-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(calc(-1 * var(--ticker-shift)), 0, 0); }
}

/* ── Home feed (app-like, web-adapted) ── */
.home-feed {
  position: relative;
  padding: 28px 0 40px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #FFFEF5 55%, #FFF9DB 100%);
}

.home-feed-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(255, 224, 52, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 45% at 0% 20%, rgba(255, 212, 0, 0.08), transparent 50%),
    url("data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23FFB300' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.home-feed-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.home-brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #000;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.home-brand-name {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.home-brand-tag {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.home-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
  max-width: 720px;
}

.home-search-icon {
  opacity: 0.55;
  font-size: 1rem;
}

.home-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.home-search input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.home-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.home-chips::-webkit-scrollbar { display: none; }

.home-chip {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 800;
  transition: var(--transition);
}

.home-chip:hover {
  border-color: rgba(255, 212, 0, 0.35);
  color: var(--primary);
}

.home-chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 212, 0, 0.22);
}

.home-stories-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-stories-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text);
}

.home-stories {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.home-story {
  position: relative;
  flex: 0 0 128px;
  width: 128px;
  height: 212px;
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: start;
  background: linear-gradient(160deg, #1E1E1E, #FFD400);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: #fff;
}

.home-story img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.35s ease;
}
/* 16:9 inside a tall story frame — zoom/crop so the frame is fully filled */
.home-story.is-landscape img {
  object-fit: cover;
  object-position: center center;
  transform: scale(1.28);
  background: #12100D;
}
.home-story.is-portrait img {
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.08);
}

.home-story-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.12) 0%,
    transparent 42%,
    rgba(0, 0, 0, 0.78) 100%
  );
}

.home-story-logo {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.home-story-logo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
}

.home-story-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.home-story-title {
  position: absolute;
  inset-inline: 10px;
  bottom: 10px;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-story-badge {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  background: #EF4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
}

.home-stories-skeleton {
  width: 100%;
  height: 212px;
  border-radius: 16px;
  background: linear-gradient(90deg, #e8eef8, #f7fafc, #e8eef8);
  background-size: 200% 100%;
  animation: homePulse 1.2s ease infinite;
}

@keyframes homePulse {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.home-desk {
  --desk-accent: #B59A00;
  --desk-accent-soft: rgba(255, 212, 0, 0.16);
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.92fr) minmax(0, 1.75fr);
  gap: 22px 28px;
  width: 100%;
  align-items: stretch;
  direction: rtl;
}
.home-desk.is-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #1E1E1E 0%, #3F3A32 55%, #7A5C00 100%);
}
.home-desk.is-empty .home-desk-rail,
.home-desk.is-empty .home-desk-stage {
  visibility: hidden;
}
.home-desk-placeholder {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #FFF9DB;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(30,30,30,.72), rgba(255,212,0,.28));
}
.home-desk-placeholder[hidden] { display: none !important; }

.home-desk-rail {
  display: flex;
  flex-direction: column;
  /* Match stage height (title + image); do not grow the desk row */
  height: 0;
  min-height: 100%;
  max-height: 100%;
  align-self: stretch;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFEF8 100%);
  border: 1px solid rgba(30, 30, 30, 0.07);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(30, 30, 30, 0.06);
  overflow: hidden;
}
.home-desk-rail-head {
  flex: 0 0 auto;
  padding: 14px 16px 10px;
  border-bottom: 2px solid var(--desk-accent);
}
.home-desk-rail-head h3 {
  margin: 0;
  color: var(--desk-accent);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.home-desk-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0 16px;
  scroll-padding-top: 8px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 137, 0, 0.45) transparent;
}
.home-desk-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  text-align: right;
  cursor: pointer;
  direction: rtl;
  transition: background 0.22s ease, box-shadow 0.22s ease;
}
.home-desk-item:first-child {
  padding-top: 14px;
}
.home-desk-item time {
  color: var(--desk-accent);
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
  white-space: nowrap;
  min-width: 3.4em;
}
.home-desk-item span {
  color: #1E1E1E;
  font-weight: 800;
  font-size: 1.28rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-desk-item:hover {
  background: rgba(255, 212, 0, 0.08);
}
.home-desk-item.is-active {
  background: linear-gradient(90deg, rgba(255,212,0,0.18), rgba(255,212,0,0.04));
  box-shadow: inset -3px 0 0 var(--desk-accent);
}
.home-desk-item.is-active span {
  font-weight: 900;
}

.home-desk-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.home-desk-headline {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 4px 2px 2px;
  overflow: visible;
}
.home-desk-headline-title {
  display: block;
  color: #14120F;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: -0.015em;
  overflow: visible;
  padding-block: 2px;
  transition: opacity 0.28s ease, transform 0.28s ease, color 0.2s ease;
}
.home-desk-headline-title.is-swap {
  animation: homeDeskTitleIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes homeDeskTitleIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.home-desk-headline:hover .home-desk-headline-title {
  color: #7A6A00;
}

.home-desk-media-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 212, 0, 0.18), transparent 42%),
    #12100D;
  box-shadow:
    0 0 0 1px rgba(255, 212, 0, 0.18),
    0 1px 2px rgba(30, 30, 30, 0.06),
    0 22px 48px rgba(30, 30, 30, 0.18);
  direction: ltr;
  isolation: isolate;
}
.home-desk-media-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 -70px 70px rgba(0, 0, 0, 0.28),
    inset 0 28px 40px rgba(0, 0, 0, 0.12);
}
.home-desk-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.home-desk-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  background: #12100D;
}
.home-desk-blur {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(30px) saturate(1.15) brightness(0.52);
  transform: scale(1.1);
}
.home-desk-photo,
.home-desk-slide .video-glimpse,
.home-desk-slide .video-glimpse-el,
.home-desk-slide .video-glimpse-fallback,
.home-desk-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.home-desk-photo {
  object-fit: cover;
  object-position: center center;
  z-index: 1;
  transition: transform 0.7s ease, filter 0.4s ease;
  filter: saturate(1.05) contrast(1.03);
}
.home-desk-slide:hover .home-desk-photo {
  transform: scale(1.03);
}
.home-desk-slide.is-landscape .home-desk-photo {
  object-fit: contain;
  filter: saturate(1.06) contrast(1.04);
}
.home-desk-slide.is-portrait .home-desk-photo {
  object-fit: cover;
  object-position: center 16%;
  transform: scale(1.06);
}
.home-desk-slide.is-portrait:hover .home-desk-photo {
  transform: scale(1.09);
}
.home-desk-slide.is-square .home-desk-photo { object-fit: cover; }
.home-desk-fallback {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,212,0,.45), transparent 42%),
    linear-gradient(135deg, #2A2620, #5C5340 55%, #FFD400);
}
.home-desk-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #1E1E1E;
  font-size: 1.45rem;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.home-desk-nav:hover {
  background: #FFD400;
  transform: translateY(-50%) scale(1.05);
}
.home-desk-nav--prev { inset-inline-start: 12px; }
.home-desk-nav--next { inset-inline-end: 12px; }
.home-desk-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}
.home-desk-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  transition: width 0.25s ease, background 0.25s ease;
}
.home-desk-dot.is-active {
  width: 20px;
  background: #FFD400;
}

@media (max-width: 900px) {
  .home-desk {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .home-desk-rail {
    order: 2;
    height: auto;
    min-height: 0;
    max-height: min(42vh, 280px);
  }
  .home-desk-stage {
    order: 1;
  }
  .home-desk-list {
    min-height: 0;
  }
  .home-desk-media-shell {
    aspect-ratio: 16 / 9;
    border-radius: 16px;
  }
  .home-desk-headline-title {
    font-size: clamp(1.08rem, 4.5vw, 1.35rem);
  }
}

.home-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: stretch;
}

.home-featured-card {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 420px;
  min-height: 420px;
  max-height: 420px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.home-featured-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.home-featured-media {
  position: relative;
  flex: 0 0 300px;
  width: 100%;
  height: 300px;
  min-height: 300px;
  max-height: 300px;
  aspect-ratio: auto;
  background: #E2E8F0;
  overflow: hidden;
}

.home-featured-media img,
.home-featured-media .video-glimpse,
.home-featured-media .video-glimpse-fallback,
.home-featured-media .video-glimpse-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-featured-media.is-poster {
  background: #111;
}

.home-featured-media.is-poster img {
  object-fit: cover;
  object-position: center top;
  background: #111;
}

.home-featured-media > .video-glimpse {
  position: absolute;
  inset: 0;
}

.home-featured-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8, 21, 47, 0.28);
  color: #fff;
  font-size: 2rem;
}

/* معاينة فيديو صامتة في البطاقات (مثل التطبيق) */
.video-glimpse {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0f172a;
}

.video-glimpse--ad,
.ad-card-media > .video-glimpse {
  position: relative;
  aspect-ratio: auto;
  height: 160px;
}

.video-glimpse--ad .video-glimpse-play {
  font-size: 1.5rem;
  background: rgba(8, 21, 47, 0.2);
}

.home-story > .video-glimpse,
.home-featured-media > .video-glimpse,
.article-card-thumb > .video-glimpse {
  position: absolute;
  inset: 0;
}

.video-glimpse-fallback,
.video-glimpse-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.video-glimpse-el {
  z-index: 1;
  background: transparent;
}

.video-glimpse-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.35rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  background: rgba(8, 21, 47, 0.18);
  pointer-events: none;
}

.video-glimpse--story .video-glimpse-play {
  font-size: 1.5rem;
  background: transparent;
}

.video-glimpse--featured .video-glimpse-play {
  font-size: 1.85rem;
  background: rgba(8, 21, 47, 0.22);
}

.video-glimpse--card .video-glimpse-play {
  font-size: 0.95rem;
  background: rgba(8, 21, 47, 0.2);
}

.home-featured-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.home-featured-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.home-featured-body h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.4em * 2);
}

.home-featured-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: auto;
}

.home-featured-card--placeholder {
  padding: 18px;
  min-height: 160px;
  justify-content: center;
}

.home-featured-card--placeholder p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

/* Legacy hero aliases kept empty to avoid stray styles */
.hero,
.hero-bg,
.hero-grid,
.hero-visual,
.hero-card-visual {
  /* superseded by .home-feed */
}

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

  .home-featured-card {
    height: 360px;
    min-height: 360px;
    max-height: 360px;
  }

  .home-featured-media {
    flex-basis: 240px;
    height: 240px;
    min-height: 240px;
    max-height: 240px;
  }
}

@media (max-width: 720px) {
  .home-feed { padding: 18px 0 28px; }
  .home-brand-logo { width: 48px; height: 48px; }
  .home-featured { grid-template-columns: 1fr; }
  .home-featured-card {
    height: 420px;
    min-height: 420px;
    max-height: 420px;
  }
  .home-featured-media {
    flex-basis: 300px;
    height: 300px;
    min-height: 300px;
    max-height: 300px;
  }
  .home-story { flex-basis: 112px; width: 112px; height: 190px; }
}

/* ── Sections ── */
section { padding: 56px 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .icon {
  width: 36px;
  height: 36px;
  background: var(--bg-alt);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 4px;
}

/* ── Two-column layout: 2/3 wide + 1/3 narrow, equal height ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: stretch;
}

@media (min-width: 993px) {
  .two-col {
    grid-template-columns: 2fr 1fr;
  }

  .col-span-wide .article-card-thumb {
    width: 210px;
    height: 140px;
  }
  .col-span-wide .article-card-thumb.is-landscape {
    width: 240px;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .col-span-wide .article-card-thumb.is-portrait {
    width: 128px;
    height: 168px;
  }
}

.col-panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
}

.col-panel-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.col-panel-actions {
  margin-top: auto;
  flex-shrink: 0;
  padding-top: 20px;
  text-align: center;
}

/* ── Resource cards (app-style) ── */
.resource-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--primary)) 18%, var(--stroke));
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.resource-card-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.resource-card-media {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

.resource-card-media img,
.resource-card-media video {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.resource-card-media video {
  background: #000;
  max-height: 240px;
  object-fit: contain;
}

.article-video-wrap {
  margin: 0 auto 16px;
  border-radius: 14px;
  overflow: visible;
  background: transparent;
  max-width: 520px;
  width: 100%;
}
.article-video-wrap .cdt-video-card {
  margin-bottom: 0;
}

.article-video {
  display: block;
  width: 100%;
  max-height: 292px;
  background: #000;
}

/* Medium centered rectangle (16:9) — video fills the frame, no black frame */
.cdt-video-card {
  width: min(100%, 520px);
  max-width: 520px;
  margin: 0 auto 16px;
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  border: 1px solid var(--line, #e8dfc8);
  box-shadow: 0 8px 20px rgba(30, 30, 30, 0.08);
}
.cdt-video-card.is-gallery {
  width: min(100%, 520px);
  max-width: 520px;
  margin: 0 auto;
  border-radius: 14px;
}
.cdt-video-card-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  max-height: none;
  background: transparent;
  overflow: hidden;
}
.cdt-video-card.is-hero .cdt-video-card-stage,
.cdt-video-card.is-feature .cdt-video-card-stage {
  aspect-ratio: 16 / 9;
  max-height: none;
}
.cdt-video-card video.cdt-video-card-el,
.cdt-video-card .cdt-video-card-el {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  /* contain keeps the full frame readable when mixed with gallery images */
  object-fit: contain !important;
  object-position: center center !important;
  background: #0b0b0b !important;
  cursor: pointer;
}
.cdt-video-card-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.55);
  color: #fff;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, background 0.18s ease;
  z-index: 2;
}
.cdt-video-card-play:hover {
  transform: scale(1.05);
  background: rgba(15, 15, 15, 0.72);
}
.cdt-video-card.is-playing .cdt-video-card-play {
  opacity: 0;
  pointer-events: none;
}
.cdt-video-card-bar {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
  z-index: 3;
}
.cdt-video-card-toggle,
.cdt-video-card-fs {
  border: 0;
  border-radius: 10px;
  width: 36px;
  height: 32px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}
.cdt-video-card-stage:fullscreen,
.cdt-video-card-stage:-webkit-full-screen {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  max-height: none;
  background: #000;
}
.cdt-video-card-stage:fullscreen .cdt-video-card-el,
.cdt-video-card-stage:-webkit-full-screen .cdt-video-card-el {
  object-fit: contain !important;
}

.article-card-thumb--video,
.article-card-thumb:has(.video-glimpse--card) {
  width: min(200px, 40vw);
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 110px;
}
.article-media-gallery:has(.article-gallery-item.is-video:only-child),
.article-gallery:has(> .article-gallery-item.is-video:only-child) {
  display: flex;
  justify-content: center;
  grid-template-columns: none;
}
.article-gallery-item.is-video {
  /* Full row — never squeeze a player into a 150px image cell */
  grid-column: 1 / -1;
  width: min(100%, 520px);
  max-width: 520px;
  justify-self: center;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none;
}
.article-gallery-item.is-video .cdt-video-card {
  width: 100%;
  max-width: 520px;
  margin: 0;
  background: transparent;
  border: 1px solid var(--line, #e8dfc8);
  box-shadow: 0 8px 20px rgba(30, 30, 30, 0.08);
}
.article-gallery-item.is-video .cdt-video-card-stage {
  background: transparent;
}
.article-gallery-item.is-video .cdt-video-card-el {
  background: transparent !important;
}

.resource-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.resource-card-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: color-mix(in srgb, var(--card-accent, var(--primary)) 12%, transparent);
  border-radius: 14px;
}

.resource-card-body { flex: 1; min-width: 0; }

.resource-card-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.resource-card-body p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.resource-card-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 1.4rem;
  font-weight: 300;
}

.section-divider {
  height: 1px;
  background: var(--stroke);
  margin: 20px 0;
}

.section-divider-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.article-list { display: flex; flex-direction: column; gap: 16px; }

/* ── Media frame (صفحة المقال فقط) ── */
.media-frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--primary-dark) 0%, var(--primary-light) 100%);
}

.media-frame-bg {
  position: absolute;
  inset: -25%;
  background-size: cover;
  background-position: center;
  filter: blur(32px) saturate(1.15) brightness(0.7);
  transform: scale(1.2);
  z-index: 0;
  pointer-events: none;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(6, 26, 68, 0.05) 0%,
    rgba(6, 26, 68, 0.22) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.media-frame-img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
}

.article-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: var(--transition);
}

.article-card-main {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  cursor: pointer;
}

.article-card:hover {
  background: var(--bg);
  border-color: var(--stroke);
  box-shadow: var(--shadow-sm);
}

.article-card-thumb.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #fff8e1, #f5f5f5);
  font-size: 1.6rem;
}

.article-card-thumb {
  position: relative;
  flex-shrink: 0;
  width: 135px;
  height: 100px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-alt);
}

.article-card-thumb--poster {
  width: 112px;
  height: 148px;
  background: #111;
}

.article-card-thumb--poster img {
  object-fit: cover !important;
  object-position: center top;
  background: #111;
}

.article-card-thumb.is-landscape {
  width: 168px;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #12100D;
}

.article-card-thumb.is-landscape img {
  object-fit: contain !important;
  object-position: center center;
  background: #12100D;
}

.article-card-thumb.is-portrait {
  width: 112px;
  height: 148px;
  background: #111;
}

.article-card-thumb.is-portrait img {
  object-fit: cover !important;
  object-position: center 16%;
  transform: scale(1.08);
  background: #111;
}

.article-card-thumb img,
.article-card-thumb .video-glimpse {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
}

.article-card-body { flex: 1; min-width: 0; }

.article-card .subject {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.article-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

.article-card .article-excerpt {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 6px 0 10px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.6em * 2);
  word-break: break-word;
}

.article-card .meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Event cards ── */
.event-list { display: flex; flex-direction: column; gap: 12px; }

.event-when-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary, #FFD400) 12%, transparent);
  color: var(--primary, #FFD400);
  font-size: 0.75rem;
  font-weight: 700;
}

.event-when-badge.is-ended {
  background: rgba(220, 38, 38, 0.12);
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.22);
}

.event-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--stroke);
  transition: var(--transition);
  align-items: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.event-card-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #7A6A00;
}

.event-card.has-image {
  padding-left: 0;
  overflow: hidden;
}

.event-card.is-ended {
  border-color: rgba(220, 38, 38, 0.18);
  background: linear-gradient(180deg, #FFFCFC 0%, #FFF8F8 100%);
}

.event-card.is-ended .event-thumb {
  filter: grayscale(0.35) brightness(0.92);
}

.event-card.is-ended h4 {
  color: #6B5E5E;
}

.event-media {
  position: relative;
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  margin-left: 14px;
}

.event-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  box-shadow: 0 8px 18px rgba(30, 30, 30, 0.16);
}

.event-ended-seal {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  margin: auto;
  width: max-content;
  max-width: calc(100% - 12px);
  height: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #EF4444 0%, #B91C1C 100%);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.22),
    0 8px 18px rgba(185, 28, 28, 0.45);
  pointer-events: none;
  transform: rotate(-8deg);
}

.event-card:hover {
  border-color: var(--accent-sky);
  box-shadow: var(--shadow-sm);
}
.event-card:hover .event-card-more {
  color: #1E1E1E;
}

.event-date-box {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  width: auto;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #1E1E1E;
  border-radius: 10px;
  padding: 5px 4px 4px;
  line-height: 1.1;
  box-shadow: 0 4px 10px rgba(30, 30, 30, 0.18);
}

.event-date-box .day { font-size: 0.85rem; font-weight: 900; line-height: 1; }
.event-date-box .mon { font-size: 0.55rem; font-weight: 700; opacity: 0.85; }

.event-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.event-card .loc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Feature cards ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-sky);
}

.feature-card .emoji { font-size: 2.5rem; margin-bottom: 12px; }

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ── Side rail (Facebook + meetings) ── */
#articles .two-col {
  align-items: start;
}

.home-side-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: auto;
  min-height: 0;
  align-self: start;
}

.home-side-rail > .col-panel {
  flex: 0 1 auto;
  height: auto;
  min-height: 0;
}

/* ── Facebook follow card ── */
.fb-follow-card {
  width: 100%;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.fb-follow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fb-follow-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.fb-follow-accent {
  width: 4px;
  height: 18px;
  border-radius: 99px;
  background: #1877F2;
  flex-shrink: 0;
}

.fb-follow-title h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: var(--primary);
}

.fb-follow-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-family: Arial, sans-serif;
  color: rgba(24, 119, 242, 0.55);
  background: rgba(24, 119, 242, 0.08);
}

.fb-follow-banner {
  position: relative;
  min-height: 96px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #FFE034 0%, #FFD400 55%, #1E1E1E 100%);
  padding: 16px 14px;
  color: #1E1E1E;
}

.fb-follow-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 75%;
}

.fb-follow-banner-copy strong {
  font-size: 1.1rem;
  font-weight: 900;
}

.fb-follow-banner-copy span {
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.88;
}

.fb-follow-badge {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1877F2;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-family: Arial, sans-serif;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
}

.fb-follow-body {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fb-follow-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #000;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.fb-follow-meta {
  min-width: 0;
}

.fb-follow-meta h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.35;
  color: var(--primary);
}

.fb-follow-meta p {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.fb-follow-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.fb-follow-category::before {
  content: "📁";
  font-size: 0.8rem;
}

.fb-follow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 12px;
  background: #1877F2;
  color: #fff !important;
  font-weight: 800;
  text-decoration: none;
  transition: var(--transition);
}

.fb-follow-btn::before {
  content: "+";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  line-height: 1;
}

.fb-follow-btn:hover {
  background: #166FE5;
  transform: translateY(-1px);
}

/* ── Join section ── */
.join-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.join-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #fff;
  transition: var(--transition);
}

.join-card:hover { transform: scale(1.02); }

.join-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

.join-card:nth-child(1)::before { background: linear-gradient(160deg, #FFD400, #FFE034); }
.join-card:nth-child(2)::before { background: linear-gradient(160deg, #7C3AED, #2563EB); }
.join-card:nth-child(3)::before { background: linear-gradient(160deg, #059669, #0F766E); }

.join-card > * { position: relative; z-index: 1; }

.join-card .emoji { font-size: 2.2rem; margin-bottom: 12px; }

.join-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; }

.join-card p { font-size: 0.88rem; opacity: 0.9; margin-bottom: 16px; }

.join-card .btn {
  align-self: flex-start;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  backdrop-filter: blur(4px);
}

.join-card .btn:hover { background: rgba(255,255,255,0.3); }

/* ── Footer ── */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand .logo { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: 0.9rem; opacity: 0.75; line-height: 1.8; }

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 0.88rem;
  opacity: 0.75;
  transition: var(--transition);
}

.footer-col a:hover { opacity: 1; color: var(--accent-sky); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  opacity: 0.6;
}

/* ── Skeleton loading ── */
.skeleton {
  background: linear-gradient(90deg, var(--stroke) 25%, var(--bg-alt) 50%, var(--stroke) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  display: flex;
  gap: 16px;
  padding: 12px;
}

.skeleton-card .sk-img { width: 110px; height: 80px; flex-shrink: 0; }
.skeleton-card .sk-body { flex: 1; }
.skeleton-card .sk-line { height: 12px; margin-bottom: 8px; }
.skeleton-card .sk-line.short { width: 60%; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state .emoji { font-size: 2.5rem; margin-bottom: 12px; }

/* ── Article page ── */
.article-page { padding: 32px 0 64px; }

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 20px;
  transition: var(--transition);
}

.article-back-arrow {
  display: inline-block;
  font-size: 1.1em;
  line-height: 1;
}

.article-back:hover { color: var(--accent-sky); }

.article-header {
  margin: 0 0 22px;
  text-align: center;
}

.article-hero.media-frame {
  width: min(100%, 840px);
  height: clamp(300px, 42vw, 400px);
  margin: 0 auto 32px;
  border-radius: 20px;
  box-shadow:
    0 28px 70px rgba(255, 212, 0, 0.16),
    0 8px 24px rgba(255, 212, 0, 0.08);
}

.article-hero .media-frame-bg {
  filter: blur(40px) saturate(1.2) brightness(0.65);
}

.article-poster {
  margin: 0 auto 28px;
  max-width: min(960px, 100%);
  background: #fff;
  border: 1.5px solid var(--primary);
  border-radius: 16px;
  padding: 5px;
  box-shadow: 0 8px 24px rgba(30, 30, 30, 0.06);
}

.article-poster-view {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
}

.article-poster-view img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(86vh, 1400px);
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  background: #fff;
  image-rendering: auto;
}

.article-poster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.article-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 96px;
  background: rgba(12, 12, 12, 0.94);
}

.article-lightbox.is-open { display: flex; }

.article-lightbox.is-video {
  padding: 56px 16px 24px;
}

.article-lightbox.is-video .article-lightbox-image,
.article-lightbox.is-video .article-lightbox-bar {
  display: none !important;
}

.article-lightbox img,
.article-lightbox-image {
  max-width: min(100%, 1400px);
  max-height: calc(100vh - 130px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.article-lightbox-video-wrap {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 100px);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.article-lightbox-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 100px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}

.article-lightbox-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #FFD400;
  color: #1E1E1E;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  font-weight: 800;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.article-lightbox-bar {
  position: absolute;
  bottom: 22px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: center;
}

.article-gallery-item.is-video-thumb,
.activity-detail-media.is-video-thumb,
.milestone-gallery-item.is-video-thumb {
  grid-column: auto;
  width: auto;
  max-width: none;
  justify-self: stretch;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--line, #ece4d4);
  border-radius: 12px;
}

.article-gallery-video-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #0b0b0b;
  cursor: pointer;
}

.article-gallery-video-thumb img,
.article-gallery-video-thumb video {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #0b0b0b;
}

.activity-detail-media.is-video-thumb .article-gallery-video-thumb img,
.activity-detail-media.is-video-thumb .article-gallery-video-thumb video {
  height: auto;
  max-height: 320px;
  min-height: 180px;
  aspect-ratio: 16 / 9;
}

.article-gallery-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(15, 15, 15, 0.62);
  color: #fff;
  font-size: 1.05rem;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(3px);
}

.article-header h1 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  font-weight: 900;
  color: #1E1E1E;
  line-height: 1.35;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--stroke);
}

.article-meta span { display: flex; align-items: center; gap: 6px; }

.article-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text);
}

.article-body p { margin-bottom: 16px; }

.article-attachments {
  margin-top: 28px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
}

.article-attachments h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text);
}

.article-pdf-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-pdf-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff1f2;
  border: 1px solid #fecaca;
  text-decoration: none;
  color: inherit;
}

.article-pdf-item strong {
  display: block;
  font-size: 0.95rem;
}

.article-pdf-item small {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.article-pdf-icon {
  font-size: 1.4rem;
}

.article-pdf-section {
  margin: 28px 0 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: none;
}

.article-pdf-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stroke, #ece4d4);
}

.article-pdf-section-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

.article-pdf-section-head span {
  font-size: 0.78rem;
  color: var(--text-secondary, #6b7280);
  white-space: nowrap;
}

.article-pdf-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-pdf-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffaf5 0%, #fff 55%);
  border: 1px solid #e8dfd2;
  box-shadow: 0 1px 0 rgba(30, 30, 30, 0.04);
}

/* Keep PDF block visually with media, not with comments */
.article-page .article-attachments + .article-pdf-section {
  margin-top: 16px;
}

.article-page .share-bar,
.article-page .article-share {
  margin-top: 28px;
}

.article-page .comments-section {
  margin-top: 48px;
  clear: both;
}

.article-pdf-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(145deg, #c62828 0%, #8e0000 100%);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.article-pdf-card-body strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}

.article-pdf-card-body small {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--text-secondary, #6b7280);
}

.article-pdf-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .article-pdf-card {
    grid-template-columns: auto 1fr;
  }

  .article-pdf-card-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .article-pdf-card-actions .btn {
    flex: 1;
    text-align: center;
  }
}

.admin-pdf-upload {
  margin-top: 4px;
}

.admin-pdf-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-pdf-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line, #e8dfd2);
  background: #fff;
}

.admin-pdf-badge {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(145deg, #c62828 0%, #8e0000 100%);
}

.admin-pdf-row strong {
  display: block;
  font-size: 0.9rem;
}

.admin-pdf-row small {
  color: var(--text-secondary, #6b7280);
  font-size: 0.75rem;
}

.admin-pdf-row-body {
  min-width: 0;
}

.admin-pdf-title-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary, #6b7280);
}

.admin-pdf-title-label input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line, #e8dfd2);
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  background: #fff;
}

.admin-pdf-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 640px) {
  .admin-pdf-row {
    grid-template-columns: auto 1fr;
  }

  .admin-pdf-row-actions {
    grid-column: 1 / -1;
  }
}

.article-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.article-gallery img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
}

.article-gallery-item {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #ece4d4);
}

.article-gallery-item.is-video {
  background: transparent;
  border: 0;
  overflow: visible;
  grid-column: 1 / -1;
  width: min(100%, 520px);
  max-width: 520px;
  justify-self: center;
}

.article-gallery-item.is-video > video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: transparent;
  border-radius: 14px;
}

.article-gallery-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.article-gallery-zoom img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.article-tag {
  background: var(--bg-alt);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.article-share,
.share-bar {
  margin-top: 32px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.share-bar-label {
  font-weight: 800;
  color: var(--text);
}

.share-bar--compact {
  margin: 0;
  padding: 8px 0 0;
  background: transparent;
  border: 0;
  border-top: 1px dashed var(--stroke);
  border-radius: 0;
  justify-content: flex-start;
}

.share-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.share-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  height: 44px;
  padding: 0 14px 0 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(30, 30, 30, 0.12);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.share-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.share-icon:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.share-icon--wa { background: #25D366; }
.share-icon--fb { background: #1877F2; }
.share-icon--ig { background: linear-gradient(135deg, #f58529, #dd2a7b 52%, #8134af); }
.share-icon--tw { background: #1DA1F2; }

.share-bar--compact .share-icon {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  justify-content: center;
}

.share-bar--compact .share-icon span {
  display: none;
}

.share-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 16px);
  background: #1E1E1E;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.share-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.app-banner {
  margin-top: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  padding: 28px 32px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.app-banner h3 { font-size: 1.15rem; font-weight: 800; }

/* ── Responsive ── */
@media (max-width: 992px) {
  .features-grid, .join-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-visual { order: -1; }
  .home-feed { padding: 22px 0 32px; }
}

.ads-resource-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  max-width: 980px;
}

.ad-card {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--card-accent, #E6BF00) 22%, transparent);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(255, 212, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ad-card-media {
  position: relative;
  height: 160px;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f9;
}

.ad-card-media > .video-glimpse {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ad-card-media img,
.ad-card-media video {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.ad-card-media .video-glimpse-el,
.ad-card-media .video-glimpse-fallback {
  height: 100%;
}

.ad-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.ad-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.ad-card-text h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
}

.ad-card-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.ad-card-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--card-accent, #E6BF00) 45%, transparent);
  color: var(--card-accent, #E6BF00);
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  background: color-mix(in srgb, var(--card-accent, #E6BF00) 8%, #fff);
}

.ad-card-download:hover {
  background: color-mix(in srgb, var(--card-accent, #E6BF00) 14%, #fff);
}

.ad-comments {
  background: #eff8f1;
  border: 1px solid #b7e0c2;
  border-radius: 12px;
  padding: 10px;
}

.ad-comments-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #1b7a3d;
  margin-bottom: 8px;
}

.ad-comments-composer {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.ad-comments-input {
  flex: 1;
  border: 1px solid #b7e0c2;
  border-radius: 999px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  background: #fff;
}

.ad-comments-send {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #1b7a3d;
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
}

.ad-comments-login {
  width: 100%;
  border: 1px dashed #b7e0c2;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  color: #1b7a3d;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
}

.ad-comments-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ad-comment-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.8rem;
  color: #245c38;
  line-height: 1.35;
}

.ad-comment-item strong {
  flex-shrink: 0;
}

.ad-comment-item span {
  flex: 1;
}

.ad-comment-delete {
  border: none;
  background: transparent;
  color: #c0392b;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
}

.ad-comments-empty,
.ad-comments-loading {
  font-size: 0.8rem;
  color: #6aa87e;
  margin: 0;
}

.ad-comments-more {
  margin-top: 8px;
  width: 100%;
  border: none;
  background: transparent;
  color: #1b7a3d;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px;
}

/* ── Store ── */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.store-card {
  background: #fff;
  border: 1px solid rgba(255, 212, 0, 0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(255, 212, 0, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.store-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(255, 212, 0, 0.12);
}

.store-card-media {
  position: relative;
  height: 190px;
  background: linear-gradient(145deg, #f3f6fb, #e8eef8);
  overflow: hidden;
}

.store-card-media > .video-glimpse {
  position: absolute;
  inset: 0;
}

.video-glimpse--store .video-glimpse-play {
  font-size: 1.5rem;
  background: rgba(8, 21, 47, 0.2);
}

.store-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-card-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
}

.store-card-category {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #FFD400;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
}

.store-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.store-card-body h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.45;
  margin: 0;
}

.store-card-desc {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.store-card-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.store-card-price strong {
  color: #FFD400;
  font-size: 1.15rem;
  font-weight: 900;
}

.store-card-original {
  color: #94a3b8;
  font-size: 0.8rem;
  text-decoration: line-through;
}

.store-buy-btn {
  background: #F68B1E !important;
  color: #fff !important;
  border: none !important;
  font-size: 0.85rem !important;
  font-weight: 800 !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  white-space: nowrap;
}

.store-buy-btn:hover {
  filter: brightness(1.05);
}

.document-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.document-filters {
  position: relative;
  margin-bottom: 16px;
  z-index: 20;
}

.doc-filter {
  position: relative;
}

.doc-filter-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(13, 148, 136, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(14, 165, 233, 0.06));
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.doc-filter-trigger:hover {
  border-color: rgba(13, 148, 136, 0.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.doc-filter-trigger-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0D9488, #0F766E);
  color: #fff;
}

.doc-filter-trigger-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-filter-trigger-text strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-filter-trigger-text small {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.doc-filter-badge {
  flex-shrink: 0;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #0D9488;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.doc-filter-chevron {
  color: #0D9488;
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.doc-filter-chevron.open {
  transform: rotate(180deg);
}

.doc-filter-panel {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: docFilterIn 0.2s ease;
}

.doc-filter-panel.open {
  display: flex;
}

@keyframes docFilterIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.doc-filter-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.doc-filter-panel-head h3 {
  font-size: 1rem;
  font-weight: 900;
  color: var(--primary);
  margin: 0;
}

.doc-filter-panel-head p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.doc-filter-reset {
  border: none;
  background: transparent;
  color: #0D9488;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  padding: 4px 0;
}

.doc-filter-group-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.doc-filter-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.doc-filter-option {
  border: 1px solid var(--stroke);
  background: #F8FAFC;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  text-align: center;
}

.doc-filter-option:hover {
  border-color: rgba(13, 148, 136, 0.35);
  background: #F0FDFA;
}

.doc-filter-option.active.type {
  background: #0D9488;
  border-color: #0D9488;
  color: #fff;
}

.doc-filter-option.active.subject {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.doc-filter-apply {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #0D9488, #0F766E);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.25);
}

.doc-filter-apply:hover {
  filter: brightness(1.05);
}

.document-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.document-type-badge,
.document-pdf-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.document-type-badge {
  background: rgba(13, 148, 136, 0.12);
  color: #0F766E;
}

.document-pdf-badge {
  background: rgba(220, 38, 38, 0.1);
  color: #B91C1C;
}

.legal-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 18px 18px 14px;
  border-radius: 4px;
  background: #fffef9;
  border: 1px solid rgba(30, 64, 175, 0.18);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.legal-card:hover {
  border-color: rgba(30, 64, 175, 0.4);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.legal-card-header {
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #FFD400;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-bottom: 10px;
}

.legal-card-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.5;
  text-align: center;
}

.legal-card-meta {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 12px;
}

.legal-card-rule {
  border: 1.5px solid #1e3a8a;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: #fff;
}

.legal-card-rule-label {
  display: block;
  font-weight: 800;
  color: #1e3a8a;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.legal-card-rule p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #1f2937;
  text-align: justify;
}

.legal-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: #64748b;
  border-top: 1px dashed rgba(30, 64, 175, 0.2);
  padding-top: 10px;
}

.article-legal-banner {
  text-align: center;
  font-weight: 800;
  color: #FFD400;
  text-decoration: underline;
  text-underline-offset: 5px;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.article-legal-rule {
  border: 2px solid #1e3a8a;
  padding: 16px 18px;
  margin: 0 0 24px;
  background: #fffef9;
}

.article-legal-rule h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #1e3a8a;
}

.article-legal-rule p {
  margin: 0;
  line-height: 1.8;
  text-align: justify;
}

.article-body.legal-body p {
  text-align: justify;
  margin-bottom: 0.85em;
}

.article-body.legal-body .legal-heading {
  font-weight: 800;
  color: #FFD400;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
  text-align: center;
}

.document-card {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(255, 212, 0, 0.1);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.document-card-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(13, 148, 136, 0.12);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}

.document-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.document-card-body h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #FFD400;
  line-height: 1.45;
}

.document-card-summary {
  margin: 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.55;
}

.document-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.8rem;
  color: #64748b;
}

.document-ref {
  background: rgba(255, 212, 0, 0.08);
  color: #FFD400;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.document-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 1100px) {
  .app-qr-box { display: none; }
}

@media (max-width: 900px) {
  .site-header > .container.header-inner {
    width: min(100% - 24px, var(--header-container));
  }
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    column-gap: 8px;
  }
  .logo { grid-column: 1; min-width: 0; }
  .nav-desktop { display: none; }
  .header-actions {
    grid-column: 2;
    justify-self: end;
  }
  .menu-toggle {
    display: block;
    grid-column: 3;
  }
  .header-inner > .notif-bell {
    grid-column: 4;
    justify-self: start;
  }
  .header-app-group,
  #auth-widget,
  .auth-signin-btn {
    display: flex !important;
    visibility: visible !important;
  }
  .auth-signin-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 768px) {
  .article-card-thumb { width: 105px; height: 78px; }
  .article-card-thumb--poster { width: 92px; height: 122px; }
  .event-media { width: 86px; height: 86px; }
  .article-hero.media-frame {
    height: clamp(220px, 58vw, 300px);
    border-radius: 16px;
  }
  .article-card h3 { font-size: 0.9rem; }
  section { padding: 40px 0; }
}

@media (max-width: 480px) {
  .header-actions .btn-primary { font-size: 0.8rem; padding: 8px 14px; }
  .auth-user-name { display: none; }
  .logo .logo-title {
    white-space: nowrap;
    font-size: 0.82rem;
  }
  .auth-signin-btn.auth-signin-icon { width: 36px; height: 36px; padding: 0; }
}

/* ── AI public content ── */
.ai-more-list {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--stroke);
}

.ai-more-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  text-align: center;
}

.ai-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.ai-more-item {
  display: block;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.ai-more-item:hover {
  border-color: var(--purple);
  box-shadow: var(--shadow-sm);
}

.ai-more-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ai-more-item strong {
  font-size: 0.92rem;
  color: var(--text);
}

.ai-examples {
  margin-top: 32px;
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.ai-examples h3 {
  color: var(--primary);
  margin-bottom: 12px;
}

.ai-examples ul {
  list-style: disc;
  padding-inline-start: 24px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.quiz-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
  max-width: 720px;
  margin: 0 auto;
}

.quiz-progress {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 12px 0 20px;
}

.quiz-question {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  padding: 14px 18px;
  border: 2px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  transition: var(--transition);
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--bg-alt);
}

.quiz-option.correct {
  border-color: var(--mint);
  background: rgba(16, 185, 129, 0.1);
}

.quiz-option.wrong {
  border-color: #DC2626;
  background: rgba(220, 38, 38, 0.08);
}

.quiz-feedback {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-sm);
}

.quiz-feedback.ok { background: rgba(16, 185, 129, 0.1); }
.quiz-feedback.bad { background: rgba(220, 38, 38, 0.08); }

.quiz-result {
  text-align: center;
}

.quiz-score {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  margin: 16px 0;
}

.notif-bell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 212, 0, 0.08);
  text-decoration: none;
  font-size: 1.1rem;
}

.notif-bell-count {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-page-main {
  padding: 28px 16px 64px;
  max-width: 720px;
}

.notif-page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.notif-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(255, 212, 0, 0.1);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  transition: var(--transition);
}

.notif-card--compact {
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  align-items: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.notif-card:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  border-color: rgba(255, 212, 0, 0.18);
  transform: translateY(-1px);
}

.notif-card-img {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.notif-card-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}

.notif-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  background: rgba(16, 185, 129, 0.12);
}

.notif-card-icon--article { background: rgba(255, 212, 0, 0.1); }
.notif-card-icon--legal { background: rgba(30, 64, 175, 0.12); }
.notif-card-icon--document { background: rgba(13, 148, 136, 0.12); }
.notif-card-icon--event { background: rgba(124, 58, 237, 0.12); }
.notif-card-icon--ad { background: rgba(245, 158, 11, 0.14); }
.notif-card-icon--product { background: rgba(246, 139, 30, 0.14); }
.notif-card-icon--comment { background: rgba(59, 130, 246, 0.12); }
.notif-card-icon--meeting { background: rgba(14, 165, 233, 0.14); }

.notif-card-img--logo {
  display: grid;
  place-items: center;
  background: rgba(255, 212, 0, 0.08);
}

.notif-card-img--logo img {
  width: 42px;
  height: 42px;
}

.notif-card-body {
  min-width: 0;
  flex: 1;
}

.notif-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.notif-card-top time {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 700;
}

.notif-card-body h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: #FFD400;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-card--compact .notif-card-body h3 {
  margin: 0;
}

.notif-card--compact .notif-card-body p {
  margin: 3px 0 6px;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-card-body p {
  margin: 0;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.55;
}

.notif-card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.75rem;
  color: #64748b;
}

.notif-type {
  display: inline-flex;
  background: rgba(255, 212, 0, 0.08);
  color: #FFD400;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.notif-type--article { background: rgba(255, 212, 0, 0.1); color: #FFD400; }
.notif-type--legal { background: rgba(30, 64, 175, 0.12); color: #1E40AF; }
.notif-type--document { background: rgba(13, 148, 136, 0.12); color: #0F766E; }
.notif-type--event { background: rgba(124, 58, 237, 0.12); color: #6D28D9; }
.notif-type--ad { background: rgba(255, 212, 0, 0.16); color: #7A6A00; }
.notif-type--product { background: rgba(255, 212, 0, 0.12); color: #B59A00; }
.notif-type--comment { background: rgba(59, 130, 246, 0.12); color: #1D4ED8; }
.notif-type--meeting { background: rgba(14, 165, 233, 0.14); color: #0369A1; }

/* CDT yellow contrast */
.btn-primary,
.home-chip.is-active {
  color: #1E1E1E;
}
.btn-primary:hover {
  color: #1E1E1E;
}
.logo {
  color: var(--primary-dark);
}
.logo span,
.logo .logo-title {
  font-family: "Amiri", "Traditional Arabic", "Cairo", serif;
  font-weight: 700;
  color: var(--primary-dark);
}
.site-footer .logo,
.site-footer .logo span,
.footer-brand .logo span {
  color: #fff;
}
.home-brand-name {
  color: var(--primary-dark);
}
.home-brand-name::after {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  margin-top: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* ── Admin dashboard ── */
.admin-body {
  min-height: 100vh;
  background: #F4F1E8;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 268px;
  flex-shrink: 0;
  background: #1E1E1E;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 18px 18px;
  color: inherit;
  text-decoration: none;
}

.admin-brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary);
  padding: 4px;
}

.admin-brand strong {
  display: block;
  color: var(--primary);
  font-size: 1.05rem;
  font-weight: 900;
}

.admin-brand small {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 700;
  font-size: 0.78rem;
}

.admin-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 16px;
}

.admin-nav-label {
  margin: 16px 10px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.42);
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  margin-bottom: 4px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
}

.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.admin-nav a.is-active {
  background: var(--primary);
  color: #1E1E1E;
}

.admin-nav-ico {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
}

.admin-nav-ico svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-nav a.is-active .admin-nav-ico {
  opacity: 1;
}

.admin-sidebar-foot {
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar .auth-user-name,
.admin-sidebar .auth-user-chip {
  color: #fff;
}

.admin-sidebar .btn-outline {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.admin-frame {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 28px;
  background: #fff;
  border-bottom: 1px solid #E8DFC8;
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: #1E1E1E;
}

.admin-top-kicker { display: none; }

.admin-topbar > div {
  flex: 1;
  min-width: 0;
}

.admin-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid #E8DFC8;
  border-radius: 12px;
  background: #fff;
  font-size: 1.15rem;
  cursor: pointer;
}

.admin-main {
  padding: 28px 28px 64px;
  max-width: 1180px;
  width: 100%;
}

.admin-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 16, 12, 0.45);
  z-index: 25;
}

.admin-tabs {
  display: contents;
}

.admin-loading,
.admin-login-wrap {
  display: grid;
  place-items: center;
  min-height: 50vh;
  text-align: center;
  gap: 16px;
  color: var(--text-secondary);
}

.admin-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--stroke);
  border-top-color: var(--primary);
  animation: adminSpin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes adminSpin {
  to { transform: rotate(360deg); }
}

.admin-hero h1,
.admin-toolbar h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--primary-dark);
  margin: 4px 0 8px;
}

.admin-kicker {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.85rem;
}

.admin-hero p,
.admin-toolbar p {
  color: var(--text-muted);
  font-weight: 600;
}

.overview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.overview-kicker {
  margin: 0 0 4px;
  color: #b45309;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.overview-head h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2.8vw, 1.95rem);
  font-weight: 900;
  color: var(--primary-dark);
}

.overview-head p {
  display: none;
}

.overview-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #ecfdf5, #d1fae5);
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 800;
}

.overview-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.overview-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.overview-hero-tile {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 16px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  border: 1px solid transparent;
  box-shadow: 0 10px 28px rgba(28, 25, 23, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.overview-hero-tile::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0.18;
  background: currentColor;
  pointer-events: none;
}

.overview-hero-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(28, 25, 23, 0.1);
}

.overview-hero-tile.tone-visit {
  background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 55%, #fed7aa 100%);
  border-color: #fdba74;
  color: #9a3412;
}

.overview-hero-tile.tone-download {
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 55%, #bfdbfe 100%);
  border-color: #93c5fd;
  color: #1d4ed8;
}

.overview-hero-tile.tone-reads {
  background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 55%, #bbf7d0 100%);
  border-color: #86efac;
  color: #166534;
}

.overview-hero-tile.tone-comments {
  background: linear-gradient(145deg, #fff1f2 0%, #ffe4e6 55%, #fecdd3 100%);
  border-color: #fda4af;
  color: #9f1239;
}

.overview-hero-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  font-weight: 900;
}

.overview-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.overview-hero-label {
  font-size: 0.8rem;
  font-weight: 800;
  opacity: 0.85;
}

.overview-hero-value {
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: inherit;
}

.overview-hero-hint {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.72;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.overview-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), #fff),
    radial-gradient(120% 80% at 100% 0%, rgba(251, 191, 36, 0.08), transparent 55%);
  border: 1px solid #e7e0d2;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.05);
  overflow: hidden;
}

.overview-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #f59e0b;
}

.overview-card.tone-amber::after { background: #f59e0b; }
.overview-card.tone-green::after { background: #10b981; }
.overview-card.tone-blue::after { background: #3b82f6; }
.overview-card.tone-slate::after { background: #64748b; }
.overview-card.tone-rose::after { background: #f43f5e; }
.overview-card.tone-ink::after { background: #292524; }

.overview-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 14px;
}

.overview-card-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff8e7;
  border: 1px solid #f0e4c0;
  font-size: 0.95rem;
}

.overview-card.tone-green .overview-card-icon { background: #ecfdf5; border-color: #a7f3d0; }
.overview-card.tone-blue .overview-card-icon { background: #eff6ff; border-color: #bfdbfe; }
.overview-card.tone-slate .overview-card-icon { background: #f8fafc; border-color: #e2e8f0; }
.overview-card.tone-rose .overview-card-icon { background: #fff1f2; border-color: #fecdd3; }
.overview-card.tone-ink .overview-card-icon { background: #f5f5f4; border-color: #d6d3d1; }

.overview-card-head h3 {
  margin: 0;
  flex: 1;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--primary-dark);
}

.overview-card-arrow {
  color: #a8a29e;
  font-size: 0.95rem;
  font-weight: 800;
}

.overview-metrics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.overview-metric {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(250, 250, 249, 0.9);
}

.overview-metric span {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.overview-metric strong {
  font-size: 0.95rem;
  font-weight: 900;
  text-align: end;
  color: var(--primary-dark);
}

.overview-metric.is-alert {
  background: #fef2f2;
}

.overview-metric.is-alert span,
.overview-metric.is-alert strong {
  color: #dc2626;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.overview-links a {
  text-decoration: none;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.74rem;
  font-weight: 800;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.overview-links a:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

@media (max-width: 1100px) {
  .overview-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .overview-hero {
    grid-template-columns: 1fr;
  }

  .overview-head {
    flex-direction: column;
  }
}

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 22px 0 28px;
}

.admin-kpi {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.admin-kpi strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.1;
}

.admin-kpi span {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
}

.admin-actions,
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-action,
.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.admin-action h3,
.admin-row h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.admin-card-no {
  display: inline-block;
  margin-inline-start: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 212, 0, 0.18);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  vertical-align: middle;
}

/* Compact horizontal member strips — dense list for hundreds of rows */
.member-strips {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.member-strip-head,
.member-strip {
  display: grid;
  grid-template-columns:
    3px
    minmax(110px, 0.95fr)
    88px
    90px
    84px
    minmax(0, 1fr)
    minmax(0, 0.85fr)
    100px
    30px
    minmax(168px, 188px);
  align-items: center;
  column-gap: 6px;
  row-gap: 0;
}

.member-strip-head {
  min-height: 28px;
  padding: 0 8px 0 0;
  color: #8A8070;
  font-size: 0.72rem;
  font-weight: 800;
}

.member-strip-head span:nth-child(3) {
  color: #1E1E1E;
  font-weight: 900;
}

.member-strip {
  min-height: 40px;
  padding: 4px 8px 4px 0;
  background: #fff;
  border: 1px solid #E8E2D6;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.member-strip-identity {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.member-strip-ids-mobile {
  display: none;
}

.member-profile {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.member-profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--stroke);
  flex-wrap: wrap;
}

.member-profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 900;
  background: rgba(255, 212, 0, 0.22);
  color: var(--charcoal);
  flex-shrink: 0;
}

.member-profile-head h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 900;
}

.member-profile-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.member-profile-head .member-profile-pay,
.member-profile-head .admin-badge {
  margin-inline-start: auto;
}

.member-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.member-profile-field {
  background: #FFFEF5;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 12px 14px;
}

.member-profile-field span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.member-profile-field strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--charcoal);
  word-break: break-word;
}

.member-profile-notes {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #FFF9DB;
}

.member-profile-notes span {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.member-profile-notes p {
  margin: 0;
  font-weight: 600;
  line-height: 1.6;
}

.member-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

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

@media (max-width: 640px) {
  .member-profile-grid { grid-template-columns: 1fr; }
}

.member-strip:hover {
  background: #FAF8F3;
  border-color: #D9D2C4;
}

.member-strip-status {
  align-self: stretch;
  width: 3px;
  border-radius: 8px 0 0 8px;
  background: #A89984;
}

.member-strip.is-paid .member-strip-status {
  background: #6B8F71;
}

.member-strip.is-unpaid .member-strip-status {
  background: #B08968;
}

.member-strip-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #2A2620;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.member-strip-id {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 5px;
  background: #F3EFE7;
  border: 1px solid #E4DDD0;
  color: #3F3A32;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: visible;
}

.member-strip-id.is-card-no {
  background: #FFF6D6;
  border-color: #F0D889;
}

.member-strip-id em {
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 800;
  color: #8A8070;
}

.member-strip-id b,
.member-strip-id .member-id-empty {
  min-width: 0;
  font-weight: 900;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  font-variant-numeric: tabular-nums;
}

.member-strip-cell {
  min-width: 0;
  max-width: 100%;
  font-size: 0.78rem;
  font-weight: 700;
  color: #3F3A32;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-id-empty {
  font-size: 0.68rem;
  font-weight: 700;
  color: #A89984;
}

.member-strip-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 5px;
  background: #F3EFE7;
  border: 1px solid #E4DDD0;
  box-sizing: border-box;
}

.member-strip-phone-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  direction: ltr;
  unicode-bidi: isolate;
  overflow: hidden;
  text-align: center;
}
.member-strip-phone-val .ltr-num {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  font-weight: 800;
  color: #3F3A32;
  width: 100%;
}

.member-strip-phone-val a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-strip-phone-val a:hover {
  color: #5C5340;
}

.member-strip-pay {
  display: grid;
  place-items: center;
  width: 30px;
  justify-self: center;
}

.admin-wa-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #25D366;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.admin-wa-icon:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
  color: #fff;
}

.admin-wa-icon.is-empty {
  visibility: hidden;
  pointer-events: none;
  background: transparent;
}

.admin-wa-icon svg {
  display: block;
}

.member-strip-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: 100%;
  min-width: 0;
  flex-shrink: 0;
}

.member-pay-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 4.8rem;
  height: 28px;
  padding: 0 6px 0 8px;
  border-radius: 6px;
  border: 1px solid #E0D9CC;
  background: #F7F4EE;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.member-pay-btn-label {
  line-height: 1;
}

.member-pay-btn-caret {
  width: 0;
  height: 0;
  border-inline: 3.5px solid transparent;
  border-top: 4.5px solid #8A8274;
  margin-top: 1px;
  flex-shrink: 0;
}

.member-pay-btn.is-paid .member-pay-btn-label {
  color: #059669;
}

.member-pay-btn.is-unpaid .member-pay-btn-label {
  color: #DC2626;
}

.member-pay-btn:hover {
  background: #EFEAE0;
  border-color: #CFC6B6;
}

.member-pay-btn:hover .member-pay-btn-caret {
  border-top-color: #5C564C;
}

.member-pay-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.member-icon-btn {
  appearance: none;
  border: 1px solid #E0D9CC;
  background: #F7F4EE;
  color: #4A4338;
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.member-icon-btn:hover {
  background: #EFEAE0;
  border-color: #CFC6B6;
  color: #2A2620;
}

.member-icon-btn.is-danger,
.member-delete-btn {
  color: #DC2626;
  border-color: #F0C9C9;
  background: #FEF2F2;
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.member-icon-btn.is-danger:hover,
.member-delete-btn:hover {
  background: #FEE2E2;
  border-color: #F5A8A8;
  color: #B91C1C;
}

.member-delete-btn svg {
  display: block;
  pointer-events: none;
}


.members-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.members-action-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid #E4DDD0;
  border-radius: 10px;
  background: #FAF8F3;
}

.members-action-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #8A8070;
  padding-inline: 4px;
}

.members-toolbar-actions .btn-primary {
  background: #3F3A32;
  border-color: #3F3A32;
  color: #FFF9DB;
}

.members-toolbar-actions .btn-primary:hover {
  background: #2A2620;
  border-color: #2A2620;
  color: #fff;
}

.admin-action p,
.admin-row p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.admin-action span {
  font-size: 1.4rem;
  color: var(--primary);
}

.admin-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-toolbar-actions .btn,
.admin-toolbar-actions label.btn {
  margin: 0;
  cursor: pointer;
}

.admin-upload {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed var(--stroke);
  border-radius: 16px;
  background: var(--bg-alt);
}

.admin-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-upload-preview {
  min-height: 88px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--stroke);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
}

.admin-upload-preview img,
.admin-upload-preview video {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  display: block;
  background: #fff;
}

.admin-progress {
  height: 8px;
  background: #fff;
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--stroke);
}

.admin-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.2s ease;
}

.admin-back {
  display: inline-block;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 6px;
}

.admin-season {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: var(--text-secondary);
}

.admin-year-control {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.admin-year-control .admin-season {
  flex: 1 1 220px;
  min-width: 180px;
}

.admin-year-control .btn {
  flex: 0 0 auto;
  margin-bottom: 1px;
}

.admin-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.member-filters {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px;
  gap: 14px;
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.04);
}

.member-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.member-filter-bar .admin-year-control {
  flex: 1 1 auto;
  min-width: min(100%, 420px);
}

.member-filter-reset {
  margin-inline-start: auto;
}

.member-filter-search {
  position: relative;
}

.member-filter-search-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 14px;
  transform: translateY(-50%);
  color: #8A8070;
  font-size: 1.05rem;
  pointer-events: none;
}

.member-filter-search .admin-input {
  padding-inline-start: 40px;
}

.member-filter-block {
  display: grid;
  gap: 10px;
}

.member-filter-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.member-filter-block-head strong {
  font-size: 0.84rem;
  font-weight: 900;
  color: #1E1E1E;
}

.member-filter-block-head span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8A8070;
}

.member-filter-selects {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.member-filter-selects label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-secondary);
}

.member-filter-selects .admin-input,
.member-filter-search .admin-input {
  min-height: 44px;
}

.member-office-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 8px 12px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.member-office-chip:hover {
  transform: translateY(-1px);
  border-color: #C9C0B0;
  background: #F7F4EE;
}

.member-office-chip em {
  font-style: normal;
  min-width: 1.6em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  color: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.member-office-chip.is-active em {
  background: rgba(17, 17, 17, 0.12);
}

.member-office-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-office-chip {
  max-width: 100%;
  white-space: nowrap;
}

.member-office-chip.is-active {
  background: #EFEAE0;
  border-color: #C9C0B0;
  color: #2A2620;
}

.member-office-chip.is-private-chip.is-active {
  background: #3F3A32;
  border-color: #3F3A32;
  color: #F5EFD9;
}

.member-private-dd {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.member-private-dd .is-private-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(100vw, 280px);
}

.member-private-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 160px;
}

.member-private-caret {
  font-size: 0.7rem;
  opacity: 0.8;
  transition: transform 0.15s ease;
}

.member-private-dd.is-open .member-private-caret {
  transform: rotate(180deg);
}

.member-private-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  z-index: 40;
  min-width: 260px;
  max-width: min(92vw, 340px);
  max-height: 420px;
  overflow: auto;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #E4DDD0;
  background: #FFFEFA;
  box-shadow: 0 14px 32px rgba(30, 30, 30, 0.12);
}

.member-private-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: right;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  color: #2A2620;
}

.member-private-option:hover {
  background: #F3EFE7;
}

.member-private-option.is-active {
  background: #EFEAE0;
  color: #1E1E1E;
}

.member-private-option em {
  font-style: normal;
  min-width: 1.6em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  font-size: 0.75rem;
  font-weight: 900;
  text-align: center;
}

.member-private-empty {
  padding: 12px 10px;
  color: #8A8070;
  font-size: 0.82rem;
  font-weight: 700;
}

.member-private-add {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border-top: 1px solid #E8E1D4;
  background: #FBF8F2;
  border-radius: 0 0 10px 10px;
}

.member-private-add strong {
  font-size: 0.8rem;
  font-weight: 900;
  color: #1E1E1E;
}

.member-private-add .admin-input {
  width: 100%;
  min-height: 36px;
  font-size: 0.84rem;
}

.member-private-add-sector {
  display: grid;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #5C5340;
}

.member-private-add .btn {
  width: 100%;
  justify-content: center;
}

.institution-filter-summary {
  display: grid;
  gap: 2px;
}

.institution-filter-summary strong {
  font-size: 0.95rem;
  font-weight: 900;
  color: #1E1E1E;
}

.institution-filter-summary span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8A8070;
}

.institution-filter-selects {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.institution-strips {
  margin-top: 4px;
}

.institution-strip {
  display: grid;
  grid-template-columns:
    4px
    34px
    minmax(160px, 1.5fr)
    minmax(80px, 0.7fr)
    minmax(70px, 0.55fr)
    minmax(70px, 0.55fr)
    auto
    auto;
  align-items: center;
  gap: 10px 12px;
  min-height: 52px;
  padding: 8px 10px 8px 0;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.institution-strip:hover {
  background: #FFFEF5;
  border-color: #FFD400;
}

.institution-strip-status {
  align-self: stretch;
  width: 4px;
  border-radius: 10px 0 0 10px;
  background: #CFC6B5;
}

.institution-strip.is-ready .institution-strip-status { background: #43A047; }
.institution-strip.is-warn .institution-strip-status { background: #E53935; }
.institution-strip.is-neutral .institution-strip-status { background: #FFD400; }

.institution-strip-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: rgba(255, 212, 0, 0.22);
  color: #1E1E1E;
}

.institution-strip-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.institution-strip-name {
  font-size: 0.95rem;
  font-weight: 900;
  color: #1E1E1E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.institution-strip-meta {
  font-size: 0.75rem;
  font-weight: 700;
  color: #8A8070;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.institution-strip-cell {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.institution-strip-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: #8A8070;
}

.institution-strip-cell > span:last-child {
  font-size: 0.86rem;
  font-weight: 800;
  color: #1E1E1E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.institution-strip-badge .admin-badge {
  white-space: nowrap;
}

.institution-strip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.institution-strip-actions .btn {
  padding: 6px 10px;
}

.institution-detail-card {
  overflow: hidden;
}
.institution-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.institution-detail-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
}
.institution-detail-count {
  min-width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(30, 30, 30, 0.08);
  font-size: 0.88rem;
  font-weight: 900;
}
.institution-info-table-wrap,
.institution-members-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(30, 30, 30, 0.08);
  border-radius: 12px;
  background: #fff;
}
.institution-info-table,
.institution-members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.institution-info-table th,
.institution-info-table td,
.institution-members-table th,
.institution-members-table td {
  padding: 11px 14px;
  text-align: right;
  border-bottom: 1px solid rgba(30, 30, 30, 0.06);
  vertical-align: middle;
}
.institution-info-table tr:last-child th,
.institution-info-table tr:last-child td,
.institution-members-table tbody tr:last-child td {
  border-bottom: 0;
}
.institution-info-table th {
  width: 34%;
  max-width: 220px;
  background: rgba(255, 212, 0, 0.14);
  font-weight: 800;
  color: #4A4538;
  white-space: nowrap;
}
.institution-info-table td {
  font-weight: 700;
  color: #1E1E1E;
}
.institution-members-table thead th {
  background: linear-gradient(180deg, rgba(255, 212, 0, 0.28), rgba(255, 212, 0, 0.12));
  font-weight: 900;
  color: #1E1E1E;
  white-space: nowrap;
  border-bottom: 1px solid rgba(30, 30, 30, 0.1);
}
.institution-members-table tbody tr:nth-child(even) {
  background: rgba(255, 249, 219, 0.45);
}
.institution-members-table tbody tr:hover {
  background: rgba(255, 212, 0, 0.16);
}
.institution-members-table .col-num {
  width: 3.2rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #7A7360;
}
.institution-member-link {
  font-weight: 800;
  color: #1E1E1E;
  text-decoration: none;
}
.institution-member-link:hover {
  color: #7A6A00;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 960px) {
  .institution-filter-selects {
    grid-template-columns: 1fr;
  }

  .institution-strip {
    grid-template-columns: 4px 34px minmax(0, 1fr) auto;
    grid-template-areas:
      "status avatar main badge"
      "status avatar cells cells"
      "status avatar actions actions";
  }

  .institution-strip-status { grid-area: status; }
  .institution-strip-avatar { grid-area: avatar; }
  .institution-strip-main { grid-area: main; }
  .institution-strip-badge { grid-area: badge; }
  .institution-strip-actions { grid-area: actions; justify-content: flex-start; }
  .institution-strip-cell { display: none; }
  .institution-strip-hide-sm { display: none; }
}

.member-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 6px;
  padding: 8px 12px;
  background: #111;
  color: #FFD400;
  border-radius: 10px;
  font-size: 0.9rem;
}

.member-group-head:first-child {
  margin-top: 4px;
}

.member-group-head strong {
  font-weight: 900;
}

.member-group-head span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: #FFD400;
  color: #111;
  font-weight: 900;
  font-size: 0.82rem;
}

.admin-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-chip {
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-dark);
}

@media (max-width: 1100px) {
  .member-filter-selects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .member-filter-selects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .member-filters {
    padding: 12px;
    border-radius: 14px;
  }

  .member-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .member-filter-reset {
    margin-inline-start: 0;
    width: 100%;
  }

  .member-filter-selects {
    grid-template-columns: 1fr;
  }

  .member-office-chip {
    flex: 1 1 calc(50% - 8px);
    justify-content: space-between;
  }
}

.admin-form input[readonly] {
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-weight: 800;
}

.admin-form input[type="hidden"],
.admin-form input[type="file"] {
  display: none !important;
}

.admin-input,
.admin-form input:not([type="file"]):not([type="hidden"]):not([type="checkbox"]),
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.admin-dropzone {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  padding: 16px 12px;
  border: 2px dashed var(--stroke);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  font-weight: 800;
  color: var(--text-secondary);
}

.admin-dropzone span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.admin-dropzone.is-over,
.admin-dropzone:hover {
  border-color: var(--primary);
  background: var(--bg-alt);
}

.admin-dropzone.is-busy {
  pointer-events: none;
  opacity: 0.7;
}

.admin-form {
  display: grid;
  gap: 14px;
  max-width: 720px;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-md);
}

.admin-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: var(--text-secondary);
}

/* display:grid above must not override the HTML hidden attribute */
.admin-form label[hidden],
.admin-form [hidden] {
  display: none !important;
}

.other-choice-field {
  display: grid;
  gap: 6px;
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px dashed #e6bf00;
  border-radius: 14px;
  background: #fffbeb;
}
.other-choice-field-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #8a6d00;
}
.other-choice-field .admin-input,
.other-choice-field input {
  border-color: #e6bf00;
  background: #fff;
}
.other-pill {
  display: inline-flex;
  align-items: center;
  margin-inline-end: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff3bf;
  border: 1px solid #e6bf00;
  font-size: 0.72rem;
  font-weight: 800;
  color: #1e1e1e;
  vertical-align: middle;
}
.other-custom {
  font-weight: 800;
  color: #1e1e1e;
}

.inquiry-form [hidden],
.inquiry-form label[hidden],
.inquiry-form .other-choice-field[hidden] {
  display: none !important;
}

.inquiry-form .other-choice-field {
  margin: 4px 0 12px;
}

.admin-hint {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.admin-form .admin-upload-btn {
  display: inline-flex;
  font-weight: 700;
}

.admin-switch {
  display: flex !important;
  align-items: center;
  gap: 10px;
  grid-template-columns: none;
}

.admin-switch input {
  width: auto;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-phone-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-phone-row input {
  flex: 1;
}

.admin-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px !important;
  font-weight: 700;
  color: var(--text);
}

.admin-wa {
  background: #25D366 !important;
  color: #fff !important;
  border: none !important;
  white-space: nowrap;
}

.admin-wa:hover {
  filter: brightness(0.95);
}

.admin-meta { font-size: 0.82rem !important; }

.admin-badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 800;
}

.admin-badge.is-ok { background: rgba(16, 185, 129, 0.12); color: #059669; }
.admin-badge.is-warn { background: rgba(239, 68, 68, 0.12); color: #DC2626; }

/* تحديد القطاعات */
.sector-group-badge.is-edu {
  background: rgba(245, 185, 66, 0.2);
  color: #8A5A00;
}
.sector-group-badge.is-inst {
  background: rgba(5, 150, 105, 0.14);
  color: #047857;
}
.sector-group-badge.is-private {
  background: rgba(180, 83, 9, 0.14);
  color: #9A3412;
}
.sector-group-badge.is-other {
  background: rgba(30, 30, 30, 0.08);
  color: #1E1E1E;
}
.sector-yn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}
.sector-yn-pill.is-yes {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}
.sector-yn-pill.is-no {
  background: rgba(245, 158, 11, 0.16);
  color: #B45309;
}
.sectors-table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line, #E6E0D4);
  border-radius: 16px;
  margin-bottom: 18px;
}
.sectors-admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.sectors-admin-table th,
.sectors-admin-table td {
  padding: 12px 14px;
  text-align: right;
  border-bottom: 1px solid rgba(30, 30, 30, 0.06);
  vertical-align: middle;
}
.sectors-admin-table th {
  font-size: 0.78rem;
  font-weight: 900;
  color: #6B6458;
  background: #FBF8F0;
  white-space: nowrap;
}
.sectors-admin-table tbody tr:hover {
  background: rgba(245, 185, 66, 0.08);
}
.sectors-admin-table tbody tr.is-inactive {
  opacity: 0.62;
}
.sector-row-name {
  display: block;
  font-weight: 900;
  color: #1E1E1E;
}
.sector-row-note {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: #6B6458;
  font-weight: 700;
}
.sector-member-count {
  font-weight: 900;
  color: #1E1E1E;
}
.sector-row-actions {
  white-space: nowrap;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sectors-strips {
  display: none;
}
@media (max-width: 900px) {
  .sectors-table-wrap { display: none; }
  .sectors-strips { display: block; }
}

.btn-danger {
  background: #fff;
  color: #DC2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

body.is-pdf-exporting {
  cursor: progress;
}

body.is-pdf-exporting::after {
  content: "جاري إنشاء ملف PDF…";
  position: fixed;
  inset: auto 0 88px;
  margin: 0 auto;
  width: min(90vw, 320px);
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(30, 30, 30, 0.92);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  z-index: 90;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

body.is-pdf-exporting [data-export-members-pdf],
body.is-pdf-exporting [data-export-finance-pdf] {
  opacity: 0.65;
  pointer-events: none;
}

.admin-toast {
  position: fixed;
  bottom: 24px;
  inset-inline: 0;
  margin: 0 auto;
  width: min(90vw, 420px);
  background: var(--primary-dark);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  text-align: center;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.25s ease;
  z-index: 80;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: none;
}

.admin-toast.is-error { background: #DC2626; }

.admin-login-wrap { min-height: 100vh; padding: 24px; }

.admin-login-card {
  width: min(100%, 420px);
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: 36px 28px;
  box-shadow: var(--shadow-lg);
}

.admin-login-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #000;
  object-fit: cover;
}

.admin-login-card h1 {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.admin-login-card p {
  color: var(--text-muted);
  margin-bottom: 18px;
}

.admin-login-card .btn { width: 100%; }

.admin-login-back {
  display: inline-block;
  margin-top: 16px;
  color: var(--text-secondary);
  font-weight: 700;
}

.admin-alert {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-weight: 700;
}

.member-dialog {
  max-width: 980px;
  margin: 0 auto 40px;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  overflow: visible;
}

.member-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  background: linear-gradient(180deg, #FFF3D6, #fff);
  border-bottom: 1px solid var(--stroke);
}

.member-dialog-head h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--primary-dark);
}

.member-dialog-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--stroke);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
}

.member-dialog-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.member-grid {
  display: grid;
  gap: 14px 16px;
}

.member-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.member-dialog-form label,
.member-full {
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.member-dialog-form input,
.member-dialog-form select,
.member-dialog-form textarea {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}

.combo {
  position: relative;
}

.combo input { padding-inline-end: 42px; }

.combo-toggle {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.combo-list {
  position: absolute;
  z-index: 12;
  inset-inline: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  overflow: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.combo-list li {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.combo-list li:hover { background: var(--bg-alt); }

.member-dialog-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.member-switch {
  align-self: end;
  min-height: 58px;
}

.finance-hint {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.finance-kpis .admin-kpi strong {
  font-size: 1.15rem;
  line-height: 1.35;
}

.chart-card {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px 18px 10px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.members-chart-card {
  background: linear-gradient(160deg, #FFF9DB 0%, #fff 42%, #FFFEF5 100%);
}

.chart-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.chart-card-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 900;
}

.chart-card-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.chart-card-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.chart-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.chart-export-actions .btn {
  min-width: 52px;
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 800;
}

.chart-legend {
  display: flex;
  gap: 12px;
  align-items: center;
}

.chart-legend span {
  position: relative;
  padding-inline-start: 16px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
}

.chart-legend span::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 99px;
  transform: translateY(-50%);
}

.chart-legend .is-income::before { background: #059669; }
.chart-legend .is-expense::before { background: #DC2626; }
.chart-legend .is-members::before { background: #FFD400; }

.trend-chart {
  width: 100%;
  height: auto;
  max-height: 240px;
  display: block;
}

.trend-chart.chart-compact {
  max-height: 220px;
}

.chart-empty {
  padding: 36px 12px;
  text-align: center;
  color: var(--text-muted);
  font-weight: 700;
}

.finance-gate {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 18px;
}

.finance-gate-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--stroke);
  background: #fff;
  box-shadow: var(--shadow-sm);
  min-height: 150px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.finance-gate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(30, 30, 30, 0.08);
}

.finance-gate-card.is-income {
  background: linear-gradient(135deg, #ECFDF5 0%, #fff 55%);
  border-color: #A7F3D0;
}

.finance-gate-card.is-expense {
  background: linear-gradient(135deg, #FEF2F2 0%, #fff 55%);
  border-color: #FECACA;
}

.finance-gate-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.finance-gate-card strong {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--charcoal);
  line-height: 1.1;
}

.finance-gate-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  flex: 1;
}

.finance-gate-go {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--primary-dark, #B37A00);
}

.mad-amount,
.period-grid strong .ltr-num,
.fund-card .ltr-num,
.office-balance-card .ltr-num {
  unicode-bidi: isolate;
  direction: ltr;
  display: inline-block;
  text-align: left;
  white-space: nowrap;
}

.office-balance-board {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.04);
}

.office-balance-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.office-balance-board-head h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 900;
}

.office-balance-board-head p {
  margin: 0;
  color: #8A8070;
  font-size: 0.82rem;
  font-weight: 700;
}

.office-balance-board-total {
  display: grid;
  gap: 4px;
  text-align: end;
}

.office-balance-board-total span {
  font-size: 0.75rem;
  font-weight: 800;
  color: #8A8070;
}

.office-balance-board-total strong {
  font-size: 1.25rem;
  font-weight: 900;
}

.office-balance-rank {
  display: grid;
  gap: 8px;
}

.office-balance-card {
  display: grid;
  grid-template-columns: 36px minmax(120px, 1.2fr) minmax(120px, 1fr) minmax(140px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: #FFFEF5;
}

.office-balance-card.is-warn {
  background: #FFF7F7;
  border-color: #FECACA;
}

.office-balance-rank-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: #111;
  color: #FFD400;
}

.office-balance-card-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.office-balance-card-main strong {
  font-size: 0.98rem;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.office-balance-card-main span,
.office-balance-card-meta span,
.office-balance-card-amount span {
  font-size: 0.75rem;
  font-weight: 700;
  color: #8A8070;
}

.office-balance-card-amount {
  display: grid;
  gap: 2px;
}

.office-balance-card-amount strong {
  font-size: 1.05rem;
  font-weight: 900;
}

.office-balance-card-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.office-balance-card .is-ok { color: #059669; }
.office-balance-card .is-warn { color: #DC2626; }
.office-balance-board-total .is-ok { color: #059669; }
.office-balance-board-total .is-warn { color: #DC2626; }

@media (max-width: 800px) {
  .office-balance-card {
    grid-template-columns: 36px 1fr;
    grid-template-areas:
      "rank main"
      "rank amount"
      "rank meta";
  }
  .office-balance-rank-num { grid-area: rank; }
  .office-balance-card-main { grid-area: main; }
  .office-balance-card-amount { grid-area: amount; }
  .office-balance-card-meta { grid-area: meta; justify-items: start; }
}

.finance-balance-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 20px;
  margin-bottom: 18px;
  border: 1px solid var(--stroke);
  background: linear-gradient(120deg, #FFF9DB 0%, #fff 48%, #F7F5EA 100%);
}

.finance-balance-hero.is-warn {
  background: linear-gradient(120deg, #FEF2F2 0%, #fff 55%);
  border-color: #FECACA;
}

.finance-balance-kicker {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.finance-balance-hero > div > strong {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--charcoal);
  line-height: 1.15;
  margin-bottom: 8px;
}

.finance-balance-hero > div > p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 42ch;
}

.finance-balance-side {
  display: grid;
  gap: 10px;
  align-content: center;
}

.finance-balance-side div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(240, 228, 192, 0.9);
}

.finance-balance-side span {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.finance-balance-side strong {
  font-size: 0.92rem;
  font-weight: 800;
}

.period-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.period-board-season {
  grid-template-columns: minmax(0, 1fr);
}

.period-card {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.period-card h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 800;
}

.period-grid {
  display: grid;
  gap: 8px;
}

.period-grid div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.period-grid span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.period-grid strong {
  font-size: 0.95rem;
  font-weight: 800;
}

.period-grid strong.is-ok,
.ledger-summary strong.is-ok,
.finance-balance-hero.is-ok > div > strong { color: #059669; }

.period-grid strong.is-warn,
.ledger-summary strong.is-warn,
.finance-balance-hero.is-warn > div > strong { color: #DC2626; }

.period-note {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.finance-filters {
  margin-bottom: 14px;
}

.ledger-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ledger-summary article {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px 16px;
}

.ledger-summary span {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.ledger-summary strong {
  font-size: 1.1rem;
  font-weight: 900;
}

.ledger-table-head {
  display: grid;
  grid-template-columns: 110px minmax(160px, 1.4fr) minmax(140px, 1fr) 140px 120px;
  gap: 10px;
  padding: 0 12px 8px 16px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.ledger-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ledger-section-title {
  margin: 14px 0 8px;
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--charcoal);
}

.ledger-row.is-dues {
  background: #F0FDF4;
  border-color: #BBF7D0;
}

.ledger-row {
  display: grid;
  grid-template-columns: 4px 110px minmax(160px, 1.4fr) minmax(140px, 1fr) 140px 120px;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 10px 8px 0;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  overflow: hidden;
}

.ledger-row:hover { background: #FFFBF0; }

.ledger-row-mark {
  align-self: stretch;
  width: 4px;
  background: #059669;
}

.ledger-row.is-expense .ledger-row-mark { background: #DC2626; }

.ledger-row-date,
.ledger-row-main,
.ledger-row-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ledger-row-date strong,
.ledger-row-main strong {
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ledger-row-date span,
.ledger-row-main span,
.ledger-row-meta span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ledger-voucher {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: var(--charcoal) !important;
}

.ledger-amount {
  font-size: 0.92rem;
  font-weight: 900;
  text-align: end;
  white-space: nowrap;
}

.ledger-row.is-income .ledger-amount { color: #059669; }
.ledger-row.is-expense .ledger-amount { color: #DC2626; }

.ledger-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.ledger-row-actions .btn {
  padding: 4px 9px;
  font-size: 0.72rem;
}

.ledger-recent {
  margin-top: 8px;
}

.ledger-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ledger-recent-head h3 {
  margin: 0;
  font-size: 1rem;
}

.finance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.finance-card {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.finance-card h3 {
  margin: 0 0 12px;
  font-size: 0.98rem;
}

.finance-bar-row {
  margin-bottom: 10px;
}

.finance-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.finance-bar {
  height: 7px;
  background: rgba(255, 212, 0, 0.16);
  border-radius: 99px;
  overflow: hidden;
}

.finance-bar span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
}

.finance-form .member-grid {
  margin-bottom: 12px;
}

.finance-funds {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.fund-card {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.fund-card.is-over {
  background: #FEF2F2;
  border-color: #FECACA;
}

.fund-card strong {
  display: block;
  font-size: 1.6rem;
  color: var(--primary);
  line-height: 1;
}

.fund-card h3 {
  margin: 6px 0 10px;
  font-size: 0.92rem;
}

.fund-card p {
  margin: 0 0 4px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.fund-balance {
  color: var(--text) !important;
  font-weight: 800 !important;
  margin-top: 6px !important;
}

.fund-card-local {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.fund-office-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 8px 0 0;
  border-top: 1px dashed #efe4a8;
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
}

.fund-office-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  font-size: 0.8rem;
  font-weight: 700;
}

.fund-office-list li span {
  color: var(--text-secondary);
  min-width: 0;
}

.fund-office-list li em {
  font-style: normal;
  color: #9a927e;
  font-size: 0.72rem;
  font-weight: 700;
  margin-inline-start: 4px;
}

.fund-office-list li strong {
  font-size: 0.8rem;
  color: var(--text);
  flex: 0 0 auto;
}

.fund-office-list li strong.is-ok { color: #047857; }
.fund-office-list li strong.is-warn { color: #b91c1c; }
.fund-office-list li.is-empty {
  color: #9a927e;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .finance-funds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fund-card-local { grid-column: span 2; }
}

@media (max-width: 640px) {
  .finance-funds { grid-template-columns: 1fr; }
  .fund-card-local { grid-column: auto; }
}

.ratio-form {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}

.ratio-form h3 {
  margin: 0 0 4px;
}

.ratio-form p {
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 12px;
}

.ratio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.ratio-grid small {
  color: var(--text-muted);
  font-weight: 700;
}

@media (max-width: 1100px) {
  .finance-grid,
  .finance-funds { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .admin-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    transform: translateX(-110%);
    transition: transform 0.22s ease;
    box-shadow: none;
  }
  html[dir="rtl"] .admin-sidebar {
    transform: translateX(110%);
  }
  .admin-shell.is-nav-open .admin-sidebar {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.28);
  }
  .admin-menu-btn { display: grid; place-items: center; }
  .admin-top-site { display: none; }
  .admin-main { padding: 20px 16px 48px; }
  .admin-topbar { padding: 10px 14px; }
}

@media (max-width: 1200px) {
  .member-strip-head,
  .member-strip {
    grid-template-columns:
      3px
      minmax(100px, 0.9fr)
      84px
      84px
      76px
      minmax(0, 0.95fr)
      96px
      28px
      minmax(160px, 180px);
  }
  .member-strip-hide-sm { display: none; }
  .member-strip-head span:nth-child(7) { display: none; }
}

@media (max-width: 1100px) {
  .member-strip-head,
  .member-strip {
    grid-template-columns:
      3px
      minmax(96px, 0.85fr)
      80px
      80px
      72px
      minmax(0, 0.9fr)
      92px
      28px
      minmax(158px, 176px);
  }
  .member-strip-hide-sm { display: none; }
  .member-strip-head span:nth-child(7) { display: none; }
  .finance-balance-hero,
  .finance-gate,
  .period-board,
  .ledger-summary { grid-template-columns: 1fr; }
  .ledger-table-head { display: none; }
  .ledger-row {
    grid-template-columns: 4px 1fr auto;
    gap: 8px 10px;
  }
  .ledger-row-date,
  .ledger-row-meta,
  .ledger-row-actions { display: none; }
  .ledger-amount { grid-column: 3; }
}

@media (max-width: 860px) {
  .admin-row, .admin-action { align-items: flex-start; flex-direction: column; }
  .member-grid-3 { grid-template-columns: 1fr; }
  .finance-grid,
  .finance-funds { grid-template-columns: 1fr; }
  .member-strip-head { display: none; }
  .member-strip {
    grid-template-columns: 3px minmax(0, 1fr) 30px;
    column-gap: 8px;
    padding: 6px 8px 6px 0;
    min-height: 44px;
  }
  .member-strip > .member-strip-id,
  .member-strip-cell { display: none; }
  .member-strip-ids-mobile {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
  }
  .member-strip-ids-mobile .member-strip-id {
    display: inline-flex;
    width: auto;
    max-width: 100%;
  }
  .member-strip-pay { justify-self: center; }
  .member-strip-identity { grid-column: 2; }
  .member-strip-actions {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    width: 100%;
    padding-top: 2px;
  }
}

/* ????? ???????? ??????? */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.activity-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #ece4d4);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(30, 30, 30, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.activity-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(30, 30, 30, 0.1);
}

.activity-mosaic {
  display: grid;
  gap: 3px;
  background: #111;
  min-height: 190px;
  aspect-ratio: 16 / 11;
}

.activity-mosaic--1 { grid-template-columns: 1fr; }
.activity-mosaic--2 { grid-template-columns: 1fr 1fr; }
.activity-mosaic--3 {
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.activity-mosaic--3 .activity-mosaic-cell:first-child { grid-row: 1 / 3; }
.activity-mosaic--4 {
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.activity-mosaic--4 .activity-mosaic-cell:first-child { grid-row: 1 / 3; }

.activity-mosaic-cell {
  position: relative;
  overflow: hidden;
  min-height: 0;
  background: #1a1a1a;
}

.activity-mosaic-cell img,
.activity-mosaic-cell .video-glimpse,
.activity-mosaic-cell .video-glimpse-el,
.activity-mosaic-cell .video-glimpse-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.activity-card-body {
  padding: 16px 16px 18px;
  display: grid;
  gap: 8px;
}

.activity-chip {
  display: inline-flex;
  align-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, #FFD400 22%, transparent);
  color: #1E1E1E;
  font-size: 0.78rem;
  font-weight: 800;
}

.activity-card-body h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.45;
}

.activity-card-body p {
  margin: 0;
  color: var(--text-secondary, #6b6558);
  font-size: 0.9rem;
  line-height: 1.6;
}

.activity-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--text-secondary, #8a8070);
  font-size: 0.8rem;
  font-weight: 600;
}

.meeting-wrap {
  max-width: 760px;
  padding-top: 24px;
  padding-bottom: 48px;
}
.meeting-detail-hero {
  position: relative;
  margin: 0 0 20px;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #12100D;
  box-shadow: var(--shadow-md);
}
.meeting-detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.meeting-detail-hero.is-ended img {
  filter: grayscale(0.25) brightness(0.92);
}
.meeting-detail-seal {
  position: absolute;
  inset: auto 16px 16px auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #EF4444, #B91C1C);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.4);
}
.meeting-detail-header {
  margin-bottom: 18px;
}
.meeting-detail-header h1 {
  margin: 10px 0 0;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 900;
  line-height: 1.4;
}
.meeting-detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.meeting-fact {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background:
    linear-gradient(160deg, rgba(255, 212, 0, 0.14), rgba(255, 255, 255, 0.96) 45%),
    var(--surface);
}
.meeting-fact-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #8A8070;
}
.meeting-fact strong {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--charcoal);
  line-height: 1.45;
}
.meeting-detail-body {
  margin-bottom: 22px;
  padding: 18px 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.meeting-detail-body h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 900;
}
.meeting-detail-body p {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.9;
  color: var(--text-secondary);
}
@media (max-width: 640px) {
  .meeting-detail-facts {
    grid-template-columns: 1fr;
  }
}

.activity-detail-desc {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text-secondary, #5c564a);
  margin: 0 0 22px;
  font-weight: 600;
}

.activity-detail-cover {
  position: relative;
  margin: 0 0 18px;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  border: 2px solid var(--amber, #ffb300);
}

.activity-detail-cover > img,
.activity-detail-cover > video {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  background: #000;
}
.activity-detail-cover .cdt-video-card {
  width: min(100%, 520px);
  max-width: 520px;
  margin: 0 auto;
  border: 0;
  box-shadow: none;
}

.activity-detail-cover .article-gallery-zoom {
  display: block;
  width: 100%;
}

.activity-detail-cover .article-gallery-zoom img {
  height: auto;
  max-height: 520px;
  object-fit: contain;
}

.activity-cover-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: var(--amber, #ffb300);
  color: #1e1e1e;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}

.activity-detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.activity-detail-media {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--line, #ece4d4);
}
.activity-detail-media.is-video {
  grid-column: 1 / -1;
  overflow: visible;
  background: transparent;
  border: 0;
}

.activity-detail-media > img,
.activity-detail-media > video {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  background: #000;
}
.activity-detail-media .cdt-video-card {
  width: min(100%, 520px);
  max-width: 520px;
  margin: 0 auto;
}

.activity-detail-media .article-gallery-zoom {
  display: block;
  width: 100%;
}

.activity-detail-media .article-gallery-zoom img {
  height: auto;
  max-height: 420px;
  object-fit: contain;
}

.activity-detail-media.is-video video {
  min-height: 220px;
}

.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.admin-gallery-item {
  margin: 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  border: 1px solid #e7dcc0;
  aspect-ratio: 1;
}

.admin-gallery-item.is-cover {
  border-color: #ffb300;
  box-shadow: 0 0 0 2px rgba(255, 179, 0, 0.35);
}

.admin-gallery-item img,
.admin-gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-gallery-badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
}

.admin-gallery-badge-cover {
  background: #ffb300;
  color: #1e1e1e;
}

.admin-gallery-actions {
  position: absolute;
  inset-inline-end: 6px;
  bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.admin-gallery-actions .btn {
  padding: 2px 8px;
  font-size: 0.7rem;
}

@media (max-width: 640px) {
  .activities-grid { grid-template-columns: 1fr; }
  .activity-detail-gallery { grid-template-columns: 1fr; }
}

/* Push campaigns */
.push-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1E1E1E 0%, #3D3428 100%);
  color: #fff;
  margin-bottom: 18px;
}
.push-hero-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #FFD400;
  margin-bottom: 6px;
}
.push-hero h2 { margin: 0 0 8px; font-size: 1.35rem; font-weight: 900; }
.push-hero p { margin: 0; color: #D6CFC2; max-width: 52ch; line-height: 1.5; }
.btn-amber {
  background: #FFD400 !important;
  color: #1E1E1E !important;
  border: none !important;
  font-weight: 800;
}
.push-campaign-list { display: flex; flex-direction: column; gap: 12px; }
.push-card {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
}
.push-card-media { aspect-ratio: 16 / 7; background: #FFF9DB; }
.push-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.push-card-body { padding: 14px 16px 16px; }
.push-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.push-card-time { margin-inline-start: auto; font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.push-card h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 900; }
.push-card p { margin: 0; color: #5C5340; line-height: 1.45; }
.push-card-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.push-card-cats span {
  background: #FFF9DB;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
}
.push-card-error { color: #EF4444 !important; font-weight: 700; margin-top: 8px !important; }
.push-compose {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 18px;
  align-items: start;
}
.push-preview-pane h3 { margin: 0 0 10px; font-size: 0.95rem; font-weight: 900; }
.push-phone {
  background: #111827;
  border-radius: 28px;
  padding: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}
.push-phone-inner {
  background: #1F2937;
  border-radius: 20px;
  padding: 12px;
  color: #fff;
}
.push-phone-app {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.78rem;
}
.push-phone-logo {
  width: 22px; height: 22px; border-radius: 6px;
  background: #FFD400; color: #1E1E1E;
  display: grid; place-items: center; font-weight: 900; font-size: 0.7rem;
}
.push-phone-app strong { font-weight: 800; }
.push-phone-app em { margin-inline-start: auto; opacity: 0.45; font-style: normal; }
.push-phone-title { display: block; font-size: 0.95rem; font-weight: 900; margin-bottom: 4px; }
.push-phone-body { margin: 0; color: #D1D5DB; font-size: 0.82rem; line-height: 1.4; }
.push-phone-image { margin-top: 10px; border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; background: #374151; }
.push-phone-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.push-form label { display: block; margin-bottom: 12px; font-weight: 700; }
.push-audience {
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 12px;
  margin: 8px 0 12px;
  background: #fff;
}
.push-audience legend { font-weight: 900; padding: 0 6px; }
.push-audience-option {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px; border-radius: 10px; cursor: pointer;
}
.push-audience-option:hover { background: #FFFEF5; }
.push-audience-option strong { display: block; }
.push-audience-option small { color: var(--text-muted); font-weight: 600; }
.push-categories,
.push-picker { margin-bottom: 12px; }
.push-picker-tools {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
}
.push-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.push-picker-count {
  margin-inline-start: auto;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
}
.push-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  margin-top: 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 14px;
}
.push-cat-item {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 8px; border-radius: 10px; cursor: pointer; font-weight: 600;
}
.push-cat-item:hover { background: #FFF9DB; }
.push-cat-item strong { display: block; font-size: 0.82rem; }
.push-cat-item small { color: var(--text-muted); font-size: 0.72rem; }
@media (max-width: 700px) {
  .push-picker-tools { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .push-compose { grid-template-columns: 1fr; }
}

/* Keep phone / WhatsApp numbers left-to-right in RTL pages */
.ltr-num,
a[href^="tel:"],
a[href^="https://wa.me/"] {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  display: inline-block;
}

/* Money: isolate digits only; currency word stays outside in RTL flow */
.mad-amount.ltr-num {
  white-space: nowrap;
  text-align: left;
}

/* ── App download promo (3D phone) ── */
.app-promo {
  position: relative;
  overflow: visible;
  border-radius: 28px;
  padding: 28px 22px 24px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--stroke));
  background:
    radial-gradient(120% 80% at 12% 0%, rgba(255, 212, 0, 0.42), transparent 58%),
    radial-gradient(95% 70% at 100% 18%, rgba(255, 224, 52, 0.28), transparent 55%),
    radial-gradient(90% 60% at 80% 100%, rgba(255, 152, 0, 0.16), transparent 55%),
    linear-gradient(165deg, #FFFEF5 0%, #FFF7D6 46%, #FFE99A 100%);
  color: var(--text);
  box-shadow:
    0 18px 40px rgba(255, 212, 0, 0.16),
    0 8px 20px rgba(30, 30, 30, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: auto;
  min-height: 100%;
}

.app-promo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 18%, rgba(255, 212, 0, 0.28), transparent 58%);
  pointer-events: none;
  z-index: 0;
}

@media (min-width: 993px) {
  .app-promo {
    position: sticky;
    top: calc(var(--header-h) + 18px);
  }
}

.app-promo-glow {
  display: none;
}

.app-promo > *:not(.app-promo-glow) {
  position: relative;
  z-index: 1;
}

.app-promo-eyebrow {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #E69500;
  text-transform: uppercase;
}

.app-promo-title {
  margin: 0 0 8px;
  font-family: "Amiri", "Cairo", serif;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--charcoal);
}

.app-promo-copy {
  margin: 0 0 8px;
  max-width: 28ch;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.app-promo-stage {
  width: 100%;
  display: grid;
  place-items: center;
  min-height: 380px;
  margin: 10px 0 14px;
  padding: 24px 12px 36px;
  overflow: visible;
}

.app-promo-phone {
  position: relative;
  width: 180px;
  height: 368px;
  transform-origin: center 60%;
  animation: phone-float 6s ease-in-out infinite;
}

@keyframes phone-float {
  0%, 100% {
    transform: perspective(1200px) rotateY(-16deg) rotateX(7deg) translateY(0);
  }
  50% {
    transform: perspective(1200px) rotateY(-11deg) rotateX(5deg) translateY(-8px);
  }
}

.phone-bezel {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 40px;
  padding: 11px;
  background:
    linear-gradient(165deg, #3a3a3a 0%, #1a1a1a 35%, #0b0b0b 70%, #1f1f1f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 2px 3px rgba(255, 255, 255, 0.08),
    0 18px 36px rgba(30, 30, 30, 0.28),
    0 8px 14px rgba(30, 30, 30, 0.12);
}

.phone-bezel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px #111;
}

.phone-btn {
  position: absolute;
  width: 3px;
  background: linear-gradient(180deg, #4a4a4a, #1c1c1c);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-btn-silent {
  top: 92px;
  right: -2px;
  height: 22px;
}

.phone-btn-vol-up {
  top: 128px;
  right: -2px;
  height: 36px;
}

.phone-btn-vol-down {
  top: 172px;
  right: -2px;
  height: 36px;
}

.phone-btn-power {
  top: 140px;
  left: -2px;
  height: 52px;
}

.phone-dynamic-island {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 68px;
  height: 16px;
  border-radius: 999px;
  background: #050505;
  z-index: 3;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 212, 0, 0.18), transparent 55%),
    linear-gradient(180deg, #FFF9DB 0%, #FFFEF5 42%, #FFF4C8 100%);
  color: #1E1E1E;
  display: flex;
  flex-direction: column;
  padding: 28px 10px 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.phone-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.35) 0%,
    transparent 32%,
    transparent 70%,
    rgba(255, 212, 0, 0.08) 100%
  );
  pointer-events: none;
  z-index: 4;
}

.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #1E1E1E;
  margin-bottom: 8px;
  padding-inline: 4px;
}

.phone-status-icons {
  letter-spacing: -1px;
  opacity: 0.7;
  font-size: 0.55rem;
}

.phone-app-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  text-align: right;
}

.phone-app-header img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(255, 212, 0, 0.35);
}

.phone-app-header strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
}

.phone-app-header small {
  display: block;
  font-size: 0.58rem;
  color: #8A8070;
  font-weight: 700;
}

.phone-hero-card {
  background: linear-gradient(145deg, #FFD400, #FFE034 55%, #FFE566);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: right;
  box-shadow: 0 10px 18px rgba(255, 212, 0, 0.35);
  margin-bottom: 10px;
}

.phone-hero-card span {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 800;
  background: rgba(30, 30, 30, 0.12);
  padding: 2px 7px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.phone-hero-card strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 4px;
}

.phone-hero-card em {
  display: block;
  font-style: normal;
  font-size: 0.6rem;
  font-weight: 700;
  opacity: 0.8;
}

.phone-feed {
  display: grid;
  gap: 7px;
  flex: 1;
}

.phone-feed-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 7px;
  align-items: center;
  background: #fff;
  border: 1px solid #F0E4C0;
  border-radius: 12px;
  padding: 6px;
  text-align: right;
  box-shadow: 0 4px 10px rgba(30, 30, 30, 0.04);
}

.phone-feed-thumb {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, #FFF176, #E6BF00);
}

.phone-feed-thumb--mint {
  background: linear-gradient(145deg, #34D399, #059669);
}

.phone-feed-card b {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
}

.phone-feed-card small {
  display: block;
  font-size: 0.52rem;
  color: #8A8070;
  font-weight: 700;
}

.phone-tabbar {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 6px 4px;
  border-top: 1px solid rgba(240, 228, 192, 0.9);
}

.phone-tabbar span {
  height: 6px;
  border-radius: 999px;
  background: #E8DFC8;
}

.phone-tabbar span.is-active {
  background: #FFD400;
}

.phone-shadow {
  position: absolute;
  left: 50%;
  bottom: -26px;
  width: 72%;
  height: 28px;
  transform: translateX(-42%) scaleY(0.55);
  background: radial-gradient(ellipse at center, rgba(30, 30, 30, 0.28), transparent 72%);
  filter: blur(8px);
  pointer-events: none;
  z-index: -1;
}

.app-promo-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 8px;
}

.app-promo-download {
  width: 100%;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 14px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(255, 212, 0, 0.35);
}

.app-promo-download:hover {
  transform: translateY(-1px);
}

.app-promo-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.app-promo-qr img {
  width: 88px;
  height: 88px;
  border-radius: 14px;
  background: #fff;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--stroke));
  box-shadow: 0 10px 24px rgba(255, 212, 0, 0.18);
}

.app-promo-qr span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

@media (prefers-reduced-motion: reduce) {
  .app-promo-phone {
    animation: none;
    transform: perspective(1200px) rotateY(-14deg) rotateX(6deg);
  }
}

@media (max-width: 992px) {
  .app-promo {
    max-width: 420px;
    margin-inline: auto;
  }

  .app-promo-stage {
    min-height: 340px;
  }

  .app-promo-phone {
    width: 164px;
    height: 336px;
  }
}

/* ── Statement / Communiqué composer (template bayan) ── */
.stmt-composer {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.stmt-composer.is-busy {
  cursor: progress;
  opacity: 0.92;
}

.stmt-composer-form {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
}

.stmt-type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.stmt-type-btn {
  appearance: none;
  border: 1px solid var(--stroke);
  background: #FFFEF5;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.stmt-type-btn.is-active {
  background: #FFE566;
  border-color: #F5C400;
  color: #1E1E1E;
  box-shadow: 0 8px 18px rgba(255, 196, 0, 0.28);
}

.stmt-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stmt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.stmt-hint { margin-top: 10px; }

.stmt-preview-pane { min-width: 0; }

.stmt-preview-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.stmt-preview-frame {
  overflow: auto;
  padding: 14px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 229, 102, 0.35), transparent 55%),
    linear-gradient(180deg, #FFFEF5 0%, #FFF9DB 100%);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: center;
}

.stmt-sheet {
  --stmt-yellow: #FFE566;
  --stmt-yellow-soft: #FFF4B8;
  --stmt-yellow-line: #F0C400;
  position: relative;
  width: min(100%, 794px);
  min-height: 1120px;
  margin: 0 auto;
  padding: 22px 28px 18px;
  color: #111;
  font-family: "Cairo", Tahoma, sans-serif;
  background: #fff;
  border: 2px solid var(--stmt-yellow-line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}

.stmt-watermark {
  position: absolute;
  inset: 180px 40px 140px;
  z-index: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.stmt-watermark img {
  width: min(78%, 460px);
  opacity: 0.14;
  mix-blend-mode: multiply;
}

.stmt-letterhead,
.stmt-double-rule,
.stmt-banner,
.stmt-subject,
.stmt-intro,
.stmt-points,
.stmt-slogan,
.stmt-signoff,
.stmt-stamp,
.stmt-contact-bar,
.stmt-page-num {
  position: relative;
  z-index: 1;
}

.stmt-letterhead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.stmt-head-ar,
.stmt-head-fr {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  color: #1a1a1a;
}

.stmt-head-ar { text-align: right; }
.stmt-head-fr { text-align: left; font-size: 10px; font-weight: 700; }

.stmt-head-line + .stmt-head-line { margin-top: 2px; }

.stmt-logo {
  width: 86px;
  height: 86px;
  object-fit: contain;
  border-radius: 50%;
  background: transparent;
  border: 0;
  box-shadow: none;
  flex-shrink: 0;
}

.stmt-double-rule {
  display: grid;
  gap: 3px;
  margin: 6px 0 14px;
}

.stmt-double-rule span {
  display: block;
  height: 2px;
  background: var(--stmt-yellow-line);
}

.stmt-banner {
  background: var(--stmt-yellow);
  border: 1px solid #E6B800;
  text-align: center;
  padding: 14px 16px 12px;
  margin-bottom: 14px;
}

.stmt-banner-type {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.1;
  color: #111;
}

.stmt-banner-issuer {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 800;
  color: #222;
  line-height: 1.5;
}

.stmt-subject {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin: 0 0 12px;
}

.stmt-subject-bar {
  width: 7px;
  flex-shrink: 0;
  background: var(--stmt-yellow);
  border-radius: 2px;
}

.stmt-subject-text {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.stmt-subject-text strong {
  color: #111;
  margin-inline-end: 4px;
}

.stmt-intro {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.85;
  text-align: justify;
}

.stmt-points {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.stmt-point {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: stretch;
  background: var(--stmt-yellow-soft);
  border: 1px solid #F0D66A;
  border-radius: 4px;
  padding: 8px 10px 8px 8px;
}

.stmt-point-num {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 34px;
  background: var(--stmt-yellow);
  border: 1px solid #E6B800;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 900;
  color: #111;
}

.stmt-point-text {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.8;
  text-align: justify;
  padding-top: 4px;
}

.stmt-slogan {
  margin: 8px 0 18px;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  font-style: italic;
  color: #111;
}

.stmt-signoff {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 8px 4px 0;
}

.stmt-place-date {
  font-size: 13px;
  font-weight: 800;
}

.stmt-sign {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
  min-width: 180px;
}

.stmt-stamp {
  width: 88px;
  height: 88px;
  margin: 10px auto 14px;
  border: 3px solid #C62828;
  border-radius: 50%;
  color: #C62828;
  display: grid;
  place-content: center;
  text-align: center;
  transform: rotate(-8deg);
  opacity: 0.88;
}

.stmt-stamp span {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.stmt-stamp small {
  font-size: 11px;
  font-weight: 800;
}

.stmt-contact-bar {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.3fr;
  gap: 8px;
  align-items: center;
  background: #ECEFF1;
  border-radius: 2px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #37474F;
}

.stmt-contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.stmt-contact-item span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stmt-ico {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 900;
  background: #455A64;
  color: #fff;
}

.stmt-page-num {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #78909C;
  margin-top: 6px;
}

.stmt-sheet.is-exporting {
  width: 794px !important;
  max-width: 794px !important;
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 1100px) {
  .stmt-composer { grid-template-columns: 1fr; }
  .stmt-composer-form { position: static; max-height: none; }
}

@media (max-width: 640px) {
  .stmt-form-grid { grid-template-columns: 1fr; }
  .stmt-sheet { padding: 16px 12px 12px; min-height: 0; }
  .stmt-letterhead { gap: 6px; }
  .stmt-logo { width: 64px; height: 64px; }
  .stmt-banner-type { font-size: 26px; }
  .stmt-head-ar, .stmt-head-fr { font-size: 9px; }
  .stmt-contact-bar { grid-template-columns: 1fr; }
}

/* Monthly auto report */
.monthly-auto-panel {
  margin: 14px 0 18px;
  padding: 14px 16px;
  border: 1px solid #F0E4C0;
  border-radius: 14px;
  background: #FFFDF6;
}
.monthly-auto-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 10px;
}
.monthly-auto-section {
  border-top: 1px solid #F0E4C0;
  padding: 8px 0;
}
.monthly-auto-section summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.monthly-auto-section summary::-webkit-details-marker { display: none; }
.monthly-auto-list {
  margin: 8px 0 0;
  padding-inline-start: 18px;
}
.monthly-auto-list li { margin-bottom: 6px; line-height: 1.45; }
.admin-subpanel {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #E8E0D0;
  border-radius: 12px;
  background: #fff;
}
.admin-subpanel-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Admin post views badge */
.post-views-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #E8E0D0;
  background: #FFFDF6;
  color: #1E1E1E;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.post-views-badge .post-views-icon {
  width: 15px;
  height: 15px;
  fill: #5C5340;
  flex: 0 0 auto;
}

/* Contact page */
.contact-cards {
  display: grid;
  gap: 12px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 16px;
  border: 1px solid #E8E0D0;
  border-radius: 16px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.contact-card:hover {
  border-color: #FFD400;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}
.contact-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #FFF9DB;
  flex: 0 0 auto;
  font-size: 1.2rem;
  margin: 0 auto;
}
.contact-card > div {
  width: 100%;
  text-align: center;
}
.contact-card strong {
  display: block;
  font-weight: 800;
  margin-bottom: 4px;
}
.contact-card span:last-child,
.contact-card .ltr-num {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  display: block;
  text-align: center;
  width: 100%;
}

.contact-whatsapp-icon {
  background: #25D366 !important;
  color: #fff;
}
.contact-card-whatsapp:hover {
  border-color: #25D366;
}
.contact-fb-card {
  margin-top: 4px;
}

/* Legal pages */
.legal-page {
  max-width: 820px;
  padding-top: 28px;
  padding-bottom: 56px;
}
.legal-page h1 {
  margin: 0 0 8px;
  font-weight: 900;
  font-size: clamp(1.55rem, 3vw, 2rem);
}
.legal-kicker {
  margin: 0 0 6px;
  color: #b45309;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.legal-meta {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-weight: 600;
}
.legal-card {
  padding: 16px 18px;
  border: 1px solid #E8E0D0;
  border-radius: 16px;
  background: #FFFDF6;
  margin-bottom: 18px;
  line-height: 1.7;
}
.legal-card-warn {
  background: #FFF7ED;
  border-color: #FDBA74;
}
.legal-card-warn strong {
  display: block;
  margin-bottom: 6px;
  color: #9A3412;
}
.legal-section {
  margin-bottom: 22px;
}
.legal-section h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 900;
}
.legal-section h3 {
  margin: 12px 0 6px;
  font-size: 1rem;
  font-weight: 800;
}
.legal-section p,
.legal-section li {
  line-height: 1.75;
  color: #3F3A32;
}
.legal-section ul,
.legal-section ol {
  margin: 8px 0 0;
  padding-inline-start: 1.25rem;
}
.legal-steps li {
  margin-bottom: 8px;
}
.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.legal-footer-note {
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.legal-page[dir='ltr'],
.legal-page[lang='en'] {
  text-align: left;
}

/* ── Anthem page ── */
.anthem-wrap {
  max-width: 760px;
  padding-top: 28px;
  padding-bottom: 56px;
}
.anthem-title {
  margin: 0 0 8px;
  font-weight: 900;
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
}
.anthem-lead {
  margin: 0 0 26px;
  color: var(--text-muted);
  font-weight: 600;
}
.anthem-player {
  background:
    linear-gradient(145deg, rgba(255, 212, 0, 0.18), rgba(255, 255, 255, 0.92) 42%),
    var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 16px 10px;
  margin-bottom: 28px;
}
.anthem-player-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.anthem-player-art {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.anthem-player-head strong {
  display: block;
  font-weight: 800;
  font-size: 1.05rem;
}
.anthem-player-head span {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}
.anthem-soundcloud {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
}
.anthem-sheet {
  margin: 0;
}
.anthem-sheet-title {
  margin: 0 0 14px;
  font-weight: 900;
  font-size: 1.2rem;
}
.anthem-sheet img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-md);
  background: #fff8a8;
}
.anthem-sheet figcaption {
  margin-top: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
}
.anthem-sheet a {
  color: var(--charcoal);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 560px) {
  .anthem-player-head {
    align-items: flex-start;
  }
}

/* ── Sectors dropdown ── */
.desk-sectors-panel {
  max-height: min(72vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.desk-sectors-panel.is-expanded {
  max-height: min(78vh, 640px);
}
.desk-menubar-panel .desk-sectors-more,
.desk-menubar-panel .desk-sectors-all {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 212, 0, 0.22);
  color: #1E1E1E;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
}
.desk-menubar-panel .desk-sectors-more:hover,
.desk-menubar-panel .desk-sectors-all:hover {
  background: rgba(255, 212, 0, 0.4);
  color: #1E1E1E;
  padding-inline-start: 12px;
}
.desk-sectors-group {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(30, 30, 30, 0.08);
}
.desk-sectors-group-title {
  padding: 6px 10px 4px;
  font-size: 0.74rem;
  font-weight: 900;
  color: #7A6A00;
}
.desk-sectors-group-title span {
  font-weight: 700;
  color: #8A8070;
}

/* ── Sectors page ── */
.sectors-wrap {
  max-width: 960px;
  padding-top: 28px;
  padding-bottom: 56px;
}
.sectors-title {
  margin: 0 0 8px;
  font-weight: 900;
  font-size: clamp(1.45rem, 3vw, 2rem);
}
.sectors-lead {
  margin: 0 0 26px;
  color: var(--text-muted);
  font-weight: 600;
  max-width: 42rem;
}
.sectors-catalog {
  display: grid;
  gap: 22px;
}
.sectors-group {
  background:
    linear-gradient(160deg, rgba(255, 212, 0, 0.12), rgba(255, 255, 255, 0.96) 40%),
    var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 18px 20px;
}
.sectors-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.sectors-group-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
}
.sectors-group-count {
  flex-shrink: 0;
  min-width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(30, 30, 30, 0.08);
  font-size: 0.85rem;
  font-weight: 900;
}
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sectors-chip {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(30, 30, 30, 0.08);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
a.sectors-chip:hover {
  border-color: rgba(30, 30, 30, 0.18);
  background: rgba(255, 212, 0, 0.18);
  transform: translateY(-1px);
}
.sectors-grid li.is-highlight .sectors-chip {
  border-color: var(--primary);
  background: rgba(255, 212, 0, 0.28);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.25);
}

/* ── Sector feed page ── */
.sector-feed-page {
  padding-top: 8px;
  padding-bottom: 64px;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(255, 212, 0, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 20%, rgba(30, 30, 30, 0.04), transparent 50%),
    var(--bg, #f7f5f0);
}
.sector-feed-wrap {
  max-width: 880px;
}
.sector-feed-hero {
  position: relative;
  margin: 20px 0 28px;
  padding: 28px 26px 30px;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 212, 0, 0.22) 0%, rgba(255, 255, 255, 0.92) 48%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
}
.sector-feed-hero::before {
  content: "";
  position: absolute;
  inset-inline-end: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 212, 0, 0.35);
  pointer-events: none;
}
.sector-feed-hero[data-sector="education"] {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(255, 255, 255, 0.96) 55%);
}
.sector-feed-hero[data-sector="health"] {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(255, 255, 255, 0.96) 55%);
}
.sector-feed-hero[data-sector="agriculture"] {
  background: linear-gradient(135deg, rgba(132, 204, 22, 0.18), rgba(255, 255, 255, 0.96) 55%);
}
.sector-feed-hero[data-sector="industry"] {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.16), rgba(255, 255, 255, 0.96) 55%);
}
.sector-feed-kicker {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  position: relative;
}
.sector-feed-hero h1 {
  margin: 0 0 8px;
  font-weight: 900;
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  line-height: 1.35;
  position: relative;
}
.sector-feed-lead {
  margin: 0;
  max-width: 36rem;
  color: var(--text-muted);
  font-weight: 600;
  position: relative;
}
.sector-feed-section {
  margin-bottom: 32px;
}
.sector-feed-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.sector-feed-section-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
}
.sector-feed-count {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(30, 30, 30, 0.07);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
}
.sector-meetings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.sector-meeting-card {
  height: 100%;
}
.sector-meetings-empty {
  padding: 18px;
  background: var(--surface);
  border: 1px dashed var(--stroke);
  border-radius: 14px;
}
.sector-posts-grid {
  gap: 14px;
}
.sector-feed-page .load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
@media (max-width: 640px) {
  .sector-feed-hero { padding: 22px 18px 24px; margin-top: 12px; }
  .sector-meetings-grid { grid-template-columns: 1fr; }
}

/* ── About page ── */
.about-wrap {
  max-width: 760px;
  padding-top: 28px;
  padding-bottom: 56px;
}
.about-title {
  margin: 0 0 22px;
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  line-height: 1.45;
}
.about-body {
  background:
    linear-gradient(160deg, rgba(255, 212, 0, 0.14), rgba(255, 255, 255, 0.96) 38%),
    var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px 24px 28px;
}
.about-body p {
  margin: 0 0 1.15em;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.95;
  color: var(--text);
  text-align: justify;
}
.about-body p:last-child {
  margin-bottom: 0;
}


/* —— ملخص جميع المكاتب المحلية —— */
.loc-office-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.loc-office-totals article {
  background: #fff;
  border: 1px solid #E8DFD0;
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 8px 20px rgba(30, 30, 30, 0.04);
}
.loc-office-totals span {
  display: block;
  color: #8A8070;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}
.loc-office-totals strong {
  font-size: 1.15rem;
  font-weight: 900;
  color: #1E1E1E;
}
.loc-office-totals .is-ok strong { color: #047857; }
.loc-office-totals .is-warn strong { color: #B91C1C; }
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 8px;
  padding: 10px 12px;
}
.admin-pagination .admin-meta {
  font-size: 0.92rem;
  color: #5b5348;
}
.institution-level-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.institution-level-chip {
  appearance: none;
  border: 1px solid #e5dccf;
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  color: #3d3428;
}
.institution-level-chip em {
  font-style: normal;
  font-weight: 800;
  color: #8a7355;
}
.institution-level-chip.is-active {
  border-color: #c4a574;
  background: #f7f1e6;
  color: #1e1e1e;
}
.admin-alert.is-warn {
  background: #fff8e8;
  border: 1px solid #e8d09a;
  color: #7a5b12;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0 0 12px;
  font-size: 0.92rem;
  line-height: 1.55;
}
.loc-office-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.loc-office-card {
  background: #fff;
  border: 1px solid #E8DFD0;
  border-radius: 22px;
  padding: 16px 16px 14px;
  box-shadow: 0 12px 28px rgba(30, 30, 30, 0.05);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}
.loc-office-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.loc-office-card-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #1E1E1E;
  line-height: 1.35;
}
.loc-office-card-head p {
  margin: 4px 0 0;
  color: #8A8070;
  font-size: 12px;
  font-weight: 600;
}
.loc-office-badge {
  flex: 0 0 auto;
  background: #DBEAFE;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.loc-office-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.loc-office-stats > div {
  background: #F8F5EE;
  border: 1px solid #EFE6D6;
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
}
.loc-office-stats span {
  display: block;
  color: #8A8070;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}
.loc-office-stats strong {
  font-size: 1.2rem;
  font-weight: 900;
  color: #1E1E1E;
}
.loc-office-stats .is-ok strong { color: #047857; }
.loc-office-stats .is-warn strong { color: #B91C1C; }
.loc-office-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.loc-office-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #4B5563;
}
.loc-office-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #F3EFE6;
  overflow: hidden;
}
.loc-office-bar-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  min-width: 0;
}
.loc-office-bar.is-teal .loc-office-bar-track > span {
  background: linear-gradient(90deg, #0F766E, #14B8A6);
}
.loc-office-bar.is-sand .loc-office-bar-track > span {
  background: linear-gradient(90deg, #D97706, #F59E0B);
}
.loc-office-empty {
  margin: 0;
  color: #8A8070;
  font-size: 13px;
  font-weight: 600;
}
.loc-office-finance {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid #F0E6D6;
  padding-top: 12px;
}
.loc-office-finance > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.loc-office-finance span {
  color: #8A8070;
  font-size: 12px;
  font-weight: 700;
}
.loc-office-finance strong {
  color: #1E1E1E;
  font-size: 1rem;
  font-weight: 900;
}
@media (max-width: 720px) {
  .loc-office-stats { grid-template-columns: 1fr; }
}


/* —— زيارات المؤسسات: أولوية / تمت الزيارة —— */
.visit-board {
  margin: 0 0 18px;
  background: #fff;
  border: 1px solid #E8DFD0;
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(30,30,30,.04);
  overflow: hidden;
}
.visit-board-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #F0E6D6;
}
.visit-board-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: #1E1E1E;
  line-height: 1.4;
}
.visit-board-head p {
  margin: 4px 0 0;
  color: #8A8070;
  font-size: 12px;
  font-weight: 650;
}
.visit-board-priority .visit-board-head {
  background: linear-gradient(180deg, #FFF7ED, #fff);
}
.visit-board-done .visit-board-head {
  background: linear-gradient(180deg, #ECFDF5, #fff);
}
.visit-board-body {
  padding: 14px 16px 16px;
  background: #FBF7EF;
}
.visit-board-empty {
  margin: 0;
  color: #8A8070;
  font-weight: 700;
  font-size: 13px;
}
.visit-office-block {
  margin: 0 0 16px;
}
.visit-office-block:last-child { margin-bottom: 0; }
.visit-office-block > h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 900;
  color: #9A3412;
}
.visit-level-block { margin: 0 0 10px; }
.visit-level-label {
  display: inline-block;
  margin: 0 0 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  color: #9A3412;
  font-size: 11px;
  font-weight: 800;
}
.visit-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.visit-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #E8DFD0;
  color: #1E1E1E;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(30,30,30,.03);
  transition: border-color .15s ease, transform .15s ease;
}
.visit-pill:hover {
  border-color: #F59E0B;
  transform: translateY(-1px);
}
.visit-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F59E0B;
  flex: 0 0 auto;
}
.visit-pill.is-visited .visit-pill-dot { background: #10B981; }
.visit-pill-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.visit-pill-text strong {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}
.visit-pill-text em {
  font-style: normal;
  color: #8A8070;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.visit-board-log .admin-list { margin: 0; padding: 0 16px 16px; }

/* ——— Struggle milestones timeline ——— */
.milestones-page {
  padding: 28px 0 64px;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 179, 0, 0.18), transparent 60%),
    linear-gradient(180deg, #fffdf7 0%, #f7f3ea 100%);
  min-height: 70vh;
}
.milestones-wrap { max-width: 1100px; }
.milestones-hero {
  text-align: center;
  margin-bottom: 36px;
}
.milestones-kicker {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255, 179, 0, 0.22);
  color: #7a5a00;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.milestones-hero h1 {
  font-family: Amiri, serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 10px;
  color: var(--ink, #1e1e1e);
}
.milestones-lead {
  margin: 0 auto;
  max-width: 34rem;
  color: var(--text-secondary, #6b6458);
  line-height: 1.7;
}
.milestones-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 18px;
  align-items: start;
}
.milestone-station {
  position: relative;
  display: block;
  padding-bottom: 0;
  animation: milestoneIn 0.55s ease both;
  animation-delay: calc(var(--i, 0) * 0.06s);
}
@keyframes milestoneIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.milestone-marker {
  display: none;
}
.milestone-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFB300, #e08e00);
  box-shadow: 0 0 0 4px rgba(255, 179, 0, 0.25);
  z-index: 1;
  flex-shrink: 0;
}
.milestone-line {
  flex: 1;
  width: 3px;
  margin-top: 6px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(255, 179, 0, 0.55), rgba(255, 179, 0, 0.08));
  min-height: 40px;
}
.milestone-card {
  height: 100%;
  background: #fff;
  border: 1px solid rgba(30, 30, 30, 0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(40, 30, 10, 0.07);
}
.milestone-media {
  background: #111;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.milestone-media.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #2a2418, #1a160f);
  font-size: 2.4rem;
}
.milestone-cover-img,
.milestone-cover-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.milestone-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  padding: 8px;
  background: #0d0d0d;
}
.milestone-gallery-item {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #222;
}
.milestone-gallery-item img,
.milestone-gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.milestone-body {
  padding: 18px 20px 22px;
}
.milestone-meta {
  margin-bottom: 8px;
}
.milestone-meta time {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #9a7a20;
  background: rgba(255, 179, 0, 0.14);
  padding: 3px 10px;
  border-radius: 999px;
}
.milestone-body h2 {
  margin: 0 0 8px;
  font-size: 1.28rem;
  line-height: 1.35;
  color: #1e1e1e;
}
.milestone-summary {
  margin: 0 0 10px;
  color: #6b6458;
  font-weight: 600;
  line-height: 1.6;
}
.milestone-content {
  color: #333;
  line-height: 1.8;
  font-size: 0.98rem;
}
.milestone-content p { margin: 0 0 0.7em; }
.milestone-content p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .milestones-page { padding-top: 18px; }
  .milestones-rail { grid-template-columns: 1fr; gap: 16px; }
  .milestone-body { padding: 14px 14px 18px; }
  .milestone-body h2 { font-size: 1.12rem; }
}

/* ── Public inquiries portal ── */
.inquiry-page {
  position: relative;
  padding: 28px 0 64px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(255, 212, 0, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(30, 30, 30, 0.06), transparent 50%),
    linear-gradient(180deg, #fffef8 0%, #fff 45%, #f7f4ea 100%);
}
.inquiry-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(30, 30, 30, 0.04) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, #000 20%, transparent 90%);
}
.inquiry-shell { position: relative; max-width: 860px; }
.inquiry-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
}
.inquiry-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.inquiry-mark img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  background: transparent;
}
.inquiry-hero h1 {
  margin: 4px 0 10px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1.25;
}
.inquiry-intro {
  margin: 0;
  color: var(--text-muted, #5c5c5c);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  font-size: clamp(0.82rem, 1.7vw, 1.02rem);
}
.inquiry-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(30, 30, 30, 0.08);
  border-radius: 22px;
  padding: 22px 22px 18px;
  box-shadow: 0 18px 40px rgba(30, 30, 30, 0.08);
  backdrop-filter: blur(8px);
}
.inquiry-form { display: grid; gap: 16px; }
.inquiry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.inquiry-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inquiry-field {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #1e1e1e;
}
.inquiry-field-wide { grid-column: 1 / -1; }
.inquiry-field span em {
  font-style: normal;
  font-weight: 600;
  opacity: 0.65;
  font-size: 0.85em;
}
.inquiry-field input,
.inquiry-field select,
.inquiry-field textarea {
  width: 100%;
  border: 1px solid rgba(30, 30, 30, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 600;
  background: #fff;
  color: #1e1e1e;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.inquiry-field input:focus,
.inquiry-field select:focus,
.inquiry-field textarea:focus {
  outline: none;
  border-color: #f5b800;
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.28);
}
.inquiry-field textarea { resize: vertical; min-height: 160px; line-height: 1.7; }
.inquiry-files small {
  font-weight: 600;
  color: var(--text-muted, #666);
  line-height: 1.5;
}
.inquiry-files-picker {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.inquiry-files-add {
  min-height: 42px;
  font-weight: 800;
}
.inquiry-files-add:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.inquiry-files-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.inquiry-files-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f5ef;
  border: 1px solid rgba(30, 30, 30, 0.08);
  font-weight: 700;
}
.inquiry-files-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inquiry-files-size {
  font-size: 0.78rem;
  opacity: 0.7;
  white-space: nowrap;
}
.inquiry-files-remove {
  appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #F0C9C9;
  background: #FEF2F2;
  color: #DC2626;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}
.inquiry-files-remove:hover {
  background: #FEE2E2;
  border-color: #F5A8A8;
}
.inquiry-actions { display: flex; justify-content: flex-start; }
.inquiry-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding-inline: 22px;
  font-weight: 800;
}
.inquiry-submit.is-busy { opacity: 0.7; pointer-events: none; }
.inquiry-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
}
.inquiry-status.is-ok { background: rgba(46, 160, 67, 0.12); color: #1b7a32; }
.inquiry-status.is-error { background: rgba(200, 40, 40, 0.1); color: #a11; }
.inquiry-status.is-pending { background: rgba(255, 212, 0, 0.18); color: #7a6a00; }
.inquiry-privacy {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted, #666);
}

/* Admin inquiries inbox — short rectangular cards, 3 per row */
.inquiry-admin-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.inquiry-admin-row {
  position: relative;
  display: grid;
  grid-template-rows: 4px minmax(0, 1fr) auto;
  gap: 0;
  min-height: 0;
  padding: 0 0 10px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(30, 30, 30, 0.08);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.inquiry-admin-row:hover {
  background: #fffdf5;
  border-color: rgba(245, 184, 0, 0.45);
  box-shadow: 0 8px 20px rgba(30, 30, 30, 0.07);
}
.inquiry-admin-accent {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 0;
  background: #f5b800;
}
.inquiry-admin-row.is-danger .inquiry-admin-accent { background: #c62828; }
.inquiry-admin-row.is-info .inquiry-admin-accent { background: #1565c0; }
.inquiry-admin-row.is-warn .inquiry-admin-accent { background: #f5b800; }
.inquiry-admin-main {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 10px 12px 8px;
}
.inquiry-admin-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}
.inquiry-admin-headline strong {
  font-size: 0.92rem;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.inquiry-admin-headline .admin-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  padding: 2px 8px;
}
.inquiry-admin-subject {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inquiry-admin-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.inquiry-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(30, 30, 30, 0.05);
  font-size: 0.7rem;
  font-weight: 800;
  color: #444;
}
.inquiry-chip.is-attach {
  background: rgba(245, 184, 0, 0.18);
  color: #7a6a00;
}
.inquiry-admin-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #555;
  min-width: 0;
}
.inquiry-admin-side-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.inquiry-admin-inst {
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inquiry-admin-phone { letter-spacing: 0.02em; color: #1e1e1e; }
.inquiry-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #fff !important;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 800;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.inquiry-wa-btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
  color: #fff !important;
}
.inquiry-wa-btn svg { display: block; flex-shrink: 0; }
.inquiry-wa-btn-sm {
  width: 30px;
  height: 30px;
}
.inquiry-wa-btn-lg {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 12px;
  justify-content: center;
}
.inquiry-wa-num {
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI", monospace;
  letter-spacing: 0.02em;
  font-weight: 800;
}
.inquiry-admin-side time { font-size: 0.7rem; font-weight: 600; opacity: 0.65; white-space: nowrap; }
.inquiry-delete-btn {
  appearance: none;
  border: 1px solid #F0C9C9;
  background: #FEF2F2;
  color: #DC2626;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.inquiry-delete-btn:hover {
  background: #FEE2E2;
  border-color: #F5A8A8;
  color: #B91C1C;
}
.inquiry-delete-btn svg {
  display: block;
  pointer-events: none;
}
.inquiry-attach-kind {
  display: inline-flex;
  min-width: 3.2rem;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(30, 30, 30, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
}
.inquiry-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: start;
}
.inquiry-detail-card,
.inquiry-detail-side {
  background: #fff;
  border: 1px solid rgba(30, 30, 30, 0.08);
  border-radius: 16px;
  padding: 18px;
}
.inquiry-detail-dl {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}
.inquiry-detail-dl > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(30, 30, 30, 0.08);
}
.inquiry-detail-dl dt { font-weight: 800; opacity: 0.65; }
.inquiry-detail-dl dd { margin: 0; font-weight: 700; }
.inquiry-detail-body {
  white-space: pre-wrap;
  background: #faf8f0;
  border-radius: 12px;
  padding: 14px;
  font: inherit;
  font-weight: 600;
  line-height: 1.75;
  overflow: auto;
}
.inquiry-attach-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.inquiry-attach-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f7f7;
  font-weight: 700;
}
.inquiry-admin-form { display: grid; gap: 12px; }
.inquiry-admin-form h2 { margin: 0 0 4px; font-size: 1.05rem; }
.inquiry-quick-actions { display: grid; gap: 8px; margin-top: 14px; }
@media (max-width: 1100px) {
  .inquiry-admin-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .inquiry-hero { grid-template-columns: 1fr; }
  .inquiry-grid,
  .inquiry-grid-2 { grid-template-columns: 1fr; }
  .inquiry-detail-layout { grid-template-columns: 1fr; }
  .inquiry-detail-dl > div { grid-template-columns: 1fr; }
  .inquiry-admin-list { grid-template-columns: 1fr; }
}

/* Finance office filter bar */
.fo-filter-card {
  margin-bottom: 14px;
}
.fo-filter-head h3 {
  margin: 0 0 4px;
}
.fo-filter-head .admin-meta {
  margin: 0;
}
.fo-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin-top: 12px;
}
.fo-filter-chip {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
}
.fo-filter-select {
  display: grid;
  gap: 4px;
  min-width: min(220px, 100%);
  flex: 1 1 200px;
  margin: 0;
}
.fo-filter-select-label {
  display: none;
}
.fo-filter-select .admin-input {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  background: #fff;
}
.fo-filter-select.is-active .admin-input {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-dark);
}
@media (max-width: 720px) {
  .fo-filter-select {
    flex: 1 1 100%;
    min-width: 100%;
  }
}

/* Finance office compact cards (2 per row) */
.fo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.fo-card {
  appearance: none;
  text-align: right;
  width: 100%;
  border: 1px solid #efe4a8;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #fffdf5);
  padding: 14px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  font: inherit;
  color: inherit;
}
.fo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(30, 30, 30, .08);
  border-color: #e6bf00;
}
.fo-card.is-income { background: linear-gradient(145deg, #fff, #f0fdf4); }
.fo-card.is-expense { background: linear-gradient(145deg, #fff, #fef2f2); }
.fo-card.is-accounts { background: linear-gradient(145deg, #fff, #fff9db); }
.fo-card.is-over { border-color: #fecaca; }
.fo-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.fo-card-head h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 900;
}
.fo-card-head p {
  margin: 2px 0 0;
  color: #7a7360;
  font-size: 0.78rem;
  font-weight: 700;
}
.fo-open {
  font-size: 0.75rem;
  font-weight: 800;
  color: #8a6d00;
  background: rgba(255, 212, 0, .22);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.fo-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.88rem;
}
.fo-line span { color: #7a7360; font-weight: 700; }
.fo-line strong { font-weight: 900; }
.fo-total { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #efe4a8; }
.fo-preview {
  margin: 4px 0 8px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  color: #7a7360;
  font-size: 0.78rem;
}
.fo-preview strong { color: #1e1e1e; }
.fo-empty { margin: 4px 0 8px; color: #9a927e; font-size: 0.8rem; font-weight: 700; }
body.fo-modal-open { overflow: hidden; }
.fo-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.fo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 15, .52);
  backdrop-filter: blur(2px);
}
.fo-modal-panel {
  position: relative;
  width: min(860px, 100%);
  max-height: min(86vh, 920px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fffef5;
  border: 1px solid #efe4a8;
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
}
.fo-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 18px 12px;
  border-bottom: 1px solid #efe4a8;
  background: linear-gradient(180deg, #fff8db, #fffef5);
  flex: 0 0 auto;
}
.fo-modal-head h3 { margin: 0; font-size: 1.2rem; font-weight: 900; }
.fo-modal-head p { margin: 4px 0 0; color: #7a7360; font-weight: 700; }
.fo-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 14px 18px 8px;
  flex: 0 0 auto;
}
.fo-modal-summary > div {
  background: #fff;
  border: 1px solid #efe4a8;
  border-radius: 14px;
  padding: 12px;
}
.fo-modal-summary span {
  display: block;
  color: #7a7360;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.fo-modal-summary strong { font-weight: 900; font-size: 1.02rem; }
.fo-modal-summary strong.is-ok { color: #047857; }
.fo-modal-summary strong.is-warn { color: #b91c1c; }
.fo-modal-actions {
  padding: 4px 18px 10px;
  flex: 0 0 auto;
}
.fo-modal-body {
  padding: 4px 18px 22px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 180px;
}
.fo-detail-title {
  margin: 14px 0 8px;
  font-size: 0.95rem;
  font-weight: 900;
}
.fo-detail-title.is-ok { color: #047857; }
.fo-detail-title.is-warn { color: #b91c1c; }
.fo-detail-stat,
.fo-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  background: #fff;
  border: 1px solid #efe4a8;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
}
.fo-detail-row p {
  margin: 2px 0 0;
  color: #7a7360;
  font-size: 0.8rem;
  font-weight: 600;
}
.fo-detail-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 760px) {
  .fo-grid { grid-template-columns: 1fr; }
  .fo-modal { padding: 12px; place-items: center; }
  .fo-modal-panel {
    width: 100%;
    max-height: min(90vh, 900px);
    border-radius: 18px;
  }
  .fo-modal-summary { grid-template-columns: 1fr 1fr; }
}
