:root { --ink: #1c1b19; --red: #c4122f; --line: #e6e1d8; --paper: #f7f5f1; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
a { color: var(--red); }
button, input, select, textarea { font: inherit; }
button {
  background: var(--ink);
  color: #fff;
  border: 0;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}
.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: 210px;
  background: #161616;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 1rem 0.8rem;
  gap: 0.2rem;
}
.side a, .side button {
  color: #fff;
  text-decoration: none;
  background: transparent;
  text-align: left;
  padding: 0.45rem 0.55rem;
}
.side a.on { background: var(--red); }
.side .brand { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.6rem; }
.side .who { margin: 0.4rem 0.55rem 0.8rem; color: #c8c2b6; font-size: 0.85rem; }
.side form { margin-top: auto; }
.work { margin-left: 210px; padding: 1.4rem 1.6rem 3rem; }
.work h1 { margin-top: 0; }
.flash { padding: 0.7rem 0.9rem; }
.flash.ok { background: #e5f2e6; }
.flash.bad { background: #fde8e8; }
.stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.stats p { background: #fff; border: 1px solid var(--line); padding: 0.8rem 1rem; margin: 0; }
.actions { display: flex; gap: 0.6rem; align-items: center; }
.button, a.button {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  padding: 0.55rem 0.9rem;
}
a.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
table { width: 100%; border-collapse: collapse; background: #fff; margin-top: 1rem; }
th, td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.filters, .inline, .sheet { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: end; }
.sheet { flex-direction: column; align-items: stretch; max-width: 760px; }
label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.92rem; }
input, select, textarea { border: 1px solid #ccc; padding: 0.5rem 0.6rem; background: #fff; width: 100%; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.muted { color: #666; }
.check { flex-direction: row; align-items: center; gap: 0.5rem; }
.check input { width: auto; }
fieldset { border: 1px solid var(--line); padding: 0.8rem 1rem; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin: 0.6rem 0 1.2rem; }
.slot {
  background: #fff;
  border: 1px dashed #c8c2b6;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.slot img { width: 100%; height: 90px; object-fit: cover; }
.slot span { padding: 0.45rem 0.6rem; font-size: 0.85rem; }
.thumb { width: 96px; height: 54px; object-fit: cover; display: block; background: #eee; }
.listino { overflow-x: auto; }
.listino input { width: 5.4rem; }
.listino th, .listino td { white-space: nowrap; }
.row-form { display: flex; gap: 0.4rem; align-items: center; }
.row-form select, .row-form input { width: auto; }
.banner-editor { display: flex; flex-direction: column; gap: 0.7rem; }
.banner-editor canvas { width: 100%; height: auto; background: #fff; border: 1px solid var(--line); }
.editor-colors { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 0.8rem; }
.banner-editor input[type="color"] { height: 2.4rem; padding: 0.2rem; }
.editor-status { margin: 0; min-height: 1.2em; }
.danger { margin-top: 1.5rem; }
.danger button { background: var(--red); }
.login-body { min-height: 100vh; display: grid; place-items: center; }
.login { width: min(380px, calc(100% - 2rem)); background: #fff; padding: 1.4rem; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.8rem; }
.login .brand { margin: 0; font-weight: 700; letter-spacing: 0.04em; }
@media (max-width: 800px) {
  .side { position: static; width: auto; }
  .work { margin-left: 0; }
  .split, .slots, .editor-colors { grid-template-columns: 1fr; }
}
