/* RouterBox - Customer List & Edit Management Styles */

#view-customer-list {
  background-color: #0b1120;
  color: #f1f5f9;
}

#view-customer-list.active {
  display: flex !important;
  flex-direction: column;
  height: calc(100vh - 65px);
  min-height: calc(100vh - 65px);
  overflow: hidden;
}

.customer-list-toolbar {
  padding: 10px 14px;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.customer-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

/* Customer Card */
.customer-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s, border-color 0.15s;
}

.customer-card:active {
  transform: scale(0.99);
}

.customer-card.isolir {
  border-left: 4px solid #ef4444;
}

.customer-card.aktif {
  border-left: 4px solid #10b981;
}

.customer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.customer-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
}

.customer-card-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.cust-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
}

.cust-badge-aktif {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.cust-badge-isolir {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.cust-badge-unpaid {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.cust-badge-paid {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
}

.customer-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 11.5px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 10px;
  border-radius: 8px;
}

.customer-card-item {
  display: flex;
  flex-direction: column;
}

.customer-card-item span.lbl {
  color: #64748b;
  font-size: 9.5px;
  text-transform: uppercase;
  font-weight: 600;
}

.customer-card-item span.val {
  color: #f1f5f9;
  font-weight: 600;
}

.customer-card-item span.val.highlight {
  color: #38bdf8;
}

.customer-card-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 4px;
}

.btn-card-action {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 5px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-card-edit {
  background: #0284c7;
  color: #ffffff;
}

.btn-card-edit:active {
  background: #0369a1;
}

.btn-card-acs {
  background: #0891b2;
  color: #ffffff;
}

.btn-card-acs:hover {
  background: #06b6d4;
}

.btn-card-acs:active {
  background: #0e7490;
}

.btn-card-map {
  background: #334155;
  color: #38bdf8;
}

.btn-card-map:active {
  background: #475569;
}

.btn-card-wa {
  background: #16a34a;
  color: #ffffff;
}

.btn-card-wa:active {
  background: #15803d;
}

/* Pagination Bar */
.customer-pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #0f172a;
  border-top: 1px solid #1e293b;
  font-size: 12px;
  color: #94a3b8;
  flex-shrink: 0;
  margin-bottom: 56px;
}

.btn-page-nav {
  background: #1e293b;
  border: 1px solid #334155;
  color: #f1f5f9;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-page-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Customer Edit Form Modal */
.cust-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.cust-modal-sheet {
  background: #0f172a;
  border-top: 2px solid #38bdf8;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
  animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpModal {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cust-modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cust-modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
}

.cust-modal-subtitle {
  font-size: 11.5px;
  color: #94a3b8;
}

.cust-modal-close {
  background: #1e293b;
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cust-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.cust-form-row {
  display: flex;
  gap: 10px;
}

.cust-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.cust-form-label {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
}

.cust-form-input, .cust-form-select {
  background: #1e293b;
  border: 1px solid #334155;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
  width: 100%;
}

.cust-form-input:focus, .cust-form-select:focus {
  border-color: #38bdf8;
  background: #0b1120;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.cust-modal-footer {
  padding: 12px 18px;
  border-top: 1px solid #1e293b;
  display: flex;
  gap: 10px;
  background: #0f172a;
}

.btn-cust-cancel {
  flex: 1;
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-cust-submit {
  flex: 1.5;
  background: #0284c7;
  border: none;
  color: #ffffff;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
}

.btn-cust-submit:active {
  background: #0369a1;
}

/* ==========================================================================
   DESKTOP WINBOX CUSTOMER MANAGER STYLES
   ========================================================================== */

@media (min-width: 768px) {
  .cust-modal-backdrop {
    align-items: center !important;
    padding: 24px !important;
  }
  .cust-modal-sheet {
    max-width: 640px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    animation: zoomInCustModal 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }
}

@keyframes zoomInCustModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.cust-desktop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.cust-desktop-table thead tr {
  position: sticky;
  top: 0;
  background: #090d16;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 2;
}

.cust-desktop-table th {
  padding: 10px 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cust-desktop-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.cust-desktop-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.04);
}

.cust-desktop-table td {
  padding: 8px 12px;
  vertical-align: middle;
}

/* Action button styles in desktop table */
.btn-desk-act {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-desk-acs {
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(6, 182, 212, 0.3);
}
.btn-desk-acs:hover {
  background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.5);
  transform: translateY(-1px);
}

.btn-desk-edit {
  background: rgba(2, 132, 199, 0.2);
  border-color: rgba(2, 132, 199, 0.4);
  color: #38bdf8;
}
.btn-desk-edit:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.btn-desk-map {
  background: rgba(100, 116, 139, 0.2);
  border-color: rgba(100, 116, 139, 0.4);
  color: #94a3b8;
}
.btn-desk-map:hover {
  background: #475569;
  color: #f8fafc;
  border-color: #475569;
}

.btn-desk-wa {
  background: rgba(22, 163, 74, 0.2);
  border-color: rgba(22, 163, 74, 0.4);
  color: #4ade80;
}
.btn-desk-wa:hover {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
}

.btn-desk-del {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}
.btn-desk-del:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.cust-desk-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 7px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cust-desk-badge-aktif {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.cust-desk-badge-isolir {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.cust-desk-badge-lunas {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.cust-desk-badge-unpaid {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.cust-desk-badge-area {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-weight: 600;
}


