:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #192a36;
  background: #f4f6f8;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  min-height: 72px;
  background: #152936;
  color: #fff;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
header strong {
  font-size: 25px;
  letter-spacing: 2px;
}
header strong span {
  color: #e9b35b;
}
.environment {
  font-size: 11px;
  letter-spacing: 1px;
  color: #d5e2eb;
}
header button {
  margin-left: auto;
}
#shell {
  display: flex;
  min-height: calc(100vh - 72px);
}
nav {
  flex: 0 0 220px;
  padding: 24px 16px;
  background: #fff;
  border-right: 1px solid #dde3e8;
}
nav a {
  display: block;
  color: #52616d;
  text-decoration: none;
  padding: 13px 16px;
  border-radius: 6px;
  margin-bottom: 4px;
}
nav a[aria-current="page"] {
  background: #e7edf2;
  color: #183c53;
  font-weight: 700;
}
main {
  padding: 32px;
  min-width: 0;
  width: 100%;
  max-width: 1460px;
}
h1 {
  font-size: 29px;
  margin: 0 0 10px;
}
h2 {
  font-size: 19px;
  margin: 0 0 16px;
}
p {
  color: #52616d;
  line-height: 1.6;
  max-width: 850px;
}
.panel {
  background: white;
  border: 1px solid #dde3e8;
  border-radius: 9px;
  padding: 22px;
  margin: 22px 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.metric {
  font-size: 27px;
  font-weight: 650;
}
.muted,
small {
  color: #62727e;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}
input,
select,
textarea {
  font: inherit;
  color: #192a36;
  background: white;
  padding: 11px;
  border: 1px solid #bcc8d1;
  border-radius: 5px;
  min-height: 44px;
  width: 100%;
  max-width: 100%;
}
textarea {
  min-height: 80px;
}
button {
  font: inherit;
  min-height: 44px;
  padding: 10px 17px;
  border: 0;
  background: #224d69;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
}
button.secondary {
  background: #e7edf2;
  color: #224158;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:hover {
  filter: brightness(0.94);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #d89c3d;
  outline-offset: 3px;
}
form {
  display: grid;
  gap: 16px;
  max-width: 850px;
}
form button {
  justify-self: start;
}
.row {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.row label {
  flex: 1;
  min-width: 150px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
th {
  text-align: left;
  color: #62727e;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
td,
th {
  padding: 13px 10px;
  border-bottom: 1px solid #e7ebee;
  vertical-align: top;
}
td.number,
th.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
td input[type="number"] {
  max-width: 110px;
}
td button {
  white-space: nowrap;
}
code {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-block;
  border-radius: 4px;
  padding: 4px 8px;
  background: #fff2d8;
  color: #735015;
  font-size: 12px;
}
#notice {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(90vw, 650px);
  background: #183c53;
  color: white;
  border-radius: 7px;
  box-shadow: 0 3px 16px #0002;
  padding: 15px 20px;
  display: none;
}
.error {
  background: #fff0ee;
  color: #963e30;
  border: 1px solid #efc9c3;
  border-radius: 5px;
  padding: 12px;
  margin: 12px 0;
  overflow-wrap: anywhere;
}
pre {
  white-space: pre-wrap;
  font-size: 12px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
#login {
  max-width: 400px;
  margin-top: 30px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  header {
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .environment {
    font-size: 9px;
  }
  #shell {
    display: block;
  }
  nav {
    display: flex;
    overflow-x: auto;
    padding: 8px;
    border-bottom: 1px solid #dde3e8;
    gap: 5px;
  }
  nav a {
    white-space: nowrap;
    margin: 0;
    padding: 12px;
  }
  main {
    padding: 22px 16px;
  }
  h1 {
    font-size: 25px;
  }
  .panel {
    padding: 16px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .row {
    align-items: stretch;
  }
  .row label {
    min-width: 130px;
  }
  td,
  th {
    padding: 12px 7px;
  }
  .metric {
    font-size: 24px;
  }
}
td .badge {
  min-width: 100px;
  max-width: 150px;
}
td button {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  white-space: normal;
  min-width: 115px;
}
td details {
  margin-top: 8px;
}
td code {
  white-space: nowrap;
}
fieldset {
  min-width: 0;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  margin: 0 0 18px;
  padding: 14px;
}
legend { font-weight: 600; padding: 0 6px; }
label.project-choice { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.project-choice input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; }

/* Inherited POS receipt preview styles; printing remains device-local. */
.thermal-receipt {
  width: 80mm;
  max-width: 100%;
  background: #fff;
  color: #000;
  border: 1px solid #dde3e8;
  padding: 4mm;
  font-family: "Courier New", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10pt;
  line-height: 1.25;
}

.thermal-receipt.receipt-58 {
  width: 58mm;
  font-size: 7.5pt;
  line-height: 1.18;
  padding: 2mm;
}

.receipt-center {
  text-align: center;
}

.receipt-logo {
  display: block;
  max-width: 42mm;
  max-height: 16mm;
  margin: 0 auto 2mm;
  object-fit: contain;
  filter: grayscale(1) contrast(3);
}

.receipt-58 .receipt-logo {
  max-width: 28mm;
  max-height: 11mm;
  margin-bottom: 1.5mm;
}

.receipt-note {
  margin-top: 2mm;
  white-space: pre-wrap;
}

.receipt-rule {
  border-top: 1px dashed #000;
  margin: 2.5mm 0;
}

.receipt-58 .receipt-rule {
  margin: 1.5mm 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 3mm;
}

.receipt-58 .receipt-row {
  gap: 1mm;
}

.receipt-row span,
.receipt-row strong,
.receipt-item div {
  overflow-wrap: anywhere;
}

.receipt-row span:first-child {
  flex: 1 1 auto;
}

.receipt-row span:last-child,
.receipt-row strong:last-child {
  flex: 0 0 auto;
  text-align: right;
}

.receipt-currency {
  margin-bottom: 1mm;
  text-align: right;
  font-size: 0.9em;
}

.receipt-item {
  margin-bottom: 2mm;
}

.receipt-58 .receipt-item {
  margin-bottom: 1.25mm;
}

.receipt-total {
  font-size: 1.15em;
  font-weight: 900;
}
