* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

.page {
    max-width: 1800px;
    margin: 0 auto;
    padding: 32px 20px;
}

.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

h1,
h2 {
    margin: 0;
    color: #111827;
}

.header p,
.results-header p {
    margin: 8px 0 0;
    color: #6b7280;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 0.85fr 1.15fr 0.75fr 0.85fr auto;
    gap: 16px;
    align-items: end;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-weight: 700;
    font-size: 14px;
}

select,
input {
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    background: #ffffff;
}

small {
    color: #6b7280;
    font-size: 12px;
}

.button-row {
    display: flex;
    gap: 10px;
    align-items: end;
}

button {
    height: 42px;
    border: none;
    border-radius: 10px;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
    background: #2563eb;
    color: white;
    white-space: nowrap;
}

button:hover {
    background: #1d4ed8;
}

.secondary-button {
    background: #111827;
}

.secondary-button:hover {
    background: #374151;
}

.disabled-button {
    background: #9ca3af;
    cursor: not-allowed;
}

.disabled-button:hover {
    background: #9ca3af;
}

.alert {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 10px;
}

.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}

.source {
    margin: 18px 0;
    font-size: 14px;
    color: #4b5563;
    word-break: break-all;
}

.source a {
    color: #2563eb;
}

.results-card {
    margin-top: 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.results-header span {
    color: #6b7280;
    font-size: 14px;
    white-space: nowrap;
}

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

table {
    width: 100%;
    min-width: 2100px;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    background: #f9fafb;
    white-space: nowrap;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

td {
    font-size: 13px;
}

td a {
    color: #2563eb;
}

.evidence-cell {
    max-width: 280px;
    min-width: 220px;
    color: #4b5563;
}

.empty {
    margin-top: 20px;
    color: #6b7280;
}

.pagination-form {
    margin-top: 18px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    color: #4b5563;
}

@media (max-width: 1200px) {
    .search-form {
        grid-template-columns: 1fr 1fr;
    }

    .button-row {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .search-form {
        grid-template-columns: 1fr;
    }

    .button-row {
        flex-direction: column;
        align-items: stretch;
    }

    button {
        width: 100%;
    }

    .results-header {
        flex-direction: column;
    }

    .pagination {
        flex-direction: column;
        align-items: stretch;
    }
}
