:root {
  font-family:
    Segoe UI,
    Arial,
    sans-serif;
  color: #253832;
  background: #f6f7f5;
  font-synthesis: none;
  --bg: #f6f7f5;
  --card: #fff;
  --text: #253832;
  --muted: #6b7973;
  --line: #e4e9e5;
  --green: #245c4d;
  --pale: #edf3ef;
  --amber: #c28a45;
  --shadow: 0 3px 16px #1d493907;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
html[data-theme="dark"] {
  --bg: #14231e;
  --card: #20352c;
  --text: #e5eee8;
  --muted: #b4c4b9;
  --line: #3a5043;
  --pale: #2b4638;
  --shadow: none;
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font-weight: 600;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--green);
  color: #fff;
  transition: filter 0.1s;
}
button:hover {
  filter: brightness(1.08);
}
button:disabled {
  opacity: 0.48;
  cursor: default;
}
button svg,
svg {
  width: 24px;
  height: 24px;
  flex: none;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}
a {
  color: var(--green);
  overflow-wrap: anywhere;
}
html[data-theme="dark"] a {
  color: #b4d7c3;
}
.secondary {
  background: var(--pale);
  color: var(--text);
  border: 1px solid var(--line);
}
.danger {
  background: #f5e6e1;
  color: #903b2d;
}
.link-button {
  background: none;
  color: var(--green);
  padding: 8px 5px;
  min-height: 44px;
}
.icon-button {
  padding: 10px;
  background: transparent;
  color: inherit;
  min-width: 44px;
}
h1 {
  font-size: 27px;
  line-height: 1.2;
  margin: 0 0 10px;
}
h2 {
  font-size: 19px;
  margin: 0 0 16px;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.6;
  margin: 12px 0;
}
small,
.muted {
  color: var(--muted);
  font-weight: 400;
}
small {
  display: block;
  font-size: 13px;
  line-height: 1.6;
}
.pre-line {
  white-space: pre-line;
}
.error {
  color: #b33e34;
}
.error:empty {
  display: none;
}
header {
  height: 72px;
  padding: 10px max(18px, calc((100vw - 1060px) / 2));
  background: #245c4d;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 3px 12px #173e2c12;
}
.brand {
  font-size: 22px;
  font-weight: 650;
  white-space: nowrap;
}
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px 115px;
  min-height: 80vh;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.page-title,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-title h1,
.section-title h2 {
  margin: 0;
}
.greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  padding: 0 5px;
}
.greeting h1 {
  font-size: 30px;
}
.greeting p {
  color: var(--muted);
  margin-top: 6px;
}
.still-art {
  color: var(--amber);
  margin-right: 24px;
}
.still-art svg {
  height: 80px;
  width: 80px;
  stroke-width: 1;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0 28px;
}
.metric-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 24px;
  min-height: 142px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  font-weight: 400;
  text-align: left;
}
.metric-card svg {
  color: var(--green);
  position: absolute;
  right: 23px;
  top: 22px;
}
.metric-card span {
  padding-right: 25px;
  font-size: 15px;
}
.metric-card strong {
  font-size: 29px;
  font-weight: 650;
  color: var(--green);
  margin-top: 18px;
}
.metric-card:nth-child(4) strong,
.metric-card:nth-child(4) svg {
  color: var(--amber);
}
html[data-theme="dark"] .metric-card strong,
html[data-theme="dark"] .metric-card svg,
html[data-theme="dark"] .link-button {
  color: #aed2be;
}
.event {
  background: transparent;
  border-radius: 0;
  color: var(--text);
  padding: 16px 0;
  text-align: left;
  display: flex;
  width: 100%;
  justify-content: flex-start;
  border-top: 1px solid var(--line);
  gap: 16px;
  font-weight: 400;
}
.event > span:nth-child(2) {
  flex: 1;
}
.event > svg {
  width: 18px;
  color: var(--muted);
}
.event strong {
  font-size: 15px;
}
.event-icon {
  border-radius: 12px;
  width: 42px;
  height: 42px;
  background: var(--pale);
  color: var(--green);
  display: grid;
  place-items: center;
}
.events .section-title {
  margin-bottom: 4px;
}
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.quick-actions button {
  min-height: 64px;
  font-size: 16px;
}
.quick-actions button:nth-child(2n) {
  background: var(--card);
  color: var(--green);
  border: 1px solid var(--green);
}
.bottom-nav {
  display: flex;
  justify-content: center;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 6;
  background: var(--card);
  box-shadow: 0 -3px 18px #153b3010;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav button {
  background: none;
  color: var(--muted);
  border-radius: 0;
  flex: 1;
  max-width: 220px;
  min-height: 80px;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 400;
}
.bottom-nav button.active {
  color: var(--green);
  font-weight: 650;
  box-shadow: inset 0 3px var(--green);
}
#drawer {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(340px, 95vw);
  z-index: 20;
  padding: 18px;
  background: var(--card);
  border-right: 1px solid var(--line);
  box-shadow: 15px 0 80px #142d3b44;
  overflow: auto;
}
#drawer[hidden] {
  display: none;
}
#drawer > button {
  display: flex;
  justify-content: flex-start;
  background: none;
  color: var(--text);
  width: 100%;
  margin: 3px 0;
}
#drawer > button.active {
  background: var(--pale);
  color: var(--green);
}
.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.drink-row,
.request-row {
  display: flex;
  width: 100%;
  text-align: left;
  color: var(--text);
  gap: 20px;
  font-weight: 400;
  justify-content: flex-start;
}
.drink-row > span {
  flex: 1;
}
.drink-row strong {
  font-size: 19px;
}
.drink-row > svg,
.request-row > svg {
  width: 18px;
}
.drink-photo {
  width: 94px;
  height: 94px;
  object-fit: cover;
  border-radius: 16px;
}
.drink-icon {
  width: 94px;
  height: 94px;
  background: var(--pale);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--amber);
  flex: none;
}
.drink-icon svg {
  width: 48px;
  height: 48px;
  stroke-width: 1.2;
}
.stock-stats {
  display: flex;
  gap: 22px;
  margin-top: 13px;
  font-size: 13px;
}
.stock-stats b {
  display: block;
  font-size: 16px;
  margin-top: 3px;
}
.drink-heading {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.drink-heading > div:nth-child(2) {
  flex: 1;
}
.drink-heading .drink-photo,
.drink-heading .drink-icon {
  width: 120px;
  height: 120px;
}
.stock-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 24px;
}
.stock-summary strong {
  display: block;
  font-size: 23px;
  color: var(--text);
  margin-top: 9px;
}
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 20px;
}
.tabs button {
  flex: 1;
  background: none;
  color: var(--muted);
}
.tabs button.active {
  background: var(--pale);
  color: var(--green);
}
.stock-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.stock-line:last-child {
  border-bottom: 0;
}
.stock-line > div:last-child {
  text-align: right;
}
.stock-line strong {
  display: block;
  margin: 5px 0;
}
.four-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}
.badge {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--pale);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  margin: 5px 5px 5px 0;
  color: var(--text);
}
.actions,
.contact-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.contact-actions a {
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
}
.request-row > div {
  flex: 1;
}
.request-row p {
  margin-bottom: 0;
}
.request-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.line-allocation {
  display: grid;
  gap: 10px;
  width: 45%;
}
.finance {
  background: var(--pale);
  border-radius: 14px;
  padding: 20px;
  margin: 24px 0;
}
.finance h2 {
  font-size: 16px;
}
.finance p {
  display: flex;
  justify-content: space-between;
}
.private-label {
  color: var(--muted);
  font-size: 14px;
}
.notice {
  border-left: 3px solid var(--amber);
  background: var(--pale);
  padding: 16px;
  border-radius: 0 12px 12px 0;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
td,
th {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 15px 10px;
  white-space: normal;
}
th {
  font-weight: 600;
  color: var(--muted);
}
.empty {
  text-align: center;
  padding: 35px 16px;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 400;
}
.history-entry {
  font-size: 13px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.calculator-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.calculator-list > button {
  display: flex;
  justify-content: flex-start;
  text-align: left;
  color: var(--text);
  margin: 0;
}
.calculator-list > button > span {
  flex: 1;
}
.calculator-list strong {
  font-size: 16px;
}
.calculator-list > button > svg:first-child {
  color: var(--amber);
}
.calculator-list > button:disabled {
  opacity: 0.6;
}
.calc-result {
  background: var(--pale);
  padding: 20px;
  border-radius: 12px;
  margin: 20px 0;
}
.calc-result p {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.news-photo {
  max-width: 100%;
  max-height: 300px;
  border-radius: 12px;
}
.highlight {
  border-color: var(--amber);
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--bg);
  color: var(--text);
  min-width: 0;
  min-height: 46px;
}
label {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}
label input,
label select,
label textarea {
  margin-top: 7px;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 13px;
  margin: 18px 0;
  padding: 18px;
  min-width: 0;
}
legend {
  font-size: 14px;
  color: var(--muted);
  padding: 0 8px;
}
.check,
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.check input,
.radio input {
  width: 20px;
  min-height: 20px;
  flex: none;
  margin: 0;
  accent-color: var(--green);
}
details {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
summary {
  cursor: pointer;
  min-height: 32px;
  font-weight: 600;
}
details[open] summary {
  margin-bottom: 16px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  width: min(660px, 96vw);
  max-height: 90dvh;
  overflow: auto;
  color: var(--text);
  background: var(--card);
}
dialog::backdrop {
  background: #112f2677;
  backdrop-filter: blur(3px);
}
dialog form > .page-title {
  position: sticky;
  top: -28px;
  background: var(--card);
  padding-top: 12px;
  z-index: 2;
}
dialog h2 {
  margin: 0;
}
dialog form > button[type="submit"] {
  width: 100%;
  margin-top: 10px;
}
dialog .actions button {
  flex: 1;
}
canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
#toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: #183e31;
  color: #fff;
  padding: 14px 22px;
  border-radius: 14px;
  z-index: 100;
  width: max-content;
  max-width: 90vw;
  font-size: 14px;
  box-shadow: 0 4px 24px #142d3b33;
}
#toast[hidden] {
  display: none;
}
.login {
  max-width: 480px;
  padding-top: 70px;
}
.login h1,
.login > p {
  text-align: center;
}
.login .card {
  margin-top: 30px;
}
.login button {
  width: 100%;
}
.brandmark {
  display: grid;
  place-items: center;
  color: var(--amber);
  margin-bottom: 22px;
}
.brandmark svg {
  width: 64px;
  height: 64px;
}
.presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.presets button {
  min-width: 58px;
  padding: 10px;
}
.process-list {
  display: grid;
  gap: 12px;
}
.photo-field {
  padding: 15px;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.photo-field label:last-of-type {
  margin-bottom: 10px;
}
@media (max-width: 600px) {
  header {
    height: 64px;
    padding: 8px 12px;
  }
  .brand {
    font-size: 20px;
  }
  main {
    padding: 20px 16px 105px;
  }
  .greeting {
    min-height: 103px;
  }
  .greeting h1 {
    font-size: 26px;
  }
  .still-art {
    margin-right: 8px;
  }
  .still-art svg {
    width: 66px;
    height: 66px;
  }
  .metrics {
    gap: 12px;
    margin: 16px 0 22px;
  }
  .metric-card {
    padding: 17px;
    min-height: 136px;
  }
  .metric-card svg {
    right: 14px;
    top: 17px;
    width: 21px;
  }
  .metric-card span {
    font-size: 13px;
    line-height: 1.5;
    max-width: 150px;
  }
  .metric-card strong {
    font-size: 25px;
    margin-top: 16px;
  }
  .card {
    padding: 19px;
    border-radius: 16px;
    margin-bottom: 18px;
  }
  .events {
    padding: 18px;
  }
  .event {
    gap: 12px;
  }
  .event-icon {
    width: 35px;
    height: 35px;
  }
  .event-icon svg {
    width: 20px;
  }
  .section-title h2 {
    font-size: 17px;
  }
  .event strong {
    font-size: 14px;
  }
  .quick-actions {
    gap: 12px;
  }
  .quick-actions button {
    font-size: 14px;
    min-height: 60px;
    padding: 12px 8px;
    gap: 7px;
  }
  .quick-actions button svg {
    width: 20px;
  }
  .bottom-nav button {
    min-height: 74px;
    padding: 10px 2px;
    font-size: 11px;
  }
  .bottom-nav svg {
    width: 23px;
  }
  .page-title {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }
  .page-title h1 {
    font-size: 25px;
  }
  .page-title > button {
    font-size: 13px;
  }
  .drink-row {
    padding: 16px;
    gap: 13px;
  }
  .drink-photo,
  .drink-icon {
    width: 67px;
    height: 82px;
    border-radius: 12px;
  }
  .drink-row strong {
    font-size: 17px;
  }
  .drink-row small {
    font-size: 11px;
  }
  .stock-stats {
    gap: 14px;
    font-size: 11px;
  }
  .stock-stats b {
    font-size: 15px;
  }
  .drink-heading {
    flex-wrap: wrap;
  }
  .drink-heading .drink-photo,
  .drink-heading .drink-icon {
    width: 78px;
    height: 98px;
  }
  .drink-heading h1 {
    font-size: 24px;
  }
  .drink-heading p {
    font-size: 13px;
  }
  .stock-summary {
    gap: 10px;
    font-size: 11px;
  }
  .stock-summary strong {
    font-size: 20px;
  }
  .tabs button {
    font-size: 13px;
    padding: 12px 9px;
  }
  .stock-line {
    font-size: 13px;
    gap: 10px;
  }
  .stock-line small {
    font-size: 11px;
  }
  .four-actions button {
    font-size: 13px;
  }
  .request-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .request-row h2 {
    font-size: 18px;
  }
  .request-row p {
    font-size: 13px;
  }
  .request-row > .badge {
    margin-right: auto;
  }
  .request-line {
    flex-wrap: wrap;
  }
  .line-allocation {
    width: 100%;
  }
  .finance p {
    font-size: 13px;
  }
  .calculator-list {
    grid-template-columns: 1fr;
  }
  .calculator-list .card {
    padding: 18px;
  }
  .table-wrap {
    margin-left: -5px;
    margin-right: -5px;
  }
  td,
  th {
    padding: 12px 7px;
    font-size: 12px;
  }
  dialog {
    padding: 22px 18px;
    border-radius: 18px;
  }
  dialog form > .page-title {
    top: -22px;
  }
  dialog h2 {
    font-size: 21px;
  }
  .calc-result p {
    font-size: 14px;
  }
  .login {
    padding-top: 44px;
  }
  .contact-actions > * {
    font-size: 13px;
  }
  .bottom-nav button.active {
    color: var(--green);
  }
  html[data-theme="dark"] .bottom-nav button.active {
    color: #b4d7c3;
  }
}
