/*
Theme Name: Negócios Práticos - Tema Unificado
Description: Tema responsivo e moderno para todas as categorias do Negócios Práticos
Version: 2.0.0
Author: Negócios Práticos
Text Domain: negociospraticos
*/

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Variáveis CSS Dinâmicas */
:root {
    --np-primary-color: #667eea;
    --np-secondary-color: #764ba2;
    --np-accent-color: #ff4757;
    --np-success-color: #2ecc71;
    --np-warning-color: #f39c12;
    --np-danger-color: #e74c3c;
    --np-info-color: #3498db;
    --np-light-color: #f8f9fa;
    --np-dark-color: #2c3e50;
    --np-border-radius: 8px;
    --np-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --np-transition: all 0.3s ease;
}

/* Container e Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-1 { flex: 0 0 8.333333%; }
.col-2 { flex: 0 0 16.666667%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333333%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.666667%; }
.col-9 { flex: 0 0 75%; }
.col-12 { flex: 0 0 100%; }

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--np-primary-color) 0%, var(--np-secondary-color) 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--np-box-shadow);
}

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

.site-logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.site-logo .logo-negocio {
    color: var(--np-accent-color);
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--np-transition);
    padding: 0.5rem 1rem;
    border-radius: var(--np-border-radius);
}

.main-navigation a:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Botões */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--np-border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--np-transition);
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(45deg, var(--np-primary-color), var(--np-secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: var(--np-light-color);
    color: var(--np-dark-color);
    border: 2px solid var(--np-primary-color);
}

.btn-secondary:hover {
    background: var(--np-primary-color);
    color: white;
}

.btn-accent {
    background: var(--np-accent-color);
    color: white;
}

.btn-accent:hover {
    background: #ff3742;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--np-success-color);
    color: white;
}

.btn-warning {
    background: var(--np-warning-color);
    color: white;
}

.btn-danger {
    background: var(--np-danger-color);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--np-border-radius);
    box-shadow: var(--np-box-shadow);
    overflow: hidden;
    transition: var(--np-transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-header {
    padding: 1.5rem;
    background: var(--np-light-color);
    border-bottom: 1px solid #dee2e6;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background: var(--np-light-color);
    border-top: 1px solid #dee2e6;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--np-dark-color);
}

.card-text {
    color: #666;
    margin-bottom: 1rem;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.dashboard-widget {
    background: white;
    border-radius: var(--np-border-radius);
    box-shadow: var(--np-box-shadow);
    padding: 1.5rem;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--np-dark-color);
}

.widget-icon {
    font-size: 1.5rem;
    color: var(--np-primary-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--np-primary-color);
    line-height: 1;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Formulários */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--np-dark-color);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: var(--np-border-radius);
    font-size: 1rem;
    transition: var(--np-transition);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--np-primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control.is-invalid {
    border-color: var(--np-danger-color);
}

.form-control.is-valid {
    border-color: var(--np-success-color);
}

.form-text {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.invalid-feedback {
    color: var(--np-danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    color: var(--np-success-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Tabelas */
.table-responsive {
    overflow-x: auto;
    margin: 1rem 0;
}

.table {
    width: 100%;
    background: white;
    border-radius: var(--np-border-radius);
    overflow: hidden;
    box-shadow: var(--np-box-shadow);
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: var(--np-light-color);
    font-weight: 600;
    color: var(--np-dark-color);
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table-striped tbody tr:nth-child(odd) {
    background: #f8f9fa;
}

/* Alertas */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--np-border-radius);
    margin: 1rem 0;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: var(--np-success-color);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: var(--np-warning-color);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: var(--np-danger-color);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: var(--np-info-color);
}

/* Modais */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--np-border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--np-dark-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Navegação por Abas */
.nav-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 2rem;
}

.nav-tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: var(--np-transition);
}

.nav-tab.active {
    color: var(--np-primary-color);
    border-bottom-color: var(--np-primary-color);
}

.nav-tab:hover {
    color: var(--np-primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Gráficos e Estatísticas */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

.progress {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(45deg, var(--np-primary-color), var(--np-secondary-color));
    transition: width 0.6s ease;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--np-primary-color);
    color: white;
}

.badge-success {
    background: var(--np-success-color);
    color: white;
}

.badge-warning {
    background: var(--np-warning-color);
    color: white;
}

.badge-danger {
    background: var(--np-danger-color);
    color: white;
}

/* Sidebar */
.sidebar {
    background: white;
    box-shadow: var(--np-box-shadow);
    border-radius: var(--np-border-radius);
    padding: 1.5rem;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #666;
    text-decoration: none;
    border-radius: var(--np-border-radius);
    transition: var(--np-transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--np-primary-color);
    color: white;
}

/* Footer */
.site-footer {
    background: var(--np-dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--np-accent-color);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 1rem;
    text-align: center;
    color: #999;
}

/* Utilitários */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.m-0 { margin: 0; }
.m-1 { margin: 0.5rem; }
.m-2 { margin: 1rem; }
.m-3 { margin: 1.5rem; }
.m-4 { margin: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-primary { color: var(--np-primary-color); }
.text-secondary { color: var(--np-secondary-color); }
.text-accent { color: var(--np-accent-color); }
.text-success { color: var(--np-success-color); }
.text-warning { color: var(--np-warning-color); }
.text-danger { color: var(--np-danger-color); }
.text-muted { color: #666; }

.bg-primary { background-color: var(--np-primary-color); }
.bg-secondary { background-color: var(--np-secondary-color); }
.bg-accent { background-color: var(--np-accent-color); }
.bg-light { background-color: var(--np-light-color); }
.bg-dark { background-color: var(--np-dark-color); }

/* Animações */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsivo */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .row {
        flex-direction: column;
    }
    
    .col,
    .col-1, .col-2, .col-3, .col-4, 
    .col-6, .col-8, .col-9, .col-12 {
        flex: 0 0 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .card-body,
    .dashboard-widget {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .nav-tab {
        text-align: center;
        border-bottom: 1px solid #eee;
        border-right: none;
    }
    
    .nav-tab.active {
        border-bottom-color: var(--np-primary-color);
        border-right-color: transparent;
    }
}

/* Print */
@media print {
    .no-print {
        display: none !important;
    }
    
    .site-header,
    .site-footer,
    .sidebar {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

