/* === LAYOUT PRINCIPAL === */
.container {
    display: none;
}

.container[style*="display: block"] {
    display: block !important;
    animation: fadeIn 0.3s ease-in-out;
}

.view-active {
    display: block !important;
}

.main{
    margin-left:78px;
    transition:margin-left .2s ease;
    min-height:100vh;
    overflow-y:auto;
}

.sidebar:hover + .main {
    margin-left:260px;
}

.page{padding:18px;padding-bottom:60px}

/* === SIDEBAR === */
.sidebar {
  position:fixed;left:0;top:0;bottom:0;width:78px;
  background:#0c0d10;border-right:1px solid rgba(255,255,255,.06);
  padding:14px 10px;display:flex;flex-direction:column;gap:12px;
  z-index:1000;transition:width .2s ease;
  overflow:hidden;
  scrollbar-width:none;
}

.sidebar:hover{
  width:260px;
  overflow:auto;
}

.sidebar:hover::-webkit-scrollbar{width:6px}
.sidebar:hover::-webkit-scrollbar-thumb{background:rgba(255,255,255,.12);border-radius:6px}
.sidebar::-webkit-scrollbar{width:0;height:0}

/* Logo Sidebar */
.sb-top{padding:2px 0 6px}
.sb-logo{display:flex;align-items:center;gap:10px}
.logo-img{width:36px;height:36px;border-radius:8px;object-fit:cover}
.brand-text{display:flex;flex-direction:column;line-height:1.1}
.sidebar:not(:hover) .brand-text{ display:none }

/* Navegação Sidebar */
.sb-nav{display:flex;flex-direction:column;gap:6px;margin-top:8px;overflow:auto}
.sb-section{padding:8px 10px 2px;font-size:11px;color:var(--muted)}
.sb-link{
  width:100%;text-align:left;background:transparent;color:#cfd3da;border:1px solid transparent;border-radius:12px;
  padding:10px 10px;display:flex;align-items:center;gap:10px;cursor:pointer;transition:all .2s ease;
  text-decoration: none;
}
.sb-link:hover{background:#13161e;border-color:rgba(255,255,255,.06)}
.sb-link.active{background:#161a22;border-color:rgba(255,255,255,.10);color:#fff}

/* Labels Sidebar */
.sidebar .label{opacity:0;max-width:0;white-space:nowrap;overflow:hidden;transition:opacity .2s ease,max-width .2s ease}
.sidebar:hover .label{opacity:1;max-width:200px}

/* Footer Sidebar */
.sb-footer{margin-top:auto;border-top:1px solid rgba(255,255,255,.06);padding-top:10px}

/* Divisor Sidebar */
.sb-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 8px 0;
}

/* Ícones Sidebar */
.sb-link .ico {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sb-link .ico svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transition: all 0.2s ease;
}

.sb-link:hover .ico svg,
.sb-link.active .ico svg {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* === TOPBAR === */
.topbar{
    position:sticky;top:0;z-index:20;padding:14px 20px;
    background:linear-gradient(180deg,rgba(10,10,10,.95),rgba(10,10,10,.6));
    backdrop-filter:blur(6px);border-bottom:1px solid rgba(255,255,255,.06)
}

.brand{display:flex;flex-direction:column}
.badge{
    background:linear-gradient(90deg,var(--brand),var(--brand-2));
    color:#0b0b0b;
    font-weight:800;
    padding:6px 12px;
    border-radius:999px;
    float:right
}

/* === GRIDS === */
.grid{display:grid;grid-template-columns:1fr;gap:20px}
.col{display:flex;flex-direction:column;gap:20px}

@media (min-width:980px){
    .grid{grid-template-columns:1.1fr .9fr}
}

/* === RESPONSIVO === */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main {
        margin-left: 0 !important;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .dash-head {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .actions {
        width: 100%;
        justify-content: space-between;
    }
}