* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #0f172a;
    color: #e5e7eb;
}

.container {
    width: 95%;
    max-width: 1450px;
    margin: 30px auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

h1, h2, h3, p {
    margin-top: 0;
}

.card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.upload-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input[type="file"] {
    width: 100%;
    padding: 12px;
    background: #0b1220;
    color: #e5e7eb;
    border: 1px solid #334155;
    border-radius: 10px;
}

.btn {
    display: inline-block;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: bold;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-light {
    background: #e5e7eb;
    color: #111827;
}

.btn-small {
    padding: 8px 12px;
    font-size: 13px;
}

.btn-disabled {
    background: #374151;
    color: #9ca3af;
    cursor: not-allowed;
}

.alerts {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.alert.success {
    background: #14532d;
    color: #dcfce7;
}

.alert.error {
    background: #7f1d1d;
    color: #fee2e2;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sample-box {
    background: #0b1220;
    border: 1px solid #1f2937;
    border-radius: 12px;
    padding: 14px;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    color: #cbd5e1;
    margin: 0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
}

th, td {
    border-bottom: 1px solid #1f2937;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #0b1220;
}

.ua-box {
    max-width: 420px;
    max-height: 120px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #0b1220;
    border: 1px solid #1f2937;
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
}

.link-cell a {
    color: #93c5fd;
    text-decoration: none;
}

.bad {
    color: #fca5a5;
}

@media (max-width: 900px) {
    .upload-form,
    .two-col {
        grid-template-columns: 1fr;
    }
}