:root {
  --ca-bg-0: #050816;
  --ca-bg-1: #071a3a;
  --ca-surface: rgba(255, 255, 255, 0.05);
  --ca-border: rgba(148, 163, 184, 0.18);
  --ca-text: #e5e7eb;
  --ca-muted: #94a3b8;
  --ca-brand: #34d399;
  --ca-brand-2: #22d3ee;
}

body.page-clientarea .bg-gray,
body.page-resellerpricing .bg-gray,
body[class*="tpl-client_"] .bg-gray {
  background: radial-gradient(900px 600px at 10% 10%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(900px 600px at 90% 0%, rgba(167, 139, 250, 0.14), transparent 60%),
    radial-gradient(900px 700px at 60% 90%, rgba(52, 211, 153, 0.12), transparent 55%),
    linear-gradient(180deg, var(--ca-bg-0), var(--ca-bg-1)) !important;
  color: var(--ca-text);
}

/* Apply the same background treatment to placeorder pages without affecting inner `.bg-gray` blocks */
body.page-resellerplaceorder > .bg-gray,
body.page-placeorder > .bg-gray {
  background: radial-gradient(900px 600px at 10% 10%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(900px 600px at 90% 0%, rgba(167, 139, 250, 0.14), transparent 60%),
    radial-gradient(900px 700px at 60% 90%, rgba(52, 211, 153, 0.12), transparent 55%),
    linear-gradient(180deg, var(--ca-bg-0), var(--ca-bg-1)) !important;
  color: var(--ca-text);
}

body.page-clientarea header .header-top,
body.page-clientarea header .header-middle,
body.page-clientarea header .header-bottom,
body.page-resellerpricing header .header-top,
body.page-resellerpricing header .header-middle,
body.page-resellerpricing header .header-bottom,
body[class*="tpl-client_"] header .header-top,
body[class*="tpl-client_"] header .header-middle,
body[class*="tpl-client_"] header .header-bottom {
  background: linear-gradient(180deg, rgba(5, 8, 22, 0.92) 0%, rgba(7, 26, 58, 0.86) 100%) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Fix logged-in menus: keep master dropdowns above the products bar */
body.page-clientarea header,
body.page-resellerpricing header,
body[class*="tpl-client_"] header {
  position: relative;
  z-index: 50;
}

body.page-clientarea header .header-bottom,
body.page-resellerpricing header .header-bottom,
body[class*="tpl-client_"] header .header-bottom {
  position: relative;
  z-index: 51;
}

body.page-clientarea header .header-middle,
body.page-resellerpricing header .header-middle,
body[class*="tpl-client_"] header .header-middle {
  position: relative;
  z-index: 52;
}

body.page-clientarea header .navbar-mastermenu,
body.page-resellerpricing header .navbar-mastermenu,
body[class*="tpl-client_"] header .navbar-mastermenu {
  position: relative;
  z-index: 53;
}

body.page-clientarea header .dropdown-menu,
body.page-resellerpricing header .dropdown-menu,
body[class*="tpl-client_"] header .dropdown-menu {
  z-index: 9999 !important;
}

body.page-clientarea header nav,
body.page-clientarea header .navbar,
body.page-clientarea header .nav,
body.page-resellerpricing header nav,
body.page-resellerpricing header .navbar,
body.page-resellerpricing header .nav,
body[class*="tpl-client_"] header nav,
body[class*="tpl-client_"] header .navbar,
body[class*="tpl-client_"] header .nav {
  background: transparent !important;
  background-color: transparent !important;
}

body.page-clientarea header .nav-link,
body.page-resellerpricing header .nav-link,
body[class*="tpl-client_"] header .nav-link {
  color: #e0f2fe !important;
}

body.page-clientarea header .nav-link:hover,
body.page-resellerpricing header .nav-link:hover,
body[class*="tpl-client_"] header .nav-link:hover {
  color: var(--ca-brand-2) !important;
}

body.page-clientarea .bg-white,
body.page-clientarea .bg-light,
body.page-resellerpricing .bg-white,
body.page-resellerpricing .bg-light,
body[class*="tpl-client_"] .bg-white,
body[class*="tpl-client_"] .bg-light {
  background: rgba(5, 8, 22, 0.86) !important;
  color: var(--ca-text) !important;
}

body.page-clientarea .border-bottom,
body.page-clientarea .border-top,
body.page-clientarea .border,
body.page-resellerpricing .border-bottom,
body.page-resellerpricing .border-top,
body.page-resellerpricing .border,
body[class*="tpl-client_"] .border-bottom,
body[class*="tpl-client_"] .border-top,
body[class*="tpl-client_"] .border {
  border-color: var(--ca-border) !important;
}

body.page-clientarea .text-dark,
body.page-resellerpricing .text-dark,
body[class*="tpl-client_"] .text-dark {
  color: var(--ca-text) !important;
}

body.page-clientarea .text-muted,
body.page-resellerpricing .text-muted,
body[class*="tpl-client_"] .text-muted {
  color: var(--ca-muted) !important;
}

body.page-clientarea .dropdown-menu,
body.page-resellerpricing .dropdown-menu,
body[class*="tpl-client_"] .dropdown-menu {
  background: #050816 !important;
  background-image: none !important;
  border: 1px solid var(--ca-border) !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.65) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
}

body.page-clientarea .dropdown-header,
body.page-resellerpricing .dropdown-header,
body[class*="tpl-client_"] .dropdown-header {
  color: var(--ca-text) !important;
}

body.page-clientarea .dropdown-item,
body.page-resellerpricing .dropdown-item,
body[class*="tpl-client_"] .dropdown-item {
  color: var(--ca-text) !important;
  opacity: 1 !important;
}

body.page-clientarea .dropdown-item:hover,
body.page-clientarea .dropdown-item:focus,
body.page-resellerpricing .dropdown-item:hover,
body.page-resellerpricing .dropdown-item:focus,
body[class*="tpl-client_"] .dropdown-item:hover,
body[class*="tpl-client_"] .dropdown-item:focus {
  background: rgba(34, 211, 238, 0.12) !important;
  color: #ffffff !important;
}

body.page-clientarea .page-title,
body.page-resellerpricing .page-title,
body[class*="tpl-client_"] .page-title {
  color: var(--ca-text) !important;
}

body.page-clientarea .breadcrumb,
body.page-resellerpricing .breadcrumb,
body[class*="tpl-client_"] .breadcrumb,
body.page-clientarea .breadcrumb a,
body.page-resellerpricing .breadcrumb a,
body[class*="tpl-client_"] .breadcrumb a {
  color: var(--ca-muted) !important;
}

body.page-clientarea .card,
body.page-resellerpricing .card,
body[class*="tpl-client_"] .card,
body.page-clientarea .card-search,
body.page-resellerpricing .card-search,
body[class*="tpl-client_"] .card-search {
  background: var(--ca-surface) !important;
  border: 1px solid var(--ca-border) !important;
  color: var(--ca-text);
}

body.page-clientarea .table,
body.page-resellerpricing .table,
body[class*="tpl-client_"] .table {
  color: var(--ca-text);
}

body.page-clientarea .table thead th,
body.page-resellerpricing .table thead th,
body[class*="tpl-client_"] .table thead th {
  border-color: var(--ca-border) !important;
}

body.page-clientarea .table td,
body[class*="tpl-client_"] .table td,
body.page-clientarea .table th,
body.page-resellerpricing .table td,
body.page-resellerpricing .table th,
body[class*="tpl-client_"] .table th {
  border-color: rgba(148, 163, 184, 0.14) !important;
}

body.page-clientarea .form-control,
body.page-resellerpricing .form-control,
body[class*="tpl-client_"] .form-control {
  background: rgba(0, 0, 0, 0.22) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: var(--ca-text) !important;
}

body.page-clientarea .form-control::placeholder,
body.page-resellerpricing .form-control::placeholder,
body[class*="tpl-client_"] .form-control::placeholder {
  color: rgba(148, 163, 184, 0.75) !important;
}

body.page-clientarea a,
body.page-resellerpricing a,
body[class*="tpl-client_"] a {
  color: var(--ca-brand-2);
}

body.page-clientarea a:hover,
body.page-resellerpricing a:hover,
body[class*="tpl-client_"] a:hover {
  color: #a5f3fc;
}

/* Reseller Place Order: service blocks (match homepage home-card vibe) */
body.page-resellerplaceorder .card.card-product,
body.page-placeorder .card.card-product {
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.04)) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35) !important;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body.page-resellerplaceorder .card.card-product:hover,
body.page-placeorder .card.card-product:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.32) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5) !important;
}

body.page-resellerplaceorder .card.card-product .row,
body.page-placeorder .card.card-product .row {
  margin: 0;
  align-items: stretch;
}

body.page-resellerplaceorder .card.card-product .col-group-icon,
body.page-placeorder .card.card-product .col-group-icon {
  padding: 0;
  flex: 0 0 74px;
  max-width: 74px;
}

body.page-resellerplaceorder .card.card-product .col-group-icon .bg-gray,
body.page-placeorder .card.card-product .col-group-icon .bg-gray {
  background: rgba(255, 255, 255, 0.06) !important;
  border-right: 1px solid rgba(148, 163, 184, 0.18) !important;
  color: rgba(226, 232, 240, 0.95) !important;
  font-weight: 900;
  letter-spacing: -0.02em;
  justify-content: center;
}

body.page-resellerplaceorder .card.card-product .mw-360,
body.page-placeorder .card.card-product .mw-360 {
  padding: 0.95rem 1rem;
}

body.page-resellerplaceorder .card.card-product .searchme,
body.page-placeorder .card.card-product .searchme {
  color: var(--ca-text);
  font-weight: 800;
  letter-spacing: -0.01em;
}

body.page-resellerplaceorder .card.card-product .text-muted,
body.page-placeorder .card.card-product .text-muted {
  color: var(--ca-muted) !important;
  font-size: 0.9rem;
}

body.page-resellerplaceorder .card.card-product .badge,
body.page-placeorder .card.card-product .badge {
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

body.page-resellerplaceorder .card.card-product .badge-success,
body.page-placeorder .card.card-product .badge-success {
  background: rgba(34, 197, 94, 0.18) !important;
  border: 1px solid rgba(34, 197, 94, 0.35) !important;
  color: #86efac !important;
}

body.page-resellerplaceorder .card.card-product .badge-warning,
body.page-placeorder .card.card-product .badge-warning {
  background: rgba(245, 158, 11, 0.16) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  color: #fde68a !important;
}

/* Invoice logo replacement (client_viewinvoice.tpl) */
body.tpl-client_viewinvoice .invoice-brandmark,
body.tpl-client_viewinvoice-copy .invoice-brandmark {
  display: inline-flex;
  align-items: center;
  max-width: 380px;
  margin-bottom: 0.35rem;
}

body.tpl-client_viewinvoice .invoice-brandmark .brand-svg-invoice,
body.tpl-client_viewinvoice-copy .invoice-brandmark .brand-svg-invoice {
  width: clamp(240px, 30vw, 380px);
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 60px rgba(0, 0, 0, 0.55));
}

body.tpl-client_viewinvoice .invoice-brandmark .brand-stroke-invoice,
body.tpl-client_viewinvoice .invoice-brandmark .brand-fill-invoice,
body.tpl-client_viewinvoice-copy .invoice-brandmark .brand-stroke-invoice,
body.tpl-client_viewinvoice-copy .invoice-brandmark .brand-fill-invoice {
  font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 96px;
}

body.tpl-client_viewinvoice .invoice-brandmark .brand-stroke-invoice,
body.tpl-client_viewinvoice-copy .invoice-brandmark .brand-stroke-invoice {
  fill: transparent;
  stroke-width: 7px;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: brand-draw-invoice 1.8s ease forwards, brand-pulse-invoice 4.4s ease-in-out 2s infinite;
}

body.tpl-client_viewinvoice .invoice-brandmark .brand-fill-invoice,
body.tpl-client_viewinvoice-copy .invoice-brandmark .brand-fill-invoice {
  opacity: 0;
  animation: brand-fill-invoice 700ms ease 1.3s forwards, brand-float-invoice 5.6s ease-in-out 2.2s infinite;
}

body.tpl-client_viewinvoice .invoice-brandmark .brand-underline-invoice,
body.tpl-client_viewinvoice-copy .invoice-brandmark .brand-underline-invoice {
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  animation: brand-draw-invoice 1.8s ease forwards;
}

@keyframes brand-draw-invoice {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes brand-fill-invoice {
  to {
    opacity: 1;
  }
}

@keyframes brand-float-invoice {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes brand-pulse-invoice {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(34, 211, 238, 0));
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(34, 211, 238, 0.55)) drop-shadow(0 0 44px rgba(52, 211, 153, 0.35))
      drop-shadow(0 0 60px rgba(167, 139, 250, 0.25));
  }
}
