:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17202a;
  background: #f3f5f7;
  line-height: 1.5;
}

* { box-sizing: border-box; }
body { margin: 0; }
.container { width: min(100% - 32px, 1380px); margin: 48px auto; }
header { margin-bottom: 24px; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -0.04em; }
h2 { margin-top: 0; }
.eyebrow { margin: 0 0 6px; font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.lead { margin: 8px 0 0; color: #5d6975; }
.panel { background: #fff; border: 1px solid #dfe4e8; border-radius: 14px; padding: 22px; box-shadow: 0 8px 26px rgba(20, 32, 44, 0.05); }
form { display: grid; gap: 16px; }
label { display: grid; gap: 7px; font-weight: 700; }
input, select { width: 100%; padding: 12px 14px; border: 1px solid #b8c1c9; border-radius: 9px; background: #fff; font: inherit; }
button { width: fit-content; padding: 11px 18px; border: 0; border-radius: 9px; background: #17202a; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
button.secondary { background: #e8edf1; color: #17202a; }
button:disabled { opacity: 0.55; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.status { min-height: 1.5em; margin: 0; color: #5d6975; }
.results, .preview { margin-top: 22px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.summary { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-radius: 10px; border: 1px solid #d2d8de; background: #fff; }
.summary.ready { border-left: 5px solid #2f7d4a; }
.summary.warning { border-left: 5px solid #a26100; }
.item { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid #edf0f2; }
.item span { color: #65717d; }
.item.good strong { color: #23663b; }
.item.bad strong { color: #9b2c2c; }
.hint { padding: 10px; border-radius: 8px; background: #f5f6f7; color: #5b6570; overflow-wrap: anywhere; }
.metrics { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 12px; margin: 18px 0; }
.metric { min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; padding: 14px; border: 1px solid #dfe4e8; border-radius: 12px; background: #fff; }
.metric span { color: #65717d; font-size: 0.88rem; }
.metric strong { font-size: 1.65rem; }
.metric-warning { border-left: 4px solid #a26100; }
.table-panel { padding: 0; overflow: hidden; }
.toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) 190px auto auto; gap: 12px; align-items: end; padding: 18px; border-bottom: 1px solid #e5e9ec; }
.toolbar label { font-size: 0.88rem; }
.toolbar input, .toolbar select { padding: 9px 11px; }
.toolbar .checkbox { display: flex; flex-direction: row; align-items: center; gap: 8px; padding-bottom: 9px; white-space: nowrap; }
.toolbar .checkbox input { width: auto; }
#visible-count { padding-bottom: 9px; color: #65717d; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 1250px; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 12px 14px; border-bottom: 1px solid #edf0f2; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: #f8fafb; color: #4f5a65; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
tbody tr:hover { background: #fafbfc; }
td small { display: block; margin-top: 4px; color: #6c7782; }
details { margin-top: 6px; }
summary { color: #596570; cursor: pointer; font-size: 0.82rem; }
details p { max-width: 600px; margin: 7px 0; overflow-wrap: anywhere; }
code { display: inline-block; max-width: 100%; margin: 2px; padding: 2px 5px; border-radius: 4px; background: #eef1f3; white-space: normal; overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 3px 7px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.badge-publish { background: #e5f4ea; color: #24633b; }
.badge-draft { background: #edf0f2; color: #4e5964; }
.badge-future { background: #e8eef9; color: #31548c; }
.badge-skip { background: #f8e8e8; color: #8a3333; }
.text-good { color: #23663b; font-weight: 700; }
.text-warning { color: #8a5600; font-weight: 700; }
.text-bad { color: #9b2c2c; font-weight: 700; }

@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  .toolbar { grid-template-columns: 1fr 180px; }
}

@media (max-width: 720px) {
  .container { margin-top: 24px; }
  .grid { grid-template-columns: 1fr; }
  .summary { flex-direction: column; }
  .metrics { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .toolbar { grid-template-columns: 1fr; }
  #visible-count, .toolbar .checkbox { padding-bottom: 0; }
}
button.small { padding: 7px 10px; font-size: 0.82rem; }
.media-search-result { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #f5f7f8; }
.media-search-result:empty { display: none; }
.media-search-result p { margin: 5px 0; }
.import-panel { margin-top: 22px; display: grid; gap: 14px; }
.import-panel h2 { margin-bottom: 0; }
.import-panel .confirm { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.import-panel .confirm input { width: auto; }
.import-progress { display: grid; gap: 9px; }
.import-progress progress { width: 100%; height: 20px; }
.import-progress p { margin: 0; color: #4f5a65; }
.import-progress pre { max-height: 300px; margin: 0; padding: 12px; overflow: auto; border-radius: 8px; background: #111820; color: #e8edf1; font-size: 0.78rem; white-space: pre-wrap; }
