/* PandooraB2B - Tema Profissional Escuro */

:root {
    --primary-color: #3b82f6;
    --secondary-color: #6366f1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    /* Tema Dark Profissional com Alto Contraste */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    
    /* TEXTOS COM ALTO CONTRASTE */
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #cbd5e1;
    --text-on-white: #1e293b;
    
    --border-color: #334155;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
}

/* Layout Principal */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
    background-color: var(--bg-primary);
}

/* Highlighted menu item (Relatórios) */
.highlighted-menu {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white !important;
    font-weight: 600;
}

.highlighted-menu:hover {
    opacity: 0.9;
}

/* Cards com Alto Contraste */
.card {
    background-color: var(--bg-card) !important;
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.card-header {
    background-color: var(--bg-card) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
    color: #ffffff !important;
}

.card-body {
    color: #e2e8f0;
}

.card-title {
    color: #ffffff !important;
    font-weight: 600;
}

/* Cards brancos para destaque */
.card.bg-white {
    background-color: #ffffff !important;
    color: var(--text-on-white);
}

.card.bg-white .card-header {
    background-color: #f8fafc !important;
    color: var(--text-on-white) !important;
}

.card.bg-white .card-body {
    color: #475569;
}

.card.bg-white .card-title {
    color: #1e293b !important;
}

.card.bg-white .text-muted,
.card.bg-white small {
    color: #64748b !important;
}

/* HIGH CONTRAST TEXT STYLES */
.text-muted {
    color: #cbd5e1 !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
    font-weight: 600;
}

p {
    color: #e2e8f0 !important;
}

small, .small {
    color: #cbd5e1 !important;
}

/* Labels com melhor contraste */
.form-label {
    color: #e2e8f0 !important;
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Forms */
.form-control, .form-select {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

/* Tables */
.table {
    color: var(--text-primary);
    background-color: transparent !important;
    --bs-table-bg: transparent;
}

/* Forçar tema escuro nas células da tabela (Bootstrap override) */
.table > :not(caption) > * > * {
    background-color: transparent !important;
    color: var(--text-primary);
}

.table thead tr {
    background-color: rgba(30, 40, 60, 0.5) !important;
}

.table-responsive {
    background: transparent !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Blazor Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Empty State Styles - High Contrast */
.empty-state {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 2px dashed rgba(100, 116, 139, 0.5);
    border-radius: 16px;
    padding: 5rem 2rem;
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state i {
    font-size: 5rem;
    color: #60a5fa;
    opacity: 0.8;
    margin-bottom: 2rem;
    display: block;
}

.empty-state h5 {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: #cbd5e1;
    font-size: 1rem;
    margin-bottom: 0;
    max-width: 500px;
}

/* Alert Styles for Dark Theme - HIGH CONTRAST */
.alert {
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.alert-info {
    background-color: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #a5f3fc !important;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fde047 !important;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #86efac !important;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5 !important;
}

/* Bootstrap overrides for better contrast */
.bg-primary-subtle {
    background-color: rgba(59, 130, 246, 0.15) !important;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.text-primary {
    color: #60a5fa !important;
}

.text-success {
    color: #4ade80 !important;
}

.text-info {
    color: #22d3ee !important;
}

.text-warning {
    color: #facc15 !important;
}

.text-danger {
    color: #f87171 !important;
}

/* Remove any white backgrounds in dark theme */
.bg-white {
    background-color: var(--bg-secondary) !important;
}

/* Ensure good contrast for empty states */
.text-center .text-muted {
    color: #cbd5e1 !important;
    font-size: 1rem !important;
}

.fa-2x, .fa-3x {
    opacity: 0.9 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}
