/* Reset Básico e Fontes */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #ffffff;
    padding: 20px 40px;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
}

header h1 {
    color: #2c3e50;
    font-size: 1.8rem;
}

/* Container Principal (agora centralizado) */
main {
    width: 100%;
    max-width: 900px; /* Largura máxima do card */
    margin: 30px auto;
    padding: 0 20px;
}

/* Estilo do Card (agora ocupa 100% do 'main') */
.card {
    width: 100%;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    color: #34495e;
    margin: 0;
}

.card-header span {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* Status de Edição */
.edit-status {
    font-size: 0.8rem;
    font-style: italic;
    color: #e67e22;
    padding: 0 20px;
    display: none; /* Começa escondido */
}

.card-body {
    padding: 20px;
    flex-grow: 1;
}

/* View-mode (texto normal) */
.card-body .view-mode p {
    font-size: 1rem;
    color: #555;
    max-height: 400px; /* Altura maior */
    overflow-y: auto;
    white-space: pre-wrap;
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 5px;
}

/* Formatação de links dentro do texto */
.card-body .view-mode p a {
    color: #3498db;
    text-decoration: none;
}
.card-body .view-mode p a:hover {
    text-decoration: underline;
}

/* Edit-mode (área de edição) */
.card-body .edit-mode {
    display: none; /* Começa escondido */
}
.card-body .edit-mode .edit-textarea {
    width: 100%;
    min-height: 400px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    padding: 10px;
    border: 1px solid #3498db; /* Borda azul para destacar */
    border-radius: 5px;
    resize: vertical;
}

/* Botões de Ação */
.card-actions {
    padding: 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
}

.btn {
    flex-grow: 1;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}
.btn:active {
    transform: scale(0.98);
}
.btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* Botão de Ícone (Edição) */
.btn-icon {
    flex-grow: 0; /* Não estica */
    width: 50px;
    background-color: #3498db;
    color: white;
}
.btn-icon:hover {
    background-color: #2980b9;
}

.btn-aprovar {
    background-color: #2ecc71;
    color: white;
}
.btn-aprovar:hover {
    background-color: #27ae60;
}

.btn-recusar {
    background-color: #e74c3c;
    color: white;
}
.btn-recusar:hover {
    background-color: #c0392b;
}

/* Ações de Edição */
.card-edit-actions {
    padding: 20px;
    display: none; /* Começa escondido */
    gap: 10px;
    border-top: 1px solid #eee;
}
.btn-save-edit {
    background-color: #3498db;
    color: white;
}
.btn-save-edit:hover {
    background-color: #2980b9;
}
.btn-cancel-edit {
    background-color: #bdc3c7;
    color: #333;
}
.btn-cancel-edit:hover {
    background-color: #95a5a6;
}


/* Área de Rejeição (Não muda) */
.card-rejeicao {
    padding: 0 20px 20px 20px;
    display: none; 
    flex-direction: column;
    gap: 10px;
}
.card-rejeicao textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
}
.card-rejeicao .botoes-rejeicao {
    display: flex;
    gap: 10px;
}
.btn-confirmar-recusa { background-color: #e74c3c; color: white; }
.btn-cancelar-recusa { background-color: #bdc3c7; color: #333; }


/* Controles de Navegação */
.navigation-controls {
    display: flex;
    justify-content: space-between;
    max-width: 900px;
    margin: 0 auto 40px auto;
    padding: 0 20px;
    gap: 20px;
}
.btn-nav {
    flex-grow: 1;
    background-color: #34495e;
    color: white;
}
.btn-nav:hover {
    background-color: #2c3e50;
}
.btn-nav:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}
.report-counter {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 10px;
}


/* Loading Spinner (Não muda) */
.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast (Não muda) */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, bottom 0.3s;
}
.toast.show { opacity: 1; visibility: visible; bottom: 40px; }
.toast.success { background-color: #2ecc71; }
.toast.error { background-color: #e74c3c; }