body {
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 1100px;
  margin: auto;
}

h1 {
  margin-bottom: 15px;
}

.card {
  background: #fff;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.selector select {
  width: 100%;
  padding: 8px;
}

.selector input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
}

.search-results {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-height: 280px;
  overflow-y: auto;
  margin-top: 8px;
  display: none;
}

.search-results.active {
  display: block;
}

.customer-result {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}

.customer-result:hover {
  background: #f8fafc;
}

.customer-result:last-child {
  border-bottom: none;
}

.customer-name {
  font-weight: 600;
  color: #1f2937;
}

.customer-meta {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

.info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.balance-box {
  background: #222;
  color: #fff;
  padding: 15px 20px;
  border-radius: 6px;
  text-align: center;
  min-width: 180px;
}

.balance-box strong {
  display: block;
  font-size: 22px;
  margin-top: 5px;
}

.table {
  margin-top: 10px;
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 140px 120px 1fr 120px;
  padding: 8px;
  align-items: center;
}

.table-header {
  background: #eee;
  font-weight: bold;
}

.table-row:nth-child(even) {
  background: #f9f9f9;
}

.amount.pos {
  color: green;
}

.amount.neg {
  color: red;
}

.balance {
  font-size: 26px;
  font-weight: bold;
}

.balance.pos {
  color: #61e167; /* πράσινο */
}

.balance.neg {
  color: #ff0000; /* κόκκινο */
}

.print-btn {
  margin: 15px 0;
  padding: 8px 16px;
  font-size: 15px;
  background: #1976d2;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.print-btn:hover {
  background: #125aa0;
}

/* 🔴 ΤΙ ΔΕΝ ΘΕΛΟΥΜΕ ΝΑ ΤΥΠΩΘΕΙ */
@media print {
  /* Απόκρυψη στοιχείων που δεν χρειάζονται στην εκτύπωση */
  select,
  button,
  .print-btn,
  .payment-box,
  .back-btn,
  .selector {
    display: none !important;
  }

  body {
    background: white;
    padding: 5px;
    margin: 0;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: none;
    padding: 8px 10px;
    margin-bottom: 8px;
    page-break-inside: avoid;
  }

  h1 {
    font-size: 24px;
    margin: 5px 0 8px 0;
  }

  h2 {
    font-size: 20px;
    margin: 5px 0;
  }

  h3 {
    font-size: 18px;
    margin: 8px 0 5px 0;
  }

  .info {
    margin-bottom: 10px;
    padding: 8px 10px;
  }

  .balance-box {
    background: #333 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .table {
    margin-top: 5px;
    page-break-inside: auto;
  }

  .table-header,
  .table-row {
    font-size: 13px;
    border-bottom: 1px solid #ddd;
    padding: 5px 8px;
    page-break-inside: avoid;
  }

  .table-header {
    background: #f0f0f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    font-weight: bold;
  }

  .amount.pos {
    color: green !important;
  }

  .amount.neg {
    color: red !important;
  }
}

.payment-box {
  margin: 20px 0;
  padding: 15px;
  background: #f5f5f5;
  border-radius: 8px;
}

.payment-box h3 {
  margin-top: 0;
}

.payment-box input,
.payment-box select {
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
}

.payment-box button {
  background: #2e7d32;
  color: white;
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}

.payment-box button:hover {
  background: #1b5e20;
}
