body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #222;
    background: #fafafa;
}

.top-menu {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.top-menu a {
    color: #222;
    text-decoration: none;
    margin-right: 1.5rem;
    font-weight: 500;
}

.top-menu a:hover {
    text-decoration: underline;
}

.top-menu .brand {
    font-weight: 700;
}

.top-menu .spacer {
    flex: 1;
}

main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

input[type="text"],
input[type="url"],
select,
textarea {
    font: inherit;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: inherit;
}

input[type="text"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #888;
}

textarea {
    resize: vertical;
}

button {
    font: inherit;
    padding: 0.4rem 0.9rem;
    border: 1px solid #222;
    border-radius: 4px;
    background: #222;
    color: #fff;
    cursor: pointer;
}

button:hover {
    background: #444;
    border-color: #444;
}

.field-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.field-row {
    align-items: flex-start;
}

.field-row > input,
.field-row > select,
.field-row > textarea {
    flex: 1;
    min-width: 0;
}

.field-row.actions {
    justify-content: center;
}

.field-row.actions button {
    min-width: 16rem;
    padding: 0.6rem 1.5rem;
    font-size: 1.05rem;
}

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #ddd;
    margin-top: 1.5rem;
}

.tab {
    background: none;
    color: #666;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.5rem 1rem;
    margin-bottom: -1px;
    cursor: pointer;
}

.tab:hover {
    background: none;
    color: #222;
    border-color: transparent;
}

.tab.active {
    color: #222;
    border-bottom-color: #222;
    font-weight: 600;
}

.output {
    margin-top: 0.5rem;
}

.output.hidden {
    display: none;
}

.results-meta {
    color: #666;
    font-size: 0.9rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.results-table th,
.results-table td {
    text-align: left;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #eee;
}

.results-table th {
    background: #f4f4f4;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

.pagination button {
    min-width: auto;
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

input.code-input,
textarea.code-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
}
