.section {
  margin-bottom: 20px;
}

.invoice-preview {
  padding-bottom: 30px;
}

.row {
  display: flex;
  gap: 10px;
}
.row input {
  flex: 1;
}
.qty {
  max-width: 18%;
}
.amount {
  background: var(--input-bg);
  color: var(--text-color);
}

.total-section,
.total-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%; /* atau ukuran spesifik */
  /* color: var(--text-color); */
  margin-top: 5px;
  font-size: 14px;
}

.total-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%; /* atau ukuran spesifik */
  color: var(--text-color);
}

.invoice-total {
  text-align: right;
  margin: 20px 0px 20px 0;
  padding-bottom: 10px;
}

#preview-total-words {
  text-align: right;
  color: var(--text-color-desc);
}

.total-label {
  text-align: left;
  font-size: 16px;
}

.total-value {
  text-align: right;
  font-weight: bold;
  font-size: 20px;
  padding: 2px 0;
}

.total-words {
  font-size: 12px;
  text-align: right;
  white-space: normal; /* Izinkan teks wrap */
  word-wrap: break-word; /* Pecah kata panjang jika perlu */
  overflow-wrap: break-word;
  margin-top: 10px;
}

.item-invoice {
  border: 1px solid var(--table-border-color);
  padding: 12px;
  border-radius: 12px;
}
.action-buttons-invoice {
  display: flex;
  justify-content: flex-end; /* dorong tombol ke kanan */
}
.delete-btn {
  color: red;
  padding: 10px 8px;
  font-size: 12px;
  border: 1px solid var(--table-border-color);
  border-radius: 10px;
  /* background-color: var(--table-border-color); */
  background-color: transparent;
  cursor: pointer;
  transition: background-color 0.2s ease;
  max-width: 40px;
}

.action-buttons-invoice button:hover {
  background-color: var(--table-border-color);
}

/* Billed Item */
.billed-card {
  /* background-color: var(--input-bg); */
  border-radius: 16px;
  padding: 10px 15px;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* gap: 2px; */
  position: relative;
  flex: 0 0 auto; /* Jangan menyusut, tampilkan secara horizontal */
  min-width: 150px;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid var(--table-border-color);
}
.billed-card p {
  margin: 0;
  padding-bottom: 2px;
}
.billed-logo {
  width: 35px;
  height: 35px;
  border-radius: 40%;
  object-fit: cover;
}

.billed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
}

.billed-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.billed-card .email,
.billed-card .address {
  color: var(--text-color-desc);
}

.billed-card.selected {
  border: 1px solid #7056ec;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  background-color: rgba(112, 86, 236, 0.1); /* soft highlight */
}

.invoice-tnc {
  font-size: 12px;
  color: var(--text-color);
  text-align: left;
  white-space: normal; /* Izinkan teks wrap */
  word-wrap: break-word; /* Pecah kata panjang jika perlu */
  overflow-wrap: break-word;
  margin-bottom: 20px;
}

.invoice-tnc h3 {
  margin-bottom: 0px;
}

.invoice-tnc ol,
.invoice-tnc ul,
.item-desc ol,
.item-desc ul {
  padding-left: 20px;
  margin: 0;
}

.preview-footer {
  font-size: 10px;
  color: var(--text-color-desc);
  text-align: center;
  white-space: normal; /* Izinkan teks wrap */
  word-wrap: break-word; /* Pecah kata panjang jika perlu */
  overflow-wrap: break-word;
}

.footer {
  font-size: 16px;
}

/* Invoice header */
.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.invoice-info {
  text-align: left;
}

.invoice-info h1 {
  color: var(--btn-bg); /* ungu */
  margin-bottom: 10px;
  margin-top: 0px;
  font-size: 24px;
}

.invoice-info p {
  margin: 4px 0;
  font-size: 12px;
}

.invoice-logo img {
  max-height: 70px;
  border-radius: 5px;
}

.invoice-addresses {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.address-box {
  background-color: #f3e8ff; /* ungu muda */
  padding: 16px;
  border-radius: 12px;
  width: 100%;
}

.address-box h3 {
  color: #7c3aed;
  margin: 0 0 4px;
}

.address-box p {
  margin: 4px 0;
  font-size: 15px;
}

.billed-preview {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  margin-top: 10px;
}

.invoice-section img {
  width: 30px;
  height: 30px;
  border-radius: 40%;
  object-fit: cover;
}

.invoice-section {
  background-color: var(--infobox-info-bg);
  padding: 10px 12px;
  border-radius: 16px;
  width: 100%;
  text-align: left;
}

.invoice-section p {
  margin: 5px 0px;
}

#tncField,
#itemDescQuill {
  color: var(--text-color);
  margin-bottom: 10px;
  font-size: 16px;
}

/* tale styleb */
.item-desc {
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  font-size: 12px;
  color: var(--text-color-desc);
  max-width: 300px;
  display: block;
}

#preview-items .item-name {
  word-wrap: break-word;
  font-weight: bold;
  padding-bottom: 5px;
}

.select-payment-method-invoice {
  text-align: left;
}

.tnc-container {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  font-size: 16px;
}

.preview-logo {
  border: 1px solid var(--infobox-info-bg);
  padding: 5px 5px;
  border-radius: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
  max-width: 80px;
  background-color: var(--infobox-info-bg);
}

/* Button upload logo */
.custom-button {
  display: inline-block;
  background-color: var(--container-bg);
  border: 1px solid var(--btn-bg);
  color: var(--btn-bg);
  padding: 10px 15px;
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  margin: 0px;
  align-items: center;
  display: flex;
}

.custom-button i {
  margin-right: 5px;
}

.flatpickr-calendar {
  z-index: 11000 !important;
}

.ql-toolbar {
  border-radius: 10px 10px 0px 0px;
  /* background-color: var(--input-bg); */
  color: var(--text-color);
  text-align: left;
  /* overflow-x: auto; */
  /* white-space: nowrap; */
  padding: 5px 10px;
  font-size: px;
  gap: 0px;
}

.ql-editor {
  color: var(--text-color);
  font-size: 16px;
}

.ql-container {
  border-radius: 0px 0px 10px 10px;
  font-size: 16px;
  border: 1px solid var(--table-border-color);
}

/* Style DIscount */
.button-preview-section {
  margin-top: 5px;
}

.discount-type {
  max-width: 40%;
}

.discount-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1rem;
}

.discount-input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  /* justify-content: space-between; */
}

.discount-type,
#discountValue {
  padding: 10px;
  font-size: 16px;
  border: 1px solid var(--table-border-color);
  border-radius: 10px;
  /* width: 100px; */
}

#discountValue {
  flex: 1; /* Lebar mengikuti ruang sisa */
  max-width: 60%;
}

#discountInfo,
#subtotal,
#preview-subtotal,
#preview-discountInfo {
  /* font-size: 13px; */
  /* color: var(--text-color-desc, #666); */
  margin: 0;
}

hr {
  margin: 20px 0;
}

.item-desc-container {
  margin-bottom: 10px;
  font-size: 16px;
}

.date-input input {
  margin-bottom: 0;
  padding: 0;
  border: none;
  width: 95%;
  text-align: left;
  align-items: flex-start;
}

.date-input {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  box-sizing: border-box;
  margin-bottom: 15px;
  border: 1px solid var(--table-border-color);
  border-radius: 10px;
  font-size: 16px;
  color: var(--text-color);
  background-color: var(--input-bg);
  text-align: left;
}

.total-summary-section {
  background: var(--gradient-color);
  border-radius: 16px;
  padding: 15px 20px;
  color: white;
}

.invoice-date-section {
  display: flex;
  gap: 10px; /* jarak antar kolom */
  flex-wrap: wrap;
}

.date-group {
  flex: 1; /* agar dua-duanya ambil lebar seimbang */
}

.invoice-button-container {
  display: flex;
  gap: 10px;
}

.edit-button-section {
  display: flex;
  justify-content: flex-end;
}

.edit-icon {
  color: var(--btn-bg);
  font-size: 14px;
  margin-left: 5px;
  cursor: pointer;
  border: 1px solid var(--table-border-color);
  padding: 2px 5px;
  border-radius: 8px;
}

/* INVOICE summary */
.card-summary-grid {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  overflow-x: auto;
  padding: 0 6px;
  scrollbar-width: none; /* Firefox */
  align-items: center;
  align-items: stretch; /* ✅ stretch semua anak ke height maksimum */
  margin-bottom: 20px;
}

.card-summary-grid::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}
.summary-box {
  min-width: 100px;
  height: 100%; /* ✅ biar ikut tinggi parent */
  justify-content: center; /* ✅ agar konten tetap di tengah secara vertikal */
  flex: 0 0 auto;
  border: 1px solid var(--infobox-info-bg);
  border-radius: 20px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: 0.3s;
  height: auto;
}

.summary-box i {
  font-size: 20px;
  color: var(--btn-bg);
  margin-bottom: 5px;
}

.summary-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
}

.summary-label {
  font-size: 10px;
  color: var(--text-color-desc);
}

/* Border color per status */
.total i {
  color: #6366f1;
}

.paid i {
  color: #16a34a;
}

.unpaid i {
  color: var(--progress-color);
}

.see-all {
  /* background-color: var(--infobox-info-bg); */
  border: 1px solid var(--infobox-info-bg);
  /* border: none; */
  cursor: pointer;
}

.see-all-img {
  width: 40px;
  margin-bottom: 10px;
}

.invoice-illustration-container {
  display: flex;
  align-items: center;
  gap: 30px;
  justify-content: center;
  background: var(--gradient-color);
}

.invoice-illustration {
  width: 20%;
  max-width: 100%;
  border-radius: 12px;
  object-fit: contain;
}

.invoice-text {
  text-align: left;
}

.invoice-message {
  font-size: 20px;
  font-weight: 600;
  color: white;
  margin-bottom: 5px;
}

.invoice-message-desc {
  color: white;
  font-size: 12px;
  margin-bottom: 16px;
}

.create-invoice-btn {
  border: 1px solid white;
  border-radius: 10px;
  background-color: transparent;
  color: white;
  padding: 8px 12px;
  cursor: pointer;
  margin: 0px;
  align-items: center;
  width: auto;
  font-size: 12px;
}

.card-client {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  padding: 0 6px;
}

.client-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--table-border-color);
  border-radius: 20px;
  min-width: fit-content;
}

.client-card img,
.add-client {
  width: 40px;
  height: 40px;
  border-radius: 40%;
  background-color: var(--infobox-info-bg);
  color: var(--btn-bg);
  display: flex; /* Aktifkan flex */
  align-items: center; /* Vertikal center */
  justify-content: center; /* Horizontal center */
  cursor: pointer;
  font-size: 18px; /* Ukuran icon */
}

.client-info {
  text-align: left;
  align-items: left;
}

.client-info h4 {
  margin: 0;
  font-size: 14px;
  color: var(--text-color);
}

.client-info p {
  margin: 0;
  font-size: 12px;
  color: var(--text-color-desc);
}

.popupFinalizeInvoice,
.popupFinalizeSplitBill {
  text-align: center;
}

/* Multi-step form styles */

.progress-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  width: 100%;
}

.progress-bar::before {
  content: "";
  position: absolute;
  top: 30%;
  left: 50%;
  width: 90%;
  height: 2px;
  background-color: var(--input-bg);
  z-index: 1;
  transform: translate(-50%, -50%); /* center horizontal + vertical */
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  /* background-color: var(--input-bg); */
  /* padding: 5px; */
  border-radius: 10px;
  min-width: 50px;
}

.step-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--table-border-color);
  color: var(--text-color-desc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 10px;
  margin-bottom: 5px;
  transition: all 0.3s ease;
  border: 4px solid var(--input-bg);
}

.step-circle i {
  font-size: 16px;
}

.step-label {
  font-size: 10px;
  color: var(--text-color-desc);
  text-align: center;
  font-weight: 500;
  transition: all 0.3s ease;
}

.progress-step.active .step-circle {
  background-color: var(--btn-bg);
  color: white;
  outline: 0.5px solid var(--btn-bg);
  /* outline-offset: 1px; */
}

.progress-step.active .step-label {
  color: var(--btn-bg);
  font-weight: 600;
}

.progress-step.completed .step-circle {
  background-color: var(--achieved-border);
  color: white;
}

.progress-step.completed .step-label {
  color: var(--achieved-border);
}

/* Form step visibility */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

/* Step navigation buttons */
.step-navigation {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--infobox-info-bg);
}

.step-navigation button {
  flex: 1;
  max-width: 120px;
}

.step-navigation button:only-child {
  margin-left: auto;
}

.invoice-ready {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
}

.invoice-ready p {
  text-align: left;
}

.invoice-ready img {
  width: 40px;
  height: 40px;
  background-color: var(--infobox-info-bg);
  padding: 10px;
  border-radius: 20px;
  margin: 0;
  margin-right: 20px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .progress-step {
    min-width: auto;
  }

  .step-circle {
    width: 25px;
    height: 25px;
    font-size: 10px;
  }

  .step-label {
    font-size: 8px;
  }

  .step-navigation button {
    max-width: none;
  }
}
