@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

.text-muted {
    color: limegreen !important;
}

:root {
    --bg-primary: #0F1015;
    /* Mais escuro, idêntico ao Quantix */
    --bg-secondary: #161821;
    --bg-sidebar: #13141C;
    --text-main: #FFFFFF;
    --text-muted: #8E93A6;
    --accent: #7A5AF8;
    /* Purple */
    --accent-hover: #9B7CF6;
    --accent-glow: rgba(122, 90, 248, 0.4);
    --border-color: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(122, 90, 248, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(34, 197, 94, 0.03) 0%, transparent 40%);
    background-attachment: fixed;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-text {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* Layout Exato Quantix */
.page {
    display: flex;
    min-height: 100vh;
    padding: 0;
    gap: 0;
}

.sidebar {
    width: 250px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0.5rem;
    flex-shrink: 0;
    z-index: 10;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top Row Quantix */
.top-row {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: transparent;
    z-index: 5;
}

.top-search-mock {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    min-width: 300px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.live-health-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #4ADE80;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.live-health-badge .dot {
    width: 6px;
    height: 6px;
    background: #22C55E;
    border-radius: 50%;
    box-shadow: 0 0 8px #22C55E;
    animation: pulse-dot 2s infinite;
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px 24px;
}

/* Cards Quantix */
.glass-panel {
    background: linear-gradient(180deg, rgba(26, 28, 40, 0.8) 0%, rgba(20, 22, 31, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Quantix Cards */
.quantix-card {
    background: linear-gradient(180deg, #1A1C28 0%, #15161E 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.quantix-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.card-header-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.card-header-q span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body-q h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: white;
    letter-spacing: -0.02em;
}

.card-trend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.trend-pill {
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.trend-pill.warning {
    background: rgba(251, 191, 36, 0.1);
    color: #FBBF24;
}

.trend-pill.negative {
    background: rgba(248, 113, 113, 0.1);
    color: #F87171;
}

.card-trend.positive .trend-pill {
    background: rgba(34, 197, 94, 0.1);
    color: #4ADE80;
}

.trend-text {
    color: var(--text-muted);
}

/* Secondary Top Buttons */
.btn-secondary-mock {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary-mock:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Tables Quantix Style */
.table {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 15px;
    width: 100%;
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.table td {
    padding: 16px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
}

/* Nav Menu Styles Quantix */
.nav-section-title {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 1.5rem 0 0.5rem 1.2rem;
}

.nav-item {
    margin: 0.2rem 0.5rem;
}

.nav-link {
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-weight: 600;
}

.nav-link .bi {
    opacity: 0.6;
    font-size: 1.1rem;
}

.nav-link.active .bi {
    opacity: 1;
    color: var(--accent-hover);
}

/* Quantix Quantum Button */
.btn-quantum {
    background: linear-gradient(135deg, #7A5AF8 0%, #3B82F6 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 16px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(122, 90, 248, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: auto;
}

.btn-quantum:hover {
    box-shadow: 0 6px 20px rgba(122, 90, 248, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    color: white;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ADE80;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #FBBF24;
}

.badge-danger {
    background: rgba(248, 113, 113, 0.15);
    color: #F87171;
}

.badge-info {
    background: rgba(56, 189, 248, 0.15);
    color: #38BDF8;
}

/* Forms and Inputs Quantix Style */
.form-control,
.form-select,
input,
textarea {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    border-radius: 8px !important;
    padding: 10px 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus {
    background: rgba(0, 0, 0, 0.4) !important;
    box-shadow: 0 0 0 2px var(--accent-glow) !important;
    border-color: var(--accent) !important;
    outline: none;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* Blazor Error/Reconnect */
#blazor-error-ui {
    display: none !important;
}

dialog#components-reconnect-modal {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: auto !important;
    overflow: visible !important;
}

dialog#components-reconnect-modal::backdrop {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

dialog#components-reconnect-modal[open] {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

dialog#components-reconnect-modal .components-reconnect-container {
    background: rgba(20, 25, 40, 0.8) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-main) !important;
    padding: 30px 40px !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

dialog#components-reconnect-modal p {
    margin: 0 !important;
    font-weight: 500 !important;
    font-size: 1.1rem !important;
}

dialog#components-reconnect-modal .components-reconnect-rejoining-animation {
    filter: invert(1) hue-rotate(180deg) brightness(1.5);
}