:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #68736d;
  --line: #dce4df;
  --paper: #f5f7f5;
  --white: #fff;
  --green: #1d654d;
  --green-dark: #124a38;
  --red: #a43b3b;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
.topbar {
  display: flex; justify-content: space-between; gap: 24px; align-items: center;
  padding: 24px 32px; background: var(--ink); color: var(--white);
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(25px, 3vw, 38px); letter-spacing: -.04em; }
h2 { margin-bottom: 5px; }
.eyebrow { margin-bottom: 7px; color: #91b8a8; font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.run-status { max-width: 560px; color: #c6d3cd; font-size: 13px; text-align: right; white-space: pre-line; }
button { border: 0; border-radius: 8px; padding: 10px 14px; font-weight: 700; }
.primary { color: white; background: var(--green); }
.primary:hover { background: var(--green-dark); }
.ghost { color: inherit; background: transparent; border: 1px solid currentColor; }
.topbar .ghost { color: #c6d3cd; }
.full { width: 100%; }
.tabs { padding: 0 32px; background: white; border-bottom: 1px solid var(--line); }
.tab { border-radius: 0; padding: 17px 20px 13px; background: transparent; border-bottom: 3px solid transparent; }
.tab.active { color: var(--green); border-color: var(--green); }
main { padding: 24px 32px 40px; }
.section-head { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 16px; }
.muted { color: var(--muted); margin-bottom: 0; }
.table-wrap { position: relative; overflow: auto; max-height: calc(100vh - 270px); background: white; border: 1px solid var(--line); border-radius: 12px; }
table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
thead { position: sticky; top: 0; z-index: 3; }
th { background: #edf2ef; text-align: left; border-bottom: 1px solid var(--line); }
.sort-button { width: 100%; padding: 12px 10px 8px; text-align: left; white-space: nowrap; background: transparent; color: var(--ink); }
.sort-button:disabled { opacity: 1; cursor: default; }
.filters th { top: 40px; padding: 5px; background: #f7f9f8; }
.filters input, .search {
  width: 100%; min-width: 90px; border: 1px solid var(--line); border-radius: 6px;
  padding: 7px 8px; outline: none; background: white;
}
.filters input:focus, .search:focus { border-color: var(--green); box-shadow: 0 0 0 2px #1d654d22; }
.range-filter { display: flex; width: 150px; gap: 4px; }
.range-filter input { min-width: 0; width: 73px; }
td { max-width: 260px; padding: 10px; border-bottom: 1px solid #edf1ee; vertical-align: top; }
td img { width: 56px; height: 70px; border-radius: 5px; object-fit: cover; background: #e8ece9; }
td img.broken { visibility: hidden; }
td a { color: var(--green); }
.detail-button { padding: 0; color: var(--green); background: transparent; text-align: left; text-decoration: underline; }
.empty { padding: 35px; color: var(--muted); text-align: center; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; background: #ffffffcc; font-weight: 700; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 16px; }
.banner { margin-bottom: 14px; padding: 12px 14px; border-radius: 8px; white-space: pre-line; }
.error { color: var(--red); }
.banner.error { background: #faeaea; }
.hidden { display: none !important; }
.search { max-width: 480px; margin-bottom: 18px; padding: 11px 13px; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.brand-card { display: flex; gap: 12px; align-items: center; padding: 14px; background: white; border: 1px solid var(--line); border-radius: 10px; }
.brand-card input { width: 18px; height: 18px; accent-color: var(--green); }
.brand-card span { display: grid; gap: 4px; }
.brand-card small { color: var(--muted); }
dialog { width: min(900px, calc(100vw - 30px)); max-height: 90vh; padding: 0; border: 0; border-radius: 14px; box-shadow: 0 20px 80px #0005; }
dialog::backdrop { background: #10201a99; }
.dialog-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; background: white; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; }
.detail-images { display: grid; gap: 6px; padding: 16px 22px 0; }
.detail-images a { overflow: hidden; color: var(--green); text-overflow: ellipsis; white-space: nowrap; }
pre { margin: 16px 22px 22px; padding: 16px; overflow: auto; background: #18211e; color: #e5eee9; border-radius: 8px; font-size: 12px; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at top, #dbe9e2, var(--paper) 48%); }
.login-card { width: min(410px, calc(100vw - 32px)); padding: 36px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px #244c3918; }
.logo-mark { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 22px; border-radius: 12px; color: white; background: var(--green); font-size: 24px; font-weight: 800; }
.login-card h1 { margin-bottom: 10px; }
.login-card form { display: grid; gap: 16px; margin-top: 28px; }
.login-card label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
.login-card input { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 8px; }
@media (max-width: 800px) {
  .topbar, .section-head { align-items: stretch; flex-direction: column; }
  .topbar, main { padding-left: 16px; padding-right: 16px; }
  .tabs { padding: 0 16px; }
  .header-actions { align-items: stretch; flex-wrap: wrap; }
  .run-status { width: 100%; max-width: none; text-align: left; }
}

