/* ============================================
   AFRIVEST CAPITAL - Global Theme
   Brand Colors:
     --green:       #00D47E (primary)
     --green-light: #00E88A
     --dark:        #0C2628
     --gold:        #f0c040
   ============================================ */

:root {
    --av-green: #00D47E;
    --av-green-light: #00E88A;
    --av-dark: #0C2628;
    --av-dark-card: #133436;
    --av-dark-lighter: #1a4446;
    --av-gold: #f0c040;
    --av-text: #e0e0e0;
    --av-text-muted: #a0b0b2;
    --av-border: rgba(0, 212, 126, 0.15);
}

/* ===== BASE ===== */
body.afrivest-theme {
    background: var(--av-dark) !important;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--av-text);
    min-height: 100vh;
    padding: 20px;
}

/* ===== BOOTSTRAP PRIMARY OVERRIDE ===== */
.afrivest-theme .btn-primary {
    background: var(--av-green) !important;
    border-color: var(--av-green) !important;
    color: var(--av-dark) !important;
    font-weight: 600;
}
.afrivest-theme .btn-primary:hover,
.afrivest-theme .btn-primary:focus {
    background: var(--av-green-light) !important;
    border-color: var(--av-green-light) !important;
    color: var(--av-dark) !important;
    box-shadow: 0 4px 15px rgba(0, 212, 126, 0.3);
}

.afrivest-theme .btn-outline-primary {
    color: var(--av-green) !important;
    border-color: var(--av-green) !important;
    background: transparent !important;
}
.afrivest-theme .btn-outline-primary:hover,
.afrivest-theme .btn-outline-primary:focus,
.afrivest-theme .btn-outline-primary.active {
    background: var(--av-green) !important;
    color: var(--av-dark) !important;
    box-shadow: 0 4px 15px rgba(0, 212, 126, 0.3);
}

/* Secondary / Outline variants */
.afrivest-theme .btn-outline-warning {
    color: var(--av-gold) !important;
    border-color: var(--av-gold) !important;
}
.afrivest-theme .btn-outline-warning:hover {
    background: var(--av-gold) !important;
    color: var(--av-dark) !important;
}

.afrivest-theme .btn-outline-info {
    color: #5bc0de !important;
    border-color: #5bc0de !important;
}
.afrivest-theme .btn-outline-info:hover {
    background: #5bc0de !important;
    color: var(--av-dark) !important;
}

.afrivest-theme .btn-outline-success {
    color: var(--av-green) !important;
    border-color: var(--av-green) !important;
}
.afrivest-theme .btn-outline-success:hover {
    background: var(--av-green) !important;
    color: var(--av-dark) !important;
}

.afrivest-theme .btn-success {
    background: var(--av-green) !important;
    border-color: var(--av-green) !important;
    color: var(--av-dark) !important;
    font-weight: 600;
}

.afrivest-theme .btn-info {
    background: #5bc0de !important;
    border-color: #5bc0de !important;
    color: var(--av-dark) !important;
    font-weight: 600;
}

.afrivest-theme .btn-danger {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
}

.afrivest-theme .btn-secondary {
    background: var(--av-dark-lighter) !important;
    border-color: var(--av-border) !important;
    color: var(--av-text) !important;
}
.afrivest-theme .btn-secondary:hover {
    background: var(--av-dark-card) !important;
    border-color: var(--av-green) !important;
}

/* ===== TEXT COLORS ===== */
.afrivest-theme .text-primary {
    color: var(--av-green) !important;
}
.afrivest-theme .text-success {
    color: var(--av-green) !important;
}
.afrivest-theme .text-info {
    color: #5bc0de !important;
}
.afrivest-theme .text-warning {
    color: var(--av-gold) !important;
}
.afrivest-theme .text-muted {
    color: var(--av-text-muted) !important;
}

/* ===== CARDS ===== */
.afrivest-theme .card {
    background: var(--av-dark-card) !important;
    border: 1px solid var(--av-border) !important;
    border-radius: 12px;
    color: var(--av-text);
}

/* ===== TABLES ===== */
.afrivest-theme .table {
    color: var(--av-text);
    --bs-table-bg: transparent;
    --bs-table-color: var(--av-text);
}
.afrivest-theme .table th {
    color: var(--av-green);
    border-color: var(--av-border);
    font-weight: 600;
}
.afrivest-theme .table td {
    border-color: var(--av-border);
    color: var(--av-text);
}
.afrivest-theme .table-hover > tbody > tr:hover {
    background: rgba(0, 212, 126, 0.05);
    --bs-table-hover-bg: rgba(0, 212, 126, 0.05);
}
.afrivest-theme .table-sm td,
.afrivest-theme .table-sm th {
    color: var(--av-text);
}

/* ===== BADGES ===== */
.afrivest-theme .badge.bg-primary {
    background: var(--av-green) !important;
    color: var(--av-dark) !important;
}
.afrivest-theme .badge.bg-success {
    background: var(--av-green) !important;
    color: var(--av-dark) !important;
}
.afrivest-theme .badge.bg-info {
    background: #5bc0de !important;
    color: var(--av-dark) !important;
}
.afrivest-theme .badge.bg-warning {
    background: var(--av-gold) !important;
    color: var(--av-dark) !important;
}
.afrivest-theme .badge.bg-secondary {
    background: var(--av-dark-lighter) !important;
    color: var(--av-text-muted) !important;
}

/* ===== ALERTS ===== */
.afrivest-theme .alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #ff6b7a;
}
.afrivest-theme .alert-warning {
    background: rgba(240, 192, 64, 0.15);
    border-color: rgba(240, 192, 64, 0.3);
    color: var(--av-gold);
}
.afrivest-theme .alert-info {
    background: rgba(91, 192, 222, 0.15);
    border-color: rgba(91, 192, 222, 0.3);
    color: #7dd3e8;
}
.afrivest-theme .alert-success {
    background: rgba(0, 212, 126, 0.15);
    border-color: rgba(0, 212, 126, 0.3);
    color: var(--av-green-light);
}
.afrivest-theme .alert-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--av-border);
    color: var(--av-text-muted);
}

/* ===== FORMS ===== */
.afrivest-theme .form-control,
.afrivest-theme .form-select {
    background: var(--av-dark) !important;
    border-color: var(--av-border) !important;
    color: var(--av-text) !important;
}
.afrivest-theme .form-control:focus,
.afrivest-theme .form-select:focus {
    border-color: var(--av-green) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 212, 126, 0.25) !important;
}
.afrivest-theme .form-control::placeholder {
    color: var(--av-text-muted) !important;
}
.afrivest-theme .form-label,
.afrivest-theme label {
    color: var(--av-text) !important;
}
.afrivest-theme .form-check-input:checked {
    background-color: var(--av-green);
    border-color: var(--av-green);
}
.afrivest-theme .form-text {
    color: var(--av-text-muted) !important;
}
.afrivest-theme .input-group-text {
    background: var(--av-dark-lighter) !important;
    border-color: var(--av-border) !important;
    color: var(--av-text) !important;
}

/* ===== NAVIGATION BAR ===== */
.afrivest-theme .nav-header {
    background: var(--av-dark-card);
    border: 1px solid var(--av-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.afrivest-theme .nav-header .btn-group {
    gap: 4px;
}

/* ===== HEADER ===== */
.afrivest-theme h1,
.afrivest-theme h2,
.afrivest-theme h3,
.afrivest-theme h4,
.afrivest-theme h5 {
    color: var(--av-text);
}
.afrivest-theme h1 .fa-chart-line,
.afrivest-theme h1 i {
    color: var(--av-green);
}

/* ===== STAT CARDS ===== */
.afrivest-theme .stat-card {
    transition: transform 0.3s, box-shadow 0.3s;
}
.afrivest-theme .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 212, 126, 0.15);
}

/* ===== WHATSAPP CARD ===== */
.afrivest-theme .whatsapp-card {
    background: linear-gradient(135deg, #25D366, #128C7E) !important;
    border: none !important;
}

/* ===== DISCLOSURE SECTION ===== */
.afrivest-theme .disclosure-section {
    border-left: 4px solid #dc3545;
}

/* ===== ACCORDION ===== */
.afrivest-theme .accordion-item {
    background: var(--av-dark) !important;
    border-color: var(--av-border) !important;
}
.afrivest-theme .accordion-button {
    background: var(--av-dark) !important;
    color: var(--av-text) !important;
}
.afrivest-theme .accordion-button:not(.collapsed) {
    background: var(--av-dark-lighter) !important;
    color: var(--av-green) !important;
}
.afrivest-theme .accordion-body {
    background: var(--av-dark) !important;
    color: var(--av-text-muted) !important;
}

/* ===== PAGINATION ===== */
.afrivest-theme .page-link {
    background: var(--av-dark-card);
    border-color: var(--av-border);
    color: var(--av-green);
}
.afrivest-theme .page-link:hover {
    background: var(--av-dark-lighter);
    color: var(--av-green-light);
}
.afrivest-theme .page-item.active .page-link {
    background: var(--av-green);
    border-color: var(--av-green);
    color: var(--av-dark);
}

/* ===== MODAL ===== */
.afrivest-theme .modal-content {
    background: var(--av-dark-card) !important;
    border: 1px solid var(--av-border);
    color: var(--av-text);
}
.afrivest-theme .modal-header {
    border-color: var(--av-border);
}
.afrivest-theme .modal-footer {
    border-color: var(--av-border);
}
.afrivest-theme .btn-close {
    filter: invert(1);
}

/* ===== LINKS ===== */
.afrivest-theme a:not(.btn) {
    color: var(--av-green);
}
.afrivest-theme a:not(.btn):hover {
    color: var(--av-green-light);
}

/* ===== UNREAD BADGE ===== */
.afrivest-theme .unread-badge {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    margin-left: 5px;
}

/* ===== BRAND HEADER ===== */
.afrivest-brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.afrivest-brand-header .brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--av-gold), #f8d060);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

/* ===== SCROLLBAR ===== */
.afrivest-theme ::-webkit-scrollbar {
    width: 8px;
}
.afrivest-theme ::-webkit-scrollbar-track {
    background: var(--av-dark);
}
.afrivest-theme ::-webkit-scrollbar-thumb {
    background: var(--av-dark-lighter);
    border-radius: 4px;
}
.afrivest-theme ::-webkit-scrollbar-thumb:hover {
    background: var(--av-green);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .afrivest-theme .btn-group.flex-wrap .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }
}
