/* --- Geral --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Alinha ao topo */
    min-height: 100vh;
    margin: 0;
    background-color: #f4f7f9;
    color: #333;
    padding: 40px 20px;
}

.container {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    text-align: center;
    width: 95%;
    max-width: 1200px;
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Cabeçalho --- */
h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.8em;
    font-weight: 700;
}

p {
    color: #555;
    margin-bottom: 30px;
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Botão Principal --- */
button {
    background: linear-gradient(135deg, #007BFF 0%, #0056b3 100%);
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* --- Loader do Botão --- */
.loader {
    width: 18px;
    height: 18px;
    border: 2px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-right: 10px;
}

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

/* --- Container do Relatório --- */
#reportContainer {
    margin-top: 40px;
    border-top: 1px solid #e0e0e0;
    padding-top: 30px;
    text-align: left;
}

/* --- Mensagens de Status --- */
.error-message, .no-conflict-message, .no-hearings-message {
    text-align: center;
    padding: 40px;
    border-radius: 12px;
    margin: 20px 0;
    font-size: 1.3em;
    font-weight: 500;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #c62828;
}

.no-conflict-message, .no-hearings-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* --- Seções --- */
.conflicts-section, .hearings-section {
    margin-bottom: 40px;
}

h2 {
    font-size: 2em;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 2px solid #007BFF;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

h2 .subtitle {
    font-size: 0.6em;
    color: #777;
    font-weight: 400;
}

.conflict-header {
    color: #d9534f;
    border-bottom-color: #d9534f;
}

/* --- Card de Conflito --- */
.conflict-card {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.3s ease;
}

.conflict-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* --- Tabela de Conflitos --- */
.conflict-table {
    width: 100%;
    border-collapse: collapse;
}

.conflict-table th, .conflict-table td {
    padding: 20px;
    text-align: left;
    vertical-align: top;
}

.conflict-table th {
    background-color: #f9f9f9;
    color: #333;
    font-weight: 600;
    font-size: 1.1em;
}

.conflict-table td {
    border-top: 1px solid #e0e0e0;
}

.conflict-table tr td:first-child {
    border-right: 1px solid #e0e0e0;
}

/* --- Detalhes da Audiência --- */
.hearing-details p {
    margin: 0 0 8px 0;
    font-size: 1em;
    color: #555;
    line-height: 1.5;
}

.hearing-details .task strong,
.hearing-details .process strong {
    color: #333;
}

.hearing-details .time {
    font-weight: 600;
    color: #007BFF;
}

.conflict-table .time {
    color: #d9534f;
}

/* --- Lista de Todas as Audiências --- */
.hearings-list {
    list-style-type: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.hearings-list li {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.hearings-list li:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.hearings-list .date {
    font-weight: 600;
    color: #28a745;
}
