/* Colors come from the brand settings (set as CSS variables at start-up). No color is written here. */
:root { --bg:#1C1E21; --surface:#25282C; --line:#3C4046; --text:#FFFFFF; --muted:#E3E5E8; --subtle:#AAB0B7; --accent:#9CC3B4; --ink:#1C1E21; --warn:#E8A33D; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1 { font-size: 24px; margin: 0; }
h2 { font-size: 18px; margin: 0; }
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.nav { flex: 1 1 220px; max-width: 250px; border-right: 1px solid var(--line); padding: 20px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav .brand { padding: 0 8px 18px; font-weight: 700; letter-spacing: .02em; }
.nav .brand img { max-height: 22px; max-width: 190px; display: block; }
.nav a { display: flex; justify-content: space-between; align-items: center; min-height: 42px; padding: 0 10px; color: var(--text); text-decoration: none; }
.nav a.on { background: var(--line); font-weight: 600; }
.nav .badge { color: var(--accent); font-weight: 600; }
.nav .foot { margin-top: auto; padding: 16px 10px 0; font-size: 13px; color: var(--subtle); display: flex; flex-direction: column; gap: 8px; }
.main { flex: 999 1 640px; min-width: 0; padding: 24px 28px 64px; display: flex; flex-direction: column; gap: 20px; max-width: 1240px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.card { background: var(--surface); border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.grid.narrow { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
label.f, div.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=number], input[type=date], input[type=email], select, textarea {
  background: var(--bg); border: 1px solid var(--line); min-height: 44px; padding: 0 12px; width: 100%; font-size: 15px; }
textarea { padding: 10px 12px; min-height: 110px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); background: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--text); }
.btn.primary { background: var(--accent); color: var(--ink); border-color: var(--accent); font-weight: 600; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn.link { border: 0; padding: 0 4px; color: var(--accent); text-decoration: underline; min-height: 36px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.pill { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); background: transparent; }
.pill[aria-pressed=true] { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line); }
.seg button { min-height: 40px; padding: 0 14px; border: 0; background: transparent; }
.seg button[aria-pressed=true] { background: var(--accent); color: var(--ink); }
.muted { color: var(--muted); } .subtle { color: var(--subtle); font-size: 13px; }
.tag { font-size: 12px; padding: 3px 8px; border: 1px solid var(--line); white-space: nowrap; }
.tag.accent { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.tag.warn { border-color: var(--warn); color: var(--warn); }
.list { display: flex; flex-direction: column; gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--text); text-decoration: none; }
.item .thumb { width: 96px; height: 68px; background: var(--line); object-fit: cover; flex: none; }
.item .txt { flex: 1 1 260px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.price { color: var(--accent); font-weight: 700; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo { position: relative; background: var(--line); }
.photo img { width: 100%; height: 96px; object-fit: cover; display: block; }
.photo .tools { display: flex; justify-content: space-between; }
.photo .tools button { border: 0; background: transparent; min-height: 34px; min-width: 34px; color: var(--text); }
.photo .st { position: absolute; top: 4px; left: 4px; }
.docrow { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.docrow:last-child { border-bottom: 0; }
.mark { width: 24px; height: 24px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; border: 1px solid var(--line); }
.mark.ok { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.mark.wait { border-color: var(--accent); color: var(--accent); }
.mark.bad { border-color: var(--warn); color: var(--warn); }
.box { border: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { min-height: 44px; padding: 0 16px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--subtle); }
.tabs button[aria-selected=true] { border-bottom-color: var(--accent); color: var(--text); font-weight: 600; }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .wide { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.split > .side { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: 16px; }
.toast { position: fixed; right: 16px; bottom: 16px; background: var(--accent); color: var(--ink); padding: 12px 16px; font-weight: 600; z-index: 9; max-width: 420px; }
.toast.err { background: var(--warn); color: #1B1F24; }
.problems { border: 1px solid var(--warn); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.problems li { margin-left: 18px; }
.sr { position: absolute; left: -9999px; }
.center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login { width: 100%; max-width: 420px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 500; color: var(--subtle); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scroll { overflow-x: auto; }
.meter { height: 10px; background: var(--line); }
.meter > span { display: block; height: 100%; background: var(--accent); }
@media (max-width: 700px) {
  .nav { max-width: none; flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .nav .brand { width: 100%; padding-bottom: 8px; }
  .nav .foot { width: 100%; margin-top: 8px; flex-direction: row; flex-wrap: wrap; }
  .main { padding: 18px 14px 64px; }
}

.check { display: flex; gap: 10px; align-items: flex-start; }
.check > span:last-child { flex: 1; min-width: 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { opacity: .6; }
