/* Reset e estilos gerais */
* {
    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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #0056b3 0%, #007bff 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 86, 179, 0.2);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

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

/* Botões */
.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #28a745;
    color: white;
}

.btn-primary:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

/* Dashboard */
main {
    padding: 30px 0;
}

#dashboard h2 {
    color: #0056b3;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Controles do Dashboard */
.dashboard-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-container {
    flex: 1;
    min-width: 250px;
}

.search-container input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #007bff;
}

.filter-container select {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    min-width: 200px;
}

.filter-container select:focus {
    outline: none;
    border-color: #007bff;
}

/* Lista de Clientes */
.client-list {
    display: grid;
    gap: 20px;
}

.client-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.client-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

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

.client-info h3 {
    color: #0056b3;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.client-info p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 2px 0;
}

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

.client-actions button {
    padding: 8px 16px;
    font-size: 12px;
}

/* Barra de Progresso */
.progress-container {
    margin-top: 15px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #495057;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    transition: width 0.5s ease;
    border-radius: 4px;
}

/* Status Badge */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-cadastrado { background-color: #e9ecef; color: #495057; }
.status-contemplado { background-color: #d4edda; color: #155724; }
.status-documentacao { background-color: #fff3cd; color: #856404; }
.status-analise { background-color: #cce5ff; color: #004085; }
.status-definicao { background-color: #e2e3e5; color: #383d41; }
.status-fluxo { background-color: #f8d7da; color: #721c24; }
.status-entrega { background-color: #d1ecf1; color: #0c5460; }

/* Mensagem sem clientes */
.no-clients {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-clients p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Modais */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    color: #0056b3;
    margin: 0;
    font-size: 1.3rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

/* Formulários */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checklist */
.checklist-container {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.checklist-section {
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.checklist-section h3 {
    background: linear-gradient(135deg, #0056b3 0%, #007bff 100%);
    color: white;
    margin: 0;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    font-size: 1.1rem;
}

.checklist-section > div {
    padding: 20px;
}

.checklist-item {
    margin-bottom: 15px;
    padding: 15px;
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.checklist-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.checklist-item input[type="checkbox"],
.checklist-item input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.item-details {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
    align-items: start;
}

.item-details input,
.item-details textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

/* Documentação */
.document-list {
    display: grid;
    gap: 20px;
}

.document-item {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
}

.document-item h4 {
    color: #0056b3;
    margin-bottom: 15px;
    font-size: 1rem;
}

.document-status {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.document-status label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.document-status input[type="radio"] {
    margin-right: 5px;
}

.document-details {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    align-items: start;
}

.document-details label {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.document-details input,
.document-details textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

/* Análise e Status */
.analysis-status,
.status-options,
.type-options {
    margin-bottom: 15px;
}

.status-options,
.type-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.status-options label,
.type-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

/* Fluxo do Bem */
.flow-section {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-top: 15px;
}

.flow-section h4 {
    color: #0056b3;
    margin-bottom: 20px;
    font-size: 1rem;
}

/* Upload de Arquivo */
.receipt-preview {
    margin-top: 10px;
    padding: 10px;
    border: 1px dashed #ddd;
    border-radius: 4px;
    text-align: center;
    color: #6c757d;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.receipt-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
}

/* Ações do Modal */
.modal-actions {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-radius: 0 0 8px 8px;
}

/* Responsividade */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .dashboard-controls {
        flex-direction: column;
    }

    .client-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .client-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 2% auto;
        width: 95%;
    }

    .document-details {
        grid-template-columns: 1fr;
    }

    .item-details {
        grid-template-columns: 1fr;
    }

    .status-options,
    .type-options {
        flex-direction: column;
        gap: 10px;
    }

    .document-status {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .btn-primary,
    .btn-secondary {
        padding: 8px 16px;
        font-size: 13px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
    }
}

