/* assets/css/manager.css */
:root {
    /* --- PALETA CORPORATE NAVY --- */
    --primary-color: #1e3a8a; 
    --primary-hover: #1e40af; 
    
    /* Fundos */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    
    /* Sidebar */
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-text-hover: #ffffff;
    --sidebar-active: #1e293b;
    
    /* Textos */
    --text-main: #334155;
    --text-muted: #64748b;
    
    /* Bordas e Status */
    --border-color: #e2e8f0;
    --danger-color: #ef4444;
    --success-color: #10b981;

    /* Cores de Widget (Auxiliares) */
    --color-info: #0ea5e9;
    --color-warning: #f59e0b;
    --color-dark: #334155;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    --radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 0.95rem;
}

/* ... (LAYOUT DASHBOARD, SIDEBAR, MAIN CONTENT, TOPBAR mantidos igual ao anterior) ... */
.app-container { display: flex; min-height: 100vh; width: 100%; position: relative; }
.sidebar { width: var(--sidebar-width); background-color: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; position: fixed; height: 100vh; left: 0; top: 0; z-index: 50; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 4px 0 24px rgba(0,0,0,0.2); border-right: 1px solid rgba(255,255,255,0.05); }
body.sidebar-closed .sidebar { transform: translateX(-100%); }
.sidebar-header { height: var(--header-height); display: flex; align-items: center; padding: 0 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.05); background-color: rgba(0,0,0,0.1); }
.brand { font-size: 1.25rem; font-weight: 700; color: #fff; letter-spacing: -0.5px; display: flex; align-items: center; gap: 12px; }
.sidebar-content { padding: 1.5rem 1rem; flex: 1; overflow-y: auto; }
.sidebar-content::-webkit-scrollbar { width: 5px; }
.sidebar-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
.sidebar-content::-webkit-scrollbar-track { background: transparent; }
.menu-block { margin-bottom: 2rem; }
.menu-block-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; color: #475569; margin-bottom: 0.75rem; padding-left: 0.75rem; }
.menu-group { margin-bottom: 0.5rem; }
.menu-label { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; font-size: 0.9rem; font-weight: 500; color: var(--sidebar-text); cursor: pointer; transition: all 0.2s ease; border-radius: var(--radius); }
.menu-label:hover { color: var(--sidebar-text-hover); background-color: rgba(255,255,255,0.08); }
.label-content { display: flex; align-items: center; gap: 12px; }
.label-content i { width: 18px; text-align: center; font-size: 1rem; opacity: 0.8; }
.arrow-icon { font-size: 0.7rem; transition: transform 0.3s ease; opacity: 0.6; }
.menu-label.active { color: #fff; background-color: rgba(255,255,255,0.03); }
.menu-label.active .arrow-icon { transform: rotate(90deg); }
.submenu-wrapper { max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.submenu-wrapper.open { max-height: 500px; }
.menu-subitem { display: flex; align-items: center; padding: 0.65rem 1rem 0.65rem 3.2rem; font-size: 0.9rem; color: var(--sidebar-text); text-decoration: none; border-radius: var(--radius); transition: all 0.2s; margin-top: 2px; border-left: 3px solid transparent; }
.menu-subitem:hover { color: var(--sidebar-text-hover); background-color: rgba(255,255,255,0.05); }
.menu-subitem.active { background-color: var(--primary-color); color: white; font-weight: 600; border-left-color: #60a5fa; }
.menu-subitem.single-item { padding-left: 1rem; margin-top: 0; gap: 12px; }
.menu-subitem.single-item i { width: 18px; text-align: center; }
.main-wrapper { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-width: 0; transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
body.sidebar-closed .main-wrapper { margin-left: 0; }
.topbar { height: var(--header-height); background: var(--bg-card); display: flex; align-items: center; justify-content: space-between; padding: 0 2rem; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03); position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--border-color); }
.toggle-sidebar-btn { background: transparent; border: 1px solid var(--border-color); font-size: 1rem; color: var(--text-muted); cursor: pointer; padding: 0.5rem; border-radius: var(--radius); transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.toggle-sidebar-btn:hover { background-color: var(--bg-body); color: var(--primary-color); border-color: var(--primary-color); }
.mobile-only { display: none; }
.content-body { padding: 2rem; animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1); }

/* ... (DROPDOWN MENU mantido) ... */
.dropdown { position: relative; }
.dropdown-trigger { cursor: pointer; display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0.75rem; border-radius: var(--radius); transition: background 0.2s; border: 1px solid transparent; }
.dropdown-trigger:hover { background-color: var(--bg-body); border-color: var(--border-color); }
.dropdown-content { display: block !important; visibility: hidden; opacity: 0; position: absolute; right: 0; top: 100% !important; margin-top: 8px; background-color: var(--bg-card); min-width: 200px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); border-radius: var(--radius); border: 1px solid var(--border-color); z-index: 100; transition: visibility 0s linear 0.3s, opacity 0.3s ease, transform 0.3s ease; transform: translateY(-10px); }
.dropdown:hover .dropdown-content { visibility: visible; opacity: 1; transition-delay: 0s; transform: translateY(0); }
.dropdown-content::before { content: ''; position: absolute; top: -20px; left: 0; width: 100%; height: 20px; display: block; background: transparent; }
.dropdown-item { padding: 12px 16px; display: flex; align-items: center; color: var(--text-main); text-decoration: none; font-size: 0.9rem; transition: all 0.1s; font-weight: 500; }
.dropdown-item:hover { background-color: var(--bg-body); color: var(--primary-color); padding-left: 20px; }

/* ... (COMPONENTES UI) ... */
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.card { background: var(--bg-card); padding: 1.75rem; border-radius: 12px; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.01); border: 1px solid var(--border-color); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05); }
.card h3 { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 0.5rem; }
.card .value { font-size: 2.25rem; font-weight: 700; color: var(--sidebar-bg); letter-spacing: -1px; }

/* =========================================
   WIDGET DE LINKS (NOVO ESTILO)
   ========================================= */
.widget-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.widget-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.widget-btn i {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.widget-btn span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Hover Effects */
.widget-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    border-color: currentColor; /* Borda assume a cor do texto/ícone */
}

/* Variações de Cores (Classes dinâmicas) */
.widget-btn.btn-primary:hover { color: var(--primary-color); }
.widget-btn.btn-primary:hover i { color: var(--primary-color); }

.widget-btn.btn-success:hover { color: var(--success-color); }
.widget-btn.btn-success:hover i { color: var(--success-color); }

.widget-btn.btn-danger:hover { color: var(--danger-color); }
.widget-btn.btn-danger:hover i { color: var(--danger-color); }

.widget-btn.btn-warning:hover { color: var(--color-warning); }
.widget-btn.btn-warning:hover i { color: var(--color-warning); }

.widget-btn.btn-info:hover { color: var(--color-info); }
.widget-btn.btn-info:hover i { color: var(--color-info); }


/* ... (Outros componentes mantidos) ... */
.login-container { background: var(--bg-card); padding: 3rem; border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); width: 100%; max-width: 400px; margin: auto; border: 1px solid var(--border-color); }
body:not(.dashboard-body) { display: flex; justify-content: center; align-items: center; background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; color: var(--text-main); }
.form-input { width: 100%; padding: 0.875rem 1rem; border: 1px solid var(--border-color); border-radius: var(--radius); font-size: 0.95rem; transition: all 0.2s; background-color: #fff; color: var(--text-main); }
.form-input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1); }
.btn-primary { width: 100%; padding: 0.875rem; background-color: var(--primary-color); color: white; border: none; border-radius: var(--radius); font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.2s; display: flex; justify-content: center; align-items: center; gap: 10px; box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2); }
.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 8px -1px rgba(30, 58, 138, 0.3); }
.btn-secondary { background: #fff; color: var(--text-main); padding: 0.75rem 1.5rem; border: 1px solid var(--border-color); border-radius: var(--radius); cursor: pointer; font-weight: 600; transition: all 0.2s; }
.btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-group { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(15, 23, 42, 0.6); align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal.show { display: flex; animation: fadeIn 0.2s ease-out; }
.modal-content { background-color: var(--bg-card); padding: 2.5rem; border-radius: 16px; width: 90%; max-width: 480px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); border: 1px solid var(--border-color); }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 2rem; align-items: center; }
.modal-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--sidebar-bg); }
.close-modal { background: #f1f5f9; border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.close-modal:hover { background: #e2e8f0; color: var(--danger-color); }
.table-container { padding: 0; overflow-x: auto; border-radius: 12px; border: 1px solid var(--border-color); }
.custom-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.custom-table th { background-color: #f8fafc; color: var(--text-muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border-color); }
.custom-table td { padding: 1.25rem 1.5rem; font-size: 0.9rem; color: var(--text-main); border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.custom-table tr:last-child td { border-bottom: none; }
.custom-table tr:hover { background-color: #f8fafc; }
.btn-icon { background: transparent; border: 1px solid transparent; color: var(--text-muted); cursor: pointer; padding: 6px; border-radius: 6px; transition: all 0.2s; }
.btn-icon:hover { color: var(--primary-color); background-color: #eff6ff; border-color: #dbeafe; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 0.8s linear infinite; display: none; margin-left: 8px; }
.btn-loading .spinner { display: inline-block; }
.btn-loading span { opacity: 0.7; }
.alert { padding: 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 0.9rem; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.alert-danger { background-color: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 768px) { .mobile-only { display: block; } .sidebar { transform: translateX(-100%); width: 260px; } .main-wrapper { margin-left: 0; width: 100%; } body.sidebar-mobile-active .sidebar { transform: translateX(0); } body.sidebar-mobile-active::before { content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.5); z-index: 45; backdrop-filter: blur(2px); } }

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    min-width: 300px;
    padding: 1rem 1.25rem;
    background-color: #fff;
    border-left: 5px solid;
    border-radius: 8px; /* Arredondado */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.3s, transform 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.toast.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Cores por Tipo */
.toast-success { border-color: var(--success-color); }
.toast-success i { color: var(--success-color); margin-right: 12px; font-size: 1.1rem; }

.toast-error { border-color: var(--danger-color); }
.toast-error i { color: var(--danger-color); margin-right: 12px; font-size: 1.1rem; }

.toast-warning { border-color: var(--color-warning); }
.toast-warning i { color: var(--color-warning); margin-right: 12px; font-size: 1.1rem; }

.toast-info { border-color: var(--color-info); }
.toast-info i { color: var(--color-info); margin-right: 12px; font-size: 1.1rem; }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}