/* General page styling */
body {
    font-family: "Segoe UI", sans-serif;
    margin: 40px 20px;
    background-color: #f9f9fb;
    color: #333;
}

/* Section headings */
h2,
h3 {
    color: #2c3e50;
    margin-top: 40px;
}

/* ──────────────────────────────────────────────────────────────────────────────
   Flex container to split left (table) and right (upload/results) panels
   ────────────────────────────────────────────────────────────────────────────── */
#main-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* Analysis controls (checkboxes) above the table */
#analysis-controls {
    margin-bottom: 20px;
}

#analysis-controls label {
    margin-right: 15px;
    font-size: 0.95rem;
}

/* ──────────────────────────────────────────────────────────────────────────────
   Table structure
   ────────────────────────────────────────────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    /* handled above by panel padding */
    background-color: white;
}

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

thead th {
    background-color: #34495e;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

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

td.editable:hover {
    background-color: #eef2f7;
}

/* Color-coded values */
td.editable::after {
    content: attr(data-symbol);
    display: inline-block;
    font-weight: bold;
}

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;
}

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

/* ──────────────────────────────────────────────────────────────────────────────
   Buttons
   ────────────────────────────────────────────────────────────────────────────── */
button {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 15px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #27ae60;
}

/* ──────────────────────────────────────────────────────────────────────────────
   Result boxes (PDF parsing and analysis)
   ────────────────────────────────────────────────────────────────────────────── */
.panel-box {
    background-color: #f4f6f9;
    padding: 20px;
    margin-top: 20px;
    border-left: 5px solid #2ecc71;
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
}

.panel-box p {
    margin: 10px 0;
    font-weight: 500;
}

/* ──────────────────────────────────────────────────────────────────────────────
   Responsive adjustments: stack panels on narrow viewports
   ────────────────────────────────────────────────────────────────────────────── */

/* Give the table (left) more space than the results (right) */
#left-panel {
    flex: 3;
    min-width: 0;
    /* allow table to shrink if needed */
}

#right-panel {
    flex: 1;
    min-width: 0;
}

/* Panel styling */
#left-panel,
#right-panel {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}