* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: #000000;
  font-family: 'Courier New', Courier, monospace;
}
.screen {
  background: #0000AA;
  color: #FFFFFF;
  min-height: 100vh;
  max-width: 1024px;
  margin: 0 auto;
  padding: 18px 22px 70px;
  position: relative;
  box-shadow: 0 0 80px rgba(0,0,0,.9);
  font-size: 17px;
  line-height: 1.4;
}
.crt {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3px);
}
.topbar {
  border-bottom: 2px solid #AAAAAA;
  padding-bottom: 6px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #FFFF55;
  font-weight: bold;
}
.topbar .brand { color: #FFFFFF; }
.statusbar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1024px;
  background: #AAAAAA;
  color: #000000;
  padding: 5px 12px;
  font-size: 15px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 80;
}
.statusbar b {
  background: #0000AA;
  color: #FFFFFF;
  padding: 0 6px;
}
h1.dos {
  color: #FFFF55;
  text-align: center;
  letter-spacing: 3px;
  margin: 8px 0 18px;
  font-size: 21px;
  text-transform: uppercase;
}
.box {
  border: 3px double #AAAAAA;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.msg { text-align: center; font-weight: bold; }
.msg.err { color: #FF5555; }
.msg.ok { color: #55FF55; }
.menu .mitem {
  display: block;
  color: #FFFFFF;
  text-decoration: none;
  padding: 6px 10px;
}
.menu .mitem .n { color: #55FF55; }
.menu .mitem:hover, .menu .mitem.sel {
  background: #AAAAAA;
  color: #000000;
}
.menu .mitem:hover .n, .menu .mitem.sel .n { color: #00008B; }
table.dos { width: 100%; border-collapse: collapse; }
table.dos th {
  color: #FFFF55;
  text-align: left;
  border-bottom: 2px solid #AAAAAA;
  padding: 4px 6px;
  white-space: nowrap;
}
table.dos td { padding: 3px 6px; vertical-align: middle; }
table.dos tr:hover td { background: #000080; }
.num { text-align: right; white-space: nowrap; }
.center { text-align: center; }
.dim { color: #AAAAAA; }
.warn { color: #FF5555; font-weight: bold; }
.okc { color: #55FF55; }
.btn {
  background: #AAAAAA;
  color: #000000;
  border: none;
  font-family: inherit;
  font-size: 15px;
  padding: 5px 14px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: inset -2px -2px 0 #555555, inset 2px 2px 0 #FFFFFF;
}
.btn:active { box-shadow: inset 2px 2px 0 #555555; }
.btn.primary { background: #FFFF55; }
.btn.danger { background: #FF5555; }
input[type=text], input[type=number], input[type=password], select {
  background: #000000;
  color: #55FF55;
  border: 2px solid #AAAAAA;
  font-family: inherit;
  font-size: 17px;
  padding: 5px 8px;
  caret-color: #55FF55;
}
input:focus, select:focus { outline: 2px dotted #FFFF55; outline-offset: -1px; }
label.f { display: inline-block; margin: 8px 12px 0 0; }
label.f b { color: #FFFF55; display: block; font-size: 14px; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cursor::after { content: '\2588'; animation: blink 1s steps(1) infinite; }
.totline { display: flex; justify-content: space-between; padding: 2px 4px; }
.totline.grand { color: #FFFF55; font-weight: bold; font-size: 19px; border-top: 2px solid #AAAAAA; margin-top: 6px; padding-top: 6px; }
dialog {
  background: #0000AA;
  color: #FFFFFF;
  border: 3px double #AAAAAA;
  padding: 18px;
  width: min(560px, 92vw);
}
dialog::backdrop { background: rgba(0,0,170,.75); }
dialog h2 { color: #FFFF55; margin-bottom: 12px; text-align: center; letter-spacing: 1px; }
.payrow label { margin-right: 16px; cursor: pointer; }
.bigfield { width: 160px; font-size: 22px !important; text-align: right; }
pre.ticket {
  background: #FFFFFF;
  color: #000000;
  padding: 16px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 14px;
  font-size: 15px;
  line-height: 1.3;
}
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
@media print {
  body * { visibility: hidden; }
  pre.ticket, pre.ticket * { visibility: visible; }
  pre.ticket { position: absolute; left: 0; top: 0; width: 100%; }
  .crt, .statusbar { display: none; }
}

body.tactile { font-size: 21px; }
body.tactile .btn { min-height: 56px; font-size: 20px; padding: 10px 20px; }
body.tactile input[type=text], body.tactile select { font-size: 22px; padding: 10px 12px; }
body.tactile table.dos td, body.tactile table.dos th { padding: 8px 8px; font-size: 19px; }
.qgrid { display: flex; flex-wrap: wrap; gap: 8px; }
.qgrid form { margin: 0; }
.qgrid .btn { min-width: 150px; min-height: 74px; line-height: 1.2; }
