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

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

/* Login Styles */
.login-body {
    background: linear-gradient(135deg, #000674 0%, #001a5e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-header .logo {
    max-width: 250px;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.login-header i {
    font-size: 3rem;
    color: #000674;
    margin-bottom: 10px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 5px;
    font-size: 2rem;
}

.login-header p {
    color: #666;
    margin-bottom: 30px;
}

.login-form {
    text-align: left;
}

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

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

.form-group label i {
    margin-right: 8px;
    color: #000674;
}

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

.form-group input:focus {
    outline: none;
    border-color: #000674;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #000674 0%, #001a5e 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #000674 0%, #001a5e 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand .nav-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1); /* Torna o logo branco */
}

.nav-brand i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    gap: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 20px 20px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    border-bottom-color: #ffc107;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link i {
    margin-right: 8px;
}

.nav-link.logout {
    color: #ffcccb;
}

.nav-link.logout:hover {
    background-color: rgba(255, 0, 0, 0.1);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.dashboard-header h1 {
    color: #333;
    font-size: 2.5rem;
}

.dashboard-header h1 i {
    margin-right: 15px;
    color: #000674;
}

.sync-status {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    background: #e9ecef;
    color: #666;
}

.sync-status.success {
    background: #d4edda;
    color: #155724;
}

.sync-status.error {
    background: #f8d7da;
    color: #721c24;
}

.sync-status i {
    margin-right: 8px;
}

.agent-info {
    display: flex;
    align-items: center;
}

.agent-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.agent-badge.laura {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.agent-badge.sophia {
    background: linear-gradient(135deg, #4834d4, #686de0);
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-grid.kpi-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .kpi-grid.kpi-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .kpi-grid.kpi-4 {
        grid-template-columns: 1fr;
    }
}

.kpi-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    background: #f8f9fa;
    color: #000674;
    font-size: 1.5rem;
}

.kpi-card.success .kpi-icon {
    background: #d4edda;
    color: #28a745;
}

.kpi-card.info .kpi-icon {
    background: #d1ecf1;
    color: #17a2b8;
}

.kpi-card.money .kpi-icon {
    background: #fff3cd;
    color: #ffc107;
}

.kpi-card.warning .kpi-icon {
    background: #fff3cd;
    color: #ffc107;
}

.kpi-card.danger .kpi-icon {
    background: #f8d7da;
    color: #dc3545;
}

/* Segunda linha de KPIs com estilo mais sutil */
.kpi-grid.secondary {
    margin-top: 20px;
    margin-bottom: 30px;
}

.kpi-grid.secondary .kpi-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.kpi-grid.secondary .kpi-card .kpi-content h3 {
    font-size: 1.5rem;
    color: #495057;
}

.kpi-grid.secondary .kpi-card .kpi-content p {
    font-size: 0.8rem;
    color: #6c757d;
}

.kpi-grid.secondary .kpi-card .kpi-content small {
    font-size: 0.7rem;
    color: #6c757d;
    display: block;
    margin-top: 2px;
}

.kpi-content h3 {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.kpi-content p {
    color: #666;
    font-size: 0.9rem;
}

/* Agents Grid */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.agent-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

.agent-card:hover {
    transform: translateY(-5px);
}

.agent-card.laura {
    border-top: 4px solid #ff6b6b;
}

.agent-card.sophia {
    border-top: 4px solid #4834d4;
}

.agent-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.agent-header i {
    font-size: 2rem;
    margin-right: 15px;
}

.agent-card.laura .agent-header i {
    color: #ff6b6b;
}

.agent-card.sophia .agent-header i {
    color: #4834d4;
}

.agent-header h2 {
    color: #333;
    font-size: 1.5rem;
}

.agent-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

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

.agent-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, #000674 0%, #001a5e 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s;
}

.agent-btn:hover {
    transform: translateY(-2px);
}

.agent-btn i {
    margin-left: 8px;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.chart-section {
    margin-bottom: 40px;
}

.chart-card.chart-wide {
    grid-column: span 2;
}

.chart-card.chart-full {
    grid-column: 1 / -1;
}

.chart-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.chart-card h3 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.chart-card h3 i {
    margin-right: 10px;
    color: #000674;
}

.chart-wrapper {
    position: relative;
    height: 250px;
}

.chart-card canvas {
    max-height: 250px;
}

/* Tables */
.table-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group, .search-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.filter-group input, .search-group input {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-group input:focus, .search-group input:focus {
    outline: none;
    border-color: #667eea;
}

.clear-btn {
    padding: 8px 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.clear-btn:hover {
    background: #5a6268;
}

.table-header h2 {
    color: #333;
    display: flex;
    align-items: center;
}

.table-header h2 i {
    margin-right: 10px;
    color: #000674;
}

.export-btn {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.export-btn:hover {
    background: #218838;
}

.export-btn i {
    margin-right: 8px;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

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

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table .money {
    font-weight: 600;
    color: #28a745;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.aguardando {
    background: #fff3cd;
    color: #856404;
}

.status-badge.disponivel {
    background: #d4edda;
    color: #155724;
}

.status-badge.retirada {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge i {
    margin-right: 4px;
}

/* Sync Log */
.sync-log-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.sync-log-section h2 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.sync-log-section h2 i {
    margin-right: 10px;
    color: #000674;
}

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

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

.sync-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.sync-table .success {
    color: #28a745;
}

.sync-table .error {
    color: #dc3545;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading i {
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        padding: 10px;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 10px 15px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .dashboard-header h1 {
        font-size: 2rem;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .agents-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-wide {
        grid-column: span 1;
    }

    .agent-stats {
        grid-template-columns: 1fr;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-card.chart-wide {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 10px;
    }

    .login-card {
        padding: 30px 20px;
    }

    .login-header .logo {
        max-width: 200px;
    }

    .kpi-card {
        flex-direction: column;
        text-align: center;
    }

    .kpi-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Filtro de Data */
.date-filter-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.date-filter-form {
    width: 100%;
}

.date-inputs {
    display: flex;
    align-items: end;
    gap: 20px;
    flex-wrap: wrap;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.date-input-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.date-input-group input[type="date"] {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    min-width: 160px;
}

.date-input-group input[type="date"]:focus {
    outline: none;
    border-color: #000674;
    box-shadow: 0 0 0 3px rgba(0, 6, 116, 0.1);
}

.date-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-filter, .btn-clear {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-filter {
    background: linear-gradient(135deg, #000674 0%, #001a5e 100%);
    color: white;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 6, 116, 0.3);
}

.btn-clear {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.btn-clear:hover {
    background: #e9ecef;
    color: #495057;
}
