body {
    font-family: "Segoe UI", sans-serif;
    background: linear-gradient(120deg, #f9f9fb 0%, #e3eafc 100%);
    color: #333;
}

.wide-section {
    padding-left: 2vw;
    padding-right: 2vw;
}

/* ── Table ─────────────────────────────────────────────────────────────────── */
table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    margin-top: 0;
    background-color: white;
}

.table-container {
    overflow-x: auto;
    width: 100%;
}

.card-content {
    overflow-x: auto;
}

th, td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
}

thead th {
    background-color: #e8edf5;
    color: #2c3e50;
    font-weight: 700;
    font-size: 13px;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 2px solid #c8d3e8;
}

tbody tr:nth-child(even) { background-color: #f6f8fa; }
tbody tr:nth-child(odd)  { background-color: #ffffff; }
tbody tr:hover {
    background-color: #e3eafc;
    transition: background 0.2s;
}

/* Editable cells */
td.editable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

td.editable[data-symbol="+"] { background-color: #d4edda; color: #155724; }
td.editable[data-symbol="0"] { background-color: #f8d7da; color: #721c24; }
td.editable[data-symbol="nt"] { background-color: #fff3cd; color: #856404; }

/* Reaction inputs */
input[type="number"] {
    width: 50px;
    padding: 6px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 4px;
}

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card {
    border-radius: 12px;
    box-shadow: 0 4px 24px 0 rgba(60, 72, 88, 0.08), 0 1.5px 4px 0 rgba(60, 72, 88, 0.08);
    overflow: hidden;
}

.card-header { border-radius: 12px 12px 0 0; }
.card-content { border-radius: 0 0 12px 12px; }

/* ── Analysis results ───────────────────────────────────────────────────────── */
#result {
    margin-top: 1rem;
}

.result-section {
    padding: 0.65rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.4rem;
    background-color: #f8f9fb;
}

.result-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 0.4rem;
}

.result-empty {
    font-size: 0.875rem;
    color: #999;
    font-style: italic;
}

.result-actions {
    padding-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

/* ── PDF drop zone ──────────────────────────────────────────────────────────── */
.pdf-dropzone {
    border: 2px dashed #c8d3e8;
    border-radius: 8px;
    padding: 1.25rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    background-color: #fafbfd;
    user-select: none;
}

.pdf-dropzone:hover {
    border-color: #3273dc;
    background-color: #f0f4ff;
}

.pdf-dropzone.is-dragover {
    border-color: #3273dc;
    background-color: #ebf2ff;
    border-style: solid;
}

.pdf-dropzone.has-file {
    border-color: #48c774;
    background-color: #f0fff4;
    border-style: solid;
}

.pdf-dropzone-icon {
    font-size: 1.75rem;
    color: #c8d3e8;
    margin-bottom: 0.4rem;
    transition: color 0.2s;
}

.pdf-dropzone.has-file .pdf-dropzone-icon { color: #48c774; }
.pdf-dropzone.is-dragover .pdf-dropzone-icon { color: #3273dc; }

.pdf-dropzone-text {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 0.2rem;
}

.pdf-dropzone-hint {
    font-size: 0.72rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Analysis controls ──────────────────────────────────────────────────────── */
#analysis-controls { margin-bottom: 20px; }
#analysis-controls label { margin-right: 15px; font-size: 0.95rem; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .columns { flex-direction: column; }
    .column.is-three-quarters, .column.is-one-quarter {
        width: 100%;
        max-width: 100%;
    }
    .card { margin-bottom: 2rem; }
}
