@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    background-color: #26292d;
    font-family: 'Inter', sans-serif;
}

.card {
    background-color: #2c3034;
    border: none;
    border-radius: 8px;
}

.card-header,
.card-footer {
    border-color: #3f444a !important;
}

.text-custom {
    color: #a0a6ab;
}

.activity-wave {
    display: flex;
    align-items: flex-end;
    height: 14px;
    gap: 2px;
}

.activity-wave .bar {
    width: 3px;
    border-radius: 1px;
}

.activity-wave .bar:nth-child(1) {
    height: 8px;
}

.activity-wave .bar:nth-child(2) {
    height: 14px;
}

.activity-wave .bar:nth-child(3) {
    height: 6px;
}

.activity-wave .bar:nth-child(4) {
    height: 12px;
}

.activity-wave .bar:nth-child(5) {
    height: 10px;
}

.activity-wave.offline .bar {
    height: 3px;
    background-color: #dc3545;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.bg-success {
    background-color: #10b981 !important;
}

.bg-danger {
    background-color: #ef4444 !important;
}

.border-start {
    border-radius: 6px;
}

/* ===== Cards clicáveis do Dashboard ===== */
.card-clickable {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
}

.card-clickable:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1.2rem rgba(0, 0, 0, 0.35) !important;
    border-color: #3f444a;
}

.card-clickable .stretched-link:hover {
    text-decoration: none;
}

.details-link {
    color: #a0a6ab;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-clickable:hover .details-link {
    color: #6ea8fe;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    --bs-breadcrumb-divider-color: #565c63;
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: #a0a6ab;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #6ea8fe;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #e9ecef;
}

/* ===== Cards de estatística (telas de detalhe) ===== */
.stat-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* ===== Informações do túnel ===== */
.tunnel-info-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #3f444a;
}

.tunnel-info-item:last-child {
    border-bottom: none;
}

.tunnel-info-label {
    color: #a0a6ab;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

/* ===== Tabela de dispositivos ===== */
.device-type-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(160, 166, 171, 0.12);
    color: #a0a6ab;
    font-size: 1rem;
}

.table-devices thead th {
    color: #a0a6ab;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    border-bottom-width: 1px;
}

.table-devices td {
    vertical-align: middle;
}

.font-monospace-ip {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    color: #d0d4d8;
}
/* ======================================================
   InfraView — Sidebar / Offcanvas Menu
   ====================================================== */
.offcanvas-dark {
    background-color: #2c3034;
    border-right: 1px solid #3f444a;
    width: 280px;
}

.offcanvas-dark .offcanvas-header {
    border-bottom: 1px solid #3f444a;
}

.sidebar-nav .nav-link {
    color: #a0a6ab;
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.92rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-nav .nav-link i.nav-icon {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.05rem;
}

.sidebar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #e9ecef;
}

.sidebar-nav .nav-link.active {
    background-color: rgba(110, 168, 254, 0.15);
    color: #6ea8fe;
    font-weight: 600;
}

.sidebar-nav .nav-divider {
    border-top: 1px solid #3f444a;
    margin: 0.75rem 0;
}

/* Botão hambúrguer da navbar */
.btn-menu-toggle {
    background: transparent;
    border: 1px solid #3f444a;
    color: #e9ecef;
    border-radius: 8px;
    padding: 0.4rem 0.65rem;
}

.btn-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* Indicador de notificação (bolinha) */
.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444;
    display: inline-block;
}

.badge-count {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
}

/* ======================================================
   Dashboard — Categorias / Progresso
   ====================================================== */
.category-row {
    padding: 0.85rem 0;
    border-bottom: 1px solid #3f444a;
}

.category-row:last-child {
    border-bottom: none;
}

.category-progress {
    height: 6px;
    background-color: #3f444a;
    border-radius: 3px;
    overflow: hidden;
}

.category-progress .fill {
    height: 100%;
    border-radius: 3px;
}

/* ======================================================
   Alertas
   ====================================================== */
.alert-item {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #3f444a;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.severity-critical {
    background-color: rgba(239, 68, 68, 0.18);
    color: #ef4444;
}

.severity-warning {
    background-color: rgba(245, 158, 11, 0.18);
    color: #f59e0b;
}

.severity-info {
    background-color: rgba(110, 168, 254, 0.18);
    color: #6ea8fe;
}

.severity-resolved {
    background-color: rgba(16, 185, 129, 0.18);
    color: #10b981;
}

/* ======================================================
   Latência — barra horizontal
   ====================================================== */
.latency-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #3f444a;
}

.latency-row:last-child {
    border-bottom: none;
}

.latency-track {
    flex: 1;
    height: 8px;
    background-color: #3f444a;
    border-radius: 4px;
    overflow: hidden;
}

.latency-fill {
    height: 100%;
    border-radius: 4px;
    background-color: #10b981;
}

.latency-fill.warn {
    background-color: #f59e0b;
}

.latency-fill.crit {
    background-color: #ef4444;
}

/* ======================================================
   Filtros (Relatórios)
   ====================================================== */
.filter-pill {
    background-color: #212528;
    border: 1px solid #3f444a;
    color: #a0a6ab;
    border-radius: 20px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
}

.filter-pill.active,
.filter-pill:hover {
    background-color: rgba(110, 168, 254, 0.15);
    color: #6ea8fe;
    border-color: rgba(110, 168, 254, 0.4);
}

/* ======================================================
   Página de Login (InfraView)
   ====================================================== */
.login-brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background-color: rgba(110, 168, 254, 0.15);
    color: #6ea8fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem auto;
}

/* ======================================================
   Animações simples de entrada / feedback
   ====================================================== */
@media (prefers-reduced-motion: no-preference) {

    @keyframes fadeInUp {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes growBar {
        from { width: 0; }
        to { width: var(--w, 0%); }
    }

    @keyframes pulseDot {
        0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
        70%  { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
        100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    }

    @keyframes popIn {
        from { opacity: 0; transform: scale(0.96); }
        to { opacity: 1; transform: scale(1); }
    }

    .anim-card {
        animation: fadeInUp 0.45s ease both;
    }

    .stagger-row > * {
        animation: fadeInUp 0.45s ease both;
    }

    .stagger-row > *:nth-child(1) { animation-delay: 0.02s; }
    .stagger-row > *:nth-child(2) { animation-delay: 0.08s; }
    .stagger-row > *:nth-child(3) { animation-delay: 0.14s; }
    .stagger-row > *:nth-child(4) { animation-delay: 0.20s; }
    .stagger-row > *:nth-child(5) { animation-delay: 0.26s; }
    .stagger-row > *:nth-child(6) { animation-delay: 0.32s; }

    .alert-item,
    .device-row-anim {
        animation: fadeIn 0.4s ease both;
    }

    .alert-item:nth-child(1) { animation-delay: 0.02s; }
    .alert-item:nth-child(2) { animation-delay: 0.06s; }
    .alert-item:nth-child(3) { animation-delay: 0.10s; }
    .alert-item:nth-child(4) { animation-delay: 0.14s; }
    .alert-item:nth-child(5) { animation-delay: 0.18s; }
    .alert-item:nth-child(6) { animation-delay: 0.22s; }
    .alert-item:nth-child(7) { animation-delay: 0.26s; }
    .alert-item:nth-child(8) { animation-delay: 0.30s; }
    .alert-item:nth-child(9) { animation-delay: 0.34s; }
    .alert-item:nth-child(10) { animation-delay: 0.38s; }
    .alert-item:nth-child(11) { animation-delay: 0.42s; }
    .alert-item:nth-child(12) { animation-delay: 0.46s; }

    .category-progress .fill,
    .latency-fill {
        animation: growBar 1s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .notif-dot.has-alert {
        animation: pulseDot 2s infinite;
    }

    .login-card-anim {
        animation: popIn 0.4s ease both;
    }

    .filter-pill {
        transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    }

    .filter-pill:active {
        transform: scale(0.96);
    }

    table.table-devices tbody tr {
        transition: background-color 0.15s ease, opacity 0.2s ease;
    }
}

/* ===== Estado vazio (filtros / busca sem resultado) ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #a0a6ab;
}

.empty-state i {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 0.75rem;
    color: #565c63;
}

/* ===== Contador "exibindo X de Y" ===== */
.results-count {
    color: #a0a6ab;
    font-size: 0.85rem;
}

/* ===== Campo de busca (Rede) ===== */
.search-box {
    position: relative;
    max-width: 320px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a6ab;
}

.search-box input {
    padding-left: 36px;
}
