/* === Global Layout === */
body {
  margin: 0;
  font-family: 'Poppins', Arial, sans-serif;
  background-color: #131315;
  color: #f5f5f5;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  overflow-x: hidden;
  position: relative;

}

/* === Login Screen === */
.login-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #131315;
}

.login-card {
  background-color: #1e1e20;
  border: 2px solid #2a2a2d;
  border-radius: 12px;
  padding: 50px;
  width: 320px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.login-card h1 {
  color: #fde901;
  margin-bottom: 30px;
  font-size: 1.5rem;
}

/* Match addForm input style */
.login-card input[type="text"],
.login-card input[type="password"] {
  height: 42px;
  width: 100%;
  padding: 0px 12px;
  box-sizing: border-box;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #3a3a3d;
  background-color: #f7f7f7eb;
  color: #131315;
  font-size: 14px;
}


/* === Dashboard Container === */
.dashboard {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* === Sidebar === */
.sidebar {
  width: 250px;
  background-color: #131315;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  border-right: 2px solid #1e1e20;
  flex-shrink: 0;
}

.logo {
  text-align: left;
  margin-bottom: 40px;
}

.logo img {
  width: 180px;
  height: 60px;
  margin-bottom: 10px;
}

nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.nav-btn {
  background: none;
  border: none;
  color: #bbb;
  font-size: 16px;
  text-align: left;
  padding: 15px 30px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover,
.nav-btn.active {
  background-color: #1e1e20;
  color: #fde901;
}

/* === Main Content === */
.main-content {
  flex-grow: 1;
  background-color: #1e1e20;
  padding: 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

header {
  border-bottom: 2px solid #fde901;
  margin-bottom: 20px;
}

header h1 {
  color: #fde901;
  margin: 0;
}

/* === QR Code Display === */
.qr-display {
  margin-top: 40px;
  text-align: center;
}

.qr-display img {
  width: 300px;
  height: 300px;
  border: 4px solid #d4af37;
  border-radius: 10px;
  background: white;
}

/* === Buttons === */
.yellow-btn {
  background-color: #fde901;
  color: #131315;
  font-weight: 600;
  border: none;
  margin-left: 4px;
  border-radius: 6px;
  padding: 10px 20px;
  cursor: pointer;
  transition: 0.2s ease;
}

.yellow-btn:hover {
  background-color: #9F8000;
  color: #fff;
}

button.removeBtn {
  background: #ce0015;
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  margin-left: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}

button.removeBtn:hover {
  background: #9b000f;
}

.hidden {
  display: none;
}
.reveal-button {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  margin-top: 1rem;
  cursor: pointer;
}

/* === Inventory Table === */
table {
  width: 80%;
  border-collapse: collapse;
  margin-top: 20px;
}

th {
  text-align: left;
  padding: 8px 8px;
  background-color: #2a2a2d;
  color: #fde901;
  font-size: 15px; /* ↓ optional: smaller font */

}

td {
  padding: 8px 8px; /* ↓ from 10px */
  border-bottom: 1px solid #333;
  font-size: 15px; /* ↓ optional: smaller font */
}

td input[type="number"] {
  background-color: #2a2a2d;
  border: 1px solid #3a3a3d;
  color: #fff;
  border-radius: 5px;
  text-align: center;
  width: 60px; /* ↓ from 70px */
  padding: 4px; /* ↓ from 5px */
  font-size: 13px; /* ↓ optional: smaller font */
}

#addForm {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
#addForm input[type="text"],
#addForm input[type="number"] {
  height: 42px;
  width: 200px; /* Fixed reasonable width */
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #3a3a3d;
  background-color: #2a2a2d;
  color: #fff;
  font-size: 14px;
}

#addForm button.yellow-btn {
  height: 42px;
  padding: 10px 20px;
  white-space: nowrap;
}

.redeem-container {
  width: 90%;
  max-width: 600px;
  margin: 5vh auto;
  padding: 40px 20px;
  text-align: center;
  background-color: #1e1e20;
  border: 2px solid #2a2a2d;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.redeem-container h1 {
  color: #fde901;
  margin-bottom: 20px;
}

.redeem-result h1.success {
  color: #d4af37;
  margin: 10px 0;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}

.redeem-result h1.used {
  color: #ff4b5c;
  margin: 10px 0;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}

.redeem-result h2 {
  color: #f5f5f5;
  margin-bottom: 10px;
  font-size: clamp(1rem, 4vw, 1.5rem);
}

.redeem-result .emoji {
  font-size: 48px;
  margin-bottom: 20px;
}


.qr-display-page {
  background-color: #131315;
  color: #f5f5f5;
  font-family: 'Poppins', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
}

.qr-display-page h1 {
  color: #fde901;
  margin-bottom: 30px;
  font-size: 1.8rem;
}

#qrContainer img {
  width: 300px;
  height: 300px;
  border: 4px solid #d4af37;
  border-radius: 10px;
  background: white;
}

#qrContainer p {
  color: #bbb;
  font-size: 1rem;
}


/* === Inventory Update Layout === */
.modify-box,
.add-box {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-bottom: 20px;
}

.modify-box select,
.modify-box input,
.add-box input {
  height: 42px;
  min-width: 160px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #3a3a3d;
  background-color: #2a2a2d;
  color: #fff;
  font-size: 14px;
}

.modify-box button,
.add-box button {
  flex: 1 1 20%;
  min-width: 120px;
  max-width: 160px;
  height: 42px;
  white-space: nowrap;
}

/* === Scrollbar === */
.main-content::-webkit-scrollbar {
  width: 8px;
}

.main-content::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

.main-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}