/* HIVE MKT 360 — Base: reset, scrollbar, login, layout, sidebar e topbar */

html,
body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    font-size: 14px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.015em;
}

/* ─── GLOBAL SCROLLBAR REFINEMENT ─── */
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 10px;
    transition: var(--transition-fast);
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

body.dark-mode *::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode *::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.5s ease;
}

.login-card {
    background: var(--color-1);
    padding: 48px 40px;
    border-radius: var(--r-surface);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 380px;
    text-align: center;
    border: 1px solid var(--color-2);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--color-4), var(--color-5));
}

.login-logo {
    height: 36px;
    object-fit: contain;
    margin-bottom: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.login-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 32px;
    font-weight: 500;
}

.login-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--r-control);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    background: rgba(0, 0, 0, 0.2);
    color: #ffffff;
    transition: var(--transition-fast);
}

.login-input:focus {
    box-shadow: 0 0 0 3px rgba(248, 198, 48, 0.2);
    border-color: var(--color-5);
    background: rgba(0, 0, 0, 0.4);
}

.btn-login {
    width: 100%;
    background: var(--color-5);
    color: var(--color-1);
    border: none;
    padding: 14px;
    border-radius: var(--r-control);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(248, 198, 48, 0.25);
    transition: var(--transition-fast);
    margin-top: 12px;
    text-transform: uppercase;
}

.btn-login:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(248, 198, 48, 0.35);
}

.btn-login:active {
    transform: scale(0.98);
}

.login-error-msg {
    color: #ffffff;
    background: rgba(229, 79, 109, 0.9);
    padding: 12px;
    border-radius: var(--r-control);
    font-size: 13px;
    font-weight: 600;
    margin-top: 20px;
    display: none;
    border: 1px solid var(--color-4);
}

.app-layout {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    border-right: none;
    z-index: 200;
    margin: 16px;
    border-radius: var(--r-surface);
    height: calc(100% - 32px);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--sidebar-divider);
    white-space: nowrap;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-logo {
    height: 28px;
    max-width: 140px;
    object-fit: contain;
    transition: opacity 0.2s;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.1));
}

.sidebar.collapsed .sidebar-header {
    padding: 0;
    justify-content: center;
}

.sidebar.collapsed .sidebar-logo {
    display: none;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    font-size: 22px;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--r-control);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text-hover);
}

.sidebar-nav {
    padding: 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 11px;
    color: var(--sidebar-title);
    text-transform: uppercase;
    font-weight: 600;
    margin: 24px 0 8px 12px;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: var(--r-control);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    flex-shrink: 0;
    width: 100%;
    text-align: left;
}

.nav-item i {
    font-size: 20px;
    min-width: 20px;
    text-align: center;
    transition: var(--transition-fast);
}

.nav-item:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text-hover);
}

.nav-item.active {
    /* Era um bloco amarelo cheio - a mesma cor do chip "aguardando aprovacao"
       que aparece do lado, no Painel. Agora o amarelo e so um trilho fino. */
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--color-5);
}

.btn-logout {
    margin-top: auto;
    color: #ef4444;
    border: 1px solid transparent;
    background: transparent;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    pointer-events: none;
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    margin-top: 12px;
}

.nav-divider {
    height: 1px;
    background: var(--sidebar-divider);
    margin: 16px 8px;
    flex-shrink: 0;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.topbar {
    height: 72px;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 100;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-light);
}

.page-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-surface);
    padding: 6px 8px;
    border-radius: var(--r-surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.month-selector button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    border-radius: var(--r-control);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.month-selector button:hover {
    background: var(--hover-bg);
    color: var(--color-2);
}

.month-selector span {
    font-size: 14px;
    font-weight: 700;
    min-width: 130px;
    text-align: center;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

/* O filtro de Analista da Visao Geral vive no topbar, colado no seletor de
   mes. Os dois recortam a MESMA tela - um diz de quem, o outro diz quando -
   e deixar um no topo e o outro no corpo fazia parecer que eram controles de
   naturezas diferentes.

   .topbar-acoes existe porque .topbar e justify-content: space-between: dois
   irmaos soltos a direita se espalhariam pela linha em vez de ficarem lado a
   lado. Agrupados, a topbar volta a ter dois lados, como sempre teve.

   O bloco do filtro em si e .filters-container + .topbar-filtro, e as
   regras dele estao em components.css, junto do componente que modificam:
   aqui elas perderiam a queda de braco por padding com .filters-container,
   que tem a mesma especificidade e e carregado depois. */
.topbar-acoes {
    display: flex;
    align-items: center;
    gap: 16px;
}

.views-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 40px 40px 40px;
    display: flex;
    flex-direction: column;
}

.view-content {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.view-content.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

