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

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

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #fec800;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #fec800, #e6b800);
    color: #1a1a1a;
    font-weight: 600;
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e6b800, #ccaa00);
    transform: translateY(-2px);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 200px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 15px;
    background: #34495e;
    border-bottom: 1px solid #3d566e;
}

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #34495e;
    color: white;
    border-right: 3px solid #3498db;
}

.sidebar-menu i {
    margin-right: 8px;
    width: 18px;
    font-size: 14px;
}

.main-content {
    flex: 1;
    margin-left: 200px;
    background: #f8f9fa;
}

.topbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: between;
    align-items: center;
}

.topbar-left h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.content {
    padding: 30px;
}

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.stat-card.success { border-left-color: #27ae60; }
.stat-card.warning { border-left-color: #f39c12; }
.stat-card.danger { border-left-color: #e74c3c; }

.stat-card h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #2c3e50;
}

.stat-card p {
    color: #7f8c8d;
    font-size: 14px;
}

/* Tables */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: between;
    align-items: center;
}

.card-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.card-body {
    padding: 25px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

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

/* Kanban */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.kanban-column {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    min-height: 500px;
}

.kanban-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.kanban-header h5 {
    font-weight: 600;
    color: #2c3e50;
}

.kanban-count {
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.kanban-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.kanban-card h6 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.kanban-card p {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.kanban-card .meta {
    display: flex;
    justify-content: between;
    align-items: center;
    font-size: 11px;
    color: #adb5bd;
}

/* Status badges */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-primary { background: #cce7ff; color: #004085; }

/* Barra de rolagem horizontal para tabelas */
body {
    overflow-x: auto !important;
}

.main-content {
    min-width: 1400px !important;
}

.table {
    width: 100% !important;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .main-content {
        margin-left: 0;
        min-width: 1400px !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

/* Modern Dashboard Styles */
:root {
    --primary-color: #fec800;
    --secondary-color: #e6b800;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --border-color: #e9ecef;
    --text-muted: #6c757d;
    --chart-color-1: #fec800;
    --chart-color-2: #f39c12;
    --chart-color-3: #27ae60;
    --chart-color-4: #e74c3c;
    --chart-color-5: #9b59b6;
    --chart-color-6: #34495e;
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.welcome-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-content p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

.welcome-actions {
    display: flex;
    gap: 15px;
}

.welcome-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.welcome-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Enhanced Stats Cards */
.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: none;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

.stat-card.success::before { background: var(--success-color); }
.stat-card.warning::before { background: var(--warning-color); }
.stat-card.info::before { background: var(--info-color); }
.stat-card.primary::before { background: var(--primary-color); }

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

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    background: var(--primary-color);
}

.stat-card.success .stat-icon { background: var(--success-color); }
.stat-card.warning .stat-icon { background: var(--warning-color); }
.stat-card.info .stat-icon { background: var(--info-color); }

.stat-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--dark-color);
}

.stat-content p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 6px 0;
    font-weight: 500;
}

.stat-trend {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 20px;
    background: #f8f9fa;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-trend.positive {
    background: #d4edda;
    color: #155724;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

/* Chart Section */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 20px;
}

.chart-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Activity Timeline */
.activity-timeline {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item.latest::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.activity-header strong {
    color: var(--dark-color);
    font-size: 14px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 10px;
}

.activity-content p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.activity-lead {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-bottom: 5px;
}

.activity-date {
    font-size: 11px;
    color: var(--text-muted);
}

/* Quick Actions */
.quick-actions {
    margin-top: 30px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.action-item:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f8f9ff, #ffffff);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    color: var(--primary-color);
}

.action-item i {
    font-size: 18px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
    padding: 8px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.action-item:hover i {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Card Enhancements */
.card {
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border-radius: 15px;
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 15px 15px 0 0;
    padding: 20px 25px;
}

.card-header h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #dee2e6;
    color: var(--text-muted);
}

.btn-outline:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

/* Responsive Enhancements */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .welcome-section {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .welcome-content h1 {
        font-size: 24px;
    }
    
    .chart-legend {
        grid-template-columns: 1fr;
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-3 { margin-bottom: 1rem; }
.mt-3 { margin-top: 1rem; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-success { background: #27ae60; color: white; }
.btn-warning { background: #f39c12; color: white; }
.btn-danger { background: #e74c3c; color: white; }
.btn-info { background: #3498db; color: white; }

.btn-success:hover { background: #229954; }
.btn-warning:hover { background: #e67e22; }
.btn-danger:hover { background: #c0392b; }
.btn-info:hover { background: #2980b9; }