/* ============================================================
   TAJ HOST — FOSSBilling Custom Theme CSS
   Paste this into: FOSSBilling Admin → Settings → Theme → Custom CSS
   Compatible with: Huraga theme (Bootstrap 5 base)
   ============================================================ */

/* ── 1. CSS VARIABLES ─────────────────────────────────────── */
:root {
  --tj-navy-950:    #0A1230;
  --tj-navy-900:    #0D1535;
  --tj-navy-800:    #1B2240;
  --tj-navy-700:    #20263E;
  --tj-gold:        #F0BE4C;
  --tj-gold-dark:   #D99A2B;
  --tj-gold-light:  #FFD86A;
  --tj-text:        #D0D5E8;
  --tj-text-muted:  #8F96A6;
  --tj-border:      rgba(255,255,255,0.08);

  /* Override Bootstrap 5 variables */
  --bs-primary:           #F0BE4C;
  --bs-primary-rgb:       240,190,76;
  --bs-body-bg:           #0A1230;
  --bs-body-color:        #D0D5E8;
  --bs-secondary-bg:      #1B2240;
  --bs-tertiary-bg:       #20263E;
  --bs-border-color:      rgba(255,255,255,0.08);
  --bs-link-color:        #F0BE4C;
  --bs-link-hover-color:  #FFD86A;
  --bs-heading-color:     #ffffff;
  --bs-emphasis-color:    #ffffff;
  --bs-card-bg:           #1B2240;
  --bs-card-border-color: rgba(255,255,255,0.08);
}

/* ── 2. BODY & LAYOUT ─────────────────────────────────────── */
body {
  background-color: var(--tj-navy-950) !important;
  color: var(--tj-text) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Main content wrapper */
.container, .container-fluid, .container-lg, .container-xl {
  background-color: transparent !important;
}

/* Page wrapper / main area */
main, .main-content, #main, [role="main"] {
  background-color: var(--tj-navy-950) !important;
}

/* ── 3. NAVBAR / HEADER ───────────────────────────────────── */
.navbar, header.navbar, .navbar-light, .navbar-dark {
  background-color: rgba(10, 18, 48, 0.92) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(240, 190, 76, 0.15) !important;
  box-shadow: 0 2px 40px rgba(240, 190, 76, 0.08) !important;
}

.navbar-brand img {
  height: 48px;
  width: auto;
}

.navbar-brand, .navbar-brand:hover {
  color: #fff !important;
}

.navbar-nav .nav-link {
  color: var(--tj-text) !important;
  transition: color 0.2s;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--tj-gold) !important;
}

/* ── 4. CARDS ─────────────────────────────────────────────── */
.card {
  background-color: var(--tj-navy-800) !important;
  border: 1px solid var(--tj-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3) !important;
}

.card-header {
  background-color: rgba(255,255,255,0.04) !important;
  border-bottom: 1px solid var(--tj-border) !important;
  color: #ffffff !important;
  font-weight: 600;
}

.card-body {
  color: var(--tj-text) !important;
}

.card-footer {
  background-color: rgba(255,255,255,0.03) !important;
  border-top: 1px solid var(--tj-border) !important;
}

/* ── 5. BUTTONS ───────────────────────────────────────────── */
.btn-primary,
.btn-success,
[type="submit"].btn,
button.btn-primary {
  background: linear-gradient(90deg, #D99A2B 0%, #FFD86A 50%, #F0BE4C 100%) !important;
  color: #0A1230 !important;
  border: none !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  box-shadow: 0 0 20px rgba(240, 190, 76, 0.35) !important;
  transition: box-shadow 0.2s, transform 0.1s !important;
}
.btn-primary:hover,
.btn-success:hover {
  box-shadow: 0 0 30px rgba(240, 190, 76, 0.6) !important;
  transform: translateY(-1px);
}

.btn-secondary, .btn-light {
  background-color: rgba(255,255,255,0.08) !important;
  color: var(--tj-text) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 9999px !important;
}
.btn-secondary:hover {
  background-color: rgba(255,255,255,0.14) !important;
  color: #fff !important;
}

.btn-danger {
  background-color: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #fff !important;
  border-radius: 9999px !important;
}

.btn-outline-primary {
  color: var(--tj-gold) !important;
  border-color: var(--tj-gold) !important;
  border-radius: 9999px !important;
  background: transparent !important;
}
.btn-outline-primary:hover {
  background-color: rgba(240, 190, 76, 0.12) !important;
}

/* ── 6. FORMS & INPUTS ────────────────────────────────────── */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
textarea,
select {
  background-color: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  color: var(--tj-text) !important;
  border-radius: 8px !important;
}
.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
  background-color: rgba(255,255,255,0.08) !important;
  border-color: var(--tj-gold) !important;
  box-shadow: 0 0 0 3px rgba(240, 190, 76, 0.2) !important;
  color: #fff !important;
  outline: none !important;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--tj-text-muted) !important;
  opacity: 0.7;
}

.form-label, label {
  color: var(--tj-text) !important;
  font-weight: 500;
}

.input-group-text {
  background-color: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: var(--tj-text-muted) !important;
}

/* ── 7. TABLES ────────────────────────────────────────────── */
.table {
  color: var(--tj-text) !important;
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255,255,255,0.03);
  --bs-table-hover-bg: rgba(255,255,255,0.05);
  --bs-table-border-color: rgba(255,255,255,0.06);
}

.table thead th,
.table > thead > tr > th {
  color: var(--tj-gold) !important;
  border-bottom: 1px solid rgba(240, 190, 76, 0.2) !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.table td, .table th {
  border-color: rgba(255,255,255,0.06) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(255,255,255,0.03) !important;
  color: var(--tj-text) !important;
}

/* ── 8. ALERTS & BADGES ───────────────────────────────────── */
.alert-success {
  background-color: rgba(0, 159, 77, 0.15) !important;
  border-color: rgba(0, 159, 77, 0.3) !important;
  color: #6ee7b7 !important;
}
.alert-danger, .alert-error {
  background-color: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}
.alert-warning {
  background-color: rgba(240, 190, 76, 0.15) !important;
  border-color: rgba(240, 190, 76, 0.3) !important;
  color: #F0BE4C !important;
}
.alert-info {
  background-color: rgba(99, 102, 241, 0.15) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
  color: #a5b4fc !important;
}

.badge.bg-success, .badge-success { background-color: #009F4D !important; color: #fff !important; }
.badge.bg-primary, .badge-primary { background-color: var(--tj-gold) !important; color: #0A1230 !important; }
.badge.bg-danger,  .badge-danger  { background-color: #ef4444 !important; color: #fff !important; }
.badge.bg-warning, .badge-warning { background-color: rgba(240,190,76,0.2) !important; color: #F0BE4C !important; }
.badge.bg-info,    .badge-info    { background-color: rgba(99,102,241,0.2) !important; color: #a5b4fc !important; }
.badge.bg-secondary { background-color: rgba(255,255,255,0.1) !important; color: var(--tj-text) !important; }

/* ── 9. SIDEBAR / LEFT NAV ────────────────────────────────── */
.sidebar, #sidebar, .sidenav, nav.sidebar {
  background-color: var(--tj-navy-900) !important;
  border-right: 1px solid var(--tj-border) !important;
}

.sidebar .nav-link,
#sidebar .nav-link,
.sidenav .nav-item a {
  color: var(--tj-text) !important;
  border-radius: 8px;
  transition: all 0.2s;
}
.sidebar .nav-link:hover,
#sidebar .nav-link:hover,
.sidebar .nav-link.active,
#sidebar .nav-link.active {
  background-color: rgba(240, 190, 76, 0.1) !important;
  color: var(--tj-gold) !important;
}

/* Sidebar section headings */
.sidebar .nav-header,
.sidebar .sidebar-heading,
#sidebar small {
  color: var(--tj-text-muted) !important;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

/* ── 10. BREADCRUMBS ──────────────────────────────────────── */
.breadcrumb {
  background: transparent !important;
}
.breadcrumb-item a {
  color: var(--tj-gold) !important;
}
.breadcrumb-item.active,
.breadcrumb-item + .breadcrumb-item::before {
  color: var(--tj-text-muted) !important;
}

/* ── 11. PAGINATION ───────────────────────────────────────── */
.page-link {
  background-color: var(--tj-navy-800) !important;
  border-color: var(--tj-border) !important;
  color: var(--tj-text) !important;
}
.page-link:hover {
  background-color: rgba(240, 190, 76, 0.12) !important;
  color: var(--tj-gold) !important;
}
.page-item.active .page-link {
  background-color: var(--tj-gold) !important;
  border-color: var(--tj-gold) !important;
  color: #0A1230 !important;
  font-weight: 700;
}

/* ── 12. MODALS ───────────────────────────────────────────── */
.modal-content {
  background-color: var(--tj-navy-800) !important;
  border: 1px solid rgba(240, 190, 76, 0.15) !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5) !important;
}
.modal-header {
  border-bottom: 1px solid var(--tj-border) !important;
  color: #fff !important;
}
.modal-footer {
  border-top: 1px solid var(--tj-border) !important;
}
.btn-close {
  filter: invert(1) brightness(0.7);
}

/* ── 13. DROPDOWNS ────────────────────────────────────────── */
.dropdown-menu {
  background-color: var(--tj-navy-800) !important;
  border: 1px solid rgba(240, 190, 76, 0.15) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4) !important;
}
.dropdown-item {
  color: var(--tj-text) !important;
}
.dropdown-item:hover, .dropdown-item:focus {
  background-color: rgba(240, 190, 76, 0.1) !important;
  color: var(--tj-gold) !important;
}
.dropdown-divider {
  border-color: var(--tj-border) !important;
}

/* ── 14. LIST GROUPS ──────────────────────────────────────── */
.list-group-item {
  background-color: var(--tj-navy-800) !important;
  border-color: var(--tj-border) !important;
  color: var(--tj-text) !important;
}
.list-group-item:hover {
  background-color: rgba(255,255,255,0.04) !important;
}
.list-group-item.active {
  background-color: rgba(240, 190, 76, 0.12) !important;
  border-color: rgba(240, 190, 76, 0.2) !important;
  color: var(--tj-gold) !important;
}

/* ── 15. PROGRESS BARS ────────────────────────────────────── */
.progress {
  background-color: rgba(255,255,255,0.08) !important;
  border-radius: 9999px;
}
.progress-bar {
  background: linear-gradient(90deg, #D99A2B, #F0BE4C) !important;
}

/* ── 16. TABS ─────────────────────────────────────────────── */
.nav-tabs {
  border-bottom: 1px solid var(--tj-border) !important;
}
.nav-tabs .nav-link {
  color: var(--tj-text-muted) !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  padding-bottom: 10px;
}
.nav-tabs .nav-link:hover {
  color: var(--tj-text) !important;
  border-bottom-color: rgba(240, 190, 76, 0.3) !important;
}
.nav-tabs .nav-link.active {
  color: var(--tj-gold) !important;
  background: transparent !important;
  border-bottom-color: var(--tj-gold) !important;
}

/* ── 17. INVOICE / ORDER STATUS PILLS ────────────────────── */
.status-active, .status-paid, .invoice-status-paid {
  background-color: rgba(0, 159, 77, 0.15) !important;
  color: #6ee7b7 !important;
  border-radius: 9999px;
  padding: 2px 10px;
}
.status-unpaid, .invoice-status-unpaid {
  background-color: rgba(240, 190, 76, 0.15) !important;
  color: #F0BE4C !important;
  border-radius: 9999px;
  padding: 2px 10px;
}
.status-cancelled, .status-expired, .invoice-status-cancelled {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #fca5a5 !important;
  border-radius: 9999px;
  padding: 2px 10px;
}

/* ── 18. FOOTER ───────────────────────────────────────────── */
footer, .footer {
  background-color: var(--tj-navy-900) !important;
  border-top: 1px solid var(--tj-border) !important;
  color: var(--tj-text-muted) !important;
}
footer a, .footer a {
  color: var(--tj-text-muted) !important;
}
footer a:hover, .footer a:hover {
  color: var(--tj-gold) !important;
}

/* ── 19. SCROLLBAR ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--tj-navy-950); }
::-webkit-scrollbar-thumb { background: rgba(240, 190, 76, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(240, 190, 76, 0.45); }

/* ── 20. SELECTION ────────────────────────────────────────── */
::selection {
  background-color: rgba(240, 190, 76, 0.3);
  color: #fff;
}

/* ── 21. HR / DIVIDERS ────────────────────────────────────── */
hr { border-color: var(--tj-border) !important; }

/* ── 22. LINKS ────────────────────────────────────────────── */
a { color: var(--tj-gold); transition: color 0.2s; }
a:hover { color: var(--tj-gold-light); }

/* ── 23. TEXT COLORS ──────────────────────────────────────── */
.text-muted { color: var(--tj-text-muted) !important; }
.text-primary { color: var(--tj-gold) !important; }
.text-success { color: #6ee7b7 !important; }
.text-danger  { color: #fca5a5 !important; }
.text-warning { color: var(--tj-gold) !important; }
.text-dark    { color: #fff !important; }
.text-white   { color: #fff !important; }

/* ── 24. BG COLORS ────────────────────────────────────────── */
.bg-white  { background-color: var(--tj-navy-800) !important; }
.bg-light  { background-color: var(--tj-navy-900) !important; }
.bg-dark   { background-color: var(--tj-navy-950) !important; }

/* ── 25. HEADINGS ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  color: #ffffff !important;
}
