/* ===========================================================================
   institution.bd / smartschool.bd — v5pro frontend
   Bootstrap 5.3 + custom theme overrides.
   Modern, accessible, mobile-first. Dark/light mode support.
   =========================================================================== */

/* ===== CSS Variables (Bootstrap override + custom) ===== */
:root {
  --bs-primary: #0f766e;
  --bs-primary-rgb: 15, 118, 110;
  --bs-secondary: #2563eb;
  --bs-success: #15803d;
  --bs-danger: #dc2626;
  --bs-warning: #d97706;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-font-size: 0.9375rem;
  --c-primary: #0f766e;
  --c-primary-700: #115e59;
  --c-primary-50: rgba(15, 118, 110, 0.08);
  --c-primary-100: rgba(15, 118, 110, 0.18);
  --c-link: #0f766e;
  --c-surface: #ffffff;
  --c-surface-2: #f8fafc;
  --c-muted: #64748b;
  --c-border: #e2e8f0;
  --c-whatsapp: #25D366;
  --c-whatsapp-700: #128C7E;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
  --r-sm: 0.5rem;
  --r-md: 0.75rem;
  --r-lg: 1rem;
  --r-xl: 1.5rem;
}


/* ===== Dark Mode ===== */
[data-bs-theme="dark"], html[data-theme="dark"] {
  --c-primary: #2dd4bf;
  --c-primary-700: #14b8a6;
  --c-primary-50: rgba(45, 212, 191, 0.12);
  --c-primary-100: rgba(45, 212, 191, 0.22);
  --c-link: #2dd4bf;
  --c-surface: #1e293b;
  --c-surface-2: #0f172a;
  --c-muted: #94a3b8;
  --c-border: #334155;
  --bs-body-bg: #0f172a;
  --bs-body-color: #e2e8f0;
}

/* ===== Global Overrides ===== */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

:lang(bn), .bn {
  font-family: 'Noto Sans Bengali', 'Inter', system-ui, sans-serif;
}

a { color: var(--c-link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--c-primary-700); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ===== Skip Link (a11y) ===== */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--c-primary); color: #fff;
  padding: 8px 16px; border-radius: var(--r-sm);
  z-index: 9999; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }


/* ===== Navbar Customization ===== */
.navbar-v5 {
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background: rgba(255,255,255,0.88) !important;
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow .2s, background .2s;
}
[data-theme="dark"] .navbar-v5 {
  background: rgba(15,23,42,0.92) !important;
  border-bottom-color: #334155;
}
.navbar-v5.scrolled {
  box-shadow: 0 2px 16px -6px rgba(0,0,0,.15);
}
.navbar-v5 .navbar-brand {
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.navbar-v5 .navbar-brand img {
  width: 32px; height: 32px;
}
.navbar-v5 .brand-sub {
  font-size: 0.7rem;
  color: var(--c-muted);
  font-weight: 500;
  display: block;
  line-height: 1;
}
.navbar-v5 .nav-link {
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--r-sm);
  transition: background .15s, color .15s;
}
.navbar-v5 .nav-link:hover,
.navbar-v5 .nav-link.active {
  background: var(--c-primary-50);
  color: var(--c-primary) !important;
}
.navbar-v5 .btn-theme-toggle {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.navbar-v5 .btn-theme-toggle:hover { background: var(--c-primary-50); }
.navbar-v5 .btn-theme-toggle:active { transform: scale(.94); }


/* ===== Hero Section ===== */
.hero-v5 {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 50%, #f0f9ff 100%);
}
[data-theme="dark"] .hero-v5 {
  background: linear-gradient(135deg, #0f172a 0%, #042f2e 50%, #0c1632 100%);
}
.hero-v5 .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--c-primary-50);
  border: 1px solid var(--c-primary-100);
  border-radius: 50rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-primary);
  margin-bottom: 1.25rem;
}
.hero-v5 .hero-eyebrow .pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-primary);
  animation: heroPulse 1.6s ease-out infinite;
}
@keyframes heroPulse {
  0% { box-shadow: 0 0 0 0 rgba(15,118,110,.5); }
  70% { box-shadow: 0 0 0 8px rgba(15,118,110,0); }
  100% { box-shadow: 0 0 0 0 rgba(15,118,110,0); }
}
.hero-v5 h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.hero-v5 h1 .text-gradient {
  background: linear-gradient(135deg, var(--c-primary) 0%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-v5 .hero-sub {
  font-size: 1.15rem;
  color: var(--c-muted);
  max-width: 56ch;
  line-height: 1.7;
}


/* ===== Search Hero Bar ===== */
.search-hero-v5 {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 640px;
}
.search-hero-v5 input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 500;
  min-width: 0;
}
.search-hero-v5 select {
  border: none;
  background: transparent;
  font-weight: 600;
  color: var(--c-muted);
  padding: 8px 4px;
  cursor: pointer;
  outline: none;
}
.search-hero-v5 .btn {
  border-radius: calc(var(--r-xl) - 4px);
  padding: 12px 24px;
  white-space: nowrap;
}
@media (max-width: 575.98px) {
  .search-hero-v5 {
    flex-wrap: wrap;
    border-radius: var(--r-lg);
  }
  .search-hero-v5 input { width: 100%; }
  .search-hero-v5 .btn { width: 100%; margin-top: 4px; }
}

/* ===== Search Result Card ===== */
.search-result-v5 {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-md);
  max-width: 640px;
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}


/* ===== Stat Tiles ===== */
.stat-tile-v5 {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.stat-tile-v5:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-tile-v5::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--c-primary);
  border-radius: 0 4px 4px 0;
}
.stat-tile-v5.stat-secondary::before { background: var(--bs-secondary); }
.stat-tile-v5.stat-warning::before { background: var(--bs-warning); }
.stat-tile-v5.stat-danger::before { background: var(--bs-danger); }
.stat-tile-v5 .stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--c-primary-50);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.stat-tile-v5 .stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-tile-v5 .stat-label {
  font-size: 0.8rem;
  color: var(--c-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}
.stat-tile-v5 .stat-delta {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--c-muted);
  margin-top: 0.5rem;
}


/* ===== Feature / Pro Cards ===== */
.feature-card-v5 {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  transition: transform .15s, box-shadow .15s;
}
.feature-card-v5:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.feature-card-v5 .feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: var(--c-primary-50);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

/* ===== Brand Cards ===== */
.brand-card-v5 {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 2rem;
  transition: transform .15s, box-shadow .2s;
  text-decoration: none !important;
  color: inherit !important;
}
.brand-card-v5:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.brand-card-v5.brand-alt {
  background: linear-gradient(135deg, #ecfeff 0%, #f0fdfa 100%);
  border-color: var(--c-primary-100);
}
[data-theme="dark"] .brand-card-v5.brand-alt {
  background: linear-gradient(135deg, #042f2e 0%, #0c4a4c 100%);
}
.brand-card-v5 .brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--c-primary);
}

/* ===== Steps / How It Works ===== */
.step-card-v5 {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  position: relative;
  padding-top: 2rem;
}
.step-card-v5 .step-number {
  position: absolute;
  top: -14px; left: 1.5rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}


/* ===== Directory Cards ===== */
.dir-card-v5 {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none !important;
  color: inherit !important;
}
.dir-card-v5:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.dir-card-v5 .dir-logo {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ===== WhatsApp Band ===== */
.wa-band-v5 {
  background: var(--c-whatsapp);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  color: #fff;
}
.wa-band-v5 h2 { color: #fff; }
.wa-band-v5 p { color: rgba(255,255,255,.9); }
.wa-band-v5 .btn-light { color: var(--c-whatsapp-700) !important; }
.wa-band-icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.18);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.wa-band-icon img { width: 32px; height: 32px; }

/* ===== WhatsApp Float ===== */
.wa-float {
  position: fixed;
  bottom: 1.25rem; right: 1.25rem;
  z-index: 1060;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--c-whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,.4);
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.08); color: #fff; }
.wa-float img { width: 28px; height: 28px; }
.wa-float::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37,211,102,.5);
  animation: waFloatPulse 1.8s ease-out infinite;
}
@keyframes waFloatPulse {
  0% { transform: scale(.85); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}
@media (min-width: 768px) {
  .wa-float { bottom: 1.5rem; right: 1.5rem; width: 64px; height: 64px; }
  .wa-float img { width: 32px; height: 32px; }
}


/* ===== FAQ Accordion ===== */
.faq-v5 .accordion-button {
  font-weight: 600;
  font-size: 1rem;
}
.faq-v5 .accordion-button:not(.collapsed) {
  background: var(--c-primary-50);
  color: var(--c-primary);
}
.faq-v5 .accordion-body {
  color: var(--c-muted);
  line-height: 1.7;
}

/* ===== CTA Band ===== */
.cta-band-v5 {
  background: linear-gradient(135deg, #0f766e 0%, #0e7490 100%);
  border-radius: var(--r-xl);
  padding: 3rem 2rem;
  color: #fff;
  text-align: center;
}
.cta-band-v5 h2 { color: #fff; }
.cta-band-v5 p { color: rgba(255,255,255,.85); }

/* ===== Footer ===== */
.footer-v5 {
  background: #0b1220;
  color: #94a3b8;
  padding: 3.5rem 0 1.5rem;
}
.footer-v5 a { color: #cbd5e1; }
.footer-v5 a:hover { color: #fff; }
.footer-v5 h6 { color: #fff; font-weight: 600; margin-bottom: 0.75rem; }
.footer-v5 .footer-brand p { color: #64748b; max-width: 30ch; }
.footer-v5 .footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 1rem;
  margin-top: 2rem;
  font-size: 0.85rem;
}


/* ===== Dashboard & Admin Layout ===== */
.dash-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: calc(100vh - 64px);
}
@media (max-width: 991.98px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }
}

/* Sidebar */
.dash-sidebar-v5 {
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  padding: 1.5rem 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
[data-theme="dark"] .dash-sidebar-v5 {
  background: #1e293b;
  border-right-color: #334155;
}
@media (max-width: 991.98px) {
  .dash-sidebar-v5 {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    height: 100vh;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform .25s ease;
    border-right: 1px solid var(--c-border);
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem 0;
  }
  .mobile-sidebar-open .dash-sidebar-v5 {
    transform: translateX(0);
  }
  .dash-sidebar-v5 .sidebar-header,
  .dash-sidebar-v5 .sidebar-footer { display: flex; }
}

.dash-sidebar-v5 .sidebar-header {
  padding: 0 1.25rem 1rem;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
}
.dash-sidebar-v5 .sidebar-nav {
  flex: 1;
  padding: 0 0.75rem;
}
.dash-sidebar-v5 .sidebar-footer {
  padding: 0.75rem 1.25rem 0;
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}


/* Sidebar Nav Items */
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 0.875rem;
  color: inherit;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.dash-nav-item:hover {
  background: var(--c-primary-50);
  color: var(--c-primary);
}
.dash-nav-item.active {
  background: var(--c-primary-50);
  color: var(--c-primary);
  font-weight: 600;
}
.dash-nav-item .nav-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
}
.dash-nav-item.active .nav-icon { opacity: 1; }
.dash-nav-item .nav-badge {
  margin-left: auto;
  background: var(--bs-danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 50rem;
  line-height: 1.3;
}

/* Dashboard Main Content */
.dash-content {
  padding: 1.5rem;
  max-width: 1200px;
}
@media (min-width: 992px) {
  .dash-content { padding: 2rem 2.5rem; }
}

/* ===== Quick Tiles (KPI) ===== */
.quick-tile-v5 {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
  text-align: left;
}
.quick-tile-v5:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-primary-100);
}
.quick-tile-v5 .tile-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--c-primary-50);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.quick-tile-v5 .tile-num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}
.quick-tile-v5 .tile-label {
  font-size: 0.78rem;
  color: var(--c-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}
.quick-tile-v5 .tile-hint {
  font-size: 0.72rem;
  color: var(--c-muted);
  margin-top: 0.5rem;
}


/* ===== Dashboard Tables ===== */
.dash-table-v5 {
  width: 100%;
  font-size: 0.875rem;
}
.dash-table-v5 th {
  font-weight: 600;
  color: var(--c-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface-2);
}
.dash-table-v5 td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--c-border);
  vertical-align: middle;
}
.dash-table-v5 tr:hover td {
  background: rgba(15, 118, 110, 0.02);
}
.dash-domain-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.dash-domain-logo {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.dash-domain-name { font-weight: 600; }
.dash-domain-meta { font-size: 0.78rem; color: var(--c-muted); }

/* ===== Connect Banner ===== */
.connect-banner-v5 {
  position: relative;
  background: linear-gradient(135deg, #0f766e, #0e7490, #2563eb);
  border-radius: var(--r-xl);
  padding: 2rem;
  color: #fff;
  overflow: hidden;
}
.connect-banner-v5::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%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/g%3E%3C/svg%3E");
}
.connect-banner-v5 h5 { color: #fff; position: relative; }
.connect-banner-v5 p { color: rgba(255,255,255,.85); position: relative; }
.connect-banner-v5 .btn { position: relative; }

/* ===== Modals ===== */
.modal-v5 .modal-content {
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg);
}
.modal-v5 .modal-header { border-bottom-color: var(--c-border); }
.modal-v5 .modal-footer { border-top-color: var(--c-border); }

/* ===== Auth Modal ===== */
.auth-modal .oauth-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  text-decoration: none;
  color: inherit;
  width: 100%;
}
.auth-modal .oauth-btn:hover {
  background: var(--c-surface-2);
  border-color: var(--c-primary-100);
}
.auth-modal .oauth-btn img { width: 22px; height: 22px; }


/* ===== Toast Notifications ===== */
.toast-container-v5 {
  position: fixed;
  top: 1rem; right: 1rem;
  z-index: 1100;
}

/* ===== Misc Utilities ===== */
.badge-verified { background: rgba(22,163,74,.12) !important; color: #15803d !important; }
.badge-pending { background: rgba(37,99,235,.12) !important; color: #2563eb !important; }
.badge-warning { background: rgba(217,119,6,.12) !important; color: #d97706 !important; }
.badge-danger { background: rgba(220,38,38,.12) !important; color: #dc2626 !important; }
.badge-brand { background: var(--c-primary-50) !important; color: var(--c-primary) !important; }
.badge-muted { background: rgba(100,116,139,.12) !important; color: #64748b !important; }

.skeleton-v5 {
  background: linear-gradient(90deg, var(--c-border) 25%, transparent 50%, var(--c-border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Activity Feed ===== */
.activity-item-v5 {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--c-border);
}
.activity-item-v5:last-child { border-bottom: none; }
.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-primary);
  margin-top: 0.5rem;
  flex-shrink: 0;
}

/* ===== Quick Actions Grid ===== */
.quick-action-v5 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  cursor: pointer;
  transition: all .12s;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  color: inherit;
  width: 100%;
  text-align: left;
}
.quick-action-v5:hover {
  background: var(--c-primary-50);
  border-color: var(--c-primary-100);
  color: var(--c-primary);
}
.quick-action-v5 .qa-icon {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--c-primary-50);
  color: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== Admin Banner ===== */
.admin-banner-v5 {
  background: var(--c-primary-50);
  border: 1px solid var(--c-primary-100);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-banner-v5.is-warning {
  background: rgba(217,119,6,.08);
  border-color: rgba(217,119,6,.2);
}
.admin-banner-v5 .banner-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== Responsive Table Wrapper ===== */
.table-responsive-v5 {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
}

/* ===== Exports Grid ===== */
.export-card-v5 {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}

/* ===== Loading States ===== */
.loading-spinner {
  display: inline-block;
  width: 1.25rem; height: 1.25rem;
  border: 2px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Print Styles ===== */
@media print {
  .navbar-v5, .dash-sidebar-v5, .wa-float, .footer-v5 { display: none !important; }
  .dash-layout { grid-template-columns: 1fr; }
}

/* ===== Mobile Sidebar Toggle & Backdrop ===== */
.mobile-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  cursor: pointer;
  font-size: 1.2rem;
  color: inherit;
  margin: 0.75rem 0.75rem 0;
  flex-shrink: 0;
}
@media (max-width: 991.98px) {
  .mobile-sidebar-toggle { display: inline-flex; }
}

.mobile-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1040;
  opacity: 0;
  transition: opacity .25s ease;
}
.mobile-sidebar-open .mobile-sidebar-backdrop {
  display: block;
  opacity: 1;
}

/* ===== Mobile Content Padding ===== */
@media (max-width: 767.98px) {
  .dash-content {
    padding: 1rem;
  }
}

/* ===== Mobile Admin Banner ===== */
@media (max-width: 767.98px) {
  .admin-banner-v5 {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }
  .admin-banner-v5 .banner-icon {
    width: 32px;
    height: 32px;
  }
}

/* ===== Mobile Table Safety ===== */
@media (max-width: 767.98px) {
  .dash-table-v5 {
    min-width: 0;
  }
  .dash-table-v5 th,
  .dash-table-v5 td {
    padding: 0.5rem 0.625rem;
    font-size: 0.8rem;
  }
}

/* ===== Mobile Quick Tiles ===== */
@media (max-width: 575.98px) {
  .quick-tile-v5 .tile-num {
    font-size: 1.25rem;
  }
  .quick-tile-v5 .tile-label {
    font-size: 0.72rem;
  }
}

/* ===== Modal XL Full Width on Mobile ===== */
@media (max-width: 575.98px) {
  .modal-xl .modal-dialog,
  .modal-dialog.modal-xl {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
}

/* ===== Claim Form Input Group Mobile ===== */
@media (max-width: 575.98px) {
  .input-group:has([data-slug-input]) {
    flex-wrap: wrap;
  }
  .input-group:has([data-slug-input]) [data-slug-input] {
    width: 100%;
    border-radius: var(--r-sm) !important;
    margin-bottom: 0.5rem;
  }
  .input-group:has([data-slug-input]) [data-brand-select] {
    max-width: 100% !important;
    width: 100%;
    border-radius: var(--r-sm) !important;
  }
}

/* ===== Prevent Horizontal Overflow ===== */
@media (max-width: 575.98px) {
  .dash-layout {
    max-width: 100vw;
    overflow-x: hidden;
  }
}

/* ===== Directory Filters Mobile ===== */
@media (max-width: 575.98px) {
  .dir-card-v5 {
    padding: 1rem;
  }
  .dir-card-v5 .dir-logo {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }
}

/* ===== Admin pane mobile polish (generalized from integrations 8de04ea) ===== */

/* Long inline code samples (redirect URIs, callbacks, JSON keys) wrap on phones
   in every admin pane card-body, not just integrations. */
.dash-content code {
  word-break: break-all;
  font-size: 0.78rem;
}

/* Integrations pane keeps its own overflow-x clip (it has no per-row Manage
   modal). Do NOT extend overflow-x:hidden to .dash-content; that would clip
   the queue/users/sponsors Manage / detail modals. */
[data-integrations-host] .card-body {
  overflow-x: hidden;
}

/* Replaces inline style="width:40px;" on the queue checkbox <th>. */
.dash-table-v5 th.col-checkbox {
  width: 2.5rem;
  min-width: 2.5rem;
}

/* Replaces inline style="max-width:180px;" / "max-width:150px;" on sponsors
   logo/website URL cells. The sm variant is for the shorter Website column. */
.dash-table-v5 td.cell-url,
.dash-table-v5 td.cell-url-short {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-table-v5 td.cell-url      { max-width: 220px; }
.dash-table-v5 td.cell-url-short{ max-width: 160px; }

/* Below the sm breakpoint relax the URL cell cap so the cell stays readable
   inside the .table-responsive scroll container. */
@media (max-width: 575.98px) {
  .dash-table-v5 td.cell-url,
  .dash-table-v5 td.cell-url-short {
    max-width: 50vw;
  }
}

/* When an action TD stacks its buttons vertically below sm
   (queue pane: <td><div class="d-flex flex-column flex-sm-row ...">), make
   each stacked button full-width so Review and the trash icon align. */
@media (max-width: 575.98px) {
  .dash-table-v5 td .d-flex.flex-column > .btn {
    width: 100%;
  }
}

