/* assets/css/style.css - VERSÃO FINAL PRO */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --bg-body: #f1f5f9;
    --surface: #ffffff;
    --text-main: #334155;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    font-size: 0.95rem;
}

/* --- LAYOUT --- */
.app-wrapper { display: flex; min-height: 100vh; }

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    transition: all 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-nav { flex: 1; padding: 10px; overflow-y: auto; }

.menu-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin: 20px 0 10px 15px;
    font-weight: 600;
}

/* Links do Menu */
.sidebar-nav a, .sidebar-nav .menu-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.sidebar-nav a:hover, .sidebar-nav .menu-btn:hover {
    background-color: rgba(255,255,255,0.05);
    color: white;
}

.sidebar-nav a.active {
    background-color: var(--primary);
    color: white;
}

.nav-icon-left { display: flex; align-items: center; gap: 12px; }

/* Seta do Menu Sanfona */
.arrow { font-size: 0.8rem; transition: transform 0.3s; }
.has-submenu.open .arrow { transform: rotate(180deg); }

/* Submenu */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    margin-bottom: 5px;
}
.has-submenu.open .submenu { max-height: 500px; }
.submenu a { padding-left: 45px; font-size: 0.9rem; color: #64748b; }
.submenu a:hover { color: white; }
.submenu a.active { color: white; font-weight: 700; background: transparent; }

/* Footer da Sidebar */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logout-btn { color: #ef4444; font-size: 1.1rem; }

/* --- CONTEÚDO --- */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    background-color: var(--bg-body);
}

.mobile-header { display: none; }

/* --- COMPONENTES VISUAIS --- */
.action-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
h1 { font-size: 1.8rem; font-weight: 700; color: #1e293b; margin: 0; }

.card, .category-section {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.card-title, .category-title {
    font-size: 1.1rem; font-weight: 600; color: #1e293b; margin-top: 0; margin-bottom: 20px;
    border-bottom: 1px solid var(--border); padding-bottom: 10px;
}

/* Tabelas */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { background-color: #f8fafc; color: #64748b; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; }
td { padding: 16px; border-bottom: 1px solid var(--border); color: var(--text-main); vertical-align: middle; }
tr:last-child td { border-bottom: none; }

/* Botões */
.btn {
    display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px;
    border-radius: 8px; font-weight: 500; text-decoration: none; border: none; cursor: pointer;
    font-family: 'Inter', sans-serif; font-size: 0.9rem; gap: 8px;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-secondary { background-color: white; color: var(--text-main); border: 1px solid var(--border); }
.btn-danger { background-color: #fee2e2; color: #ef4444; }

/* Inputs */
input, select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px;
    font-family: 'Inter', sans-serif; background: #fff;
}

/* Status */
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-block; }
.icon-circle { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* Mobile */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 20px; margin-top: 60px; }
    .mobile-header { display: flex; justify-content: space-between; align-items: center; background: var(--sidebar-bg); color: white; padding: 15px 20px; position: fixed; top: 0; left: 0; right: 0; z-index: 90; }
    .mobile-header button { background: none; border: none; color: white; font-size: 1.2rem; }
}