/* === Dark Neon Cashier v2 Theme === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at top, #0b0b18 0%, #050509 80%);
  color: #e4e4e4;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  overflow-x: hidden;
}

.app {
  width: 100%;
  max-width: 1250px;
  background: rgba(16, 16, 32, 0.95);
  border: 1px solid #23234a;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 0 24px rgba(92, 44, 255, 0.25);
  backdrop-filter: blur(6px);
}

/* === Header === */
header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

h1 {
  font-size: 1.9rem;
  color: #8e66ff;
  text-shadow: 0 0 10px #5c26ff, 0 0 20px rgba(92, 38, 255, 0.5);
  letter-spacing: 0.5px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

select,
input[type="date"],
input[type="number"],
input[type="text"],
button {
  background: #13132a;
  color: #f1f1f1;
  border: 1px solid #303055;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

select:focus,
input:focus {
  outline: none;
  border-color: #8e66ff;
  box-shadow: 0 0 8px #8e66ff;
}

button {
  background: linear-gradient(90deg, #8e66ff, #5cc9ff);
  border: none;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(142, 102, 255, 0.5);
  border-radius: 6px;
  transition: transform 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(142, 102, 255, 0.9);
}

/* === Main Layout === */
main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.panel {
  background: #14142b;
  border: 1px solid #24244a;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 0 12px rgba(92, 44, 255, 0.15);
}

.panel h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: #93a3ff;
  text-shadow: 0 0 8px rgba(147, 163, 255, 0.4);
}

.panel h3 {
  margin-top: 18px;
  font-size: 1.05rem;
  color: #9c7dff;
}

/* === Form Layouts === */
.card-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.card-form input,
.card-form select {
  flex: 1 1 130px;
}

.card-form button {
  flex: 0 0 auto;
  background: linear-gradient(90deg, #9f7cff, #5ce1ff);
  padding: 6px 12px;
}

/* === List Containers === */
.list {
  background: #0f0f1a;
  border: 1px solid #292955;
  border-radius: 8px;
  padding: 10px;
  min-height: 60px;
  margin-top: 6px;
  overflow-y: auto;
  max-height: 280px;
  box-shadow: inset 0 0 8px rgba(142, 102, 255, 0.25);
}

.list div {
  display: flex;
  justify-content: space-between;
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.list div:last-child {
  border-bottom: none;
}

.list span {
  font-size: 0.9rem;
}

/* === POS (Point of Sale) === */
#cart {
  background: #101025;
  border: 1px solid #292950;
  border-radius: 10px;
  padding: 8px;
  margin-top: 10px;
  min-height: 80px;
  box-shadow: inset 0 0 8px rgba(142, 102, 255, 0.25);
  font-size: 0.9rem;
}

.pos-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* === Expense Highlight === */
#expenseList div {
  color: #ffc7c7;
}

#expenseList div span:last-child {
  color: #ff7070;
  font-weight: 600;
}

/* === Footer === */
footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #777;
  border-top: 1px solid #222;
  padding-top: 10px;
}

footer small {
  color: #5c5cff;
  text-shadow: 0 0 6px #4a4aff;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(#8e66ff, #5cc9ff);
  border-radius: 4px;
}
::-webkit-scrollbar-track {
  background: #1a1a2a;
}

/* === Receipt (for print & PDF) === */
.receipt {
  font-family: "Courier New", monospace;
  background: #fff;
  color: #000;
  padding: 10px;
  border-radius: 6px;
  width: 280px;
  margin: auto;
  font-size: 0.85rem;
}

.receipt h3 {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 10px;
}

.receipt hr {
  border: none;
  border-top: 1px dashed #000;
  margin: 6px 0;
}

/* === Responsive === */
@media (max-width: 900px) {
  main {
    grid-template-columns: 1fr;
  }
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .controls {
    width: 100%;
    justify-content: flex-start;
  }
  .app {
    padding: 12px;
  }
}

.hidden {
  display: none !important;
}

#receiptArea {
  display: none;
}

#receiptArea.active {
  display: block;
}
