:root {
  color-scheme: light;
  --ink: #272321;
  --muted: #6b6057;
  --paper: #f5f2ed;
  --surface: #fdfbf8;
  --border: #ded5cc;
  --accent: #75503d;
  --accent-soft: #f0e7dd;
  font-family: Inter, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; }
button, .quiet {
  min-height: 44px; cursor: pointer; border: 1px solid var(--ink); border-radius: 5px;
  padding: 10px 16px; background: var(--ink); color: #fff; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
button:disabled { opacity: .55; cursor: progress; }
.quiet { background: transparent; color: var(--ink); border-color: var(--border); }
:is(a, button, summary, input, select, textarea):focus-visible { outline: 2px solid #9b6448; outline-offset: 3px; }
.brand { color: inherit; text-decoration: none; font: 400 2rem Georgia, serif; letter-spacing: .16em; }
.brand small { display: block; letter-spacing: .06em; margin-top: 8px; font: .85rem "Segoe UI", sans-serif; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { background: var(--ink); color: var(--surface); padding: 32px 20px; display: flex; flex-direction: column; min-height: 100vh; }
.sidebar .brand { padding: 4px 6px 30px; font-size: 1.48rem; letter-spacing: .13em; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a, .store-link { color: inherit; text-decoration: none; padding: 13px 10px; border-radius: 5px; }
.sidebar nav a:hover { background: #3c322d; }
.sidebar [aria-current="page"] { background: #514036; }
.store-link { margin-top: auto; color: #e3cdbb; font-size: .9rem; }
.topbar {
  min-height: 68px; display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  padding: 10px clamp(16px, 4vw, 48px); background: var(--surface); border-bottom: 1px solid var(--border);
}
.operator { color: var(--muted); font-size: .93rem; overflow-wrap: anywhere; }
.mobile-brand, .mobile-menu { display: none; }
main#conteudo { padding: clamp(24px, 4.5vw, 58px); max-width: 1370px; margin: 0 auto; }
.page-title { margin-bottom: 25px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, serif; font-weight: 400; }
h1 { font-size: clamp(2.1rem, 5vw, 3.7rem); line-height: 1.05; margin-bottom: 10px; }
h2 { font-size: clamp(1.28rem, 3.8vw, 1.75rem); margin-bottom: 10px; }
p { color: var(--muted); line-height: 1.45; }
.panel, .metric {
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); min-width: 0;
}
.panel { padding: clamp(15px, 3vw, 25px); margin: 0 0 16px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.panel-heading h2 { margin: 0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metrics.results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { padding: clamp(12px, 3vw, 22px); display: grid; align-content: start; gap: 9px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.metric strong { font: 400 clamp(1.7rem, 4vw, 2.55rem)/1.05 Georgia, serif; font-variant-numeric: tabular-nums; }
.metric small, .product-row small, .order-row small { display: block; color: var(--muted); }
.metric:hover[href] { background: var(--accent-soft); }
.order-row, .product-row { border-top: 1px solid var(--border); min-width: 0; padding: 14px 0; display: grid; align-items: center; gap: 12px; overflow-wrap: anywhere; }
.order-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; color: var(--ink); text-decoration: none; }
.order-row:hover { background: var(--accent-soft); }
.product-row { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.product-row h2, .product-row h3 { font: 600 1rem "Segoe UI", sans-serif; margin: 0 0 5px; }
.product-row dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 0; }
.product-row dt { font-size: .8rem; color: var(--muted); }
.product-row dd { margin: 5px 0 0; font-weight: 600; }
.tag { display: inline-block; color: #664633; background: var(--accent-soft); border-radius: 5px; padding: 5px 8px; font-size: .8rem; }
.empty { padding: 22px 0; }
.notice { background: var(--accent-soft); color: var(--ink); border: 1px solid var(--border); border-radius: 5px; padding: 12px 14px; margin-bottom: 16px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 5px 0 14px; }
.field-stack { display: grid; gap: 13px; }
.toolbar label { flex: 1 1 140px; min-width: 0; }
label { display: grid; gap: 6px; color: var(--muted); font-size: .88rem; font-weight: 600; }
input, textarea, select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--border); border-radius: 5px; color: var(--ink); background: #fff; padding: 9px 10px; }
summary { cursor: pointer; min-height: 32px; font-weight: 600; }
.pagination { display: flex; gap: 10px; }
dialog { max-height: calc(100vh - 28px); width: min(520px, calc(100% - 24px)); padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #272321aa; }
.hint { font-size: .85rem; margin-bottom: 0; }
.entry { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.entry-brand { background: linear-gradient(150deg, #47342c, #272321); color: var(--surface); display: grid; place-items: center; }
.entry-brand .brand { font-size: clamp(2.3rem, 5vw, 5.6rem); }
.entry-form { display: grid; place-items: center; padding: 24px; }
.entry-inner { width: min(100%, 385px); }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; font-weight: 600; }
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar, .operator { display: none; }
  .mobile-brand, .mobile-menu { display: block; }
  .topbar { gap: 8px; justify-content: flex-end; position: relative; }
  .mobile-brand { font-size: 1.13rem; margin-right: auto; }
  .mobile-menu summary { list-style: none; padding: 12px; min-height: 44px; border: 1px solid var(--border); border-radius: 5px; }
  .mobile-menu nav { display: grid; position: absolute; top: calc(100% + 4px); right: 10px; left: 10px; z-index: 2; padding: 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); box-shadow: 0 8px 30px #27232126; }
  .mobile-menu nav a { padding: 13px; text-decoration: none; color: var(--ink); border-radius: 5px; }
  .mobile-menu [aria-current="page"] { background: var(--accent-soft); }
  main#conteudo { padding: 22px 13px; }
  .metrics, .metrics.results { gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-row { grid-template-columns: 1fr; }
  .order-row { grid-template-columns: minmax(0,1fr) auto; }
  .order-row > span:nth-child(2) { grid-row: 2; }
  .order-row > strong { grid-row: 1; grid-column: 2; }
  .entry { grid-template-columns: 1fr; grid-template-rows: 23vh auto; }
  .entry-form { align-items: start; padding: 32px 20px; }
  label, input, select, textarea { font-size: 16px; }
}
