:root {
    --halo-orange: #f4511e;
    --halo-orange-dark: #d8430f;
    --halo-nav-bg: #14161c;
    --halo-nav-bg-2: #1b1e26;
    --halo-nav-border: rgba(255, 255, 255, 0.08);
    --halo-nav-text: #e7e9ee;
    --halo-nav-muted: #8b90a0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* ==========================
   LAYOUT
========================== */

.sidebar {
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
}

.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    padding: 30px;
}

/* ==========================
   TOPBAR MOBILE
========================== */

.topbar-mobile {
    height: 60px;
    z-index: 1030;
    background: var(--halo-nav-bg);
    border-bottom: 1px solid var(--halo-nav-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.topbar-mobile::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: linear-gradient(90deg, var(--halo-orange), transparent 70%);
}

.menu-toggle-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 18px;
    transition: background 0.2s ease;
}

.menu-toggle-btn:hover,
.menu-toggle-btn:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* ==========================
   SIDEBAR / OFFCANVAS (menu)
========================== */

.halo-nav {
    background: var(--halo-nav-bg);
    color: var(--halo-nav-text);
    border-right: 1px solid var(--halo-nav-border);
}

/* Garante que o offcanvas (menu mobile) fique EXATAMENTE igual ao sidebar
   desktop, sem depender de como o Bootstrap prioriza suas próprias regras
   internas de --bs-offcanvas-bg. */
.offcanvas.halo-nav,
.offcanvas.halo-nav .offcanvas-header,
.offcanvas.halo-nav .offcanvas-body {
    background-color: var(--halo-nav-bg) !important;
    color: var(--halo-nav-text) !important;
}

.offcanvas.halo-nav {
    width: 280px;
}

.halo-nav-header {
    padding: 22px 20px;
    border-bottom: 1px solid var(--halo-nav-border);
}

.sidebar .halo-nav-header {
    padding: 22px 20px;
}

.sidebar {
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar,
.offcanvas-body::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb,
.offcanvas-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

/* Botão Home com a cor da marca */
.halo-btn-home {
    background: var(--halo-orange);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease;
}

.halo-btn-home:hover {
    background: var(--halo-orange-dark);
    color: #fff;
}

/* Rótulos de seção (Chamados / Administração / futuros módulos) */
.menu-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--halo-nav-muted);
    padding-top: 22px;
    margin-top: 14px;
    border-top: 1px solid var(--halo-nav-border);
}

.menu-section-label--first {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.menu-section-label i {
    font-size: 12px;
    color: var(--halo-orange);
}

/* Itens principais do menu */
.halo-menu .nav-item {
    margin-bottom: 2px;
}

.halo-menu > .nav-item > .nav-link,
.halo-menu .nav-item .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--halo-nav-text);
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.halo-menu .nav-item > .nav-link i.fa-ticket-alt,
.halo-menu .nav-item > .nav-link > span i {
    width: 18px;
    text-align: center;
    margin-right: 8px;
    color: var(--halo-nav-muted);
}

.halo-menu .nav-item > .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.halo-menu .nav-item > .nav-link[aria-expanded="true"] {
    background: rgba(244, 81, 30, 0.12);
    color: #fff;
}

.halo-menu .nav-item > .nav-link[aria-expanded="true"] i.fa-ticket-alt,
.halo-menu .nav-item > .nav-link[aria-expanded="true"] > span i {
    color: var(--halo-orange);
}

.submenu-arrow {
    font-size: 11px;
    transition: transform 0.2s ease;
    color: var(--halo-nav-muted);
}

.halo-menu .nav-link[aria-expanded="true"] .submenu-arrow {
    transform: rotate(180deg);
    color: var(--halo-orange);
}

/* Submenus (itens filhos) */
.halo-menu .btn-toggle-nav {
    margin: 2px 0 8px 10px;
    padding-left: 14px;
    border-left: 1px solid var(--halo-nav-border);
}

.halo-menu .btn-toggle-nav .nav-link {
    padding: 8px 10px;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--halo-nav-muted);
    border-radius: 8px;
    justify-content: flex-start;
}

.halo-menu .btn-toggle-nav .nav-link i {
    width: 16px;
    text-align: center;
    margin-right: 8px;
    font-size: 12px;
}

.halo-menu .btn-toggle-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* ==========================
   CAMPO CEP (carregando)
========================== */

.cep-carregando {
    background-image: none;
    opacity: 0.7;
}

/* ==========================
   DASHBOARD
========================== */

.dash-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 36px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #222;
}

.dash-section-title:first-of-type {
    margin-top: 0;
}

.dash-section-title i {
    color: var(--halo-orange);
    font-size: 16px;
}

.dash-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: 0.25s;
    height: 100%;
}

.dash-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    color: #333;
}

.dash-card.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.dash-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    flex-shrink: 0;
}

.icon-blue   { background: rgba(13, 110, 253, .1);  color: #0d6efd; }
.icon-red    { background: rgba(220, 53, 69, .1);   color: #dc3545; }
.icon-orange { background: rgba(253, 126, 20, .12); color: #e8650d; }
.icon-green  { background: rgba(25, 135, 84, .1);   color: #198754; }
.icon-purple { background: rgba(111, 66, 193, .1);  color: #6f42c1; }
.icon-teal   { background: rgba(32, 201, 151, .12); color: #16a37c; }
.icon-cyan   { background: rgba(13, 202, 240, .12); color: #0aa8c2; }

.dash-card-number {
    font-size: 25px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1px;
    color: #1a1a1a;
}

.dash-card-label {
    color: #777;
    font-size: 13px;
}

.dash-badge-soon {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #eef2f7;
    color: #667;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}

/* Cartão de gráfico */
.chart-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
    height: 100%;
}

.chart-card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #222;
}

.chart-card-subtitle {
    font-size: 12.5px;
    color: #888;
    margin-bottom: 18px;
}

.chart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: #9aa0ab;
    min-height: 220px;
}

.chart-empty-state i {
    font-size: 34px;
    margin-bottom: 14px;
    color: #d7dbe2;
}

.chart-empty-state strong {
    color: #667;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.chart-empty-state span {
    font-size: 12.5px;
}

/* ==========================
   TOPO
========================== */

.topbar {
    background: #fff;
    padding: 20px 0;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo {
    color: #0d6efd;
    text-decoration: none;
}

.logo img {
    height: 50px;
}


.search-container {
    position: relative;
    width: 100%;
    max-width: 500px;
}

#resultadoBusca {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 9999;
    display: none;
    max-height: 350px;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,.1);
}

.item-busca {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.item-busca:hover {
    background: #f5f5f5;
}


/* ==========================
   TÍTULOS E BREADCRUMB
========================== */

.section-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 30px;
}

.page-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
}

.page-description {
    color: #666;
    margin-bottom: 40px;
}

.breadcrumb-box {
    color: #666;
    font-size: 15px;
    margin-bottom: 20px;
}

.breadcrumb-box a {
    color: #0d6efd;
    text-decoration: none;
}

/* ==========================
   CARDS DE CATEGORIA
========================== */

.categoria-card,
.subcategoria-card,
.tutorial-card {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    height: 100%;
    display: block;
    color: #333;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.categoria-card:hover,
.subcategoria-card:hover,
.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

/* ==========================
   ÍCONES
========================== */

.categoria-icon,
.subcategoria-icon,
.tutorial-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    border-radius: 15px;
    background: #eef5ff;
    color: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.categoria-icon {
    background: #e9f2ff;
    font-size: 28px;
}

.subcategoria-icon,
.tutorial-icon {
    font-size: 26px;
}

/* ==========================
   TEXTOS DOS CARDS
========================== */

.categoria-title,
.subcategoria-title,
.tutorial-title {
    font-size: 22px;
    font-weight: bold;
}

.categoria-title,
.subcategoria-title {
    margin-bottom: 10px;
}

.tutorial-title {
    margin-bottom: 15px;
    line-height: 1.4;
}

.categoria-info,
.subcategoria-info {
    color: #777;
    font-size: 15px;
}

.tutorial-info {
    color: #777;
    font-size: 14px;
}

.tutorial-meta {
    color: #777;
    font-size: 14px;
}

/* ==========================
   TUTORIAIS
========================== */

.tutorial-card {
    position: relative;
    overflow: hidden;
}

.tutorial-arrow {
    position: absolute;
    right: 25px;
    bottom: 25px;
    font-size: 22px;
    color: #0d6efd;
}

.tutorial-container {
    max-width: 1100px;
    margin: auto auto 50px;
}

.tutorial-content {
    color: #333;
    font-size: 17px;
    line-height: 1.9;
}

.tutorial-content img {
    max-width: 100%;
    margin: 20px 0;
    border-radius: 10px;
}

.tutorial-content h1,
.tutorial-content h2,
.tutorial-content h3,
.tutorial-content h4 {
    margin-top: 35px;
    margin-bottom: 20px;
    font-weight: bold;
}

.tutorial-content p,
.tutorial-content ul,
.tutorial-content ol {
    margin-bottom: 20px;
}

.tutorial-content ul,
.tutorial-content ol {
    padding-left: 20px;
}

/* ==========================
   CAIXAS
========================== */

.empty-box {
    background: #fff;
    padding: 50px;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.arquivo-box {
    margin-top: 50px;
    padding: 25px;
    background: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 15px;
}

/* ==========================
   RESPONSIVO
========================== */

/* Tablets e celulares (abaixo do breakpoint md do Bootstrap) */
@media (max-width: 767.98px) {

    /* conteúdo ocupa 100% da largura, sem espaço reservado pra sidebar */
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px 15px 40px;
        margin-top: 60px;
    }

    .topbar {
        padding: 20px 0 0;
    }

    .tutorial-card {
        padding: 20px;
    }

    .logo {
        font-size: 20px;
    }

    /* títulos menores no celular pra não quebrar o layout */
    .section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 26px;
    }

    .page-description {
        margin-bottom: 25px;
    }

    /* cards de categoria/tutorial com respiro menor */
    .categoria-card,
    .subcategoria-card,
    .tutorial-card {
        padding: 18px;
    }

    .categoria-icon,
    .subcategoria-icon,
    .tutorial-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }

    .categoria-title,
    .subcategoria-title,
    .tutorial-title {
        font-size: 18px;
    }

    .empty-box {
        padding: 30px 20px;
    }

    /* tabelas: permite rolagem horizontal em vez de estourar a tela */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 14px;
    }
}

/* Celulares pequenos */
@media (max-width: 480px) {
    .page-title {
        font-size: 22px;
    }

    .section-title {
        font-size: 20px;
    }

    .categoria-icon,
    .subcategoria-icon,
    .tutorial-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}