* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body, html {
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: 10px;
  gap: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.display-card {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 15px;
  border-radius: 12px;
  text-align: left;
  color: #000;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#amountDisplay {
  font-size: 5em;
  font-weight: bold;
  margin-bottom: 5px;
}


.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 8px;
  flex: 2;
  max-height: 40%;
}

button {
  padding: 18px;
  font-size: 1.2em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
}

.num-key {
  background-color: #666;
}

.func-key.gray {
  background-color: #888;
}

.func-key.red {
  background-color: #e9353d;
}

.func-key-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 8px;
}

.app-header {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  padding: 0 10px;
  font-size: 0.7rem;
  font-weight: 300;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  width: 100%;
  margin-bottom: 6px;
}

.partner-id {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(5, 106, 45, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fdfcfc;
  font-size: 0.7rem;
}

.partner-id.valid {
  background: rgba(60, 179, 113, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: white;
}

.firm-name {
  margin-left: auto;
  text-align: right;
  font-size: 0.7rem;
  font-weight: 300;
  margin-bottom: 6px;
}

.display-details {
  margin-top: 4px;
  text-align: right;
}

.currency-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: #000;
  font-family: "Helvetica Neue", sans-serif;
}

.customer-info {
  margin-top: 2px;
}

.info-muted {
  font-size: 0.6rem;
  font-weight: 300;
  color: #777;
  font-style: italic;
}

.info-bold {
  font-size: 0.65rem;
  font-weight: 700;
  color: #222;
}

.info-small {
  font-size: 0.8rem;
  font-weight: 400;
  color: #444;
}

.info-firma {
  font-size: 1rem;
  font-weight: 900;
  color: #444;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 6px;
  margin: 0;
}

.cwx-id-display {
  font-size: 1.2rem;
  font-weight: 400;
  color: #222;
  font-family: "Helvetica Neue", Arial, sans-serif;
  margin: 4px 0;
}

.note-display {
  font-size: 0.8rem;
  font-weight: 300;
  color: #444;
  font-style: italic;
  font-family: "Helvetica Neue", Arial, sans-serif;
  margin: 4px 0;
}


#qr-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

#qr-overlay.hidden {
  display: none;
}

.qr-box {
  position: relative;
  width: 90%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#qr-reader {
  width: 100%;
}

.close-button {
  margin-top: 10px;
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  background-color: #e9353d;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.terminal-id {
  font-size: 0.65rem;
  font-weight: 500;
  color: #222;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: rgba(255, 255, 255, 0.3);
  padding: 4px 6px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: inline-block;
  margin-top: 4px;
  margin-bottom: 4px;
}

.logout-button {
  background-color: #e9353d;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}
.login-body {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: "Helvetica Neue", Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100dvh;
  margin: 0;
}

.login-container {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 30px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.login-container h2 {
  margin-bottom: 24px;
  color: #333;
  font-size: 1.5rem;
}

.login-container input {
  width: 100%;
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

.login-container button {
  background-color: #e9353d;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.login-logo {
  max-width: 100px;
  margin-bottom: 20px;
}

.login-error {
  color: #e9353d;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.retoure-mode #amountDisplay {
  color: #e9353d;
}

.retoure-label {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-top: 6px;
}

.retoure-button {
  background-color: #e9353d;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
}
.retoure-key.retoure-inactive {
  background-color: #e9353d;
  color: white;
}

.retoure-key.retoure-active {
  animation: blink-retoure 1s infinite;
  background-color: #ffffff;
  color: #e9353d;
  border: 2px solid #e9353d;
}

@keyframes blink-retoure {
  0%   { background-color: #ffffff; color: #e9353d; }
  50%  { background-color: #e9353d; color: #ffffff; }
  100% { background-color: #ffffff; color: #e9353d; }
}
/* Button row for aligning Logout and Retoure buttons side by side */
.button-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

#noteDropdown {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: none;
  font-size: 1rem;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  width: 80%;
  max-width: 320px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}