:root {
    --border: #d7dbe0;
    --header-bg: #f3f5f7;
    --accent: #1b6ec2;
    --error-bg: #fdecea;
    --error-border: #f5c2c0;
    --error-text: #7a1f1a;
}

body {
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    color: #1c1f23;
    background: #fafbfc;
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
}

h1 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.subtitle {
    color: #5c636a;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.upload-panel {
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    background: white;
    margin-bottom: 1.25rem;
}

.upload-panel input[type=file] {
    display: block;
    margin-bottom: 0.5rem;
}

.file-info {
    color: #5c636a;
    font-size: 0.9rem;
}

.selected-file {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #1c1f23;
}

.error-panel {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.error-panel h2 {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
}

.error-panel ul {
    margin: 0;
    padding-left: 1.25rem;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.toolbar .page-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toolbar .page-size input {
    width: 4.5rem;
    padding: 0.3rem 0.4rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
}

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

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
}

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

table.review-table th, table.review-table td {
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0.6rem;
    text-align: left;
    vertical-align: top;
}

table.review-table th {
    background: var(--header-bg);
    position: sticky;
    top: 0;
    white-space: nowrap;
}

table.review-table tr.row-positive {
    background: #eaf6ec;
}

table.review-table tr.row-positive td {
    border-bottom-color: #cdeacf;
}

table.review-table tr.row-neutral {
    background: #fbf5da;
}

table.review-table tr.row-neutral td {
    border-bottom-color: #f0e3a0;
}

table.review-table tr.row-negative {
    background: #fbeaea;
}

table.review-table tr.row-negative td {
    border-bottom-color: #f0c8c8;
}

table.review-table td.review-text {
    min-width: 220px;
    max-width: 420px;
    white-space: pre-wrap;
    word-break: break-word;
}

table.review-table select, table.review-table textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.3rem;
    font-family: inherit;
    font-size: inherit;
}

table.review-table textarea {
    min-width: 200px;
    min-height: 2.2rem;
    resize: vertical;
}

.submit-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.submit-bar button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.submit-bar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.row-count {
    color: #5c636a;
    font-size: 0.9rem;
}
