:root {
  --reseller-primary: #8B0000;
  --reseller-primary-soft: rgba(139, 0, 0, 0.12);
  --reseller-primary-deep: #5c0000;
  --reseller-ink: #1f2340;
  --reseller-surface: rgba(255, 255, 255, 0.88);
  --reseller-line: rgba(148, 163, 184, 0.24);
  --reseller-shadow: 0 22px 40px rgba(15, 23, 42, 0.08);
}

html.reseller-brand-pending #resellerHeaderLogo,
html.reseller-brand-pending #resellerSiteLogo,
html.reseller-brand-pending #resellerHeroLogo,
html.reseller-brand-pending #resellerCoverLogo,
html.reseller-brand-pending #resellerHeaderName,
html.reseller-brand-pending #resellerSiteTitle,
html.reseller-brand-pending #resellerAgentTitle,
html.reseller-brand-pending #resellerCoverBrandName {
  visibility: hidden;
}

html.reseller-brand-pending #resellerSiteFallback,
html.reseller-brand-pending #resellerHeroFallback,
html.reseller-brand-pending #resellerCoverFallback,
html.reseller-brand-pending #resellerLogoFallback {
  display: none !important;
}

body.reseller-themed {
  background:
    radial-gradient(circle at top right, rgba(139, 0, 0, 0.10), transparent 26%),
    linear-gradient(180deg, #fdf4f4 0%, #f8fafc 18%, #fef2f2 100%);
}

body.reseller-themed .sidebar {
  background:
    linear-gradient(180deg, rgba(17, 10, 42, 0.98) 0%, rgba(28, 17, 67, 0.98) 52%, rgba(18, 9, 42, 0.98) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 18px 0 34px rgba(15, 23, 42, 0.14);
}

body.reseller-themed .sidebar-brand {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.96);
}

body.reseller-themed .sidebar-nav a {
  margin: 6px 4px;
  padding: 11px 12px;
  border-radius: 12px;
  transition: background .18s ease, transform .18s ease, color .18s ease;
}

body.reseller-themed .sidebar-nav a.active,
body.reseller-themed .sidebar-nav a:hover {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.26), rgba(139, 0, 0, 0.10));
  color: #fff;
  transform: translateX(2px);
}

body.reseller-themed .content {
  min-height: 100vh;
}

body.reseller-themed .content > header,
body.reseller-themed .site-header {
  background: linear-gradient(135deg, rgba(20, 18, 52, 0.97) 0%, rgba(34, 26, 76, 0.94) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 3px solid var(--reseller-primary);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

body.reseller-themed .content > header {
  margin: 10px 20px 18px;
  padding: 18px 22px;
  top: 10px;
}

body.reseller-themed .site-header {
  margin: 10px 20px 18px 240px;
  padding: 18px 22px;
  position: sticky;
  top: 10px;
  z-index: 10;
}

body.reseller-themed .container {
  max-width: none;
  margin: 0 20px 30px 240px;
  padding: 0;
}

body.reseller-themed .brand,
body.reseller-themed .site-header {
  gap: 12px;
}

body.reseller-themed .brand img,
body.reseller-themed .site-header img,
body.reseller-themed .cover-brand img,
body.reseller-themed .hero-logo {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  padding: 4px;
}

body.reseller-themed .brand .name,
body.reseller-themed .site-title {
  font-size: 22px;
  font-weight: 800;
}

body.reseller-themed .brand .muted,
body.reseller-themed .site-subtitle {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  letter-spacing: 0.03em;
  margin-left: 0;
}

body.reseller-themed main {
  padding-top: 6px;
  padding-bottom: 30px;
}

body.reseller-themed .card,
body.reseller-themed .section,
body.reseller-themed .hero,
body.reseller-themed .chart-card,
body.reseller-themed table.card,
body.reseller-themed .summary-table,
body.reseller-themed .table {
  border-radius: 18px;
  border: 1px solid var(--reseller-line);
  background: var(--reseller-surface);
  box-shadow: var(--reseller-shadow);
  backdrop-filter: blur(10px);
}

body.reseller-themed .hero {
  padding: 24px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(139, 0, 0, 0.16) 0%, rgba(255, 255, 255, 0.98) 48%, rgba(255, 255, 255, 0.94) 100%);
}

body.reseller-themed .section h2,
body.reseller-themed .card h2,
body.reseller-themed .card h3,
body.reseller-themed .hero h1 {
  color: var(--reseller-ink);
}

body.reseller-themed .section p,
body.reseller-themed .hero p,
body.reseller-themed .note,
body.reseller-themed .footer,
body.reseller-themed .muted {
  color: #64748b;
}

body.reseller-themed pre,
body.reseller-themed code {
  background: #fff7f7;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 12px;
}

body.reseller-themed table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

body.reseller-themed th,
body.reseller-themed thead th {
  background: #fff7f7;
  color: #394163;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
}

body.reseller-themed tbody tr:hover {
  background: rgba(254, 242, 242, 0.96);
}

body.reseller-themed input,
body.reseller-themed select,
body.reseller-themed textarea {
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #1f2937;
}

body.reseller-themed .btn,
body.reseller-themed .btn-primary,
body.reseller-themed .report-btn,
body.reseller-themed .btn-print {
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

body.reseller-themed .btn:hover,
body.reseller-themed .btn-primary:hover,
body.reseller-themed .report-btn:hover,
body.reseller-themed .btn-print:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.10);
}

body.reseller-themed .btn:not(.btn-outline):not(.btn-secondary),
body.reseller-themed .btn-primary,
body.reseller-themed .report-btn,
body.reseller-themed .btn-print {
  background: linear-gradient(135deg, var(--reseller-primary) 0%, var(--reseller-primary-deep) 100%);
  color: #fff;
}

body.reseller-themed .btn-outline,
body.reseller-themed .btn-secondary {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.34);
  color: var(--reseller-ink);
}

body.reseller-themed .report-builder {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

body.reseller-themed .report-builder .muted,
body.reseller-themed header .muted,
body.reseller-themed .site-header .muted {
  color: rgba(255, 255, 255, 0.82);
}

body.reseller-themed .print-cover {
  border-radius: 24px;
  overflow: hidden;
}

body.reseller-themed .footer {
  padding-bottom: 28px;
}

body.reseller-themed .reseller-fallback {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--reseller-primary);
  font-weight: 800;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}

body.reseller-themed .hero .reseller-fallback {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  font-size: 30px;
}

@media (max-width: 860px) {
  body.reseller-themed .content {
    margin-left: 0;
  }

  body.reseller-themed .site-header,
  body.reseller-themed .container {
    margin-left: 20px;
  }

  body.reseller-themed .content > header {
    margin-left: 12px;
    margin-right: 12px;
  }
}
