﻿/* ESTRUTURA BASE (Desktop) */
.app-container {
    display: grid;
    grid-template-columns: 276px 1fr;
    grid-template-rows: 76px 1fr;
    gap: 0;
    height: 100vh;
    padding: 0;
    background: linear-gradient(135deg, #f8fbff 0%, #f4f7fb 55%, #f7f9fc 100%);
    transition: grid-template-columns .25s ease;
}
.app-container.sidebar-collapsed { grid-template-columns: 78px 1fr; }

.sidebar {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 0;
    box-shadow: 6px 0 30px rgba(15, 23, 42, .045);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-right: 1px solid var(--border-light);
    z-index: 1050;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    border-radius: 0;
    box-shadow: 0 1px 0 var(--border-light);
    border: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 30px;
    z-index: 900;
}
/* AtualizaÃ§Ã£o na Topbar base para espaÃ§ar os itens */
.topbar {
    justify-content: space-between; /* Altera o alinhamento para separar a busca do perfil */
    gap: 16px;
}

/* ==========================================
   NOVOS ELEMENTOS DA TOPBAR
   ========================================== */
.topbar-search {
    display: flex;
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0 16px;
    height: 40px;
    width: min(100%, 360px);
    color: var(--text-tertiary);
    transition: all 0.2s;
}

.topbar-search:focus-within {
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 3px var(--border-focus);
    color: var(--accent);
}

.topbar-search input {
    border: none;
    background: transparent;
    padding: 0 12px;
    width: 100%;
    height: 100%;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.topbar-search input::placeholder {
    color: var(--text-tertiary);
}

.search-shortcut {
    font-size: 0.7rem;
    background: var(--bg-gray-dark);
    padding: 3px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
    font-weight: 700;
    white-space: nowrap;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.topbar-brand { display: none; }
.quick-actions { display: flex; align-items: center; gap: 7px; }
.quick-actions > span { align-self: flex-start; position: absolute; margin-top: -17px; font-size: .57rem; font-weight: 800; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .06em; }
.quick-actions button { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; background: linear-gradient(180deg, #ffffff, #f8fafc); border: 1px solid #dbe3ee; border-radius: 10px; color: var(--text-secondary); font-size: .67rem; font-weight: 800; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease; box-shadow: 0 10px 20px -20px rgba(15, 23, 42, .5), inset 0 1px 0 rgba(255, 255, 255, .82); }
.quick-actions button:hover { color: var(--accent); border-color: var(--border-focus); background: linear-gradient(180deg, #ffffff, #eef6ff); transform: translateY(-1px); box-shadow: 0 14px 24px -22px rgba(15, 23, 42, .62), inset 0 1px 0 rgba(255, 255, 255, .9); }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-btn {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid #dbe3ee;
    color: var(--text-secondary);
    font-size: 1.4rem;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
    position: relative;
    box-shadow: 0 10px 20px -20px rgba(15, 23, 42, .5), inset 0 1px 0 rgba(255, 255, 255, .82);
}

.icon-btn:hover {
    background: linear-gradient(180deg, #ffffff, #eef6ff);
    color: var(--accent);
    border-color: var(--border-focus);
    transform: translateY(-1px);
    box-shadow: 0 14px 24px -22px rgba(15, 23, 42, .62), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-white);
}

.topbar-divider {
    width: 1px;
    height: 32px;
    background: var(--border-light);
}
.main-content {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    background: radial-gradient(circle at 80% 0%, rgba(219,234,254,.32), transparent 28%), linear-gradient(135deg, #f8fbff, #f5f7fb);
    border-radius: 0;
    box-shadow: none;
    padding: 22px 28px 36px;
    overflow-y: auto;
    border: 0;
}
.notification-badge[hidden] { display: none; }
.notification-wrapper { position: relative; }
.notification-panel { position: absolute; top: calc(100% + 12px); right: 0; z-index: 1400; width: min(390px, calc(100vw - 24px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 18px; background: rgba(255,255,255,.99); box-shadow: 0 24px 60px rgba(15,23,42,.22); opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.notification-panel.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.notification-panel-header { padding: 15px 15px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #eef2f7; }
.notification-panel-header > div { display: grid; gap: 3px; }
.notification-panel-header strong { color: #0f172a; font-size: .95rem; }
.notification-panel-header small { color: #64748b; font-size: .7rem; }
.notification-panel-header button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; background: #f1f5f9; color: #475569; font-size: 1.1rem; cursor: pointer; }
.notification-list { padding: 10px; display: grid; gap: 9px; overflow-y: auto; overscroll-behavior: contain; }
.notification-empty { padding: 28px 18px; display: grid; place-items: center; gap: 8px; color: #64748b; text-align: center; font-size: .78rem; }
.notification-empty i { font-size: 1.8rem; color: #22c55e; }
.budget-notification { padding: 12px; display: grid; gap: 10px; border: 1px solid #e7edf5; border-radius: 14px; background: #f8fafc; }
.budget-notification-head { display: flex; align-items: flex-start; gap: 10px; }
.budget-notification-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: #fff7ed; color: #ea580c; font-size: 1.05rem; }
.budget-notification-copy { min-width: 0; display: grid; gap: 3px; }
.budget-notification-copy strong { overflow: hidden; color: #1e293b; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.budget-notification-copy small { color: #64748b; font-size: .69rem; }
.budget-notification-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.budget-notification-actions button { min-height: 32px; padding: 5px; border: 0; border-radius: 9px; color: #fff; font: inherit; font-size: .63rem; font-weight: 800; cursor: pointer; }
.budget-notification-actions .approve { background: #16a34a; }
.budget-notification-actions .analysis { background: #d97706; }
.budget-notification-actions .reject { background: #dc2626; }

.main-content > .tab-pane {
    width: 100%;
    max-width: 1480px;
    margin-inline: auto;
}

.btn-new-budget {
    height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    box-shadow: 0 16px 30px -18px rgba(37, 99, 235, 0.8);
}

/* Oculta todas as seções do site por padrão */
.tab-pane {
    display: none;
}

/* Mostra apenas a seção que tiver a classe 'active' */
.tab-pane.active {
    display: block; 
}
