/* Arquivo: assets/css/style.css */
/* Localização: /projeto-diarias-sttp/assets/css/style.css */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --sidebar-width: 250px;
    
    /* Cores específicas do módulo financeiro */
    --financeiro-primary: #28a745;
    --financeiro-secondary: #17a2b8;
    --financeiro-warning: #ffc107;
    --financeiro-danger: #dc3545;
    --financeiro-success: #28a745;
    --financeiro-info: #17a2b8;
    --financeiro-light: #f8f9fa;
    --financeiro-dark: #343a40;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    color: #333;
}

/* Layout Principal */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-color);
    color: white;
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.1);
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar.collapsed .sidebar-header h3 {
    display: none;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    position: relative;
}

.sidebar-menu .menu-header {
    padding: 15px 20px 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.6);
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 10px;
}

.sidebar-menu .menu-header:first-child {
    border-top: none;
    margin-top: 0;
}

.sidebar.collapsed .menu-header {
    display: none;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-menu a i {
    width: 25px;
    margin-right: 10px;
    text-align: center;
}

.sidebar.collapsed .sidebar-menu a span {
    display: none;
}

.sidebar-menu .submenu {
    list-style: none;
    padding-left: 50px;
    background: rgba(0,0,0,0.1);
    display: none;
}

.sidebar-menu .submenu.show {
    display: block;
}

.sidebar-menu .submenu a {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.sidebar.collapsed .submenu {
    display: none !important;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s;
}

.sidebar.collapsed + .main-content {
    margin-left: 80px;
}

/* Header */
.header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    margin-right: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: var(--light-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-dropdown-toggle:hover {
    background: #d5dbdb;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Content Area */
.content {
    padding: 30px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 30px;
}

/* Cards */
.card {
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #eee;
    padding: 20px 25px;
    font-weight: 600;
    color: var(--primary-color);
}

.card-body {
    padding: 25px;
}

/* Dashboard Stats */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.stat-icon.primary { background: rgba(52, 152, 219, 0.1); color: var(--secondary-color); }
.stat-icon.success { background: rgba(39, 174, 96, 0.1); color: var(--success-color); }
.stat-icon.warning { background: rgba(243, 156, 18, 0.1); color: var(--warning-color); }
.stat-icon.danger { background: rgba(231, 76, 60, 0.1); color: var(--danger-color); }
.stat-icon.info { background: rgba(23, 162, 184, 0.1); color: var(--info-color); }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.stat-desc {
    color: #95a5a6;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Cards específicos do financeiro */
.financial-card {
    background: linear-gradient(135deg, var(--financeiro-primary) 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.15);
    transition: all 0.3s ease;
}

.financial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(40, 167, 69, 0.25);
}

.pending-card {
    background: linear-gradient(135deg, var(--financeiro-warning) 0%, #fd7e14 100%);
}

.processed-card {
    background: linear-gradient(135deg, var(--financeiro-info) 0%, #007bff 100%);
}

.paid-card {
    background: linear-gradient(135deg, var(--financeiro-success) 0%, #198754 100%);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--light-color);
    border-bottom: 2px solid #ddd;
    font-weight: 600;
    color: var(--primary-color);
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
}

.table-actions {
    display: flex;
    gap: 5px;
}

/* Tabelas financeiras */
.financial-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.financial-table .table thead th {
    background: var(--financeiro-primary);
    color: white;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.financial-table .table tbody tr:hover {
    background-color: rgba(40, 167, 69, 0.05);
}

/* Forms */
.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 15px;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
}

/* Botões específicos do financeiro */
.btn-financial {
    background: linear-gradient(45deg, var(--financeiro-primary), #20c997);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-financial:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    color: white;
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.8rem;
}

.badge.bg-success { background-color: var(--success-color) !important; }
.badge.bg-danger { background-color: var(--danger-color) !important; }
.badge.bg-warning { background-color: var(--warning-color) !important; }
.badge.bg-info { background-color: var(--info-color) !important; }
.badge.bg-primary { background-color: var(--secondary-color) !important; }

/* Status badges específicos */
.status-badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 5px;
    padding: 15px 20px;
}

/* Modal */
.modal-header {
    background: var(--primary-color);
    color: white;
    border-bottom: none;
}

.modal-title {
    font-weight: 600;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Modals específicos do financeiro */
.modal-financial .modal-header {
    background: linear-gradient(135deg, var(--financeiro-primary) 0%, #20c997 100%);
    border-radius: 15px 15px 0 0;
}

/* Ações rápidas */
.quick-action-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--financeiro-primary);
}

.quick-action-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--financeiro-primary);
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading específico do financeiro */
.financial-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(40, 167, 69, 0.2);
    border-top: 4px solid var(--financeiro-primary);
    border-radius: 50%;
    animation: financial-spin 1s linear infinite;
}

@keyframes financial-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Timeline de pagamentos */
.payment-timeline {
    position: relative;
    padding-left: 30px;
}

.payment-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--financeiro-primary), var(--financeiro-info));
}

.payment-timeline-item {
    position: relative;
    margin-bottom: 25px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.payment-timeline-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 25px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--financeiro-primary);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--financeiro-primary);
}

/* Filtros do módulo financeiro */
.financial-filters {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
}

.financial-filters .form-control:focus,
.financial-filters .form-select:focus {
    border-color: var(--financeiro-primary);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Gráficos financeiros */
.financial-chart-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

/* Valores monetários */
.valor-monetario {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--financeiro-success);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -var(--sidebar-width);
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content {
        padding: 20px;
    }
    
    .stat-card {
        margin-bottom: 20px;
    }
    
    .financial-card {
        margin-bottom: 15px;
        padding: 20px;
    }
    
    .quick-action-card {
        padding: 20px;
        margin-bottom: 15px;
    }
}

/* Print */
@media print {
    .sidebar,
    .header,
    .btn,
    .table-actions {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .financial-card,
    .quick-action-card,
    .financial-filters {
        box-shadow: none !important;
        background: white !important;
        color: black !important;
    }
}