:root {
  --app-bg: #f5f7fb;
  --app-surface: #ffffff;
  --app-text: #111827;
  --app-muted: #6b7280;
  --app-border: rgba(15, 23, 42, 0.08);
  --app-primary: #0d6efd;
  --app-success: #198754;
  --app-danger: #dc3545;
}

html[data-theme="dark"] {
  --app-bg: #0f172a;
  --app-surface: #111827;
  --app-text: #e5e7eb;
  --app-muted: #9ca3af;
  --app-border: rgba(255, 255, 255, 0.08);
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 15px;
  }
}

body.app-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--app-bg) 0%, #dfe8f5 100%);
  color: var(--app-text);
  margin: 0;
}

html[data-theme="dark"] body.app-shell {
  background: linear-gradient(180deg, #020617 0%, #111827 100%);
}

.glass-nav,
.card,
.table,
.modal-content,
.list-group-item,
.form-control,
.form-select,
.input-group-text,
.alert {
  background-color: var(--app-surface) !important;
  color: var(--app-text);
  border-color: var(--app-border) !important;
}

.navbar-brand,
.nav-link,
.table,
.form-label,
.card-title,
.card-text,
.display-6,
h1, h2, h3, h4, h5, h6,
p,
span,
small,
label {
  color: var(--app-text);
}

.text-secondary,
.text-muted {
  color: var(--app-muted) !important;
}

.glass-nav {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.75) !important;
}

html[data-theme="dark"] .glass-nav {
  background: rgba(17, 24, 39, 0.9) !important;
}

.dashboard-stat {
  border-radius: 1rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.hero-panel,
.content-card {
  border-radius: 1rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.table-responsive {
  border-radius: 1rem;
  overflow: hidden;
}

.badge-soft-success {
  background: rgba(25, 135, 84, 0.12);
  color: var(--app-success);
}

.badge-soft-danger {
  background: rgba(220, 53, 69, 0.12);
  color: var(--app-danger);
}

.badge-soft-primary {
  background: rgba(13, 110, 253, 0.12);
  color: var(--app-primary);
}

.video-shell {
  background: #000;
  border-radius: 1rem;
  overflow: hidden;
}

.video-shell video {
  width: 100%;
  min-height: 360px;
  display: block;
}

.ad-card {
  min-height: 180px;
}

.link-copy-box {
  font-size: 0.9rem;
  word-break: break-all;
}

.page-breadcrumb {
  padding: 0 0.25rem;
}

.section-title {
  color: #153e8c;
  font-size: 1.7rem;
  font-weight: 700;
}

.form-control-lg,
.btn {
  border-radius: 0.85rem;
}

.form-control-lg {
  min-height: 54px;
}

.table-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.table-tools .tool-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.tool-input {
  min-width: 220px;
}

.icon-action-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0.8rem;
}

.form-inline-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.table-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.pager-button {
  min-width: 68px;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 280px;
  background: var(--app-surface);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand a {
  color: var(--app-primary);
  font-size: 1.4rem;
  font-weight: 700;
}

.sidebar-user {
  padding: 0.95rem 1rem;
  border: 1px solid var(--app-border);
  border-radius: 1rem;
  background: rgba(13, 110, 253, 0.05);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.sidebar-link,
.sidebar-sublink,
.sidebar-section {
  width: 100%;
  display: block;
  border: 0;
  text-align: left;
  text-decoration: none;
  color: var(--app-text);
  background: transparent;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  font-weight: 600;
}

.sidebar-sublink {
  margin-left: 0.35rem;
  width: calc(100% - 0.35rem);
  padding-left: 1.35rem;
  font-weight: 500;
}

.sidebar-section::after {
  content: "+";
  float: right;
  color: var(--app-muted);
}

.sidebar-section:not(.collapsed)::after {
  content: "-";
}

.sidebar-link:hover,
.sidebar-sublink:hover,
.sidebar-section:hover {
  background: rgba(13, 110, 253, 0.08);
}

.sidebar-link.active,
.sidebar-sublink.active {
  background: var(--app-primary);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

html[data-theme="dark"] .app-topbar {
  background: rgba(17, 24, 39, 0.8);
}

.app-content {
  padding: 1.5rem;
}

.app-footer {
  padding: 1rem 1.5rem;
}

.live-ad-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.live-ad-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  padding: 2.5rem 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 32%),
    linear-gradient(135deg, #0d6efd 0%, #6610f2 55%, #20c997 100%);
  color: #fff;
  box-shadow: 0 24px 60px rgba(13, 110, 253, 0.24);
}

.live-ad-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-ad-title {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.live-ad-subtitle {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.1rem;
}

.live-ad-offer-strip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.96);
  font-weight: 700;
  font-size: 0.92rem;
}

.live-ad-location {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
}

.live-ad-card {
  border-radius: 1.5rem;
  padding: 1.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 252, 0.98));
  border: 1px solid rgba(13, 110, 253, 0.08);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .live-ad-card {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.96));
  border-color: rgba(255, 255, 255, 0.08);
}

.live-ad-brand {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #dc3545;
}

.live-ad-highlight-card,
.live-ad-offer-card {
  border-radius: 1.35rem;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 253, 0.98));
  border: 1px solid rgba(13, 110, 253, 0.08);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] .live-ad-highlight-card,
html[data-theme="dark"] .live-ad-offer-card {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.96));
  border-color: rgba(255, 255, 255, 0.08);
}

.live-ad-highlight-kicker {
  color: var(--app-primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.live-ad-highlight-title,
.live-ad-offer-title {
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.live-ad-highlight-title {
  font-size: 1.2rem;
}

.live-ad-offer-title {
  font-size: 1.6rem;
}

.live-ad-actions {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.live-ad-btn {
  min-width: 220px;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.live-ad-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #153e8c;
}

.live-ad-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.live-ad-contact-item,
.live-ad-support-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(13, 110, 253, 0.08);
  border: 1px solid rgba(13, 110, 253, 0.08);
  color: var(--app-text);
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.live-ad-contact-item:hover,
.live-ad-support-number:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(13, 110, 253, 0.14);
  background: rgba(13, 110, 253, 0.14);
  color: var(--app-text);
}

.live-ad-support-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.live-ad-support-number {
  min-height: 72px;
  font-size: 1.35rem;
}

@media (max-width: 991.98px) {
  .app-layout {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
    height: auto;
    position: static;
  }

  .app-topbar {
    padding: 1rem;
  }

  .app-content {
    padding: 1rem;
  }

  .live-ad-card,
  .live-ad-hero {
    padding: 1.5rem 1rem;
  }

  .live-ad-actions {
    align-items: stretch;
  }

  .live-ad-btn {
    min-width: 100%;
  }
}
