body {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #eef3fb;
}

:root {
  --cccam24-primary: #244b8f;
  --cccam24-primary-dark: #173262;
  --cccam24-accent: #2ea3f2;
  --cccam24-surface: #ffffff;
  --cccam24-border: rgba(36, 75, 143, 0.16);
  --cccam24-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

body.theme-default,
body.theme-light {
  background: radial-gradient(circle at top right, #f9fbff 0%, #eef3fb 48%, #e6edf9 100%);
}

body.theme-dark {
  background-color: #0f172a;
}

.main-header.navbar {
  background: linear-gradient(110deg, var(--cccam24-primary-dark) 0%, var(--cccam24-primary) 55%, #2d5eb1 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.main-header.navbar .nav-link,
.main-header.navbar .nav-link i {
  color: #eaf2ff !important;
}

.main-header.navbar .nav-link.active,
.main-header.navbar .nav-link:hover {
  color: #ffffff !important;
}

.main-sidebar {
  background: linear-gradient(180deg, #1a2d52 0%, #142542 100%);
}

.main-sidebar .brand-link {
  background: rgba(255, 255, 255, 0.06) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.main-sidebar .brand-link .brand-text {
  color: #f5f8ff;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
}

.main-sidebar .nav-sidebar .nav-link {
  color: rgba(234, 242, 255, 0.92);
  border-radius: 0.5rem;
  margin: 0.15rem 0.5rem;
}

.main-sidebar .nav-sidebar .nav-link.active {
  background: linear-gradient(135deg, var(--cccam24-accent), #2f7fd8);
  box-shadow: 0 10px 22px rgba(46, 163, 242, 0.3);
  color: #fff !important;
}

.main-sidebar .nav-sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.content-wrapper {
  background: transparent;
}

.card,
.small-box,
.info-box,
.callout,
.table-responsive,
.content-wrapper .content .alert {
  border-radius: 0.85rem;
  border: 1px solid var(--cccam24-border);
  box-shadow: var(--cccam24-shadow);
}

.card .card-header {
  border-bottom: 1px solid rgba(36, 75, 143, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 251, 255, 0.95) 100%);
}

.btn-primary {
  background: linear-gradient(120deg, var(--cccam24-primary) 0%, #2f70d1 100%);
  border-color: #2f70d1;
  box-shadow: 0 10px 20px rgba(47, 112, 209, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(120deg, #2f70d1 0%, var(--cccam24-accent) 100%);
  border-color: var(--cccam24-accent);
}

.page-item.active .page-link {
  background-color: var(--cccam24-primary);
  border-color: var(--cccam24-primary);
}

.user-panel {
  border-bottom-color: rgba(234, 242, 255, 0.14) !important;
}

.user-panel .info a,
.user-panel .info span {
  color: #eef4ff !important;
}

.main-header.navbar-primary {
  background: linear-gradient(135deg, #1f3b73 0%, #2b6cb0 100%);
}

.main-header .navbar-brand .brand-text {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.content-wrapper > .content {
  padding-bottom: 2rem;
}

body.theme-dark .main-header.navbar {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .main-header.navbar {
  background: linear-gradient(110deg, #0b1328 0%, #132547 52%, #1f3c70 100%);
}

body.theme-dark .main-sidebar {
  background: linear-gradient(180deg, #0b1324 0%, #111b32 100%);
}

body.theme-dark .card,
body.theme-dark .small-box,
body.theme-dark .info-box,
body.theme-dark .callout,
body.theme-dark .table-responsive,
body.theme-dark .content-wrapper .content .alert {
  border-color: rgba(148, 163, 184, 0.2);
}

body.theme-dark .card .card-header {
  background: rgba(17, 24, 39, 0.75);
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.callout-hero {
  background: #ffffff;
  border-left: 5px solid #3c8dbc;
  border-radius: 0.5rem;
  box-shadow: 0 20px 45px rgba(31, 59, 115, 0.12);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}

body.theme-dark .callout-hero {
  background: #1f2937;
  border-left-color: #60a5fa;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.55);
}

.callout-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(59, 130, 246, 0.08), rgba(236, 72, 153, 0.08));
  pointer-events: none;
}

.callout-hero h2 {
  font-size: 2rem;
  font-weight: 700;
}

.callout-hero p {
  font-size: 1.05rem;
  color: #4b5563;
}

body.theme-dark .callout-hero h2,
body.theme-dark .callout-hero p,
body.theme-dark .callout-hero strong {
  color: #e5e7eb;
}

.hero-actions .btn {
  margin-right: 0.75rem;
}

.section-heading {
  font-weight: 700;
  margin-bottom: 1rem;
}

.package-card {
  border-radius: 0.5rem;
  border: 1px solid rgba(19, 38, 84, 0.14);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  background: #f5f5f7;
}

body.theme-dark .package-card {
  background: #1f2937;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.45);
}

.package-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.15);
}

.package-card .card-title {
  font-weight: 700;
  font-size: 2rem;
  color: #0f172a;
}

.package-price {
  font-size: 2rem;
  font-weight: 800;
  color: #e10909;
}

.package-card-top {
  text-align: center;
  padding: 2rem 1.5rem;
  background:
    radial-gradient(circle at 50% 62%, rgba(239, 68, 68, 0.18) 0%, rgba(239, 68, 68, 0.08) 28%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, #fff7f7 0%, #faf6f6 100%);
}

.package-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: #ffffff;
  border: 1px solid rgba(2, 6, 23, 0.08);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.package-icon-wrap i {
  color: #0f172a;
  font-size: 1.5rem;
}

.package-period {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
}

.package-card-bottom {
  background: #efefef;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.feature-list {
  margin-bottom: 1.25rem;
}

body.theme-dark .package-price {
  color: #93c5fd;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li {
  padding: 0.45rem 0 0.45rem 1.2rem;
  border-bottom: 0;
  position: relative;
  color: #0f172a;
}

body.theme-dark .feature-list li {
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1rem;
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid #ef4444;
  border-radius: 1px;
  transform: translateY(-50%);
}

.feature-list strong {
  display: block;
  color: #1f2937;
}

.package-card .btn-order {
  margin-top: auto;
  background: #e10909;
  border-color: #e10909;
  color: #fff;
  font-weight: 700;
  border-radius: 0.3rem;
}

.package-card .btn-order:hover,
.package-card .btn-order:focus {
  background: #c80707;
  border-color: #c80707;
  color: #fff;
}

.timeline-steps {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.timeline-step {
  background: #ffffff;
  border-radius: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 1.5rem;
  position: relative;
}

body.theme-dark .timeline-step {
  background: #1f2937;
  border-color: rgba(148, 163, 184, 0.2);
}

.timeline-step::before {
  content: attr(data-step);
  position: absolute;
  top: -0.9rem;
  left: 1.25rem;
  background: #3c8dbc;
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(60, 141, 188, 0.35);
}

.timeline-step h4 {
  font-weight: 600;
  margin-top: 0.75rem;
}

body.theme-dark .timeline-step h4,
body.theme-dark .timeline-step p {
  color: #e5e7eb;
}

.status-badges .badge {
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  text-transform: uppercase;
}

.table-responsive {
  border-radius: 0.5rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

body.theme-dark .table-responsive {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.45);
}

.tag {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border-radius: 0.35rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.tag.pending,
.tag.suspended {
  background: #fff3cd;
  color: #856404;
}

.tag.paid,
.tag.completed,
.tag.active {
  background: #d4edda;
  color: #155724;
}

.tag.canceled,
.tag.failed {
  background: #f8d7da;
  color: #721c24;
}

.tag.expired {
  background: #e2e3e5;
  color: #383d41;
}

.muted,
.text-muted {
  color: #6b7280 !important;
}

.list-clean {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-clean > li {
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  padding: 0.75rem 0;
}

body.theme-dark .list-clean > li {
  border-bottom-color: rgba(148, 163, 184, 0.1);
}

.list-clean > li:last-child {
  border-bottom: none;
}

.console {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 0.5rem;
  padding: 1rem;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.85rem;
  min-height: 18rem;
  height: calc(100vh - 12rem);
  max-height: none;
  overflow-y: auto;
}

.form-helper {
  font-size: 0.85rem;
  color: #6b7280;
}

.install-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1f3b73 0%, #0f172a 100%);
  padding: 2rem 1rem;
}

.install-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 1rem;
  max-width: 900px;
  width: 100%;
  padding: 2rem 2.5rem;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
}

.install-card h1 {
  font-weight: 700;
  color: #1f2937;
}

.install-card .step-title {
  font-weight: 600;
  color: #1f3b73;
}

.install-card .badge {
  background: #1f3b73;
  font-size: 0.8rem;
  padding: 0.45rem 0.75rem;
}

.font-weight-semibold {
  font-weight: 600;
}



.support-chat {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.support-chat__toggle {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 0.75rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.35);
  font-weight: 600;
}

.support-chat__toggle:hover {
  filter: brightness(1.05);
}

.support-chat__panel {
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(38rem, calc(100vh - 6rem));
  background: #fff;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  display: none;
  flex-direction: column;
}

.support-chat--open .support-chat__panel {
  display: flex;
}

.support-chat__header {
  background: #1d4ed8;
  color: #fff;
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.support-chat__header small {
  display: block;
  color: rgba(255,255,255,0.85);
}

.support-chat__close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
}

.support-chat__messages {
  padding: 0.9rem;
  background: #f8fafc;
  flex: 1;
  overflow-y: auto;
  min-height: 14rem;
}

.support-chat__msg {
  max-width: 86%;
  margin-bottom: 0.65rem;
  padding: 0.6rem 0.7rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.support-chat__msg--bot {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-top-left-radius: 0.25rem;
}

.support-chat__msg--user {
  background: #dbeafe;
  margin-left: auto;
  border-top-right-radius: 0.25rem;
}

.support-chat__actions {
  padding: 0 0.9rem 0.75rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  background: #f8fafc;
}

.support-chat__quick {
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}

.support-chat__composer {
  display: flex;
  gap: 0.45rem;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.75rem;
  background: #fff;
}

.support-chat__input {
  flex: 1;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 0.5rem;
  padding: 0.5rem 0.6rem;
}

.support-chat__send {
  border: none;
  background: #1d4ed8;
  color: #fff;
  border-radius: 0.5rem;
  padding: 0.5rem 0.85rem;
}

body.theme-dark .support-chat__panel {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.3);
}

body.theme-dark .support-chat__messages,
body.theme-dark .support-chat__actions {
  background: #111827;
}

body.theme-dark .support-chat__msg--bot {
  background: #0f172a;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.35);
}

.nav-header-muted {
  opacity: 0.72;
  letter-spacing: 0.04em;
}

.customer-hero {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 0.75rem;
  padding: 1.1rem 1.25rem;
}

.customer-quick-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.customer-overview-cards .card {
  border-radius: 0.75rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.customer-overview-cards .card .card-header {
  background: transparent;
}

body.theme-dark .customer-hero {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.45), rgba(12, 74, 110, 0.35));
  border-color: rgba(96, 165, 250, 0.35);
}

body.theme-dark .customer-overview-cards .card {
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.55);
}
