/* CSS Principal - ConstructWeb */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* Reset e configurações base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: #f8f9fa;
    margin: 0;
    color: #1a2a4a;
    font-size: 16px;
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    width: 240px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, #1a2a4a 0%, #2d4a7a 100%);
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    max-width: 120px;
    height: auto;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px 12px;
    font-weight: 500;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link.active {
    background: rgba(163, 192, 32, 0.2);
    color: #fff;
    transform: translateX(4px);
    text-decoration: none;
}

.sidebar-menu .nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sidebar-user {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 2px solid rgba(255,255,255,0.2);
}

.user-name {
    color: #fff;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
}

.btn-logout {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
}

/* Main Content */
.main-content {
    margin-left: 240px;
    padding: 30px;
    min-height: 100vh;
    background: #f8f9fa;
}

/* Cards */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    background: #fff;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 25px;
    font-weight: 600;
    color: #1a2a4a;
    border-radius: 16px 16px 0 0;
}

.card-body {
    padding: 25px;
}

.card-title {
    color: #1a2a4a;
    font-weight: 600;
    margin-bottom: 0;
}

/* KPI Cards */
.kpi-card {
    text-align: center;
    padding: 25px;
    border-radius: 16px;
    color: #fff;
    position: relative;
    overflow: hidden;
    border: none;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    z-index: 1;
}

.kpi-card .content {
    position: relative;
    z-index: 2;
}

.kpi-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.kpi-card h5 {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    margin-bottom: 10px;
}

.kpi-card small {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.bg-gradient-constructweb {
    background: linear-gradient(135deg, #a3c020 0%, #8ba81a 100%);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
}

.btn-primary {
    background: #a3c020;
    border-color: #a3c020;
    color: #fff;
}

.btn-primary:hover {
    background: #8ba81a;
    border-color: #8ba81a;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(163, 192, 32, 0.3);
}

.btn-outline-primary {
    color: #a3c020;
    border-color: #a3c020;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #a3c020;
    border-color: #a3c020;
    transform: translateY(-1px);
}

.btn-success {
    background: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
}

.btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    border-color: #d39e00;
    transform: translateY(-1px);
}

/* Tables */
.table {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0;
}

.table th {
    background: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #1a2a4a;
    padding: 15px;
    font-size: 14px;
}

.table td {
    border: none;
    padding: 15px;
    vertical-align: middle;
    font-size: 14px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(163, 192, 32, 0.05);
}

/* Badges */
.badge {
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 12px;
}

.status-ativo {
    background: #d4edda;
    color: #155724;
}

.status-pendente {
    background: #fff3cd;
    color: #856404;
}

.status-inativo {
    background: #f8d7da;
    color: #721c24;
}

/* Forms */
.form-control {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 15px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    border-color: #a3c020;
    box-shadow: 0 0 0 0.2rem rgba(163, 192, 32, 0.25);
    background: #fff;
}

.form-select {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 15px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-select:focus {
    border-color: #a3c020;
    box-shadow: 0 0 0 0.2rem rgba(163, 192, 32, 0.25);
    background: #fff;
}

.form-label {
    font-weight: 600;
    color: #1a2a4a;
    margin-bottom: 8px;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 40px;
}

.search-box .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Modals */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px 25px;
    border-radius: 16px 16px 0 0;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 20px 25px;
    border-radius: 0 0 16px 16px;
}

/* Welcome Cards */
.welcome-card {
    background: linear-gradient(135deg, #a3c020 0%, #8ba81a 100%);
    color: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.welcome-card .content {
    position: relative;
    z-index: 2;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.action-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    color: #1a2a4a;
    display: block;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #a3c020;
    color: #1a2a4a;
    text-decoration: none;
}

.action-card .icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #a3c020;
}

.action-card h6 {
    margin: 0;
    font-weight: 600;
}

.action-card p {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .kpi-card h2 {
        font-size: 2rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .welcome-card {
        padding: 20px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .table th,
    .table td {
        padding: 10px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 10px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .kpi-card {
        padding: 20px;
    }
    
    .kpi-card h2 {
        font-size: 1.8rem;
    }
    
    .welcome-card {
        padding: 15px;
    }
    
    .welcome-card h2 {
        font-size: 1.5rem;
    }
}

/* Utility Classes */
.text-constructweb {
    color: #a3c020;
}

.bg-constructweb {
    background: #a3c020;
}

.border-constructweb {
    border-color: #a3c020;
}

.shadow-constructweb {
    box-shadow: 0 4px 15px rgba(163, 192, 32, 0.3);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #a3c020;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .sidebar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
} 