/**
 * Inventário de Rede - Estilos Customizados
 */

/* Variáveis */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

/* Geral */
body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
}

/* Tabelas */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: #6c757d;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.65em;
}

/* Código */
code {
    padding: 0.2em 0.4em;
    font-size: 0.875em;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 0.25rem;
}

/* Status indicators */
.status-online {
    color: var(--success-color);
}

.status-offline {
    color: var(--danger-color);
}

/* Cards de estatísticas */
.card.bg-primary .card-footer,
.card.bg-success .card-footer,
.card.bg-danger .card-footer,
.card.bg-warning .card-footer {
    background-color: rgba(0, 0, 0, 0.1) !important;
    border-top: none;
}

/* Formulários */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Botões */
.btn {
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
}

/* Alertas */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Login */
.min-vh-100 {
    min-height: 100vh;
}

/* Paginação */
.pagination .page-link {
    border: none;
    margin: 0 0.125rem;
    border-radius: 0.25rem !important;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
}

/* Responsivo */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .display-4 {
        font-size: 2rem;
    }
}

/* Lista de alertas */
.list-group-item {
    border-left: none;
    border-right: none;
    border-radius: 0 !important;
}

.list-group-item:first-child {
    border-top: none;
}

/* Sticky header em tabelas */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #fff;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease-out;
}

/* Tooltip customizado */
.tooltip-inner {
    max-width: 300px;
    padding: 0.5rem 0.75rem;
}

/* Input group */
.input-group-text {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

/* Font monospace */
.font-monospace {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Ícones de tipo de dispositivo */
.bi-pc-display,
.bi-server,
.bi-printer,
.bi-phone,
.bi-tablet,
.bi-router,
.bi-ethernet,
.bi-camera-video,
.bi-cpu,
.bi-question-circle {
    font-size: 1rem;
}

/* Dark mode toggle (futuro) */
@media (prefers-color-scheme: dark) {
    /* Preparado para dark mode futuro */
}

/* ================================================
   SIDEBAR LAYOUT
   ================================================ */

:root {
    --sidebar-width: 250px;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #ffffff;
    --sidebar-hover-bg: #334155;
}

/* Wrapper */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar-brand:hover {
    color: #fff;
}

.sidebar-brand i {
    font-size: 1.5rem;
}

/* Navigation */
.sidebar-nav {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    flex: 1;
}

.sidebar-item {
    margin: 0.25rem 0.75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar-link i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
}

.sidebar-link:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text-active);
}

.sidebar-link.active {
    background: var(--primary-color);
    color: #fff;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1rem 1.5rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-user-avatar {
    font-size: 2rem;
    color: var(--sidebar-text);
    margin-right: 0.75rem;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sidebar-user-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
}

.sidebar-user-role {
    color: var(--sidebar-text);
    font-size: 0.75rem;
}

.sidebar-logout {
    color: var(--sidebar-text);
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.sidebar-logout:hover {
    color: var(--danger-color);
    background: rgba(220, 53, 69, 0.1);
}

/* Content Area */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #f8f9fa;
}

.content-wrapper {
    padding: 1.5rem;
}

/* Mobile Navigation */
.mobile-nav {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
    }

    .content-wrapper {
        padding: 1rem;
    }
}

@media (min-width: 992px) {
    .mobile-nav {
        display: none !important;
    }
}

/* ================================================
   ACCORDION SETORES
   ================================================ */

.accordion-sector .accordion-button {
    font-weight: 600;
    background: #fff;
}

.accordion-sector .accordion-button:not(.collapsed) {
    background: rgba(13, 110, 253, 0.05);
    color: var(--primary-color);
}

.accordion-sector .accordion-body {
    padding: 0;
}

.accordion-sector .table {
    margin: 0;
}

.accordion-sector .table th {
    background: #f8f9fa;
}

.sector-badge {
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.sector-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

/* Sem setor */
.no-sector {
    color: #6c757d;
    font-style: italic;
}
