/**
 * Admin panel (webv2) — design aligned with analytics login.
 * Primary color darker than analytics (#051c33).
 * Logo: images/arab-gt-en-logo-1.png (same as analytics)
 */

/* Full-page gradient — like analytics */
.webv2-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #F6F7F9 0%, #E8ECF1 50%, #F1F5F9 100%);
  background-attachment: fixed;
  font-family: 'Cairo', 'Inter', system-ui, sans-serif;
  color: #0F172A;
  position: relative;
  overflow-x: hidden;
}

/* Decorative radial gradients */
.webv2-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 80% 50%, rgba(5, 28, 51, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(5, 28, 51, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle grid */
.webv2-page::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(5, 28, 51, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 28, 51, 0.025) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* Card — rounded-2xl like analytics */
.webv2-card {
  background: #fff;
  border-radius: 1rem; /* 16px, close to rounded-2xl */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid #E5E7EB;
  padding: 1.5rem;
}
@media (min-width: 640px) {
  .webv2-card {
    padding: 2rem;
  }
}

/* Inputs — border, rounded-lg, focus darker primary */
.webv2-input {
  width: 100%;
  padding: 0.625rem 1rem;
  padding-inline-start: 2.5rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.875rem;
  color: #0F172A;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.webv2-input::placeholder {
  color: #94a3b8;
}
.webv2-input:focus {
  outline: none;
  border-color: #051c33;
  box-shadow: 0 0 0 2px rgba(5, 28, 51, 0.15);
}
.webv2-textarea--large {
  min-height: 10rem;
  resize: vertical;
}

/* Primary button — darker navy */
.webv2-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  font-weight: 500;
  font-size: 0.875rem;
  text-align: center;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  background: #051c33;
  cursor: pointer;
  transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.webv2-btn-primary:hover {
  background: #072540;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 28, 51, 0.25);
}
.webv2-btn-primary:active {
  transform: translateY(0);
}
.webv2-btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(5, 28, 51, 0.35);
}

/* Logo container */
.webv2-logo-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
  margin-bottom: 1.5rem;
}
.webv2-logo-wrap img {
  max-height: 1.5rem;
  width: auto;
  object-fit: contain;
}
@media (min-width: 640px) {
  .webv2-logo-wrap img {
    max-height: 2rem;
  }
}

/* Form errors */
.webv2-error {
  color: #B91C1C;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Login layout — above background layers */
.webv2-login-outer {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  z-index: 1;
}
.webv2-login-card {
  width: 100%;
  max-width: 28rem; /* 448px, like analytics max-w-md */
}

/* Input wrapper with icon — RTL-friendly */
.webv2-input-wrap {
  position: relative;
}
.webv2-input-wrap .webv2-input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  inset-inline-start: 0.75rem;
  color: #94a3b8;
  font-size: 0.875rem;
  pointer-events: none;
}
.webv2-input-wrap .webv2-input {
  padding-inline-start: 2.5rem;
  padding-inline-end: 1rem;
}
.webv2-input-wrap.webv2-password-wrap .webv2-input {
  padding-inline-end: 2.5rem;
}
.webv2-password-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  inset-inline-end: 0.75rem;
  background: none;
  border: none;
  padding: 0;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.22s ease;
}
.webv2-password-toggle:hover {
  color: #051c33;
}

/* Login header title/subtitle */
.webv2-login-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}
@media (min-width: 640px) {
  .webv2-login-title {
    font-size: 1.875rem;
  }
}
.webv2-login-subtitle {
  font-size: 0.875rem;
  color: #64748b;
}

/* Dashboard layout: sidebar + main */
.webv2-dashboard-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.webv2-sidebar {
  width: 17rem;
  flex-shrink: 0;
  background: #fafbfc;
  border-inline-start: 1px solid #e8ecf0;
  display: flex;
  flex-direction: column;
  box-shadow: 1px 0 0 rgba(0, 0, 0, 0.03);
}
.webv2-sidebar-header {
  padding: 1.5rem 1.25rem;
  padding-block-start: 1.75rem;
  border-block-end: 1px solid #e8ecf0;
}
.webv2-sidebar-logo {
  max-height: 1.5rem;
  width: auto;
  object-fit: contain;
  display: block;
}
.webv2-sidebar-nav {
  flex: 1;
  padding: 1.25rem 0;
  overflow-y: auto;
  min-height: 0;
}
.webv2-sidebar-section {
  padding: 0 1rem;
  margin-bottom: 0.5rem;
}
.webv2-sidebar-section--collapsible .webv2-sidebar-section-title--toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: start;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.6875rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0;
  background: #f1f5f9;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  font-family: inherit;
  transition: background 0.18s ease, color 0.18s ease;
}
.webv2-sidebar-section--collapsible .webv2-sidebar-section-title--toggle:hover {
  background: #e2e8f0;
  color: #475569;
}
.webv2-sidebar-section-title-icon {
  font-size: 0.6rem;
  transition: transform 0.2s ease;
  opacity: 0.8;
}
.webv2-sidebar-section--collapsible.is-collapsed .webv2-sidebar-section-title-icon {
  transform: rotate(-90deg);
}
.webv2-sidebar-section-links {
  padding-top: 0.5rem;
  overflow: hidden;
  transition: opacity 0.2s ease;
}
.webv2-sidebar-section--collapsible.is-collapsed .webv2-sidebar-section-links {
  display: none;
}
.webv2-sidebar-section-title {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background: #f1f5f9;
  border-radius: 0.375rem;
  border: 1px solid transparent;
}
.webv2-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5625rem 0.75rem;
  font-size: 0.875rem;
  color: #475569;
  text-decoration: none;
  border-radius: 0.375rem;
  margin-bottom: 0.125rem;
  transition: background 0.18s ease, color 0.18s ease;
}
.webv2-sidebar-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.webv2-sidebar-link-active {
  background: #e2e8f0;
  color: #051c33;
  font-weight: 600;
}
.webv2-sidebar-link-active:hover {
  background: #cbd5e1;
  color: #051c33;
}
.webv2-sidebar-footer {
  padding: 1.25rem 1rem;
  padding-block-start: 1.5rem;
  margin-block-start: 0.5rem;
  border-block-start: 1px solid #e8ecf0;
  background: #fff;
}
.webv2-sidebar-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: #051c33;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.webv2-sidebar-logout:hover {
  background: #072540;
  box-shadow: 0 2px 8px rgba(5, 28, 51, 0.2);
}
.webv2-main {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 1.5rem;
  overflow-y: auto;
  background: transparent;
  box-sizing: border-box;
}

/* Mobile drawer: hamburger, backdrop, off-canvas .webv2-sidebar (JS: .webv2-sidebar-open on #webv2-dashboard-layout + body) */
.webv2-sidebar-backdrop {
  display: none;
  pointer-events: none;
}
.webv2-sidebar-toggle {
  display: none;
  position: fixed;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  /* أكبر قليلاً وأوضح على الموبايل */
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.625rem;
  background: #fff;
  color: #051c33;
  box-shadow: 0 2px 8px rgba(5, 28, 51, 0.12), 0 1px 2px rgba(0,0,0,0.06);
  cursor: pointer;
  z-index: 10040;
  font-size: 1rem;
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.webv2-sidebar-toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
  box-shadow: 0 4px 12px rgba(5, 28, 51, 0.15);
}
.webv2-sidebar-toggle:active {
  transform: scale(0.95);
}
.webv2-sidebar-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(5, 28, 51, 0.3);
}
/* أيقونة X عند فتح السايدبار */
.webv2-sidebar-open .webv2-sidebar-toggle .fa-bars {
  display: none;
}
.webv2-sidebar-open .webv2-sidebar-toggle .fa-times {
  display: inline-block;
}
.webv2-sidebar-toggle .fa-times {
  display: none;
}

@media (max-width: 768px) {
  .webv2-sidebar-toggle {
    display: flex;
    /* ثابت في الأعلى — يظهر دائماً بغض النظر عن الـ scroll */
    top: max(0.625rem, env(safe-area-inset-top, 0px));
    inset-inline-start: max(0.625rem, env(safe-area-inset-inline-start, 0px));
  }
  .webv2-main {
    padding-top: 4rem;
  }
  .webv2-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10030;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s;
    /* blur خفيف للمحتوى خلف السايدبار */
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  .webv2-dashboard-layout.webv2-sidebar-open .webv2-sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  body.webv2-sidebar-open {
    overflow: hidden;
  }
  .webv2-dashboard-layout .webv2-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(17.5rem, 88vw);
    max-width: 100%;
    z-index: 10035;
    max-height: 100dvh;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(5, 28, 51, 0.15);
  }
  html[dir="rtl"] .webv2-dashboard-layout:not(.webv2-sidebar-open) .webv2-sidebar {
    transform: translateX(100%);
  }
  html[dir="rtl"] .webv2-dashboard-layout.webv2-sidebar-open .webv2-sidebar {
    transform: translateX(0);
  }
  html[dir="ltr"] .webv2-dashboard-layout:not(.webv2-sidebar-open) .webv2-sidebar {
    transform: translateX(-100%);
  }
  html[dir="ltr"] .webv2-dashboard-layout.webv2-sidebar-open .webv2-sidebar {
    transform: translateX(0);
  }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .webv2-sidebar-backdrop,
  .webv2-dashboard-layout .webv2-sidebar {
    transition: none;
  }
}
.webv2-messages {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 2200;
  width: min(420px, calc(100vw - 2rem));
  display: grid;
  gap: 0.5rem;
  pointer-events: none;
}
.webv2-message {
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.6;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  animation: webv2-toast-in 180ms ease-out;
}
.webv2-message:last-child {
  margin-bottom: 0;
}
.webv2-message--success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.webv2-message--error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.webv2-message--warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.webv2-message--info {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
@keyframes webv2-toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reusable data table */
.webv2-data-table-wrap {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.webv2-data-table-scroll { overflow-x: auto; }
.webv2-data-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.webv2-data-table th, .webv2-data-table td { padding: 0.75rem 1rem; text-align: inherit; border-block-end: 1px solid #E5E7EB; }
.webv2-data-table td:first-child { vertical-align: middle; }
.webv2-data-table th { background: #f8fafc; font-weight: 600; color: #334155; }
.webv2-th-sortable { padding: 0; }
.webv2-th-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.75rem 1rem;
  color: inherit;
  text-decoration: none;
  font-weight: inherit;
  cursor: pointer;
}
.webv2-th-sort:hover { color: #051c33; background: #f1f5f9; }
.webv2-th-sort--active { color: #051c33; }
.webv2-th-sort__icon { font-size: 0.75rem; line-height: 1; opacity: 0.85; }
.webv2-data-table tbody tr { transition: background-color 0.16s ease; }
.webv2-data-table tbody tr:nth-child(even) { background: #fcfdff; }
.webv2-data-table tbody tr:hover { background: #f8fafc; }
.webv2-data-table-actions { white-space: nowrap; }
.webv2-data-table-actions .webv2-btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; min-width: 2rem; height: 2rem; padding: 0 0.5rem;
  border: none; border-radius: 0.375rem;
  cursor: pointer; text-decoration: none; transition: background 0.15s; margin-inline-start: 0.25rem;
  gap: 0.35rem; font-size: 0.8125rem;
}
.webv2-btn-icon-text { white-space: nowrap; }
.webv2-btn-edit { background: #e0f2fe; color: #0369a1; }
.webv2-btn-edit:hover { background: #bae6fd; }
.webv2-btn-delete { background: #fee2e2; color: #b91c1c; }
.webv2-btn-delete:hover { background: #fecaca; }
.webv2-inline-form { display: inline; }
.webv2-data-table-empty { text-align: center; color: #64748b; padding: 2rem !important; }
.webv2-table-thumb {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid #E5E7EB;
  background: #f1f5f9;
}
.webv2-table-thumb-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.5rem;
  border: 1px dashed #cbd5e1;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 1.25rem;
}
.webv2-table-show-info { display: flex; flex-direction: column; gap: 0.15rem; }
.webv2-table-show-title { font-weight: 600; color: #0f172a; }
.webv2-table-show-meta { font-size: 0.8125rem; color: #64748b; }
.webv2-table-thumb-cell { vertical-align: middle; }
.webv2-pagination {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 1rem; border-block-start: 1px solid #E5E7EB; background: #fafafa;
}
.webv2-pagination-list { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.webv2-pagination-link, .webv2-pagination-current {
  display: inline-block; padding: 0.375rem 0.75rem; border-radius: 0.375rem; font-size: 0.875rem;
  text-decoration: none; color: #334155; background: #fff; border: 1px solid #E5E7EB;
}
.webv2-pagination-link:hover { background: #f1f5f9; color: #051c33; }
.webv2-pagination-current { font-weight: 600; background: #051c33; color: #fff; border-color: #051c33; }
.webv2-pagination-info { margin: 0; font-size: 0.8125rem; color: #64748b; }

/* Page header bar — تصميم منفصل عن الجدول والفورم */
.webv2-page-header-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: -0.5rem 0 1.25rem 0;
}
.webv2-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
}
/* Title + optional info (list pages) or help button (forms) on one row */
.webv2-page-header-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}
.webv2-page-header .webv2-page-title { font-size: 1.25rem; font-weight: 600; color: #0f172a; margin: 0; }
.webv2-btn-add {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500;
  color: #fff; background: #051c33; border: none; border-radius: 0.5rem; text-decoration: none; cursor: pointer;
}
.webv2-btn-add:hover { background: #072540; color: #fff; }
.webv2-btn-back {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.875rem;
  color: #334155; background: #fff; border: 1px solid #E5E7EB; border-radius: 0.5rem; text-decoration: none;
}
.webv2-btn-back:hover { background: #f8fafc; color: #051c33; }
.webv2-btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500;
  color: #334155; background: #fff; border: 1px solid #E5E7EB; border-radius: 0.5rem; text-decoration: none;
  min-height: 2.5rem; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  box-sizing: border-box;
}
.webv2-btn-secondary:hover { background: #f8fafc; color: #051c33; border-color: #cbd5e1; }
.webv2-form-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #f1f5f9;
}
.webv2-form-actions .webv2-btn-secondary {
  flex-shrink: 0;
}

/* Generic filter card — webv2-filter-* (reusable for any entity list) */
.webv2-filter-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-inline-start: 4px solid #051c33;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.webv2-filter-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #E5E7EB;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #334155;
}
.webv2-filter-card-header i {
  color: #051c33;
  font-size: 0.875rem;
}
.webv2-filter-card-body {
  padding: 1rem 1.25rem;
}
.webv2-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}
.webv2-filter-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 140px;
}
.webv2-filter-field--search {
  flex: 1.5 1 180px;
}
.webv2-filter-field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.webv2-filter-field-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  background: #fff;
  font-family: inherit;
  color: #334155;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.webv2-filter-field-input:focus {
  outline: none;
  border-color: #051c33;
  box-shadow: 0 0 0 3px rgba(5, 28, 51, 0.15);
}
.webv2-filter-field-input--select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M1.5 4.5l4.5 4 4.5-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  padding-inline-end: 2rem;
}
.webv2-filter-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.webv2-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: #051c33;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
}
.webv2-filter-btn:hover {
  background: #072540;
}
.webv2-filter-clear {
  white-space: nowrap;
  font-size: 0.8125rem;
  color: #64748b;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.webv2-filter-clear:hover {
  color: #051c33;
  background: rgba(5, 28, 51, 0.08);
}

.webv2-form-card {
  background: #fff; border-radius: 0.75rem; border: 1px solid #E5E7EB; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 1.5rem; max-width: 42rem;
  box-sizing: border-box;
}
.webv2-form-card--full {
  max-width: none;
  width: 100%;
  max-width: 100%;
}
.webv2-form-card .webv2-input, .webv2-form-card select { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #E5E7EB; border-radius: 0.5rem; font-size: 0.875rem; }
.webv2-form-card label { display: block; font-size: 0.875rem; font-weight: 500; color: #334155; margin-bottom: 0.25rem; }
.webv2-form-group { margin-bottom: 1rem; }
.webv2-form-card .webv2-error { font-size: 0.8125rem; margin-top: 0.25rem; }

/* Form layout: rows and section title */
.webv2-form-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 1.25rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}
.webv2-form-section-sub {
  font-weight: 400;
  color: #64748b;
  font-size: 0.9em;
}
.webv2-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.webv2-form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 768px) {
  .webv2-form-row-2, .webv2-form-row-3 { grid-template-columns: 1fr; }
}
.webv2-form-group-inline { display: flex; align-items: center; }
.webv2-checkbox-label { display: inline-flex !important; align-items: center; gap: 0.5rem; margin-bottom: 0 !important; cursor: pointer; }

/* نشط — داخل كارد + مفتاح تبديل لطيف */
.webv2-active-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.webv2-active-card-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.webv2-active-toggle-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #334155;
}
.webv2-toggle {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.375rem;
  flex-shrink: 0;
}
.webv2-toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}
.webv2-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.28s ease, box-shadow 0.28s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
.webv2-toggle-slider::before {
  content: '';
  position: absolute;
  height: 1rem;
  width: 1rem;
  right: 0.1875rem;
  bottom: 0.1875rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.webv2-toggle-input:checked + .webv2-toggle-slider::before {
  /* RTL: الدائرة تنتقل من اليمين لليسار عند التفعيل */
  transform: translateX(-1.125rem);
}
.webv2-toggle-input:checked + .webv2-toggle-slider {
  background: #051c33;
  box-shadow: inset 0 0 0 1px rgba(5, 28, 51, 0.2);
}
.webv2-toggle:hover .webv2-toggle-slider {
  background: #94a3b8;
}
.webv2-toggle-input:checked:hover + .webv2-toggle-slider {
  background: #072540;
}
.webv2-active-card .webv2-error { margin-top: 0.5rem; margin-bottom: 0; }

/* منشور / قادم — كل واحد بكارد مع hint */
.webv2-status-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 640px) {
  .webv2-status-cards {
    grid-template-columns: 1fr;
  }
}
.webv2-status-card {
  background: #f8fafc;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
}
.webv2-status-card-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.webv2-status-card-inner:last-child {
  margin-bottom: 0;
}
.webv2-status-card .webv2-toggle {
  margin: 0;
}
.webv2-status-card-hint {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0;
  margin-top: 0.5rem;
  line-height: 1.45;
}

/* Utility */
.webv2-js-hide { display: none !important; }

/* Images section — تقسيم أوضح مع عربي وإنجليزي */
.webv2-images-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 0.5rem;
}
@media (max-width: 768px) {
  .webv2-images-grid { grid-template-columns: 1fr; }
}
.webv2-image-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.webv2-image-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}
.webv2-image-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
}
.webv2-image-card-title-en {
  font-size: 0.8125rem;
  color: #64748b;
  font-weight: 500;
}
.webv2-image-card .webv2-image-upload-box { margin: 0; }
.webv2-image-card .webv2-error { margin-top: 0.25rem; }
.webv2-image-card--double { grid-column: 1 / -1; }
/* Logo card: slightly greyer background for image boxes */
.webv2-image-card--logo .webv2-image-upload-box {
  background: #e2e8f0;
}
.webv2-image-card--logo .webv2-image-upload-box:hover {
  background: #cbd5e1;
}
.webv2-image-card--logo .webv2-image-upload-placeholder {
  color: #475569;
}
.webv2-image-card--logo .webv2-image-upload-placeholder i {
  color: #64748b;
}
.webv2-image-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.5rem;
}
.webv2-image-cell { display: flex; flex-direction: column; gap: 0.25rem; }
.webv2-image-lang {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

/* Presenters — بطاقة أنيقة متناسقة مع التصميم */
.webv2-presenters-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1.25rem;
  margin-top: 1.0rem;
}
.webv2-presenters-intro {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 1rem 0;
}
.webv2-presenters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.webv2-presenter-chip {
  display: block;
  cursor: pointer;
  margin: 0;
}
.webv2-presenter-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.webv2-presenter-chip-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 2rem;
  font-size: 0.875rem;
  color: #334155;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.webv2-presenter-chip:hover .webv2-presenter-chip-inner {
  border-color: #051c33;
  background: #f8fafc;
}
.webv2-presenter-input:checked + .webv2-presenter-chip-inner {
  border-color: #051c33;
  background: #051c33;
  color: #fff;
  box-shadow: 0 2px 8px rgba(5, 28, 51, 0.25);
}
.webv2-presenter-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  object-fit: cover;
}
.webv2-presenter-avatar-placeholder {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #e2e8f0;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.webv2-presenter-input:checked + .webv2-presenter-chip-inner .webv2-presenter-avatar-placeholder {
  background: rgba(255,255,255,0.3);
  color: #fff;
}
.webv2-presenter-name { font-weight: 500; }
.webv2-presenters-card .webv2-error { margin-top: 0.75rem; }
.webv2-presenters-card .webv2-form-hint { margin-top: 0.5rem; margin-bottom: 0; }

.webv2-form-hint { font-size: 0.8125rem; color: #64748b; margin-top: 0.25rem; }
.webv2-seasons-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
}
.webv2-seasons-list {
  list-style: none;
  margin: 0 0 0.75rem 0;
  padding: 0;
}
.webv2-season-item { margin-bottom: 0.35rem; }
.webv2-season-link {
  font-size: 0.9375rem;
  color: #051c33;
  text-decoration: none;
  font-weight: 500;
}
.webv2-season-link:hover { text-decoration: underline; }
.webv2-season-meta { font-size: 0.8125rem; color: #64748b; margin-inline-start: 0.25rem; }
.webv2-btn-add--small {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
}
.webv2-btn-add--small:hover { color: #fff; }

/* Image upload — تجربة إضافة صورة جميلة */
.webv2-image-upload-wrap { margin-bottom: 1rem; }
.webv2-image-upload-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.35rem;
}
.webv2-image-upload-box {
  position: relative;
  aspect-ratio: 1;
  max-height: 12rem;
  border: 2px dashed #cbd5e1;
  border-radius: 0.75rem;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  overflow: hidden;
}
.webv2-image-upload-box:hover {
  border-color: #051c33;
  background: #f1f5f9;
}
.webv2-image-upload-box.webv2-image-upload-dragover {
  border-color: #051c33;
  background: #e0e7ef;
}
.webv2-image-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.8125rem;
  text-align: center;
  padding: 0.75rem;
}
.webv2-image-upload-placeholder i {
  font-size: 1.75rem;
  color: #94a3b8;
}
.webv2-image-upload-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
}
.webv2-image-upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}
.webv2-image-remove {
  position: absolute;
  top: 0.35rem;
  inset-inline-end: 0.35rem;
  z-index: 2;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.webv2-image-remove:hover {
  background: #b91c1c;
}
.webv2-image-remove:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(5, 28, 51, 0.3);
}

.webv2-form-group.webv2-youtube-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.webv2-form-group.webv2-youtube-row > label {
  flex: 0 0 auto;
  margin-bottom: 0;
  min-width: 10ch;
}
.webv2-form-group.webv2-youtube-row > .webv2-youtube-field-inline {
  flex: 1 1 220px;
  min-width: 220px;
  max-width: 100%;
}
.webv2-form-group.webv2-youtube-row > .webv2-youtube-status,
.webv2-form-group.webv2-youtube-row > .webv2-error {
  flex: 1 1 100%;
  width: 100%;
  margin-top: 0;
}

.webv2-youtube-field-inline {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.webv2-youtube-field-inline:focus-within {
  border-color: #051c33;
  box-shadow: 0 0 0 2px rgba(5, 28, 51, 0.12);
}
.webv2-youtube-field-inline .webv2-input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0.625rem 1rem;
  padding-inline-end: 0.5rem;
}
.webv2-youtube-field-inline .webv2-input:focus {
  outline: none;
  box-shadow: none;
}
.webv2-youtube-field-inline .webv2-btn-fetch-youtube {
  flex: 0 0 auto;
  flex-shrink: 0;
  width: auto;
  margin: 0;
  border: none;
  border-radius: 0;
  border-inline-start: 1px solid #E5E7EB;
  padding: 0.5rem 0.875rem;
  white-space: nowrap;
  font-size: 0.875rem;
}
.webv2-youtube-field-inline .webv2-btn-fetch-youtube:hover {
  background: rgba(5, 28, 51, 0.06);
}
.webv2-youtube-status {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}
.webv2-youtube-status--loading {
  background: #e0f2fe;
  color: #0369a1;
}
.webv2-youtube-status--success {
  background: #dcfce7;
  color: #166534;
}
.webv2-youtube-status--error {
  background: #fee2e2;
  color: #991b1b;
}
.webv2-thumbnail-preview {
  margin-top: 0.5rem;
}

/* Episode form: thumbnail section — معاينة الصورة + الرابط والرفع */
.webv2-episode-thumbnail-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1rem;
}
@media (max-width: 640px) {
  .webv2-episode-thumbnail-section {
    grid-template-columns: 1fr;
  }
}
.webv2-episode-thumbnail-preview-wrap {
  flex-shrink: 0;
}
.webv2-form-label-optional {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.35rem;
}
.webv2-episode-thumbnail-box {
  background: #f8fafc;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
}
.webv2-episode-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #94a3b8;
  font-size: 0.8125rem;
  padding: 1rem;
}
.webv2-episode-thumb-placeholder i {
  font-size: 2rem;
}
.webv2-episode-thumb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.375rem;
}
.webv2-episode-thumbnail-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Reusable image preview widget — نفس تصميم الحلقة (معاينة + رابط/رفع) */
.webv2-image-preview-widget {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1rem;
}
@media (max-width: 640px) {
  .webv2-image-preview-widget {
    grid-template-columns: 1fr;
  }
}
.webv2-image-preview-preview-wrap {
  flex-shrink: 0;
}
.webv2-image-preview-box {
  background: #f8fafc;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
}
.webv2-image-preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #94a3b8;
  font-size: 0.8125rem;
  padding: 1rem;
}
.webv2-image-preview-placeholder i {
  font-size: 2rem;
}
.webv2-image-preview-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.375rem;
}
.webv2-image-preview-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Searchable multi-select — الحاوية الرئيسية */
.webv2-searchable-multi {
  border: 1px solid #E5E7EB;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  background: #fff;
  min-height: 2.75rem;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}
.webv2-searchable-multi:focus-within {
  border-color: #051c33;
  box-shadow: 0 0 0 3px rgba(5, 28, 51, 0.12);
}

/* العناصر المختارة (الشيبات) — شكل كارد واضح */
.webv2-searchable-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
  min-height: 0.25rem;
}
.webv2-searchable-chips:empty {
  margin-bottom: 0;
}
.webv2-searchable-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #051c33;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.webv2-searchable-chip:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}
.webv2-searchable-chip-remove {
  padding: 0;
  margin: 0;
  border: none;
  background: rgba(5, 28, 51, 0.08);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1;
  color: #051c33;
  width: 1.375rem;
  height: 1.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.webv2-searchable-chip-remove:hover {
  background: rgba(5, 28, 51, 0.18);
  color: #051c33;
}

.webv2-searchable-input-wrap {
  position: relative;
}
.webv2-searchable-multi .webv2-searchable-input {
  padding: 0.5rem 0.75rem;
  padding-inline-start: 0.75rem;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  color: #0F172A;
}
.webv2-searchable-multi .webv2-searchable-input::placeholder {
  color: #94a3b8;
}
.webv2-searchable-multi .webv2-searchable-input:focus {
  outline: none;
  box-shadow: none;
}

/* قائمة نتائج البحث — كارد مع padding واضح */
.webv2-searchable-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  max-height: 18rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 0.75rem;
  box-shadow: 0 12px 28px rgba(5, 28, 51, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 50;
  padding: 0.5rem;
}
/* كل عنصر في القائمة — كارد صغير مع padding */
.webv2-searchable-dropdown-item {
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: #334155;
  background: #fafafa;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.webv2-searchable-dropdown-item:last-child {
  margin-bottom: 0;
}
.webv2-searchable-dropdown-item:hover {
  background: #f1f5f9;
  color: #051c33;
  border-color: #e2e8f0;
  box-shadow: 0 2px 6px rgba(5, 28, 51, 0.08);
}
.webv2-searchable-dropdown-item:active {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
.webv2-select {
  cursor: pointer;
}
.webv2-form-card .webv2-active-card-inner label.webv2-toggle {
  margin: 0;
}

/* Stats card (survey/poll response lists) */
.webv2-stats-card {
  border: 1px solid #E5E7EB;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.webv2-hero-stats-card--full {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.webv2-stats-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #E5E7EB;
  font-weight: 600;
  font-size: 0.9375rem;
}
.webv2-stats-card__body {
  padding: 1rem 1.25rem;
}
.webv2-stats-total {
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}
.webv2-stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.webv2-stats-item {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}
.webv2-stats-label {
  display: inline-block;
  min-width: 120px;
}
.webv2-stats-count {
  margin-inline-start: 0.5rem;
  color: #475569;
}
.webv2-stats-bar-wrap {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  margin-top: 0.25rem;
  overflow: hidden;
}
.webv2-stats-bar {
  height: 100%;
  background: #051c33;
  border-radius: 3px;
  transition: width 0.2s ease;
}
.webv2-stats-bar--0 { width: 0%; }
.webv2-stats-bar--10 { width: 10%; }
.webv2-stats-bar--20 { width: 20%; }
.webv2-stats-bar--30 { width: 30%; }
.webv2-stats-bar--40 { width: 40%; }
.webv2-stats-bar--50 { width: 50%; }
.webv2-stats-bar--60 { width: 60%; }
.webv2-stats-bar--70 { width: 70%; }
.webv2-stats-bar--80 { width: 80%; }
.webv2-stats-bar--90 { width: 90%; }
.webv2-stats-bar--100 { width: 100%; }
.webv2-stats-voice-split {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #f1f5f9;
  border-radius: 0.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.webv2-stats-voice-with {
  color: #0f766e;
}
.webv2-stats-voice-with i {
  margin-inline-end: 0.25rem;
}
.webv2-stats-voice-without {
  color: #64748b;
}

/* Hero survey response: choose survey message */
.webv2-hero-choose-survey {
  padding: 1.5rem;
  text-align: center;
  color: #64748b;
}
.webv2-hero-choose-survey p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Hero survey response: voice section and table */
.webv2-voice-section {
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.webv2-voice-section__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.webv2-voice-section__count {
  font-weight: 400;
  color: #64748b;
}
.webv2-voice-empty {
  margin: 0;
  color: #64748b;
  font-size: 0.9375rem;
}
.webv2-voice-table-wrap {
  overflow-x: auto;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
}
.webv2-voice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.webv2-voice-th,
.webv2-voice-td {
  padding: 0.625rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid #f1f5f9;
}
.webv2-voice-th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
}
.webv2-voice-th--select {
  width: 3rem;
  text-align: center;
}
.webv2-voice-td--select {
  text-align: center;
}
.webv2-voice-td--name {
  font-weight: 500;
}
.webv2-voice-td--duration {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.webv2-voice-row:has(.webv2-voice-checkbox:checked) {
  background: #f0f9ff;
}
.webv2-voice-checkbox-label {
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.webv2-voice-checkbox {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
}
.webv2-voice-audio-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.webv2-voice-audio {
  max-width: 240px;
  height: 2rem;
  vertical-align: middle;
  flex: 1;
  min-width: 0;
}
.webv2-voice-no-url {
  color: #94a3b8;
  font-size: 0.875rem;
}
.webv2-voice-play-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #051c33;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.webv2-voice-play-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.webv2-voice-play-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(5, 28, 51, 0.25);
}

/* Formset table (hero survey / poll options) */
.webv2-formset-table-wrap {
  overflow-x: auto;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
}
.webv2-formset-actions {
  margin-top: 0.75rem;
}
.webv2-btn-add-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.webv2-formset-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.webv2-formset-table th,
.webv2-formset-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  text-align: right;
}
.webv2-formset-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
}
.webv2-formset-table input[type="text"],
.webv2-formset-table input[type="number"] {
  width: 100%;
  max-width: 200px;
  padding: 0.35rem 0.5rem;
  border: 1px solid #E5E7EB;
  border-radius: 0.375rem;
}
.webv2-formset-row--errors td {
  background: #fef2f2;
}
.webv2-hint {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.25rem;
}
.webv2-label-note {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #64748b;
}
.webv2-hero-episode-placeholder {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  padding: 0.5rem 0;
}

/* ——— Modals & overlays: confirm, hint, lightbox, full-page loading ———
   JS uses .is-open (dialogs/lightbox) and .is-active (loading). Without these rules,
   toggling those classes had no effect — modals would not display as overlays. */

/* Modal panel width: set on the dialog root; .webv2-*-dialog-box uses var(--webv2-modal-content-max)
   - Confirm: keep compact. Hint: larger for images / bullet lists.
   Override (e.g. in a template or extra style block):
     .webv2-hint-dialog { --webv2-modal-content-max: min(96vw, 72rem); } */
.webv2-confirm-dialog {
  --webv2-modal-content-max: 32rem;
  --webv2-modal-content-max-h: min(90vh, 80rem);
}
.webv2-hint-dialog {
  --webv2-modal-content-max: min(96vw, 56rem);
  --webv2-modal-content-max-h: min(90vh, 80rem);
}

.webv2-confirm-dialog,
.webv2-hint-dialog,
.webv2-hint-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 1rem;
}
.webv2-hint-lightbox {
  z-index: 100010;
}
.webv2-confirm-dialog.is-open,
.webv2-hint-dialog.is-open,
.webv2-hint-lightbox.is-open {
  display: flex;
}
.webv2-confirm-dialog[hidden],
.webv2-hint-dialog[hidden],
.webv2-hint-lightbox[hidden] {
  display: none !important;
}
.webv2-confirm-dialog-backdrop,
.webv2-hint-dialog-backdrop,
.webv2-hint-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
}
.webv2-confirm-dialog-box,
.webv2-hint-dialog-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--webv2-modal-content-max, 32rem);
  max-height: var(--webv2-modal-content-max-h, min(90vh, 80rem));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  color: #0f172a;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  padding: 1.5rem 1.25rem 1.25rem;
  margin: auto;
  box-sizing: border-box;
}
.webv2-confirm-dialog-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #fff7ed;
  color: #ea580c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}
.webv2-confirm-dialog-title,
.webv2-hint-dialog-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  text-align: center;
  color: #0f172a;
}
.webv2-confirm-dialog-message,
.webv2-hint-dialog-empty {
  text-align: center;
  color: #475569;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
}
.webv2-confirm-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.5rem;
}
.webv2-confirm-dialog-btn {
  min-width: 6rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.webv2-confirm-dialog-btn--cancel {
  background: #fff;
  color: #334155;
}
.webv2-confirm-dialog-btn--cancel:hover {
  background: #f8fafc;
}
.webv2-confirm-dialog-btn--confirm {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}
.webv2-confirm-dialog-btn--confirm:hover {
  background: #991b1b;
}
.webv2-hint-dialog-close,
.webv2-hint-lightbox-close {
  position: absolute;
  top: 0.75rem;
  inset-inline-end: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: #f1f5f9;
  color: #334155;
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s;
}
.webv2-hint-dialog-close:hover,
.webv2-hint-lightbox-close:hover {
  background: #e2e8f0;
}
.webv2-hint-dialog-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.webv2-hint-image-btn {
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  max-width: 100%;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.webv2-hint-image-btn:hover {
  border-color: #051c33;
  box-shadow: 0 4px 12px rgba(5, 28, 51, 0.12);
}
.webv2-hint-image {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
}
.webv2-hint-dialog-points {
  margin: 0;
  padding: 0 0.5rem 0 0;
  list-style: disc;
  list-style-position: inside;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: start;
}
.webv2-hint-dialog-point {
  margin-bottom: 0.4rem;
}
.webv2-hint-lightbox.is-open {
  position: fixed;
  inset: 0;
  display: flex;
  padding: 1.5rem;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.webv2-hint-lightbox-box {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.webv2-hint-lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.webv2-hint-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.webv2-hint-lightbox-nav--prev { inset-inline-end: 0.5rem; }
.webv2-hint-lightbox-nav--next { inset-inline-start: 0.5rem; }
.webv2-hint-lightbox-counter {
  position: absolute;
  bottom: -1.75rem;
  left: 50%;
  transform: translateX(-50%);
  color: #e2e8f0;
  font-size: 0.875rem;
  margin: 0;
}
/* Full-page processing overlay */
.webv2-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100020;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  box-sizing: border-box;
}
.webv2-loading-overlay.is-active {
  display: flex;
}
.webv2-loading-overlay-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  color: #0f172a;
  padding: 1.5rem 1.75rem;
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid #e2e8f0;
}
.webv2-loading-overlay-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  border-top-color: #051c33;
  animation: webv2-overlay-spin 0.75s linear infinite;
}
@keyframes webv2-overlay-spin {
  to { transform: rotate(360deg); }
}
.webv2-loading-overlay-text {
  margin: 0;
  font-size: 0.9rem;
  color: #475569;
}

/* ─── HLS Status Card ────────────────────────────────────────────────────── */
.webv2-hls-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  margin-top: 0.5rem;
  transition: border-color 0.2s, background 0.2s;
}
/* — state modifiers — */
.webv2-hls-card--pending {
  border-color: #fcd34d;
  background: #fffbeb;
}
.webv2-hls-card--processing {
  border-color: #93c5fd;
  background: #eff6ff;
}
.webv2-hls-card--ready {
  border-color: #6ee7b7;
  background: #f0fdf4;
}
.webv2-hls-card--failed {
  border-color: #fca5a5;
  background: #fef2f2;
}
.webv2-hls-card--muted {
  border-color: #e2e8f0;
  background: #f8fafc;
}
/* — icon — */
.webv2-hls-card__icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
}
.webv2-hls-card--pending   .webv2-hls-card__icon { color: #d97706; }
.webv2-hls-card--processing .webv2-hls-card__icon { color: #2563eb; }
.webv2-hls-card--ready     .webv2-hls-card__icon { color: #16a34a; }
.webv2-hls-card--failed    .webv2-hls-card__icon { color: #dc2626; }
.webv2-hls-card--muted     .webv2-hls-card__icon { color: #94a3b8; }
/* — body — */
.webv2-hls-card__body {
  flex: 1;
  min-width: 0;
}
.webv2-hls-card__title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.1rem;
}
.webv2-hls-card__status {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1e293b;
}
/* — action buttons — */
.webv2-hls-card__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.webv2-hls-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.webv2-hls-card__btn:hover { opacity: 0.8; }
.webv2-hls-card__btn--ghost {
  border: 1.5px solid #cbd5e1;
  color: #475569;
  background: #fff;
}
.webv2-hls-card__btn--primary {
  border: 1.5px solid #16a34a;
  color: #fff;
  background: #16a34a;
}
/* — spinner — */
@keyframes webv2-hls-spin {
  to { transform: rotate(360deg); }
}
.webv2-hls-spinner {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  border: 2.5px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: webv2-hls-spin 0.75s linear infinite;
}

/* legacy pill classes — kept for list view usage */
.webv2-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
}
.webv2-pill--hls-pending    { background: #fef3c7; color: #92400e; }
.webv2-pill--hls-processing { background: #dbeafe; color: #1e40af; }
.webv2-pill--hls-ready      { background: #dcfce7; color: #166534; }
.webv2-pill--hls-failed     { background: #fee2e2; color: #991b1b; }
.webv2-pill--hls-muted      { background: #f3f4f6; color: #4b5563; }
.webv2-pill--status-active  { background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.webv2-pill--status-inactive { background: #f8fafc; color: #475569; border: 1px solid #e2e8f0; }

.webv2-hero-episode-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  direction: rtl;
}
.webv2-hero-pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: #f5f9ff;
  color: #315ea8;
  border: 1px solid #dbeafe;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.webv2-hero-pinned-badge i {
  font-size: 0.625rem;
  opacity: 0.85;
}
.webv2-data-table tbody tr.webv2-row-pinned {
  box-shadow: inset 2px 0 0 #dbeafe;
  background: #fbfdff;
}
.webv2-data-table tbody tr.webv2-row-pinned:hover {
  background: #f4f8ff;
}
.webv2-data-table tbody tr.webv2-row-pinned:hover .webv2-hero-pinned-badge {
  background: #eaf3ff;
  border-color: #c7dcfd;
  color: #214d92;
}
.episode-filter-card {
  border-color: #dce5f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.episode-filter-card__header {
  border-block-end: 1px solid #eef2f7;
}
.episode-filter-btn {
  box-shadow: 0 1px 2px rgba(5, 28, 51, 0.12);
}
