/* ============================================================
   Netrun Bot — Design System
   Palette: Primary #994FFD | Secondary #00CBCC | Tertiary #FF8500
   Font: Space Grotesk
   ============================================================ */

/* === CUSTOM PROPERTIES === */
:root {
   /* --nr-primary:        #994FFD;
    --nr-primary-dark:   #7B3FD8;
    --nr-secondary:      #00CBCC;
    --nr-tertiary:       #FF8500;*/
    --nr-bg:             #0A0A16;
    --nr-surface:        #12121E;
    --nr-border:         rgba(153, 79, 253, 0.18);
    --nr-border-subtle:  rgba(153, 79, 253, 0.09);
    --nr-text:           #FFFFFF;
    --nr-text-muted:     rgba(255, 255, 255, 0.65);
    --nr-success:        #00E676;
    --nr-warning:        #FFD54F;
    --nr-danger:         #FF5252;
    --nr-radius:         12px;
    --nr-radius-sm:      8px;
    --nr-radius-lg:      16px;
    --nr-radius-pill:    100px;
    --nr-shadow-primary: 0 4px 20px rgba(153, 79, 253, 0.22);
    --nr-shadow-card:    0 2px 16px rgba(10, 10, 22, 0.6);
}

/* === GLOBAL FONT === */
*, *::before, *::after {
    font-family: 'Space Grotesk', sans-serif !important;
}

/* === LOADERS — thin & elegant === */
.mud-progress-linear {
    height: 2px !important;
    border-radius: 2px !important;
}

.mud-progress-linear-bar,
.mud-progress-linear-bar1,
.mud-progress-linear-bar2 {
    height: 2px !important;
    border-radius: 2px !important;
}

.mud-progress-circular svg {
    stroke-width: 2 !important;
}

/* === BORDER RADIUS — rounded & modern === */
.mud-paper:not(.mud-drawer):not(.mud-appbar) {
    border-radius: var(--nr-radius) !important;
}

.mud-card {
    border-radius: var(--nr-radius) !important;
}

.mud-dialog .mud-paper {
    border-radius: var(--nr-radius-lg) !important;
}

.mud-popover-paper {
    border-radius: var(--nr-radius) !important;
}

.mud-chip {
    border-radius: var(--nr-radius-pill) !important;
    font-weight: 600 !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.04em !important;
}

.mud-snackbar {
    border-radius: var(--nr-radius) !important;
}

.mud-tooltip-root .mud-paper {
    border-radius: var(--nr-radius-sm) !important;
}

/* === THIN BORDERS === */
.mud-input-outlined .mud-input-outlined-border {
    border-width: 1px !important;
    border-radius: var(--nr-radius-sm) !important;
}

.mud-input-underline:before {
    border-bottom-width: 1px !important;
}

.mud-table-container {
    border-radius: var(--nr-radius) !important;
    overflow: hidden;
}

.mud-table-cell {
    border-bottom: 1px solid var(--nr-border-subtle) !important;
    font-size: 0.875rem !important;
}

.mud-table-head .mud-table-cell {
    border-bottom: 1px solid var(--nr-border) !important;
    background: rgba(153, 79, 253, 0.08) !important;
    font-weight: 700 !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--nr-primary) !important;
}

.mud-table-root .mud-table-row:hover {
    background: rgba(153, 79, 253, 0.06) !important;
    transition: background 0.15s ease !important;
}

/* MudDataGrid */
.mud-data-grid {
    border-radius: var(--nr-radius) !important;
    overflow: hidden;
}

.mud-data-grid .mud-table-head .mud-table-cell {
    background: rgba(153, 79, 253, 0.08) !important;
    font-weight: 700 !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
    color: var(--nr-primary) !important;
    border-bottom: 1px solid var(--nr-border) !important;
}

/* === CARDS === */
.mud-card {
    box-shadow: var(--nr-shadow-card) !important;
    border: 1px solid var(--nr-border-subtle) !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.mud-card:hover {
    border-color: var(--nr-border) !important;
    box-shadow: var(--nr-shadow-primary) !important;
}

.mud-card-header {
    border-bottom: 1px solid var(--nr-border-subtle) !important;
}

/* === BUTTONS — rounded, no caps, weight === */
.mud-button-root {
    font-weight: 600 !important;
    letter-spacing: 0.03em !important;
    text-transform: none !important;
    border-radius: 10px !important;
    transition: all 0.2s ease !important;
}

.mud-button-filled-primary {
    background: linear-gradient(135deg, #994FFD 0%, #7B3FD8 100%) !important;
    box-shadow: 0 3px 12px rgba(153, 79, 253, 0.35) !important;
}

.mud-button-filled-primary:hover {
    box-shadow: 0 5px 20px rgba(153, 79, 253, 0.5) !important;
    transform: translateY(-1px) !important;
}

.mud-button-filled-secondary {
    background: linear-gradient(135deg, #00CBCC 0%, #009B9C 100%) !important;
    box-shadow: 0 3px 12px rgba(0, 203, 204, 0.3) !important;
}

.mud-button-filled-secondary:hover {
    box-shadow: 0 5px 20px rgba(0, 203, 204, 0.45) !important;
    transform: translateY(-1px) !important;
}

.mud-button-text-primary {
    color: var(--nr-primary) !important;
}

.mud-button-outlined-primary {
    border: 1px solid var(--nr-primary) !important;
    color: var(--nr-primary) !important;
    border-radius: 10px !important;
}

.mud-button-outlined-primary:hover {
    background: rgba(153, 79, 253, 0.1) !important;
}

/* Icon buttons */
.mud-icon-button {
    border-radius: 10px !important;
    transition: background 0.15s ease !important;
}

/* === SWITCHES === */
.mud-switch-track {
    border-radius: 100px !important;
}

/* === BADGE === */
.mud-badge-content {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    border-radius: var(--nr-radius-pill) !important;
}

/* === APPBAR === */
.mud-appbar {
    border-bottom: 1px solid var(--nr-border) !important;
    backdrop-filter: blur(12px) !important;
}

/* === DRAWER / SIDEBAR === */
.mud-drawer {
    border-right: 1px solid var(--nr-border) !important;
}

.mud-drawer-header {
    border-bottom: 1px solid var(--nr-border-subtle) !important;
    padding: 16px 20px !important;
}

/* Nav links */
.mud-nav-link {
    border-radius: var(--nr-radius-sm) !important;
    margin: 2px 8px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    transition: background 0.15s ease !important;
}

.mud-nav-link.active {
    background: rgba(153, 79, 253, 0.18) !important;
    border-left: 3px solid var(--nr-primary) !important;
    color: var(--nr-primary) !important;
    font-weight: 600 !important;
}

.mud-nav-link:hover:not(.active) {
    background: rgba(153, 79, 253, 0.08) !important;
}

.mud-nav-group-title {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--nr-text-muted) !important;
}

/* === DIVIDERS === */
.mud-divider {
    border-color: var(--nr-border-subtle) !important;
}

/* === SELECT / AUTOCOMPLETE === */
.mud-popover .mud-list-item {
    border-radius: var(--nr-radius-sm) !important;
    font-size: 0.875rem !important;
}

.mud-popover .mud-list-item:hover,
.mud-popover .mud-list-item-selected {
    background: rgba(153, 79, 253, 0.1) !important;
}

/* ============================================================
   SEMÁFORO DE ESTADOS
   Uso: <span class="status-dot active"></span>Active
        <MudChip Class="status-chip active">Activo</MudChip>
   ============================================================ */

/* Text colors */
.text-active   { color: var(--nr-success) !important; font-weight: 600 !important; }
.text-warning  { color: var(--nr-warning) !important; font-weight: 600 !important; }
.text-inactive { color: var(--nr-danger)  !important; font-weight: 600 !important; }

/* Glowing dot indicator */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

.status-dot.active {
    background: var(--nr-success);
    box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2), 0 0 8px rgba(0, 230, 118, 0.5);
    animation: pulse-green 2s infinite;
}

.status-dot.warning {
    background: var(--nr-warning);
    box-shadow: 0 0 0 3px rgba(255, 213, 79, 0.2), 0 0 8px rgba(255, 213, 79, 0.5);
}

.status-dot.inactive {
    background: var(--nr-danger);
    box-shadow: 0 0 0 3px rgba(255, 82, 82, 0.2), 0 0 8px rgba(255, 82, 82, 0.4);
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.2), 0 0 8px rgba(0, 230, 118, 0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(0, 230, 118, 0.1), 0 0 14px rgba(0, 230, 118, 0.7); }
}

/* Status chips */
.status-chip.active {
    background: rgba(0, 230, 118, 0.15) !important;
    color: var(--nr-success) !important;
    border: 1px solid rgba(0, 230, 118, 0.35) !important;
}

.status-chip.warning {
    background: rgba(255, 213, 79, 0.15) !important;
    color: var(--nr-warning) !important;
    border: 1px solid rgba(255, 213, 79, 0.35) !important;
}

.status-chip.inactive {
    background: rgba(255, 82, 82, 0.12) !important;
    color: var(--nr-danger) !important;
    border: 1px solid rgba(255, 82, 82, 0.3) !important;
}

/* ============================================================
   NOTIFICATION ITEMS
   ============================================================ */
.no-leido {
    background: rgba(153, 79, 253, 0.18) !important;
    border-left: 3px solid var(--nr-primary) !important;
}

.no-leido-light {
    background: rgba(0, 203, 204, 0.12) !important;
    border-left: 3px solid var(--nr-secondary) !important;
}

/* ============================================================
   UTILITY
   ============================================================ */

/* Subtle glow on primary elements */
.glow-primary {
    box-shadow: 0 0 20px rgba(153, 79, 253, 0.3) !important;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--nr-primary), var(--nr-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stats cards */
.stat-card {
    border-left: 3px solid var(--nr-primary) !important;
}

.stat-card.secondary {
    border-left-color: var(--nr-secondary) !important;
}

.stat-card.tertiary {
    border-left-color: var(--nr-tertiary) !important;
}

/* Profit/loss colors (trading) */
.profit  { color: var(--nr-success) !important; font-weight: 600 !important; }
.loss    { color: var(--nr-danger)  !important; font-weight: 600 !important; }
.neutral { color: var(--nr-text-muted) !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--nr-bg); }
::-webkit-scrollbar-thumb { background: rgba(153, 79, 253, 0.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--nr-primary); }

/* === MudChipSet: force horizontal row layout (MudBlazor 7 changed default) === */
.mud-chip-set,
div.mud-chip-set,
.mud-chip-set.mud-chip-set-filter {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    align-items: center !important;
    width: 100% !important;
}

/* MudChips must not stretch to full width */
.mud-chip-set .mud-chip-root,
.mud-chip-set .mud-chip {
    flex: 0 0 auto !important;
    width: auto !important;
    display: inline-flex !important;
}

/* === MudChip selected state: visible contrast on dark background === */
.mud-chip.mud-chip-selected,
.mud-chip-root.mud-chip-selected {
    background-color: var(--nr-primary) !important;
    color: #ffffff !important;
    border-color: var(--nr-primary) !important;
    box-shadow: 0 0 0 2px rgba(153, 79, 253, 0.35) !important;
}

.mud-chip-outlined.mud-chip-selected,
.mud-chip.mud-chip-outlined.mud-chip-selected {
    border-color: var(--nr-primary) !important;
    color: var(--nr-primary) !important;
    background-color: rgba(153, 79, 253, 0.15) !important;
}

/* ============================================================
   MudTabs — dark-mode aesthetic styling
   ============================================================ */

/* Header bar: fondo oscuro fijo, sin bleed de color del Color= del componente */
.mud-tabs .mud-tabs-header,
.mud-tabs-header {
    background: #12121E !important;
    border-bottom: 1px solid rgba(153, 79, 253, 0.25) !important;
}

/* Elimina cualquier tinte que MudBlazor inyecte por el atributo Color= */
.mud-tabs .mud-tab-strip,
.mud-tabs .mud-tabs-header .mud-tab-strip-next,
.mud-tabs .mud-tabs-header .mud-tab-strip-prev {
    background: transparent !important;
}

/* Tabs inactivos: texto blanco tenue sobre fondo oscuro — siempre legible */
.mud-tabs .mud-tab,
.mud-tab {
    color: rgba(255, 255, 255, 0.55) !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.02em !important;
    text-transform: none !important;
    min-width: 72px !important;
    opacity: 1 !important;
    border-radius: 6px 6px 0 0 !important;
    transition: color 0.18s ease, background 0.18s ease !important;
}

/* Íconos heredan el color del tab */
.mud-tabs .mud-tab .mud-icon-root,
.mud-tabs .mud-tab svg,
.mud-tab .mud-icon-root,
.mud-tab svg {
    color: inherit !important;
    fill: currentColor !important;
}

/* Hover: texto más brillante, fondo muy sutil */
.mud-tabs .mud-tab:hover:not(.mud-tab-active),
.mud-tab:hover:not(.mud-tab-active) {
    color: rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

/* Tab ACTIVO: fondo primario sólido + texto blanco = máximo contraste */
.mud-tabs .mud-tab.mud-tab-active,
.mud-tabs .mud-tab[aria-selected="true"],
.mud-tab.mud-tab-active,
.mud-tab[aria-selected="true"] {
    background: var(--nr-primary) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 -2px 10px rgba(153, 79, 253, 0.4) !important;
}

/* Ocultar el slider/underline — el fondo sólido ya indica la selección */
.mud-tab-slider,
.mud-tabs .mud-tab-slider {
    display: none !important;
}

/* Tab panel content area — transparent, no colour bleed */
.mud-tabs-panels,
.mud-tabs .mud-tabs-panels {
    background: transparent !important;
    color: var(--nr-text) !important;
}

/* ============================================================
   COMPACT GRID LAYOUT
   Reduce MudGrid default gap: Spacing=6 (24px) → 10px
   ============================================================ */

/* Reduce the inter-column and inter-row gap for all spacing variants */
.mud-grid[class*="mud-grid-spacing"] {
    width: calc(100% + 10px) !important;
    margin-left: -10px !important;
    margin-top: -10px !important;
}
.mud-grid[class*="mud-grid-spacing"] > .mud-grid-item {
    padding-left: 10px !important;
    padding-top: 10px !important;
}

/* Page content area: consistent horizontal breathing room
   (padding-top is managed by MudBlazor for the appbar height) */
.mud-main-content {
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: 20px !important;
}