/* --- Root & Layout --- */
:root {
    --primary: #0a6b4e;
    --danger: #ff4757;
    --gray: #f3f4f6;
}

body {
    background-color: #f9fafb;
    overflow-x: hidden;  /* ✅ Hidden horizontal */
    overflow-y: auto;    /* ✅ Allow vertical scroll */
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;   /* ✅ Minimal full screen */
}

/* --- Container Fix --- */
.nota-body {
    background: #f9fafb;
    padding: 16px;
    padding-bottom: 120px; /* Ruang untuk footer */
}

/* --- Item Card Design --- */
.nota-row-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    border: 1px solid #f1f1f1;
}

.nota-row-info {
    flex: 1;
    cursor: pointer;
}

/* Container Popup Nota Tersimpan */
.box-draft-nota {
    max-width: 420px !important;
    height: 80vh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.list-draft-container {
    padding: 0 !important;
    flex: 1;
    overflow-y: auto;
    background: #fff;
}

/* Label Waktu (Sticky) */
.draft-group-label {
    background: #f8fafc;
    color: #64748b;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Baris Item Nota */
.item-draft {
    display: flex !important;
    align-items: stretch;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
}

.item-draft:hover {
    background: #f0fdf4;
}

.item-draft-icon {
    background: #0a6b4e;
    color: #fff;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.item-draft-details {
    flex: 1;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-draft-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-draft-name {
    font-size: 15px;
    color: #1e293b;
    font-weight: 700;
}

.item-draft-time {
    font-size: 12px;
    color: #94a3b8;
}

.item-draft-mid {
    font-size: 13px;
    color: #64748b;
}

.item-draft-bot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.item-draft-price {
    font-weight: 800;
    color: #0a6b4e;
    font-size: 16px;
}

.empty-draft-state {
    text-align: center;
    padding: 60px 20px;
    color: #cbd5e1;
}

.empty-draft-state i {
    font-size: 50px;
    margin-bottom: 10px;
}

.item-name {
    font-weight: 600;
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 4px;
}

.item-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-qty-price {
    font-size: 13px;
    color: #6b7280;
}

.reseller-tag {
    font-size: 11px;
    background: #eefdf5;
    color: #0a6b4e;
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
    font-weight: 600;
}

.nota-row-action {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-subtotal {
    font-weight: 700;
    color: #0a6b4e;
    font-size: 15px;
}

.btn-del {
    color: #d1d5db;
    font-size: 20px;
    transition: color 0.2s;
}

.btn-del:hover {
    color: var(--danger);
}

/* --- Header & Action Nav --- */
.nota-header {
    background: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f1f1;
    height: 70px; /* Tinggi tetap agar konsisten */
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Tombol Kembali Lingkaran */
.btn-circle-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f8f9fa;
    color: #0a6b4e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-circle-back:hover {
    background: #0a6b4e;
    color: #fff;
}

/* Metadata Pelanggan */
.user-meta {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.meta-value-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1f2937;
}

.meta-value-wrapper i {
    color: #0a6b4e;
    font-size: 14px;
}

.meta-value {
    font-size: 15px;
    font-weight: 700;
}

/* Tombol Draft Tersimpan yang Lebih Elegan */
.btn-draft-list {
    background: #eefdf8; /* Warna ungu sangat muda */
    border: 1px solid #f3e8ff;
    padding: 6px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-draft-list:hover {
    background: #e7fbf5;
    transform: translateY(-1px);
}

.btn-draft-badge {
    background: #085a41; /* Ikon Ungu sesuai gambar tersimpan */
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.btn-draft-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.btn-draft-text small {
    font-size: 10px;
    color: #085a41;
    font-weight: 600;
}

.btn-draft-text span {
    font-size: 12px;
    font-weight: 700;
    color: #085a41;
}

.nota-actions {
    display: flex;
    justify-content: center; /* Mengumpulkan menu di tengah */
    gap: 30px;               /* Jarak antar menu yang konsisten */
    padding: 15px 24px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px 10px;
    border-radius: 8px;
    min-width: 80px;
}

.action-item:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.action-item span {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-top: 8px;
}

/* Penyesuaian Warna Icon Box agar lebih hidup */
.icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.icon-box.blue   { background: #eff6ff; color: #2563eb; }
.icon-box.green  { background: #ecfdf5; color: #10b981; }
.icon-box.purple { background: #faf5ff; color: #8b5cf6; }
.icon-box.red    { background: #fef2f2; color: #ef4444; }
/* Warna khusus icon box saat lunas/disable */
.icon-box.gray { 
    background: #f3f4f6; 
    color: #9ca3af; 
}

/* Pastikan transisi halus saat teks berubah */
.action-item {
    transition: all 0.2s ease;
}

/* Warna teks khusus untuk tombol hapus */
.action-item.danger span {
    color: #ef4444;
}

/* --- Footer Summary --- */
.nota-footer {
    background: #fff;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
    border-radius: 20px 20px 0 0;
    padding: 20px 24px;
}

.summary-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #6b7280;
}

.total-main {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 5px;
}

.total-main .label {
    font-weight: 700;
    color: #111;
    font-size: 16px;
}

.total-main .value {
    color: #0a6b4e;
    font-size: 20px;
}

.btn-main-pay {
    background: #0a6b4e;
    color: #fff;
    border: none;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    margin-top: 10px;
}

/* --- Empty State --- */
.empty-state-nota {
    text-align: center;
    padding: 60px 0;
    color: #d1d5db;
}

.empty-state-nota i {
    font-size: 60px;
    margin-bottom: 15px;
}


.nota-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    height: 100vh;
    margin: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
}


/* HEADER */

.nota-status {
    background: #0a6b4e;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* ACTION */
/* CSS Khusus Popup Cetak Sesuai Gambar */
.enota-card {
    background: #e7fbf5;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.enota-info {
    flex: 1;
}

.enota-info strong {
    font-size: 18px;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.enota-info small {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.enota-actions {
    display: flex;
    gap: 15px;
}

.enota-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    font-size: 11px;
    font-weight: 600;
}

.enota-btn i, .enota-btn span.icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.printer-section-title {
    font-weight: 800;
    color: #1a237e; /* Biru gelap */
    margin-bottom: 12px;
    font-size: 18px;
}

.search-printer-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.search-printer-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    background: #f1f3f9;
    border: none;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
}

.printer-list-group {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.printer-group-label {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.printer-item {
    padding: 10px 0;
    cursor: pointer;
}

.printer-name {
    color: #6a1b9a; /* Ungu sesuai gambar */
    font-weight: 700;
    font-size: 15px;
}



.nota-actions .danger {
    color: red;
}


.nota-left{
  display:flex;
  align-items:center;
  gap:16px;
}

.btn-back{
  background:none;
  border:none;
  font-size:18px;
  cursor:pointer;
  color:#0a6b4e;
  font-weight:600;
}

.nota-pelanggan small{
  font-size:11px;
  color:#777;
}

.nota-pelanggan strong{
  font-size:14px;
  color:#111;
}


/* BODY */
.nota-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}


.nota-body h2 {
    text-align: center;
    color: #0a6b4e;
    margin-bottom: 24px;
}



.item-price {
    text-align: right;
}

.item-remove {
    text-align: right;
    color: red;
    cursor: pointer;
}

/* SUMMARY */
.nota-summary {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    font-size: 16px;
}

.nota-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px dashed #ddd;
    border-bottom: 1px dashed #ddd;
    margin: 10px 0;
}

.nota-summary-row span {
    font-size: 14px;
    color: #666;
}

.nota-summary-row strong {
    font-size: 16px;
    color: #0a6b4e;
}

/* FOOTER */
.nota-footer {
    position: sticky;
    bottom: 0;
    border-top: 1px solid #ddd;
    padding: 16px 24px;
    background: #e7fbf5ff;
}


.nota-footer .total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.nota-row {
    display: grid;
    grid-template-columns: 1fr 80px 160px 50px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 15px;
}


.nota-row button {
    background: none;
    border: none;
    color: red;
    font-size: 18px;
    cursor: pointer;
}


.pay-btn {
    position: relative;
    z-index: 1;
    width: 100%;
    background: #0a6b4e;
    color: #fff;
    border: none;
    padding: 16px;
    font-size: 18px;
    border-radius: 10px;
    cursor: pointer;
}



.popup-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.popup-header h3 {
  flex: 1;
  text-align: center;
  margin: 0;
}


.back-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.btn-primary {
  background: #0a6b4e;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.popup-content {
  padding: 20px;
  overflow-y: auto;
}


.popup-box {
  pointer-events: auto;
  position: relative;
  z-index: 10000;
  width: 100%;
  max-width: 480px;
  height: auto;
  max-height: 90vh;
  background: #fff;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,.2);
  overflow: hidden;
}


/* SEARCH */
.search {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 16px;
}

/* LIST */
/* WRAPPER LIST */
#listPelanggan {
  display: flex;
  flex-direction: column;
}
#listPelanggan .search {
  width: 95%
}

/* AREA SCROLL LIST */
#pelangganList {
  height: 520px;        /* ← tinggi tetap */
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 10px;
}

/* ITEM LIST */
/* ITEM LIST PELANGGAN (REVISI) */
.pelanggan-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f1f1f1;
}

.pelanggan-item:last-child {
  border-bottom: none;
}

.pelanggan-item:hover {
  background: #f3fdf9;
}

/* AVATAR FIX */
.avatar {
  width: 42px;
  height: 42px;
  background: #0a6b4e;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* INFO */
.pelanggan-info {
  display: flex;
  flex-direction: column;
}

.pelanggan-info small {
  color: #666;
  font-size: 13px;
}

.arrow {
  margin-left: auto;
  font-size: 22px;
  color: #999;
}

/* FORM */
form label {
  margin-top: 12px;
  display: block;
  font-weight: 600;
}

form input,
form textarea {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.gender {
  display: flex;
  gap: 12px;
}

.gender button {
  width: 50%;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #ccc;
  background: none;
  border-radius: 8px;
  cursor: pointer;
}

.gender button.active {
  background: #0a6b4e;
  color: #fff;
  border-color: #0a6b4e;
}


.btn-save {
  position: relative;
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  background: #0a6b4e;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  z-index: 10;
}

.btn-save:hover {
  background: #085a41;
}

.btn-save:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}


#formPelanggan {
  display: none;
}

#formPelanggan input, #formPelanggan textarea {
    width: 95%;
}


.simpan-nota-box {
  width: 90%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  font-family: 'Inter', sans-serif;
}

.popup-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
}

.popup-desc {
  margin: 8px 0 22px;
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

.popup-label {
  font-size: 14px;
  font-weight: 600;
  color: #0a6b4e;
  display: block;
  margin-bottom: 8px;
}

.popup-select {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 2px solid #0a6b4e;
  font-size: 15px;
  outline: none;
  margin-bottom: 8px;
}

.popup-input {
  width: 90%;
  padding: 14px;
  border-radius: 10px;
  border: 2px solid #0a6b4e;
  font-size: 15px;
  outline: none;
  margin-bottom: 8px;
}

.popup-input:focus {
  box-shadow: 0 0 0 3px rgba(10,107,78,.2);
}

/* WRAPPER */
.input-rp {
  position: relative;
  width: 100%;
}

/* RP PREFIX */
.rp-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 16px;
  color: #0a6b4e;
  line-height: 1;
  pointer-events: none;
}

/* INPUT */
.input-rp-field {
  width: 100%;
  height: 52px;
  padding-left: 52px;
  padding-right: 14px;

  border-radius: 10px;
  border: 2px solid #0a6b4e;

  font-size: 16px;
  font-weight: 600;

  line-height: normal; /* ⬅️ INI KUNCI */
  box-sizing: border-box;
}




.popup-btn {
  width: 100%;
  margin-top: 22px;
  padding: 16px;
  border-radius: 999px;
  border: none;
  background: #0a6b4e;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.popup-btn:hover {
  background: #085a41;
}

/* Pastikan overlay yang aktif benar-benar berada di depan dan bisa diklik */

/* Pastikan box popup berada di atas overlay */
.popup-box {
    position: relative;
    z-index: 10000 !important;
    pointer-events: auto !important;
}

/* Pastikan item di dalam list memiliki area klik yang jelas */


/* Tambahan agar scroll popup lancar */
.popup-content {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

.popup-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Area Gelap lebih kontras */
    z-index: 10000; /* Pastikan sangat tinggi */
    justify-content: center;
    align-items: center;
    cursor: pointer; 
}

.popup-overlay.active {
    display: flex !important; /* Gunakan !important untuk melawan inline style JS */
}

.popup-box {
    cursor: default; /* Agar klik di dalam kotak putih tidak menutup modal */
    pointer-events: auto; /* Pastikan tombol di dalam bisa diklik */
    position: relative;
    z-index: 10001;
}

#popupNota .popup-box {
    /* MENGATUR LEBAR */
    width: 95%;          /* Lebar relatif terhadap layar (cocok untuk mobile) */
    max-width: 500px;    /* Lebar maksimal agar tidak terlalu lebar di PC */

    /* MENGATUR TINGGI KESELURUHAN */
    height: 80vh;        /* Pop-up akan memakan 80% tinggi layar */
    max-height: 90vh;    /* Batas maksimal agar tidak menempel ke tepi layar */

    border-radius: 8px;
    display: flex;
    flex-direction: column; /* Penting agar header tetap di atas dan konten bisa scroll */
}

.nota-judul {
    font-size: 14px;
    font-weight: 700;
    color: #0a6b4e;
    margin: 15px 0 10px 0;
    padding: 8px 15px;
    background: #e7f3ef;
    border-left: 4px solid #0a6b4e;
}


#popupNota .popup-content {
  max-height: 500vh;
  overflow-y: auto;
}

#popupNota .nota-item {
  cursor: pointer;
  pointer-events: auto;
  z-index: 1;
}

/* CSS KHUSUS POPUP NOTA SEPERTI GAMBAR */
#popupNota .popup-box {
    max-width: 400px;
    border-radius: 4px; /* Lebih kotak sesuai gambar */
}

#popupNota .popup-header {
    justify-content: flex-start;
    gap: 20px;
    padding: 15px;
}

#popupNota .popup-header h3 {
    flex: 1;
    text-align: left;
    font-size: 18px;
}


.nota-group-label {
    background: #f1f5f9; /* Abu-abu muda yang bersih */
    color: #475569;      /* Warna teks slate */
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;    /* Membuat label menempel saat scroll */
    top: 0;
    z-index: 5;
}

.nota-item-revisi {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    min-height: 80px;
}

.nota-item-revisi:hover {
    background: #f9f9f9;
}

.nota-icon-side {
    background: #4e5d6c; /* Abu-abu gelap kebiruan */
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.nota-content-main {
    flex: 1;
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nota-content-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nota-content-top strong {
    font-size: 16px;
    color: #333;
}

.nota-content-top span.time {
    color: #888;
    font-size: 13px;
}

.nota-content-mid {
    color: #777;
    font-size: 13px;
    margin: 2px 0;
}

.nota-content-bot {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nota-content-bot .price {
    color: #0a6b4e; /* Ungu */
    font-weight: 700;
    font-size: 15px;
}

.nota-check-icon {
    color: #2ecc71;
    font-size: 18px;
}

/* Penyesuaian search bar di dalam popup */
.popup-search-container {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.popup-search-container input {
    width: 100%;
    padding: 10px;
    background: #f1f3f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}


.popup-header {
  padding: 14px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}

.popup-content {
  max-height: 660px;
  overflow-y: auto;
}

.nota-item {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.nota-item:hover {
  background: #f6f6f6;
}

.nota-nama {
  font-weight: 600;
}

.nota-info {
  font-size: 13px;
  color: #666;
}

/* Container Box Nota Tersimpan */
.nota-tersimpan-box {
    display: flex;
    flex-direction: column; /* Pastikan konten mengalir ke bawah */
    overflow: hidden;
}

.draft-list-container {
    flex: 1;
    overflow-y: auto; /* Scroll hanya pada bagian list */
    padding: 0;
}

.nota-item-revisi {
    display: flex; /* Gunakan flex agar icon side dan content sejajar */
    width: 100%;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.nota-content-main {
    flex: 1;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
}

/* Hindari item meluber */
.nota-content-top {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.popup-search-container {
    position: relative;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.popup-search-container .search-icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.popup-search-container input {
    width: 100%;
    padding: 12px 15px 12px 40px; /* Ruang untuk ikon search */
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
}


.nota-group-label {
    background: #f8fafc;
    color: #64748b;
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
}


.nota-item-revisi:hover {
    background: #f0fdf4; /* Warna hijau Wonosunyo sangat muda */
}

.nota-icon-side {
    background: #0a6b4e !important; /* Hijau Wonosunyo */
    opacity: 0.9;
    width: 50px !important;
}

.nota-content-top strong {
    font-size: 15px;
    color: #1e293b;
}

.nota-content-mid {
    font-size: 12px;
    color: #64748b;
    margin: 4px 0;
}

.nota-content-bot .price {
    color: #0a6b4e;
    font-size: 16px;
}

.empty-draft {
    text-align: center;
    padding: 50px 20px;
    color: #cbd5e1;
}

.empty-draft i {
    font-size: 48px;
    margin-bottom: 10px;
}

.close-btn {
  cursor: pointer;
  font-size: 20px;
}

/* BAYAR POPUP */
.bayar-box {
  max-width: 720px;
}

.bayar-header {
  padding: 16px;
  border-bottom: 1px solid #eee;
}

.bayar-header h3 {
  margin: 0;
  text-align: center;
  flex: 1;
}

.bayar-content {
  padding: 20px;
}

.label-muted {
  color: #6b7280;
  font-size: 14px;
}

.total-bayar {
  font-size: 34px;
  font-weight: 800;
  color: #0a6b4e;
  margin: 6px 0 18px;
}

.auto-nominal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.auto-nominal button {
  padding: 12px;
  border-radius: 12px;
  border: 2px solid #0a6b4e;
  background: #f0fdf9;
  font-weight: 700;
  color: #0a6b4e;
  cursor: pointer;
}

.auto-nominal button:hover {
  background: #0a6b4e;
  color: #fff;
}

.bayar-btn {
  background: #0a6b4e;
  margin-top: 8px;
}


#popupKembalian .popup-box {
  width: 90%;
  max-width: 360px;
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
}

#popupKembalian h1 {
  font-size: 36px;
  color: #4f6bed;
  margin-bottom: 12px;
}

#popupKembalian p {
  font-size: 18px;
  color: #444;
  margin-bottom: 28px;
}

#popupKembalian .btn-primary {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  border-radius: 14px;
}


#thermal {
    width: 58mm;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #000;
}

#thermal h2 {
    text-align: center;
    margin: 0;
    font-size: 16px;
}

#thermal hr {
    border: none;
    border-top: 1px dashed #000;
    margin: 6px 0;
}

#thermal .center {
    text-align: center;
}

#thermal .small {
    font-size: 10px;
}

#thermal .info {
    font-size: 11px;
}

#thermal .item {
    margin-bottom: 6px;
}

#thermal .item .nama {
    font-weight: bold;
    text-transform: uppercase;
}

#thermal .row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

#thermal .total {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 12px 0;
    font-weight: bold;
    font-size: 16px;
}

.print-actions{
  display:flex;
  gap:10px;
  margin-top:10px;
}

.popup-btn-outline{
  background:#fff;
  border:1px solid #ccc;
  color:#333;
}
.popup-btn-outline:hover{
  background:#f9f9f9;
}


#previewStruk{
  display:none;
  margin-top:12px;
  border:1px dashed #aaa;
  padding:14px;
  font-family:'Courier New', monospace;
  font-size:13px;
  white-space:pre;
  max-width:280px;      /* 58mm */
  margin-inline:auto;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
  border-radius:6px;
}

    .group-label {
        background: #f0f0f0;
        padding: 5px 10px;
        font-size: 12px;
        color: #666;
        margin-top: 15px;
        border-radius: 4px;
        text-transform: uppercase;
    }
    .nota-item-row {
        display: flex;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid #eee;
        gap: 10px;
    }
    .item-info { flex: 2; }
    .item-subtotal {
        flex: 1;
        text-align: right;
        font-weight: 700;
        color: #0a6b4e;
    }
    .btn-del {
        color: #ff4757;
        background: none;
        border: none;
        cursor: pointer;
    }

/* --- Modern Qty Control --- */
.qty-control-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #f8fafc;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.btn-qty-step {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    border: none;
    background: #fff;
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-qty-step:hover {
    background: var(--primary);
    color: #fff;
}

.btn-qty-step:active {
    transform: scale(0.9);
}

#popupQty {
    width: 60px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    outline: none;
}

/* Menghilangkan panah atas/bawah pada input number */
#popupQty::-webkit-inner-spin-button,
#popupQty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Penyesuaian header popup agar teks di tengah */
#qtyPopup .popup-header {
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
}



/* --- Bayar Popup Refinement --- */
.bayar-box {
    max-width: 420px !important;
    border-radius: 24px !important;
}

.payment-summary-card {
    background: linear-gradient(135deg, #0a6b4e 0%, #085a41 100%);
    padding: 20px;
    border-radius: 18px;
    color: white;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(10, 107, 78, 0.2);
}

.total-bayar-display {
    font-size: 32px;
    font-weight: 800;
    margin-top: 5px;
    letter-spacing: -1px;
}

.popup-label-sm {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
}

/* Method Selection Grid */
.method-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.method-item {
    padding: 12px;
    border: 2px solid #f1f5f9;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

.method-item i {
    font-size: 20px;
    color: #64748b;
}

.method-item span {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.method-item.active {
    border-color: #0a6b4e;
    background: #eefdf5;
}

.method-item.active i, .method-item.active span {
    color: #0a6b4e;
}

/* Input Payment Styling */
.input-payment-group {
    position: relative;
    margin-bottom: 15px;
}

.currency-prefix {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 800;
    color: #0a6b4e;
    font-size: 18px;
}

.payment-input-field {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    box-sizing: border-box;
    transition: all 0.2s;
}

.payment-input-field:focus {
    border-color: #0a6b4e;
    background: #f0fdf9;
    outline: none;
}

/* Shortcut Nominal */
.auto-nominal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.btn-nominal {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    font-size: 14px;
}

.btn-nominal:hover {
    background: #f1f5f9;
}

/* Final Confirm Button */
.btn-confirm-pay {
    width: 100%;
    padding: 18px;
    background: #0a6b4e;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(10, 107, 78, 0.2);
}

.btn-confirm-pay:active {
    transform: scale(0.98);
}

/* Container grid nominal */
.auto-nominal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

/* Tombol nominal profesional */
.btn-nominal {
    padding: 12px;
    border: 2px solid #e2e8f0; /* Abu-abu halus sesuai border input */
    border-radius: 12px;
    background: #f8fafc;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

/* Hover effect */
.btn-nominal:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Style khusus untuk tombol Uang Pas */
.btn-nominal.uang-pas {
    border-color: #0a6b4e; /* Hijau konsisten */
    background: #eefdf5;
    color: #0a6b4e;
}

/* Efek aktif saat diklik */
.btn-nominal:active {
    transform: scale(0.97);
}

/* Container Modal Batal */
.modal-batal-box {
    max-width: 400px !important;
    border-radius: 16px !important;
    overflow: hidden;
}

.alert-batal {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.alert-batal i {
    color: #e53e3e;
    font-size: 20px;
}

.alert-batal p {
    font-size: 13px;
    color: #9b2c2c;
    margin: 0;
    line-height: 1.4;
}

/* List Tombol Alasan */
.list-alasan-batal {
    display: flex;
    flex-direction: column;
    gap: 12 px;
}

.btn-alasan {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer !important; /* Paksa kursor tangan */
    z-index: 10001;
}

.btn-alasan:active {
    background: #f1f5f9;
    transform: scale(0.98);
}

.btn-alasan span {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.btn-alasan i {
    color: #cbd5e1;
    font-size: 12px;
}

.btn-alasan:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

.btn-alasan:hover span {
    color: #4f46e5;
}

.btn-cancel-flat {
    width: 100%;
    background: none;
    border: none;
    color: #94a3b8;
    font-weight: 700;
    font-size: 13px;
    padding: 15px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-cancel-flat:hover {
    color: #64748b;
}

/* CSS untuk Printer Thermal 58mm */
@media print {
    /* Sembunyikan seluruh tampilan aplikasi */
    body * { visibility: hidden; }
    
    /* Tampilkan hanya area struk */
    #area-cetak-html, #area-cetak-html * { 
        visibility: visible; 
    }
    
    #area-cetak-html {
        position: absolute;
        left: 0;
        top: 0;
        width: 54mm; /* Lebar optimal untuk kertas 58mm */
        font-family: 'Courier New', Courier, monospace;
        color: #000;
        background: #fff;
    }

    /* Hilangkan margin, header, dan footer otomatis browser */
    @page {
        margin: 0;
    }
}

/* Sembunyikan area ini agar tidak terlihat di layar HP/Monitor */
#area-cetak-html { display: none; }