/* These styles are generated from project.scss. */

.h-field {
  height: 42px;
  font-size: 16px;
}

.brand {
  font-size: 28px;
}
/* Popup overlay */
#createOrderPopup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

/* Popup content */
#createOrderPopup > div {
  background: #fff;
  padding: 32px 24px;
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
  min-width: 320px;
  max-width: 90vw;
}

/* Ẩn popup */
#createOrderPopup.hidden {
  display: none;
}

.require::after {
  content: "*";
  color: red;
  font-weight: bold;
}

.h-input {
  height: 40px;
}

.order-form-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
}

.order-form-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.order-form-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.table-container {
  max-height: 380px;
  overflow-y: auto;
  border-radius: 8px;
}

.h-input {
  height: 40px;
  border-radius: 6px;
}

.table-container::-webkit-scrollbar {
  width: 8px;
}

.table-container::-webkit-scrollbar-track {
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
  border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.modern-card {
  position: relative;
  background: var(--color-base-100);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* .modern-card:hover {
  transform: translateY(-2px);
  box-shadow:
      0 20px 25px -5px rgba(0, 0, 0, 0.1),
      0 10px 10px -5px rgba(0, 0, 0, 0.04),
      0 0 0 1px rgba(255, 255, 255, 0.05);
} */

.modern-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  /* background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4); */
}

.card-header {
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.card-title-modern {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title-modern::before {
  content: "";
  width: 4px;
  height: 20px;
  background: var(--color-primary);
  border-radius: 2px;
}

.card-content {
  padding: 1.5rem;
}

.info-grid {
  display: grid;
  gap: 1rem;
}

.info-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-radius: 8px;
  border-left: 3px solid var(--color-primary);
  transition: all 0.2s ease;
}

.info-item:hover {
  background: rgba(59, 130, 246, 0.05);
  transform: translateX(2px);
}

.info-label {
  font-weight: 600;
  min-width: 80px;
  margin-right: 0.5rem;
}

.info-value {
  font-weight: 500;
}

.stats-container {
  display: grid;
  /* grid-template-columns: 1fr 1fr; */
  gap: 1rem;
}

.stat-card {
  /* background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); */
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  border: 2px solid rgba(185, 191, 199, 0.6);
  transition: all 0.2s ease;
}

.stat-card:hover {
  background: rgba(59, 130, 246, 0.05);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.modern-table tbody tr {
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  transition: all 0.2s ease;
}

.modern-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
}

.modern-table tbody tr:last-child {
  border-bottom: none;
}

.modern-table td {
  padding: 1rem;
  vertical-align: middle;
  font-weight: 500;
}

.modern-table td:first-child {
  font-weight: 600;
  color: var(--color-primary);
}

.status-badge {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: 180px;
}

.create-order {
  background: #ffe58f;
  color: #ad8b00;
}

.process-delivery {
  background: #bae7ff;
  color: #0050b3;
}

.delivered {
  background: #b7eb8f;
  color: #237804;
}

.cancelled {
  background: #ffa39e;
  color: #a8071a;
}

.amount-highlight {
  font-weight: 700;
  font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .customer-detail-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.5rem;
  }

  .stats-container {
    grid-template-columns: 1fr;
  }

  .card-content {
    padding: 1rem;
  }

  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .info-label {
    min-width: auto;
    margin-right: 0;
  }
}

/* Animation for loading effect */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modern-card {
  animation: slideIn 0.5s ease-out;
}

.modern-card:nth-child(2) {
  animation-delay: 0.1s;
}

.modern-card:nth-child(3) {
  animation-delay: 0.2s;
}

#createCustomerPopup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

#createCustomerPopup > div {
  padding: 32px 24px;
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
  min-width: 320px;
  max-width: 30vw;
}

#createCustomerPopup.hidden {
  display: none;
}

/* Paginator styles */
.pagination {
  display: flex;
  justify-content: end;
  align-items: center;
  margin: 24px 0;
  font-size: 1rem;
  gap: 0.5rem;
}

.pagination .step-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination button {
  background: #f3f4f6;
  color: #1e293b;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border 0.15s;
}

.pagination button:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.pagination button:disabled,
.pagination button[disabled] {
  background: #e5e7eb;
  color: #9ca3af;
  border-color: #e5e7eb;
  cursor: not-allowed;
}

.pagination {
  user-select: none;
}

#editCustomerPopup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
}

#editCustomerPopup > div {
  background: #fff;
  padding: 32px 24px;
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
  min-width: 320px;
  max-width: 30vw;
}

#editCustomerPopup.hidden {
  display: none;
}

.card-header .flex-1 {
  overflow-y: auto;
}

.center-items {
  display: flex;
  justify-content: space-between;
}

.phac_aspc_form_autocomplete {
  padding: 0 !important;
  border: none !important;
}

.phac_aspc_form_autocomplete_focus_ring {
  padding: 0 !important;
}

.phac_aspc_form_autocomplete ul.ac_container li input.textinput {
  padding: 8px !important;
  border: 1px solid #e5e7eb !important;
}

.order-fields {
  font-weight: 500 !important;
  font-size: 1rem;
  border: 1px solid #e5e7eb !important;
}

.disable-input-bg {
  background: var(--color-base-300);
}

/* For WebKit browsers (Chrome, Safari, Edge) */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0; /* Ensures no extra margin is left behind */
}

/* For Firefox */
input[type="number"] {
  -moz-appearance: textfield;
}

.phac_aspc_form_autocomplete_focus_ring.active {
  border: none !important;
}

.gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.pulse-animation {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.number-animation {
  animation: countUp 0.8s ease-out;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.glass-card {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.icon-glow {
  filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5));
}

.warning-glow {
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.5));
}
