* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f8fafc;
  color: #0f172a;
  font:
    15px system-ui,
    sans-serif;
}
header {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #dde3ea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  font-size: 18px;
}
header span {
  font-size: 14px;
}
a {
  color: #08758b;
}
nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 20px 5% 10px;
  padding: 4px;
  border: 1px solid #94a3b8;
  border-radius: 14px;
  background: #fff;
}
button {
  border: 0;
  border-radius: 9px;
  background: #0e7490;
  color: #fff;
  padding: 10px 15px;
  font-weight: 650;
  cursor: pointer;
}
button.secondary,
nav button {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}
nav button { border: 0; padding: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.navicon { color: #475569; font-size: 16px; line-height: 1; }
nav button.active .navicon { color: #0f172a; }
nav button.active {
  background: #0e7490;
  color: #fff;
}
button.danger {
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
main#app {
  padding: 10px 5% 40px;
}
.panel,
.sheet {
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px #0001;
}
.layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 20px;
}
.controls label,
.loginbox label {
  display: block;
  font-weight: 650;
  margin: 14px 0;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}
.controls > button {
  display: block;
  width: 100%;
  margin-top: 10px;
}
.controls .panel { margin-bottom: 16px; }
.controls .note textarea { min-height: 64px; }
.modebuttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modebuttons button { width: 100%; }
.modebuttons .active { background: #0e7490; }
.hidden { display: none !important; }
.new { background: transparent !important; color: #334155 !important; }
.summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; padding: 16px 24px; background: #f8fafc; border-bottom: 1px solid #cbd5e1; }
.summary span { display: grid; gap: 4px; }
.summary small { color: #64748b; }
.sheet {
  padding: 0;
  overflow: auto;
}
.sheethead {
  background: #0f172a;
  color: #fff;
  padding: 18px 24px;
  position: relative;
  min-height: 82px;
}
.sheethead > b { color: #67e8f9; font-size: 12px; letter-spacing: .14em; }
.recipe-meta { position: absolute; right: 24px; top: 18px; display: grid; gap: 4px; text-align: right; font-size: 13px; }
.recipe-meta span { color: #e2e8f0; }
.sheethead h2 {
  margin: 5px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  background: #eef2f6;
  text-align: left;
  text-transform: uppercase;
  font-size: 11px;
}
th,
td {
  padding: 9px;
  border-bottom: 1px solid #e2e8f0;
}
td small,
.row small {
  display: block;
  color: #64748b;
}
.used {
  background: #ecfeff;
}
.inactive {
  opacity: 0.5;
}
.row,
.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}
.row span,
.bar h2 {
  flex: 1;
}
.sign {
  display: none;
}
.pv {
  display: none;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.loginbox {
  width: min(420px, 92%);
  background: #fff;
  padding: 32px;
  border-radius: 18px;
  box-shadow: 0 14px 50px #0f172a20;
}
.loginbox button {
  width: 100%;
}
.logo {
  font-size: 36px;
  color: #0e7490;
}
.error {
  padding: 12px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 8px;
}
.notice {
  padding: 12px;
  background: #cffafe;
  border-radius: 8px;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  header {
    padding: 0 15px;
  }
  nav,
  main#app {
    padding-left: 15px;
    padding-right: 15px;
  }
}
@page {
  size: A4 landscape;
  margin: 9mm;
}
@media print {
  header,
  nav,
  .controls {
    display: none !important;
  }
  main#app {
    padding: 0;
  }
  .layout {
    display: block;
  }
  .sheet {
    border: 0;
    box-shadow: none;
  }
  .sheet tbody tr:not(.used) {
    display: none;
  }
  .amt {
    display: none;
  }
  .pv,
  .sign {
    display: block;
  }
  .sign {
    padding: 35px 20px 10px;
    border-top: 1px solid #ccc;
  }
  .sign span {
    float: right;
    margin-right: 25%;
  }
}
