/* assets/css/style.css */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Sidebar */
.sidebar {
    background: var(--dark-color);
    min-height: 100vh;
    width: 250px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #495057;
}

.sidebar-header h4 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #adb5bd;
    text-decoration: none;
    transition: all 0.3s;
}

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

.sidebar-nav li a i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 0;
    transition: all 0.3s;
}

.main-content.expanded {
    margin-left: 70px;
}

/* Header */
.header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.2rem;
    margin-right: 1rem;
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dashboard Cards */
.stats-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stats-card:hover {
    transform: translateY(-2px);
}

.stats-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.stats-card-icon.primary { background: var(--primary-color); }
.stats-card-icon.success { background: var(--success-color); }
.stats-card-icon.warning { background: var(--warning-color); }
.stats-card-icon.danger { background: var(--danger-color); }

.stats-card h3 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stats-card p {
    color: var(--secondary-color);
    margin: 0;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table-header {
    background: var(--light-color);
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: between;
    align-items: center;
}

.table-header h5 {
    margin: 0;
}

.table {
    margin: 0;
}

.table th {
    background: var(--light-color);
    border-top: none;
    font-weight: 600;
}

/* Forms */
.form-container {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.required {
    color: var(--danger-color);
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(13, 110, 253, 0.1);
}

.file-upload-area i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.ativo { background: rgba(25, 135, 84, 0.1); color: var(--success-color); }
.status-badge.inativo { background: rgba(220, 53, 69, 0.1); color: var(--danger-color); }
.status-badge.andamento { background: rgba(13, 110, 253, 0.1); color: var(--primary-color); }
.status-badge.concluido { background: rgba(25, 135, 84, 0.1); color: var(--success-color); }
.status-badge.atrasado { background: rgba(220, 53, 69, 0.1); color: var(--danger-color); }

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
}

.timeline-content {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.timeline-date {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.image-overlay button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    margin: 0 0.5rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        padding: 1rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilities */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}

.border-radius-10 {
    border-radius: 10px !important;
}

.shadow-sm {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}
