:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #17202a;
}

* { box-sizing: border-box; }
body { margin: 0; background: #f4f6f8; }
button, input { font: inherit; }
button:disabled { opacity: .6; cursor: wait; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.container { width: min(1280px, calc(100% - 32px)); margin: 32px auto 64px; }
.container.narrow { width: min(820px, calc(100% - 32px)); }
.page-header { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
h1 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2rem); }
h2 { margin-top: 0; font-size: 1.1rem; }
p { margin: .5rem 0; }

.panel { background: #fff; border: 1px solid #d8dee8; border-radius: 12px; padding: 20px; box-shadow: 0 5px 20px rgba(24, 39, 75, .05); margin-bottom: 18px; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.primary-button, .secondary-button, .small-button { border-radius: 7px; padding: 9px 14px; border: 1px solid transparent; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.primary-button { background: #1769aa; color: #fff; }
.secondary-button { background: #fff; color: #243447; border-color: #aeb8c6; }
.small-button { background: #eef5fb; color: #0f5489; border-color: #9bc3e2; padding: 6px 10px; white-space: nowrap; }
.primary-button:hover { background: #125789; }
.secondary-button:hover, .small-button:hover { background: #e9eef4; }

.table-panel { padding: 0; overflow: hidden; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1050px; }
th, td { padding: 11px 12px; border-bottom: 1px solid #e1e6ed; text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; background: #edf2f7; color: #334155; font-size: .86rem; z-index: 1; }
tbody tr:hover { background: #f8fafc; }
.empty { text-align: center; color: #687386; padding: 36px; }
.rev-cell { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-block; border-radius: 999px; padding: 4px 9px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.status-new { background: #e8eef5; color: #35465b; }
.status-same { background: #e7f7ed; color: #176436; }
.status-changed { background: #fff0db; color: #8a4b00; }

.message { border-radius: 9px; padding: 12px 15px; margin-bottom: 18px; border: 1px solid; white-space: pre-wrap; }
.message.info { background: #eaf4ff; border-color: #8fc2ed; color: #174f7c; }
.message.success { background: #e9f8ee; border-color: #8bd1a1; color: #185e31; }
.message.error { background: #fff0f0; border-color: #e4a2a2; color: #8a2020; }
.form-stack { display: grid; gap: 10px; margin-top: 18px; }
.form-stack input { width: 100%; border: 1px solid #aeb8c6; border-radius: 7px; padding: 10px 12px; }
.notes li { margin: .35rem 0; }

@media (max-width: 760px) {
  .page-header, .controls { flex-direction: column; align-items: stretch; }
  .button-row > * { flex: 1; }
}

.version { margin-top: 22px; color: #6b7280; font-size: .78rem; text-align: left; }
