:root {
  --bg: #f4f7f6;
  --panel: #fff;
  --ink: #172421;
  --muted: #63716d;
  --line: #d7e1dd;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --danger: #dc2626;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Arial, Helvetica, sans-serif; }
h1, h2, h3, p { margin-top: 0; }
h1 { color: var(--accent); font-size: 1.7rem; margin-bottom: 4px; }
main { max-width: 1180px; margin: 0 auto; padding: 24px; }
.topbar { align-items: center; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; gap: 12px; justify-content: space-between; padding: 20px 28px; }
.menu-button { background: #fff; border: 1px solid var(--line); color: var(--accent); font-size: 1.2rem; min-width: 48px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 30px rgba(15,35,31,.08); margin-bottom: 18px; padding: 18px; }
.narrow { max-width: 460px; }
.panel-head { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.grid { display: grid; gap: 14px; margin-bottom: 14px; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: block; font-weight: 700; }
input, select, textarea { background: #fff; border: 1px solid #cbd5d1; border-radius: 6px; color: var(--ink); display: block; font: inherit; margin-top: 6px; min-height: 42px; padding: 9px 10px; width: 100%; }
textarea { resize: vertical; }
button { background: var(--accent); border: 0; border-radius: 6px; color: #fff; cursor: pointer; font: inherit; font-weight: 800; min-height: 42px; padding: 10px 16px; }
button:hover { background: var(--accent-dark); }
button.secondary { background: #e5e7eb; color: #1f2937; }
button.danger { background: var(--danger); }
.side-menu { background: #fff; border-right: 1px solid var(--line); bottom: 0; box-shadow: 20px 0 40px rgba(0,0,0,.14); left: 0; max-width: 620px; padding: 20px; position: fixed; top: 0; width: 50vw; z-index: 20; }
.side-menu-head { align-items: center; display: flex; justify-content: space-between; margin-bottom: 18px; }
.menu-overlay { background: rgba(0,0,0,.25); bottom: 0; left: 0; position: fixed; right: 0; top: 0; z-index: 10; }
.menu-link { background: #eef4f2; color: var(--ink); display: block; margin-bottom: 8px; text-align: left; width: 100%; }
.menu-link:hover { background: #dcebe7; }
.menu-note { border-top: 1px solid var(--line); color: var(--muted); margin-top: 18px; padding-top: 14px; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab { background: #e5e7eb; color: #1f2937; }
.tab.active { background: var(--accent); color: #fff; }
.button-row { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.label-preview { border: 1px dashed #93a7a1; border-radius: 8px; display: grid; gap: 6px; margin-top: 16px; max-width: 520px; min-height: 150px; padding: 16px; }
.subpanel { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.table-wrap { border: 1px solid var(--line); border-radius: 7px; margin-top: 14px; overflow: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; }
th { background: #eef4f2; }
.list { display: grid; gap: 8px; margin-top: 16px; }
.row { background: #f8faf9; border: 1px solid var(--line); border-radius: 7px; display: grid; gap: 6px; padding: 12px; }
.row strong { color: var(--accent); }
.muted, .status { color: var(--muted); }
.status.error { color: var(--danger); font-weight: 800; }
@media print {
  body * { visibility: hidden; }
  .table-wrap, .table-wrap * { visibility: visible; }
  .table-wrap { border: 0; left: 0; position: absolute; top: 0; width: 100%; }
}
@media (max-width: 800px) {
  .two, .three { grid-template-columns: 1fr; }
  .topbar, .panel-head { align-items: flex-start; flex-direction: column; }
  .side-menu { max-width: none; width: 88vw; }
}
