@import url('https://fonts.googleapis.com/css2?family=Chivo:ital,wght@0,300..900;1,300..900&display=swap');

/* =========================================================
   Bull RDP Theme Override for Hostrivo Signal (Panel & Auth)
   ========================================================= */

:root {
  --bull-red: #f21818;
  --bull-red-dark: #a11617;
  --bull-red-tint: rgba(242, 24, 24, 0.14);
  --bull-red-border: rgba(242, 24, 24, 0.45);
  --bull-bg: #1a1a1a;
  --bull-surface: #1e1e1e;
  --bull-surface-elevated: #252525;
  --bull-border: #2e2e2e;
  --bull-text: #ffffff;
  --bull-muted: #b7b7b7;

  /* Map common Hostrivo / Bootstrap tokens */
  --primary: #f21818;
  --primary-hover: #a11617;
  --accent: #f21818;
  --bs-primary: #f21818;
  --bs-primary-rgb: 242, 24, 24;
  --bs-link-color: #f21818;
  --bs-link-hover-color: #ff3b3b;
  --font-sans: 'Chivo', system-ui, -apple-system, sans-serif;
}

/* Dark Theme Surfaces (Default & [data-theme="dark"] / .dark) */
html[data-theme="dark"],
html.dark,
body[data-theme="dark"],
body.dark,
:root:not([data-theme="light"]) {
  --bg: #1a1a1a;
  --bg-subtle: #161616;
  --surface: #1e1e1e;
  --surface-2: #252525;
  --card-bg: #1e1e1e;
  --border: #2e2e2e;
  --text: #ffffff;
  --text-muted: #b7b7b7;
}

html,
body {
  font-family: 'Chivo', system-ui, -apple-system, sans-serif !important;
  background-color: var(--bg, #1a1a1a);
  color: var(--text, #ffffff);
  scroll-behavior: smooth;
}

/* Custom Scrollbar matching bullrdp.com */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background-color: #3a3a3a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #f21818;
}

/* Topbar & Brand Signature Red Dot */
.topbar {
  background: rgba(26, 26, 26, 0.92) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #2c2c2c !important;
}

html[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.brand,
a.brand {
  font-family: 'Chivo', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
}

.brand span:last-child,
a.brand span:last-child {
  color: #f21818 !important;
}

/* Sidebar Navigation */
.sidebar {
  background: #1a1a1a !important;
  border-right: 1px solid #2c2c2c !important;
}

html[data-theme="light"] .sidebar {
  background: #f8f9fa !important;
  border-right: 1px solid #e5e7eb !important;
}

.nav-section {
  color: #7e7e7e !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px !important;
}

.nav-item {
  border-radius: 8px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.nav-item:hover {
  background: rgba(242, 24, 24, 0.12) !important;
  color: #ffffff !important;
}

html[data-theme="light"] .nav-item:hover {
  color: #f21818 !important;
}

.nav-item.active,
.nav-item.is-active,
.nav-item[aria-current="page"] {
  background: linear-gradient(90deg, #f21818 0%, #a11617 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(242, 24, 24, 0.28);
}

.nav-item.active svg,
.nav-item.is-active svg,
.nav-item[aria-current="page"] svg {
  color: #ffffff !important;
}

/* Main Content Area & Cards */
.content {
  background: #1a1a1a;
}

html[data-theme="light"] .content {
  background: #f4f5f7;
}

.card,
.panel,
.box,
.stat-card,
.service-card,
.menu,
.notify-menu {
  background: #1e1e1e !important;
  border: 1px solid #2e2e2e !important;
  border-radius: 12px !important;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

html[data-theme="light"] .card,
html[data-theme="light"] .panel,
html[data-theme="light"] .box,
html[data-theme="light"] .menu {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
}

.card:hover,
.service-card:hover {
  border-color: rgba(242, 24, 24, 0.55) !important;
}

/* Buttons */
.btn-primary,
button.btn-primary,
a.btn-primary {
  background: linear-gradient(135deg, #f21818 0%, #a11617 100%) !important;
  border: 1px solid #f21818 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 14px rgba(242, 24, 24, 0.25);
  transition: all 0.2s ease !important;
}

.btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover {
  background: linear-gradient(135deg, #ff2626 0%, #b8191a 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(242, 24, 24, 0.4);
}

.btn-secondary,
.btn-ghost {
  border-radius: 8px !important;
}

/* Inputs & Selects */
input,
select,
textarea,
.input,
.form-control,
.form-select {
  background-color: #252525 !important;
  border: 1px solid #333333 !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  font-family: 'Chivo', sans-serif !important;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background-color: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #111827 !important;
}

input:focus,
select:focus,
textarea:focus,
.input:focus,
.form-control:focus {
  border-color: #f21818 !important;
  box-shadow: 0 0 0 3px rgba(242, 24, 24, 0.22) !important;
  outline: none !important;
}

/* Tables & Badges */
table th {
  color: #b7b7b7 !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  font-size: 11px !important;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #2e2e2e !important;
}

table td {
  border-bottom: 1px solid #262626 !important;
}

table tr:hover td {
  background: rgba(242, 24, 24, 0.06) !important;
}

.notify-badge {
  background: #f21818 !important;
}

/* Auth Pages (Login / Register / Reset Password) */
.auth {
  background: radial-gradient(circle at top center, rgba(242, 24, 24, 0.14) 0%, #1a1a1a 55%) !important;
  min-height: 100vh;
}

html[data-theme="light"] .auth {
  background: radial-gradient(circle at top center, rgba(242, 24, 24, 0.08) 0%, #f4f5f7 55%) !important;
}

.auth .card,
.auth-card {
  background: #1e1e1e !important;
  border: 1px solid rgba(242, 24, 24, 0.35) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55) !important;
}

.auth-legal a:hover {
  color: #f21818 !important;
}