/* =============================================
   SISTEMA LICO LICO V2 - CSS PREMIUM RESPONSIVO
   ============================================= */
:root {
    --bg: #020617;
    --bg-card: #0f172a;
    --bg-sidebar: #020c1b;
    --bg-input: #020617;
    --border: #1e293b;
    --border-hover: #334155;
    --text: #e2e8f0;
    --text-muted: #64748b;
    --text-white: #ffffff;
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #22c55e;
    --success-dark: #16a34a;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --info: #3b82f6;
    --info-dark: #2563eb;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);
    --transition: all 0.25s ease;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: var(--primary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text-white); }

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    padding: 20px 16px;
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    transition: transform 0.3s ease;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar .logo {
    color: var(--text-white);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    padding: 0 8px;
}
.sidebar .logo span {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}
.menu-title {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 24px;
    margin-bottom: 8px;
    padding: 0 10px;
}
.sidebar .menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 2px;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
}
.sidebar .menu a:hover {
    background: rgba(99,102,241,0.12);
    color: var(--text-white);
    transform: translateX(4px);
}
.sidebar .menu a.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}
.menu-toggle {
    display: none;
    position: fixed;
    top: 14px; left: 14px;
    z-index: 1100;
    background: var(--primary);
    border: none;
    color: #fff;
    width: 42px; height: 42px;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow);
    align-items: center;
    justify-content: center;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999;
}

/* MAIN + TOPBAR */
.main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}
.topbar {
    height: var(--topbar-height);
    background: rgba(15,23,42,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar .empresa-info { display: flex; align-items: center; gap: 12px; }
.topbar .empresa-info img { height: 40px; border-radius: 8px; }
.topbar .empresa-info .nome { font-weight: 600; font-size: 16px; color: var(--text-white); }
.topbar .empresa-info .sub { font-size: 12px; color: var(--text-muted); }
.topbar .user-info { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); }
.topbar .user-info .user-name { color: var(--text); font-weight: 500; }
.topbar .user-info .btn-sair {
    color: var(--danger); font-weight: 600;
    padding: 6px 14px; border-radius: 8px;
    border: 1px solid rgba(239,68,68,0.3);
    transition: var(--transition);
}
.topbar .user-info .btn-sair:hover { background: rgba(239,68,68,0.15); }

/* CONTENT */
.content { padding: 24px; max-width: 1400px; }

/* PAGE HEADER */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px; flex-wrap: wrap; gap: 16px;
}
.page-header h2 { font-size: 22px; font-weight: 700; color: var(--text-white); margin: 0; }
.page-header .subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* CARDS PREMIUM */
.card-premium {
    background: linear-gradient(145deg, var(--bg-card), #0a0f1e);
    padding: 24px; border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 20px;
}
.card-premium:hover { border-color: var(--border-hover); box-shadow: var(--shadow-lg); }
.card-premium .card-title {
    font-size: 14px; font-weight: 600; color: var(--text-muted);
    margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;
}
.card-premium .card-value { font-size: 28px; font-weight: 700; color: var(--text-white); }

/* CARDS KPI */
.card-kpi {
    padding: 20px 24px; border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative; overflow: hidden;
}
.card-kpi::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; }
.card-kpi:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-kpi.green { background: linear-gradient(145deg, #0a1f0f, #0f172a); }
.card-kpi.green::before { background: var(--success); }
.card-kpi.red { background: linear-gradient(145deg, #1f0a0a, #0f172a); }
.card-kpi.red::before { background: var(--danger); }
.card-kpi.yellow { background: linear-gradient(145deg, #1f1a0a, #0f172a); }
.card-kpi.yellow::before { background: var(--warning); }
.card-kpi.blue { background: linear-gradient(145deg, #0a0f1f, #0f172a); }
.card-kpi.blue::before { background: var(--info); }
.card-kpi.purple { background: linear-gradient(145deg, #150a1f, #0f172a); }
.card-kpi.purple::before { background: var(--primary); }
.card-kpi .kpi-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.card-kpi .kpi-value { font-size: 24px; font-weight: 700; color: var(--text-white); }
.card-kpi .kpi-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* GRIDS */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }

/* TABELAS */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-premium { width: 100%; border-collapse: collapse; color: var(--text); }
.table-premium thead th {
    background: rgba(2,6,23,0.8); padding: 14px 16px; text-align: left;
    font-size: 12px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border);
}
.table-premium tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.table-premium tbody tr { transition: var(--transition); }
.table-premium tbody tr:hover { background: rgba(99,102,241,0.05); }
.table-premium .text-end { text-align: right; }
.table-premium .text-center { text-align: center; }

/* BADGES */
.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.3px; }
.badge-pago { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-pendente { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-vencido { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-cancelado { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.badge-ativo { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-inativo { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-mensal { background: rgba(99,102,241,0.15); color: var(--primary-light); }
.badge-entrada { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-saida { background: rgba(239,68,68,0.15); color: var(--danger); }

/* INPUTS */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 12px; font-weight: 600; color: var(--text-muted);
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
input, select, textarea {
    width: 100%; padding: 11px 14px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg-input);
    color: var(--text-white); font-size: 14px;
    transition: var(--transition); font-family: inherit;
}
input:hover, select:hover, textarea:hover { border-color: var(--border-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
textarea { min-height: 80px; resize: vertical; }

/* BOTOES */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; border-radius: 10px; border: none;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: var(--transition); text-decoration: none;
    font-family: inherit; line-height: 1.4; color: #fff;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); color: #fff; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.btn-success { background: linear-gradient(135deg, var(--success), var(--success-dark)); }
.btn-danger { background: linear-gradient(135deg, var(--danger), var(--danger-dark)); }
.btn-warning { background: linear-gradient(135deg, var(--warning), var(--warning-dark)); }
.btn-info { background: linear-gradient(135deg, var(--info), var(--info-dark)); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-card); border-color: var(--border-hover); }
.btn-novo { background: linear-gradient(135deg, var(--success), #059669); }
.btn-salvar { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; padding: 10px 22px; border-radius: 10px; border: none; cursor: pointer; font-weight: 600; transition: var(--transition); }
.btn-salvar:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(99,102,241,0.4); }

/* FILTROS */
.filtros-bar {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
    margin-bottom: 20px; padding: 16px 20px;
    background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border);
}
.filtros-bar .form-group { margin-bottom: 0; min-width: 150px; flex: 1; }
.filtros-bar .form-group label { font-size: 11px; margin-bottom: 4px; }
.filtros-bar input, .filtros-bar select { padding: 9px 12px; font-size: 13px; }

/* PAGINACAO */
.paginacao { display: flex; justify-content: center; gap: 6px; margin-top: 20px; }
.paginacao a, .paginacao span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px;
    font-size: 13px; font-weight: 500; color: var(--text-muted);
    background: var(--bg-card); border: 1px solid var(--border); transition: var(--transition);
}
.paginacao a:hover, .paginacao .ativo { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ALERTAS */
.alerta { padding: 14px 20px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.alerta-sucesso { background: rgba(34,197,94,0.1); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.alerta-erro { background: rgba(239,68,68,0.1); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.alerta-aviso { background: rgba(245,158,11,0.1); color: var(--warning); border: 1px solid rgba(245,158,11,0.2); }
.alerta-info { background: rgba(59,130,246,0.1); color: var(--info); border: 1px solid rgba(59,130,246,0.2); }

/* FOTO */
.foto-upload { display: flex; align-items: center; gap: 20px; }
.foto-upload img { width: 100px; height: 130px; object-fit: cover; border-radius: 10px; border: 2px solid var(--border); }

/* UTILITARIOS */
.text-white { color: var(--text-white) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.d-flex { display: flex; } .flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; } .justify-between { justify-content: space-between; }
.w-100 { width: 100%; } .gap-10 { gap: 10px; } .gap-16 { gap: 16px; }

/* RESPONSIVO */
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 992px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
    .menu-toggle { display: flex; }
    .main { margin-left: 0; }
    .topbar { padding-left: 64px; }
    .content { padding: 16px; }
    .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .filtros-bar { flex-direction: column; }
    .filtros-bar .form-group { width: 100%; }
    .card-kpi .kpi-value { font-size: 20px; }
}
@media (max-width: 480px) {
    .topbar .empresa-info .nome { font-size: 14px; }
    .topbar .empresa-info .sub { display: none; }
    .topbar .user-info .user-name { display: none; }
}
/* =============================================
   MENU ACCORDION
   ============================================= */

.menu-group{
    margin-bottom:4px;
}

.menu-header{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:10px 12px;

    border-radius:10px;

    cursor:pointer;

    color:var(--text-muted);

    font-size:13.5px;
    font-weight:500;

    transition:var(--transition);
}

.menu-header:hover{
    background:rgba(99,102,241,0.12);
    color:var(--text-white);
}

.menu-header.active{
    background:rgba(99,102,241,0.12);
    color:var(--text-white);
}

.submenu{
    display:none;
    margin-left:12px;
    margin-top:4px;
}

.submenu.open{
    display:block;
}

.submenu a{
    padding-left:18px !important;
}

.arrow{
    transition:.25s;
}

.arrow.rotate{
    transform:rotate(90deg);
}
