/* ============================================================
   global.css — Estilos compartilhados entre todas as páginas
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:    #0d1b2e;
    --navy2:   #132237;
    --accent:  #1565c0;
    --accent2: #1976d2;
    --red:     #c0392b;
    --white:   #ffffff;
    --gray:    #f4f6f9;
    --text:    #1a2636;
    --muted:   #7a8fa6;
    --border:  #dde3ec;
    --green:   #27ae60;
    --orange:  #e67e22;
    --warn:    #e67e22;
    --success: #27ae60;
}

body { font-family: 'Nunito', sans-serif; background: var(--gray); display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar { width: 190px; min-height: 100vh; background: var(--navy); display: flex; flex-direction: column; flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; }
.sidebar-logo { padding: 20px 16px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.logo-box { background: var(--accent); border-radius: 10px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
.logo-box svg { width: 22px; height: 22px; fill: white; flex-shrink: 0; }
.logo-box span { font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.2; }
.sidebar-user { padding: 20px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.avatar, .user-avatar { width: 48px; height: 48px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.avatar svg, .user-avatar svg { width: 28px; height: 28px; fill: rgba(255,255,255,0.7); }
.sidebar-user p, .user-name { font-size: 13px; color: rgba(255,255,255,0.6); text-align: center; }
.sidebar-user strong, .user-name strong { color: white; font-size: 13px; }
.user-role { text-align: center; font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 2px; text-transform: uppercase; letter-spacing: 1px; }
.sidebar-nav { flex: 1; padding: 16px 0; display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: rgba(255,255,255,0.65); font-size: 13px; font-weight: 600; cursor: pointer; border: none; background: none; width: 100%; text-align: left; text-decoration: none; transition: background 0.15s, color 0.15s; border-left: 3px solid transparent; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,0.07); color: white; border-left-color: var(--accent); }
.nav-item svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,0.08); margin-top: auto; }
.btn-sair { width: 100%; padding: 11px; background: var(--red); color: white; font-family: 'Rajdhani', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; border: none; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: opacity 0.2s; }
.btn-sair:hover { opacity: 0.85; }
.btn-sair svg { width: 16px; height: 16px; fill: white; }

/* ── MAIN / TOPBAR ── */
.main { margin-left: 190px; flex: 1; display: flex; flex-direction: column; }
.topbar { background: white; border-bottom: 2px solid var(--navy); padding: 0 32px; height: 60px; display: flex; align-items: center; justify-content: flex-end; }
.topbar-title { font-family: 'Rajdhani', sans-serif; font-size: 26px; font-weight: 700; color: var(--navy); letter-spacing: 1px; display: flex; align-items: center; gap: 12px; }
.topbar-title svg { width: 36px; height: 36px; background: var(--navy); fill: white; border-radius: 50%; padding: 7px; }
.content { padding: 24px 28px; }

/* ── TOAST DE NOTIFICAÇÃO ── */
#toast-container { position: fixed; bottom: 28px; right: 28px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 10px; background: white; box-shadow: 0 8px 32px rgba(0,0,0,0.15); font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 600; color: var(--text); min-width: 280px; max-width: 380px; border-left: 4px solid var(--accent); pointer-events: auto; animation: toastIn 0.3s ease; }
.toast.sucesso { border-left-color: var(--green); }
.toast.erro    { border-left-color: var(--red); }
.toast.aviso   { border-left-color: var(--warn); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-msg  { flex: 1; }
.toast.saindo { animation: toastOut 0.3s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }

/* ── LOADING / VAZIO ── */
.loading { text-align: center; padding: 40px; color: var(--muted); font-size: 14px; }
.vazio   { text-align: center; padding: 30px; color: var(--muted); font-size: 13px; }

/* ── Avisos do sistema ── */
.avisos-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.aviso-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fdf6f6;
    border: 1.5px solid #f59e0b;
    border-left: 4px solid #f59e0b;
    border-radius: 10px;
    padding: 12px 16px;
    animation: toastIn 0.3s ease;
}

.aviso-icon {
    font-size: 30px;
    flex-shrink: 0;
    margin-top: 1px;
}

.aviso-conteudo {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.aviso-texto {
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    line-height: 1.4;
    margin: 0;
}

.aviso-meta {
    font-size: 11px;
    color: #b45309;
    font-weight: 500;
}