@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff9800;
    --primary-dark: #f57c00;
    --primary-light: #ffb74d;
    --secondary: #455a64;
    --dark: #263238;
    --light: #eceff1;
    --white: #ffffff;
    --border: #cfd8dc;
    --text: #37474f;
    --text-light: #78909c;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --sidebar-width: 280px;
    --sidebar-collapsed: 70px;
    --header-height: 65px;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background: #f5f5f5;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

/* ===== SIDEBAR CORPORATIVO ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 2px solid var(--border);
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 2px solid var(--border);
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar.collapsed .sidebar-header h2 {
    display: none;
}

.toggle-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.toggle-btn:hover {
    background: rgba(255,255,255,0.3);
}

.sidebar-nav {
    padding: 15px 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 4px;
    gap: 12px;
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 3px;
    border-left: 3px solid transparent;
}

.nav-item i {
    font-size: 18px;
    min-width: 20px;
    color: var(--primary);
}

.nav-item:hover {
    background: #fff3e0;
    border-left-color: var(--primary);
    transform: translateX(3px);
}

.nav-item.active {
    background: #fff3e0;
    color: var(--primary-dark);
    border-left-color: var(--primary);
    font-weight: 700;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
}

.editor-link,
.admin-link {
    border-top: 2px solid var(--border);
    padding-top: 12px !important;
    margin-top: 12px;
}

/* ===== HEADER CORPORATIVO ===== */
.header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-left h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    padding: 8px 15px;
    border-radius: 4px;
    gap: 10px;
    min-width: 300px;
    border: 1px solid var(--border);
}

.search-box i {
    color: var(--text-light);
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-size: 13px;
    color: var(--text);
}

.notification-btn {
    position: relative;
    background: #f5f5f5;
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.notification-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: #f5f5f5;
}

.user-profile:hover {
    border-color: var(--primary);
    background: #fff3e0;
}

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 4px;
    border: 2px solid var(--primary);
}

.user-profile span {
    font-weight: 700;
    color: var(--text);
    font-size: 13px;
    text-transform: uppercase;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

.content {
    padding: 25px;
}

.content.hidden {
    display: none;
}

/* ===== KPI CARDS CORPORATIVO ===== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.kpi-card {
    background: var(--white);
    padding: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
}

.kpi-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    flex-shrink: 0;
}

.kpi-icon.blue { background: #2196f3; }
.kpi-icon.green { background: #4caf50; }
.kpi-icon.orange { background: #ff9800; }
.kpi-icon.red { background: #f44336; }

.kpi-info h3 {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 5px;
}

.kpi-trend {
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.kpi-trend.positive { color: var(--success); }
.kpi-trend.negative { color: var(--danger); }
.kpi-trend.warning { color: var(--warning); }

/* ===== CHARTS ===== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.chart-card {
    background: var(--white);
    padding: 20px;
    border-radius: 4px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.chart-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

/* ===== TABLE CORPORATIVO ===== */
.table-card {
    background: var(--white);
    border-radius: 4px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.table-header {
    padding: 18px 20px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.table-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #fafafa;
}

.data-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text);
    font-size: 13px;
}

.data-table tbody tr:hover {
    background: #fffbf5;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #81c784;
}

.status-badge.warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
}

.status-badge.danger {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

/* ===== BUTTONS CORPORATIVO ===== */
.btn-primary, .btn-secondary, .btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: #e0e0e0;
    color: var(--text);
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 6px;
    border-radius: 3px;
    font-size: 14px;
}

.btn-icon:hover {
    background: #f5f5f5;
    color: var(--primary);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 4px;
    width: 90%;
    max-width: 550px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.modal-header {
    padding: 18px 25px;
    border-bottom: 2px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.close-btn {
    background: #e0e0e0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 3px;
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--danger);
    color: white;
}

.modal-body {
    padding: 25px;
}

/* ===== FORMS CORPORATIVO ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 13px;
    color: var(--text);
    transition: all 0.2s;
    font-family: inherit;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.1);
}

.form-group input[readonly] {
    background: #f5f5f5;
    color: var(--text-light);
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ===== SCROLLBAR CORPORATIVO ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: #bdbdbd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .header-right .search-box {
        display: none;
    }
    
    .content {
        padding: 15px;
    }
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-uppercase { text-transform: uppercase; }
.font-bold { font-weight: 700; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

/* ===== LOADING ===== */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== ALERTS ===== */
.alert {
    padding: 12px 15px;
    border-radius: 3px;
    margin-bottom: 15px;
    font-size: 13px;
    font-weight: 500;
    border-left: 4px solid;
}

.alert.success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left-color: #4caf50;
}

.alert.warning {
    background: #fff3e0;
    color: #e65100;
    border-left-color: #ff9800;
}

.alert.danger {
    background: #ffebee;
    color: #c62828;
    border-left-color: #f44336;
}

.alert.info {
    background: #e3f2fd;
    color: #1565c0;
    border-left-color: #2196f3;
}

/* ===== CARDS EXTRAS ===== */
.info-card {
    background: var(--white);
    padding: 20px;
    border-radius: 4px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.info-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge.primary {
    background: var(--primary);
    color: white;
}

.badge.success {
    background: var(--success);
    color: white;
}

.badge.danger {
    background: var(--danger);
    color: white;
}

.badge.warning {
    background: var(--warning);
    color: white;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}

.tab-item {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-item:hover {
    color: var(--primary);
}

.tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 12px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    color: var(--border);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== TOOLTIP ===== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: var(--dark);
    color: white;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 3px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 5px;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* ===== DIVIDER ===== */
.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state p {
    font-size: 13px;
}
/* FIX GRÁFICOS */
.chart-card {
    max-height: 400px !important;
    overflow: hidden;
}

canvas {
    max-height: 280px !important;
    height: 280px !important;
}

body, html {
    overflow-x: hidden;
    max-width: 100vw;
}