/* ==================== TRUEBLOCKER - ESTILO ESTÁVEL ORIGINAL ==================== */

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

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

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    background: var(--bg-sidebar-solid);
    padding: 20px;
    padding-bottom: 100px;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    margin-bottom: 30px;
}

.sidebar-header h2 {
    color: var(--color-secondary);
    font-size: 24px;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section h3 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 8px;
    color: var(--white-80);
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item:hover {
    background: var(--purple-500-10);
    color: var(--accent-secondary);
}

.nav-item.active {
    background: var(--purple-500-20);
    color: var(--accent-secondary);
}

/* SIDEBAR FOOTER */
.sidebar-footer {
    padding: 16px;
    border-top: 2px solid var(--glass-border);
    margin-top: auto;
    background: var(--sidebar-footer-bg);
    backdrop-filter: blur(20px);
    flex-shrink: 0;
}

/* Esconder todos elementos extras no footer, manter apenas logout */
.sidebar-footer > *:not(.btn-logout-sidebar) {
    display: none !important;
}

.btn-logout-sidebar {
    width: 100%;
    padding: 12px;
    background: var(--red-500-10);
    border: 1px solid var(--red-500-30);
    border-radius: 8px;
    color: var(--error);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-logout-sidebar:hover {
    background: var(--red-500-20);
    border-color: var(--red-500-50);
}

/* ==================== HEADER ==================== */

.header {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 70px;
    background: var(--surface-dark-80);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--white-05);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 90;
}

/* ==================== MAIN CONTENT ==================== */

.main-container {
    margin-left: 260px;
    padding: 24px;
    padding-top: 94px;
    min-height: 100vh;
}

/* ==================== SEÇÕES ==================== */

.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* ==================== CARDS COM GLASSMORPHISM ==================== */

.card,
.protecao-card,
.blindagem-card,
.resource-card {
    background: rgba(var(--glass-rgb), 1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title,
.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.card-content {
    color: var(--text-secondary);
}

.card-description {
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ==================== STATUS BADGE ==================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== BOTÕES PROPORCIONAIS ==================== */

button,
.btn {
    padding: 10px 20px;
    background: var(--color-secondary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* FRIEND-BATCH #6: o `transform: translateY(-1px)` saiu daqui.
   Especificidade (0,1,1). As escotilhas .btn-icon / .btn-plain / .btn-block
   ficam FORA da regra generica do dashboard.css — logo nunca recebem o
   `transform: none` de la — e as regras proprias delas nao declaram transform.
   Resultado: era ESTA linha que ainda levantava as lixeiras, o recarregar da
   Pilula, os botoes do amigo e o Salvar do perfil. Efeito colateral das
   escotilhas que so apareceu depois. */
button:hover,
.btn:hover {
    background: var(--accent-primary);
}

button:active,
.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--white-05);
    border: 1px solid var(--glass-border);
    color: var(--white-90);
}

.btn-secondary:hover {
    background: var(--input-bg);
}

/* ==================== INPUTS ==================== */

input,
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    background: var(--white-05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: white;
    font-size: 14px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: var(--input-bg);
}

input::placeholder {
    color: var(--white-40);
}

/* ==================== BOTTOM NAV (MOBILE) - ESCONDER ==================== */

.bottom-nav {
    display: none !important;
}

/* ==================== SWITCHES (TOGGLES) ==================== */

.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
}

.toggle-switch.active {
    background: var(--color-secondary);
}

.toggle-switch.active::after {
    left: 26px;
}

/* ==================== GRID ORGANIZADO ==================== */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* ==================== LISTAS ==================== */

.list-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--white-05);
    border-radius: 8px;
}

/* ==================== INPUT GROUPS ==================== */

.list-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.list-input-group input {
    flex: 1;
}

.list-input-group button {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ==================== ESTATÍSTICAS ==================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(var(--glass-rgb), 1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 16px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--white-60);
}

/* ==================== MODAIS ==================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-black-80);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: var(--bg-sidebar-solid);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
}

.modal-title {
    font-size: 20px;
    margin-bottom: 16px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-container {
        margin-left: 0;
        padding: 16px;
        padding-top: 86px;
    }
    
    .header {
        left: 0;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== UTILITÁRIOS ==================== */

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 16px;
}

.mb-4 {
    margin-bottom: 24px;
}

.hidden {
    display: none !important;
}
