:root {
  --ink: #17211b;
  --muted: #647069;
  --line: #dce3de;
  --surface: #ffffff;
  --subtle: #f4f7f5;
  --brand: #0b7a4b;
  --brand-dark: #075b38;
  --danger: #b3261e;
  --warning: #9a5b00;
  --shadow: 0 8px 24px rgba(25, 45, 34, 0.07);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #f8faf8; }
body { min-height: 100vh; margin: 0; color: var(--ink); font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.topbar { height: 64px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--ink); font-size: 18px; font-weight: 800; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 600; }
.topbar nav { display: flex; align-items: center; gap: 20px; }
.topbar nav > a, .link-button { color: #344039; font-size: 14px; font-weight: 600; }
.nav-primary { padding: 8px 13px; color: #fff !important; background: var(--ink); border-radius: 5px; }
.nav-primary:hover { text-decoration: none; background: #2a352f; }
.nav-form { display: inline; margin: 0; }
.link-button { padding: 0; border: 0; background: transparent; }
.page { min-height: calc(100vh - 128px); padding-top: 42px; padding-bottom: 72px; }
.footer { min-height: 64px; display: flex; align-items: center; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface); font-size: 13px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: 32px; line-height: 1.2; }
h2 { margin-bottom: 8px; font-size: 18px; line-height: 1.35; }
.eyebrow { margin-bottom: 8px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: 0; }
.page-heading { margin-bottom: 28px; }
.page-heading > p:last-child { max-width: 700px; color: var(--muted); }
.action-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.catalog-head { display: grid; grid-template-columns: 1fr minmax(320px, 520px); align-items: end; gap: 40px; margin-bottom: 32px; }
.search { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
input, textarea { width: 100%; color: var(--ink); background: var(--surface); border: 1px solid #c8d1cb; border-radius: 5px; outline: 0; }
input { height: 42px; padding: 0 12px; }
input[type="file"] { height: auto; padding: 10px 12px; }
textarea { min-height: 100px; padding: 10px 12px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 122, 75, 0.12); }
label { display: grid; gap: 7px; color: #344039; font-size: 13px; font-weight: 700; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; border: 1px solid transparent; border-radius: 5px; font-weight: 750; white-space: nowrap; }
.button:hover { text-decoration: none; }
.button-primary { color: #fff; background: var(--brand); }
.button-primary:hover { background: var(--brand-dark); }
.button-dark { color: #fff; background: var(--ink); }
.button-quiet { color: var(--ink); background: #fff; border-color: var(--line); }
.button-danger { color: var(--danger); background: #fff; border-color: #e6b9b5; }
.button-wide { width: 100%; }
.button-small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.app-card { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 16px; min-width: 0; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.app-icon { width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; color: #fff; background: var(--ink); border-radius: 7px; font-size: 22px; font-weight: 800; }
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-copy { min-width: 0; }
.app-copy p { margin-bottom: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-title-row { display: flex; align-items: baseline; gap: 8px; }
.app-title-row h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version { color: var(--muted); font-size: 12px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px; color: #7a867e; font-size: 12px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; color: var(--muted); font-size: 13px; }
.auth-layout { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(320px, 520px); gap: 80px; align-items: start; max-width: 960px; margin: 36px auto 0; }
.auth-heading { padding-top: 20px; }
.auth-heading h1 { font-size: 38px; }
.form-panel { display: grid; gap: 18px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: var(--shadow); }
.form-wide { max-width: 900px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.form-foot { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.alert { margin-bottom: 18px; padding: 12px 14px; border: 1px solid; border-radius: 5px; }
.alert-success { color: #075b38; background: #ecf8f1; border-color: #b8dfc9; }
.alert-error { color: #8f1d17; background: #fff2f1; border-color: #e9c0bd; }
.alert-info { color: #245071; background: #eef6fb; border-color: #c4dae8; }
.empty-state { padding: 72px 24px; text-align: center; color: var(--muted); border: 1px dashed #bdc8c0; border-radius: 7px; background: rgba(255,255,255,.6); }
.empty-state h2 { color: var(--ink); }
.empty-state.compact { padding: 32px 20px; }
.empty-state.compact p { margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 15px; text-align: left; border-bottom: 1px solid #e7ece8; vertical-align: middle; }
th { color: var(--muted); background: var(--subtle); font-size: 12px; font-weight: 800; }
td { font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
td small { display: block; max-width: 320px; margin-top: 3px; color: var(--muted); }
.cell-action { text-align: right; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; min-height: 24px; padding: 1px 8px; color: #526058; background: #eef1ef; border-radius: 999px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.status-published { color: #08623d; background: #e5f5ec; }
.status-pending { color: var(--warning); background: #fff3da; }
.status-rejected, .status-removed { color: var(--danger); background: #fdebea; }
.section-band { margin-top: 38px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.section-title h2 { font-size: 20px; }
.section-title span { color: var(--muted); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 40px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.stats div { padding: 20px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.stats strong { font-size: 27px; }
.review-list { display: grid; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.review-row { display: grid; grid-template-columns: 1fr minmax(280px, 390px); gap: 28px; padding: 20px; border-bottom: 1px solid var(--line); }
.review-row:last-child { border-bottom: 0; }
.review-main > div:first-child { display: flex; gap: 10px; align-items: center; }
.review-main p { margin: 4px 0; color: var(--muted); font-size: 13px; }
.review-main pre { max-width: 680px; margin: 12px 0 0; padding: 12px; white-space: pre-wrap; color: #344039; background: var(--subtle); border-radius: 4px; }
.review-actions { display: grid; gap: 10px; align-content: start; }
.review-actions form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) {
  .app-grid { grid-template-columns: 1fr; }
  .form-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .review-row { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .shell { width: min(100% - 24px, 1160px); }
  .topbar, .topbar-inner { height: auto; min-height: 60px; }
  .topbar-inner { align-items: flex-start; padding: 14px 0; }
  .topbar nav { justify-content: flex-end; flex-wrap: wrap; gap: 10px 14px; }
  .topbar nav > a, .link-button { font-size: 13px; }
  .page { padding-top: 28px; }
  h1 { font-size: 27px; }
  .catalog-head, .auth-layout { grid-template-columns: 1fr; gap: 20px; }
  .auth-layout { margin-top: 0; }
  .auth-heading { padding-top: 0; }
  .auth-heading h1 { font-size: 30px; }
  .action-heading { align-items: flex-start; }
  .form-grid, .form-grid-4 { grid-template-columns: 1fr; }
  .form-panel { padding: 18px; }
  .app-card { grid-template-columns: 48px 1fr; }
  .app-icon { width: 48px; height: 48px; }
  .app-card > .button { grid-column: 1 / -1; width: 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .review-actions form { grid-template-columns: 1fr; }
  .pagination { flex-wrap: wrap; }
}
