/* Fundera Brand Theme - alto contraste */

:root,
[data-bs-theme="dark"] {
    --fundera-black: #0a0a0a;
    --fundera-surface: #141414;
    --fundera-surface-2: #1c1c1c;
    --fundera-border: #333333;
    --fundera-white: #ffffff;
    --fundera-text: #f5f5f5;
    --fundera-muted: #d4d4d4;
    --fundera-muted-soft: #c0c0c0;
    --fundera-orange: #f59e0b;
    --fundera-orange-hot: #ea580c;
    --fundera-amber: #fbbf24;
    --fundera-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 45%, #ea580c 100%);

    --bs-body-color: #f5f5f5;
    --bs-body-bg: #0a0a0a;
    --bs-secondary-color: #d4d4d4;
    --bs-tertiary-color: #c0c0c0;
    --bs-emphasis-color: #ffffff;
    --bs-heading-color: #ffffff;
    --bs-primary: #f59e0b;
    --bs-primary-rgb: 245, 158, 11;
    --bs-link-color: #f59e0b;
    --bs-link-hover-color: #fbbf24;
}

body.fundera-theme,
body.fundera-auth {
    background: var(--fundera-black) !important;
    color: var(--fundera-text) !important;
}

/* Tipografia geral - forcar contraste */
.fundera-theme h1,
.fundera-theme h2,
.fundera-theme h3,
.fundera-theme h4,
.fundera-theme h5,
.fundera-theme h6,
.fundera-theme .card-title,
.fundera-theme .fw-bold,
.fundera-theme .fw-semibold,
.fundera-theme .fw-medium,
.fundera-theme strong,
.fundera-theme label,
.fundera-theme .form-label,
.fundera-theme p,
.fundera-theme span,
.fundera-theme td,
.fundera-theme th,
.fundera-theme li,
.fundera-theme small,
.fundera-theme .breadcrumb,
.fundera-auth h1,
.fundera-auth h2,
.fundera-auth h3,
.fundera-auth h4,
.fundera-auth h5,
.fundera-auth h6,
.fundera-auth label,
.fundera-auth .form-label,
.fundera-auth p,
.fundera-auth span {
    color: var(--fundera-text) !important;
}

.fundera-theme .text-muted,
.fundera-theme .text-body-secondary,
.fundera-theme .text-secondary,
.fundera-auth .text-muted,
.fundera-auth .text-body-secondary {
    color: var(--fundera-muted) !important;
}

.fundera-theme .form-check-label,
.fundera-auth .form-check-label {
    color: var(--fundera-muted) !important;
}

/* Header */
.fundera-theme .app-header {
    background: var(--fundera-surface) !important;
    border-bottom: 1px solid var(--fundera-border);
    color: var(--fundera-text) !important;
}

.fundera-theme .app-header .fundera-logo img {
    height: 32px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.fundera-theme .app-header .text-muted,
.fundera-theme .header-icon {
    color: var(--fundera-muted) !important;
}

/* Sidebar */
.fundera-theme .pe-app-sidebar {
    background: var(--fundera-surface) !important;
    border-right: 1px solid var(--fundera-border);
}

.fundera-theme .pe-app-sidebar-logo {
    border-bottom: 1px solid var(--fundera-border);
    min-height: 64px;
}

.fundera-theme .pe-app-sidebar-logo .fundera-logo img {
    height: 36px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
}

.fundera-theme .pe-nav-link {
    color: var(--fundera-muted) !important;
    border-radius: 10px;
    margin: 2px 8px;
}

.fundera-theme .pe-nav-link .pe-nav-icon,
.fundera-theme .pe-nav-link .pe-nav-content {
    color: inherit !important;
}

.fundera-theme .pe-nav-link:hover,
.fundera-theme .pe-nav-link.active {
    background: rgba(245, 158, 11, 0.12) !important;
    color: var(--fundera-amber) !important;
}

.fundera-theme .pe-nav-link.active .pe-nav-icon,
.fundera-theme .pe-nav-link:hover .pe-nav-icon,
.fundera-theme .pe-nav-link.active .pe-nav-content,
.fundera-theme .pe-nav-link:hover .pe-nav-content {
    color: var(--fundera-amber) !important;
}

.fundera-theme .pe-menu-title {
    color: #b0b0b0 !important;
    letter-spacing: 0.06em;
}

/* Main */
.fundera-theme .app-wrapper {
    background: var(--fundera-black) !important;
    min-height: 100vh;
    color: var(--fundera-text) !important;
}

.fundera-theme .footer {
    background: transparent !important;
    border-top: 1px solid var(--fundera-border);
    color: var(--fundera-muted) !important;
}

.fundera-theme .footer span,
.fundera-theme .footer div {
    color: var(--fundera-muted) !important;
}

/* Cards */
.fundera-theme .card,
.fundera-auth .card {
    background: var(--fundera-surface) !important;
    border: 1px solid var(--fundera-border) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    color: var(--fundera-text) !important;
}

.fundera-theme .card-header,
.fundera-theme .card-body,
.fundera-auth .card-body {
    background: transparent !important;
    color: var(--fundera-text) !important;
}

.fundera-theme .card-header {
    border-bottom: 1px solid var(--fundera-border) !important;
}

.fundera-theme .border {
    border-color: var(--fundera-border) !important;
}

.fundera-theme .bg-light {
    background: var(--fundera-surface-2) !important;
    color: var(--fundera-text) !important;
}

/* Tables */
.fundera-theme .table {
    --bs-table-bg: transparent;
    --bs-table-color: #f5f5f5;
    --bs-table-border-color: var(--fundera-border);
    --bs-table-hover-bg: rgba(245, 158, 11, 0.08);
    --bs-table-hover-color: #ffffff;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-striped-color: #f5f5f5;
    color: #f5f5f5 !important;
}

.fundera-theme .table td,
.fundera-theme .table th {
    color: #f5f5f5 !important;
    border-color: var(--fundera-border) !important;
}

.fundera-theme .table-light,
.fundera-theme thead.table-light,
.fundera-theme thead.table-light th {
    --bs-table-bg: var(--fundera-surface-2) !important;
    --bs-table-color: #ffffff !important;
    background: var(--fundera-surface-2) !important;
    color: #ffffff !important;
}

/* Forms */
.fundera-theme .form-control,
.fundera-theme .form-select,
.fundera-theme .input-group-text,
.fundera-auth .form-control,
.fundera-auth .form-select,
.fundera-auth .input-group-text {
    background: var(--fundera-surface-2) !important;
    border-color: var(--fundera-border) !important;
    color: #ffffff !important;
}

.fundera-theme .form-control::placeholder,
.fundera-auth .form-control::placeholder {
    color: #b0b0b0 !important;
    opacity: 1;
}

.fundera-theme .form-control:focus,
.fundera-theme .form-select:focus,
.fundera-auth .form-control:focus,
.fundera-auth .form-select:focus {
    border-color: var(--fundera-orange) !important;
    box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.25) !important;
    color: #ffffff !important;
}

.fundera-theme .form-select option {
    background: #1c1c1c;
    color: #ffffff;
}

/* Buttons */
.fundera-theme .btn-primary,
.fundera-auth .btn-primary {
    background: var(--fundera-gradient) !important;
    border: none !important;
    color: #111 !important;
    font-weight: 600;
}

.fundera-theme .btn-primary:hover,
.fundera-auth .btn-primary:hover {
    filter: brightness(1.08);
    color: #111 !important;
}

.fundera-theme .btn-outline-primary {
    border-color: var(--fundera-orange) !important;
    color: var(--fundera-amber) !important;
}

.fundera-theme .btn-outline-primary:hover {
    background: var(--fundera-orange) !important;
    color: #111 !important;
}

.fundera-theme .btn-outline-secondary {
    border-color: #555 !important;
    color: #e5e5e5 !important;
}

.fundera-theme .btn-outline-secondary:hover {
    background: #333 !important;
    color: #ffffff !important;
}

.fundera-theme .text-primary,
.fundera-auth .text-primary {
    color: var(--fundera-amber) !important;
}

.fundera-theme .bg-primary {
    background: var(--fundera-gradient) !important;
}

.fundera-theme .badge.bg-primary-subtle,
.fundera-theme .bg-primary-subtle {
    background: rgba(245, 158, 11, 0.18) !important;
    color: var(--fundera-amber) !important;
}

.fundera-theme .bg-warning-subtle { background: rgba(245, 158, 11, 0.18) !important; color: #fbbf24 !important; }
.fundera-theme .text-warning { color: #fbbf24 !important; }
.fundera-theme .bg-info-subtle { background: rgba(56, 189, 248, 0.18) !important; color: #7dd3fc !important; }
.fundera-theme .text-info { color: #7dd3fc !important; }
.fundera-theme .bg-success-subtle { background: rgba(34, 197, 94, 0.18) !important; color: #86efac !important; }
.fundera-theme .text-success { color: #86efac !important; }
.fundera-theme .bg-danger-subtle { background: rgba(239, 68, 68, 0.18) !important; color: #fca5a5 !important; }
.fundera-theme .text-danger { color: #fca5a5 !important; }

.fundera-theme a.link-primary,
.fundera-theme .text-decoration-underline.text-primary,
.fundera-auth a.text-primary {
    color: var(--fundera-amber) !important;
}

/* Auth */
.fundera-auth {
    background: var(--fundera-black) !important;
    min-height: 100vh;
}

.fundera-auth .auth-bg {
    display: none !important;
}

.fundera-auth .fundera-auth-logo {
    height: 48px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    margin: 0 auto 12px;
    display: block;
}

.fundera-theme .fundera-stat-icon {
    background: var(--fundera-gradient) !important;
    color: #111 !important;
}

.fundera-theme .fundera-step-active {
    background: rgba(245, 158, 11, 0.18) !important;
    color: var(--fundera-amber) !important;
}

.fundera-theme .breadcrumb-item a,
.fundera-theme .breadcrumb-item.active,
.fundera-theme .breadcrumb-item + .breadcrumb-item::before {
    color: var(--fundera-muted) !important;
}

.fundera-theme .alert {
    color: #ffffff !important;
}

.fundera-theme .alert-success {
    background: rgba(34, 197, 94, 0.2) !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
}

.fundera-theme .alert-danger {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

.fundera-theme ::-webkit-scrollbar { width: 8px; height: 8px; }
.fundera-theme ::-webkit-scrollbar-thumb { background: #444; border-radius: 8px; }
.fundera-theme ::-webkit-scrollbar-track { background: transparent; }
