/* ============================================================
   宏信报账 v1.0.2 - 弹窗样式
   ============================================================ */
/* ===== 遮罩层 ===== */
.hx-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  animation: hx-fade-in 0.15s ease;
}

@keyframes hx-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== 通用弹窗 ===== */
.hx-modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  animation: hx-modal-in 0.2s ease;
  max-height: 90vh;
}

@keyframes hx-modal-in {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.hx-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  color: var(--theme-primary);
}

.hx-modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.hx-modal-close:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.hx-modal-body {
  padding: var(--spacing-lg);
  overflow-y: auto;
  flex: 1;
}

.hx-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--border);
}

/* ===== 危险确认弹窗 (460×220px 固定尺寸) ===== */
.hx-modal-danger {
  width: 460px;
  min-height: 220px;
}

.hx-modal-danger .hx-modal-header {
  background: var(--danger-light);
  color: var(--danger);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.hx-modal-icon { font-size: 20px; margin-right: var(--spacing-sm); }

/* ===== 各类弹窗尺寸 ===== */
.hx-modal-customer { width: 700px; }
.hx-modal-prepayment { width: 550px; }
.hx-modal-payable { width: 800px; }
.hx-modal-driver { width: 380px; }
.hx-modal-detail { width: 90vw; }

/* ===== 弹窗内表单 ===== */
.hx-modal .hx-form-group {
  margin-bottom: var(--spacing-sm);
}

.hx-modal .hx-form-row {
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-sm);
}
