/* ============================================
   INPUT.CSS - TTN MARKETING
   ============================================ */

/* ── INPUT PAGE ── */
.input-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
  transition: background 0.3s ease;
}

/* ── HEADER ── */
.input-header {
  position: fixed;
  width: 100%;
  background: var(--home-header-bg);
  border-radius: 0 0 30px 30px;
  padding: 20px 16px 10px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  z-index: 6;
  box-shadow: 0 10px 24px var(--shadow-heavy);
  flex-shrink: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.input-header::before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  top: -60px;
  right: -40px;
}

.input-header::after {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  bottom: -40px;
  left: -20px;
}

/* ── HEADER ACTIONS ── */
.input-back-btn {
  position: absolute;
  top: 18px;
  left: 16px;
  z-index: 3;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.input-header-action {
  position: absolute;
  top: 18px;
  right: 16px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.input-detail-btn,
.input-analysis-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.18s ease, background 0.18s ease;
}

.input-detail-btn:active,
.input-analysis-btn:active {
  transform: scale(0.94);
}

.input-analysis-btn {
  background: rgba(120, 200, 255, 0.18);
}

.input-detail-btn:hover,
.input-analysis-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ── ANALYSIS DROPDOWN ── */
.analysis-dropdown {
  position: absolute;
  top: 70px;
  right: 16px;
  width: 210px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 999;
  box-shadow: 0 10px 25px var(--shadow-heavy);
  opacity: 0;
  pointer-events: none;
  transform: translateX(30px);
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.3s ease, border-color 0.3s ease;
}

.analysis-dropdown.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.analysis-item {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: 0.15s, background 0.3s ease, color 0.3s ease;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
}

.analysis-item.active {
  background: var(--accent);
  border: 1px solid var(--accent-dark);
  color: var(--text-inverse);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.analysis-item:hover {
  background: var(--bg-hover);
  transform: translateX(3px);
}

.analysis-item:active {
  transform: scale(0.97);
}

.analysis-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
  transition: background 0.3s ease;
}

.analysis-item.tampilan-item {
  color: var(--text-inverse);
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 10px var(--shadow-color);
}

.analysis-item.tampilan-item.active {
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
  color: var(--text-primary);
  border: 1px solid var(--accent);
  box-shadow: 0 6px 16px var(--shadow-heavy);
}
.analysis-item.produktif {
  background: var(--analysis-produktif-bg);
  color: var(--analysis-produktif-text);
}

.analysis-item.produktif.active {
  background: var(--analysis-produktif-bg);
  border: 1px solid var(--analysis-produktif-border);
  color: var(--analysis-produktif-text);
  box-shadow: 0 4px 12px var(--analysis-produktif-shadow);
}

.analysis-item.stabil {
  background: var(--analysis-stabil-bg);
  color: var(--analysis-stabil-text);
}

.analysis-item.stabil.active {
  background: var(--analysis-stabil-bg);
  border: 1px solid var(--analysis-stabil-border);
  color: var(--analysis-stabil-text);
  box-shadow: 0 4px 12px var(--analysis-stabil-shadow);
}

.analysis-item.non_produktif {
  background: var(--analysis-non-bg);
  color: var(--analysis-non-text);
}

.analysis-item.non_produktif.active {
  background: var(--analysis-non-bg);
  border: 1px solid var(--analysis-non-border);
  color: var(--analysis-non-text);
  box-shadow: 0 4px 12px var(--analysis-non-shadow);
}

/* ── POPUP DETAIL ── */
.popup-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.30);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: 0.18s;
}

.popup-detail-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-detail-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-card);
  border-radius: 22px 22px 0 0;
  min-height: 220px;
  max-height: 85vh;
  padding: 10px 16px 24px;
  transform: translateY(100%);
  transition: transform 0.18s ease, background 0.3s ease;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.popup-detail-sheet::-webkit-scrollbar {
  display: none;
}

.popup-detail-overlay.active .popup-detail-sheet {
  transform: translateY(0);
}

.popup-detail-header {
  margin: -10px -16px 18px;
  padding: 18px 18px 14px;
  border-radius: 22px 22px 28px 28px;
  background: linear-gradient(135deg, rgba(179, 135, 79, 0.12), rgba(179, 135, 79, 0.05));
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.popup-detail-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-heading);
  transition: color 0.3s ease;
}

.popup-detail-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  transition: color 0.3s ease;
}

.popup-detail-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.popup-detail-section {
  background: var(--bg-card);
  border-radius: 22px;
  padding: 8px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border-color);
  box-shadow: 0 6px 18px var(--shadow-color);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.popup-detail-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: 0.2px;
  transition: color 0.3s ease;
}

.popup-detail-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.popup-detail-chip {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
  transition: 0.15s, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.popup-detail-chip:active {
  transform: scale(0.97);
}

.popup-detail-section.payment {
  background: var(--payment-bg);
  border-color: var(--payment-border);
}

.popup-detail-section.expired {
  background: var(--expired-bg);
  border-color: var(--expired-border);
}

.popup-detail-section.fee {
  background: var(--fee-bg);
  border-color: var(--fee-border);
}

.popup-detail-section.disable {
  background: var(--disable-bg);
  border-color: var(--disable-border);
}

.popup-detail-chip.payment {
  background: var(--payment-chip-bg);
  border-color: var(--payment-chip-border);
  color: var(--payment-chip-text);
}

.popup-detail-chip.expired {
  background: var(--expired-chip-bg);
  border-color: var(--expired-chip-border);
  color: var(--expired-chip-text);
}

.popup-detail-chip.fee {
  background: var(--fee-chip-bg);
  border-color: var(--fee-chip-border);
  color: var(--fee-chip-text);
}

.popup-detail-chip.disable {
  background: var(--disable-chip-bg);
  border-color: var(--disable-chip-border);
  color: var(--disable-chip-text);
}

.popup-detail-section.closing {
  background: var(--closing-bg);
}

.popup-detail-chip.closing {
  background: var(--closing-chip-bg);
  color: var(--closing-chip-text);
}

.popup-detail-section.saldo {
  background: var(--saldo-bg);
}

.popup-detail-chip.saldo {
  background: var(--saldo-chip-bg);
  color: var(--saldo-chip-text);
}

.popup-detail-empty {
  width: 100%;
  text-align: center;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ── HARI & BAWA ── */
.input-hari {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 5px;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
}

.input-bawa-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  position: relative;
  z-index: 2;
}

.input-bawa-item {
  background: #ffe5b4;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 15px;
  margin: -2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #8C6A43;
}

.input-bawa-item.expired {
  background: rgb(240, 40, 40);
  border-radius: 15px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 15px;
  margin: -2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgb(255, 255, 255);
}

.input-warning {
  width: 100%;
  margin-top: -2px;
  font-size: 10px;
  font-style: italic;
  color: #ffffff;
  text-align: center;
  line-height: 1.4;
  position: relative;
  z-index: 2;
}

/* ── CUSTOMER WRAPPER ── */
.input-customer-wrapper {
  flex: 1;
  width: 100%;
  min-height: 0;
  background: var(--bg-card);
  margin-top: 28px;
  border-radius: 20px;
  padding: 100px 18px 120px;
  box-shadow: 0 -4px 20px var(--shadow-color);
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* ── LIST CUSTOMER ── */
.input-customer-item {
  background: var(--customer-list);
  border-radius: 45px;
  display: flex;
  padding: 5px 16px;
  margin-bottom: -8px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 8px 22px var(--shadow-color);
  border: 1px solid var(--border-color);
  transition: 0.2s, background 0.3s ease, border-color 0.3s ease;
  flex-shrink: 1;
}
.input-customer-item.done {
  background: var(--customer-done-bg);
  border: 1px solid var(--customer-done-border);
  opacity: 0.9;
}
.input-customer-item.done .input-customer-nama {
  color: var(--customer-done-text);
}

.input-customer-item:active {
  transform: scale(0.98);
}

.input-customer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.input-customer-foto {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 15px;
  object-fit: cover;
  border: 1px solid var(--accent);
  background-color: #ccc;
}

.preview-foto-overlay {
  position: fixed;
  inset: 0;
  background: #ffe5b4;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  padding: 20px;
}

.preview-foto-overlay.active {
  opacity: 1;
  visibility: visible;
}

.preview-foto-img {
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 18px;
  transform: scale(0.9);
  transition: 0.2s;
}

.preview-foto-overlay.active .preview-foto-img {
  transform: scale(1);
}

.input-customer-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.input-customer-nama {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.input-customer-kemarin {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.input-customer-kemarin-item {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--bg-primary);
  border: 1px solid var(--accent-light);
  color: var(--text-primary);
  white-space: nowrap;
  box-shadow: 0 2px 6px var(--shadow-color);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.input-customer-kemarin-item.highlight {
  background: #ffb15c;
  border: 1px solid #ff9800;
  color: #a85a00;
  box-shadow: 0 2px 8px rgba(255, 140, 0, 0.15);
}

.input-customer-nama-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.input-customer-badge-wrap {
  display: flex;
  gap: 4px;
}

.customer-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
}

.customer-badge.fee {
  background: #10b981;
}

.customer-badge.disable {
  background: #ef4444;
}

.customer-badge.pending {
  background: #f59e0b;
}

.customer-badge.tutup {
  background: #6b7280;
}

.customer-badge.putus {
  background: #dc2626;
}

.customer-badge.konsinyasi-diff {
  background-color: #f59e0b;
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 1px 6px;
  border-radius: 9999px;
  line-height: 1;
}

.input-customer-jarak {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
  letter-spacing: 0.2px;
  transition: color 0.3s ease;
}

.input-customer-empty {
  text-align: center;
  padding: 40px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border-radius: 24px;
  transition: background 0.3s ease, color 0.3s ease;
}

.input-list-customer {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 30px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.input-list-customer::-webkit-scrollbar {
  display: none;
}

/* ── ACTION BUTTONS ── */
.input-action-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-catatan-btn,
.input-map-btn,
.input-lokasi-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: 0.18s, color 0.3s ease;
}

.input-catatan-btn:active,
.input-map-btn:active,
.input-lokasi-btn:active {
  transform: scale(0.94);
}

.input-customer-foto-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.customer-badge-new {
  position: absolute;
  bottom: -4px;
  left: -4px;
  min-width: 34px;
  height: 18px;
  padding: 0 6px;
  border-radius: 20px;
  background: #2eaf62;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
  box-shadow: 0 4px 10px rgba(46, 175, 98, 0.3);
  animation: badgeNewPop 0.3s ease;
  transition: border-color 0.3s ease;
}

.customer-badge-note {
  position: absolute;
  bottom: -2px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: border-color 0.3s ease, background 0.3s ease;
}

/* ── POPUP INPUT ── */
.popup-input-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.30);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: 0.18s;
}

.popup-input-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-input-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-card);
  border-radius: 18px 18px 0 0;
  min-height: 200px;
  max-height: 90vh;
  padding: 10px 15px 15px;
  transform: translateY(100%);
  transition: transform 0.18s, background 0.3s ease;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.popup-input-sheet::-webkit-scrollbar {
  display: none;
}

.popup-input-overlay.active .popup-input-sheet {
  transform: translateY(0);
}

.popup-drag {
  width: 34px;
  height: 3px;
  border-radius: 20px;
  background: var(--accent-light);
  margin: 0 auto 5px;
  transition: background 0.3s ease;
}

.popup-input-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: -20px -15px 5px;
  padding: 16px 16px 2px;
  background: linear-gradient(180deg, rgba(179, 135, 79, 0.11), rgba(179, 135, 79, 0.06));
  border-bottom: 1px solid var(--border-color);
  border-radius: 18px 18px 24px 24px;
  box-sizing: border-box;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.popup-input-nama {
  font-size: 17px;
  font-weight: 800;
  margin-top: 10px;
  color: var(--text-heading);
  line-height: 1.2;
  letter-spacing: -0.2px;
  transition: color 0.3s ease;
}

.popup-data-kemarin {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  padding: 8px 0;
  box-sizing: border-box;
}

.popup-data-kemarin-tanggal {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 15px;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.popup-kemarin-item {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  white-space: nowrap;
  transition: 0.18s, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.popup-kemarin-item.highlight {
  background: #ffb15c;
  border: 1px solid #ff9800;
  color: #7a4a1f;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15);
}

.popup-kemarin-item:active {
  transform: scale(0.97);
}

.popup-total-card {
  width: 100%;
  padding: 8px 0 12px;
  margin: 4px 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}

.popup-total-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1;
  transition: color 0.3s ease;
}

.popup-total-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-heading);
  line-height: 1;
  letter-spacing: -1px;
  transition: color 0.3s ease;
}

.popup-input-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 10px;
}

.popup-group {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 5px 0 0 0;
  overflow: visible;
  border: 1px solid var(--border-color);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.popup-group-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-heading);
  padding-top: 10px;
  padding-left: 10px;
  line-height: 0.1;
  transition: color 0.3s ease;
}

.popup-group-list {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  overflow: visible;
}

.popup-input-item {
  flex: 1;
  min-width: 44px;
  overflow: visible;
}

.popup-input-number {
  width: 100%;
  position: relative;
  top: 15px;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  border: none;
  outline: none;
  border-radius: 7px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 28px;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  transition: 0.15s, background 0.3s ease, color 0.3s ease;
  z-index: 2;
}

.popup-input-number::placeholder {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}

.popup-input-number:focus::placeholder {
  opacity: 0;
}

.popup-input-number::-webkit-outer-spin-button,
.popup-input-number::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.popup-foto-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 5px;
}

.popup-foto-card {
  width: 70%;
  aspect-ratio: 5/2;
  border-radius: 18px;
  border: 2px dashed var(--accent-light);
  background: var(--bg-card);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.18s, background 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.popup-foto-card:active {
  transform: scale(0.98);
}

.popup-foto-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.popup-foto-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: color 0.3s ease;
}

.popup-status-wrapper {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.popup-status-item {
  flex: 1;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  text-align: center;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: 0.2s, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.popup-status-item input {
  display: none;
}

.popup-status-item.tutup.active {
  background: #fff3bf;
  border-color: #fcc419;
  color: #8f5b00;
}

.popup-status-item.pending.active {
  background: #ffe8cc;
  border-color: #ff922b;
  color: #d9480f;
}

.popup-status-item.putus.active {
  background: #ffe3e3;
  border-color: #fa5252;
  color: #c92a2a;
}

.popup-submit-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 20px;
  margin-top: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  transition: 0.2s, background 0.3s ease;
}

.popup-submit-btn:disabled {
  background: #D9D9D9;
  color: #9A9A9A;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
  transform: none;
}

.popup-submit-btn:not(:disabled):active {
  transform: scale(0.98);
}

/* ── POPUP WARNING ── */
.popup-warning-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  backdrop-filter: blur(4px);
}

.popup-warning-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-warning-card {
  width: 88%;
  max-width: 340px;
  background: var(--bg-card);
  border-radius: 28px;
  padding: 24px 20px 20px;
  box-shadow: 0 20px 50px var(--shadow-heavy);
  transform: translateY(20px) scale(0.96);
  transition: 0.25s, background 0.3s ease;
}

.popup-warning-overlay.active .popup-warning-card {
  transform: translateY(0) scale(1);
}

.popup-warning-icon {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  background: linear-gradient(135deg, #FFE7C2, #FFD18B);
}

.popup-warning-title {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-heading);
  transition: color 0.3s ease;
}

.popup-warning-text {
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 8px;
  transition: color 0.3s ease;
}

.popup-warning-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.popup-warning-btn {
  flex: 1;
  height: 48px;
  border: none;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 800;
}

.popup-warning-btn.cancel {
  background: var(--bg-hover);
  color: var(--text-primary);
  transition: background 0.3s ease, color 0.3s ease;
}

.popup-warning-btn.submit {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  transition: background 0.3s ease;
}

/* ── POPUP GROUP COLORS ── */

.popup-group.return {
  background: var(--saldo-bg);
  border: 1px solid var(--saldo-chip-bg);
}

.popup-group.return .popup-input-number {
  background: #ffe8a3;
  border: 1px solid #ffd95e;
}

.popup-group.expired {
  background: var(--expired-chip-bg);
  border: 1px solid var(--expired-border);
}

.popup-group.expired .popup-input-number {
  background: #ffc9c5;
  border: 1px solid #ff9f97;
}

.popup-group.konsinyasi {
  background: var(--payment-border);
  border: 1px solid var(--cust-cash-border);
}

.popup-group.konsinyasi .popup-input-number {
  background: #c8ebca;
  border: 1px solid #92d796;
}

.popup-group.cash {
  background: var(--cash-bg);
  border: 1px solid var(--cash-border);
}

.popup-group.cash .popup-input-number {
  background: #c4ebff;
  border: 1px solid #8bd8ff;
}

.popup-group.lainnya {
  background: var(--lainnya-bg);
  border: 1px solid var(--lainnya-border);
}

.popup-group.lainnya .popup-input-number {
  background: #e5c6ec;
  border: 1px solid #d59be2;
}

.popup-input-number.active-kemarin {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 4px var(--shadow-color);
}

/* ── PROGRESS BAR ── */
.input-progress-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(var(--keyboard-offset, 0px));
  z-index: 100;
  background: var(--home-header-bg);
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -10px 26px var(--shadow-heavy);
  transition: transform 0.22s ease, background 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  will-change: transform;
}

.input-progress-bar.closed {
  transform: translateY(calc(100% - 34px));
}

.input-progress-toggle {
  width: 100%;
  height: 34px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.input-progress-line {
  width: 52px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.input-progress-content {
  padding: 0 20px 20px;
}

.input-search-customer {
  width: 100%;
  height: 38px;
  outline: none;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1.5px solid var(--accent-light);
  border-radius: 20px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  box-sizing: border-box;
  transition: 0.18s, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.input-search-customer::placeholder {
  color: var(--text-muted);
}

.input-search-customer:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(179, 135, 79, 0.18);
}

.input-progress-text {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.input-progress-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  overflow: hidden;
}

.input-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #c8ebca, #7ed957);
  transition: width 0.3s ease;
}
