/* ========== Modal Dialogs ========== */
/* ========== Modal ========== */
.addr-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.addr-modal-overlay.show {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.addr-modal {
  background: white;
  border-radius: 16px;
  width: 540px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.addr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100, #f0f0f0);
}
.addr-modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-800, #222);
}
.addr-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400, #999);
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.addr-modal-close:hover {
  background: var(--gray-100, #f5f5f5);
  color: var(--gray-700, #333);
}
.addr-modal-close svg {
  width: 20px;
  height: 20px;
}

.addr-modal-body {
  padding: 24px;
}

.addr-form-group {
  margin-bottom: 18px;
}
.addr-form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700, #333);
  margin-bottom: 6px;
}
.addr-form-label .required {
  color: var(--primary, #e23a3a);
  margin-right: 2px;
}

.addr-form-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--gray-200, #e0e0e0);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--gray-800, #222);
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}
.addr-form-input:focus {
  border-color: var(--primary, #e23a3a);
  box-shadow: 0 0 0 3px rgba(226,58,58,0.1);
}
.addr-form-input.error {
  border-color: #f44336;
}
.addr-form-input::placeholder {
  color: var(--gray-300, #bbb);
}

.addr-form-textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid var(--gray-200, #e0e0e0);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--gray-800, #222);
  outline: none;
  transition: all 0.2s;
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}
.addr-form-textarea:focus {
  border-color: var(--primary, #e23a3a);
  box-shadow: 0 0 0 3px rgba(226,58,58,0.1);
}
.addr-form-textarea.error {
  border-color: #f44336;
}

.addr-form-error {
  font-size: 12px;
  color: #f44336;
  margin-top: 4px;
  display: none;
}
.addr-form-error.show {
  display: block;
}

/* Region selector row */
.addr-region-row {
  display: flex;
  gap: 10px;
}
.addr-region-row .addr-form-input {
  flex: 1;
}

/* Default toggle */
.addr-default-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--gray-100, #f0f0f0);
  margin-top: 8px;
}
.addr-default-label {
  font-size: 14px;
  color: var(--gray-700, #333);
}
.addr-default-desc {
  font-size: 12px;
  color: var(--gray-400, #999);
  margin-top: 2px;
}

/* Toggle switch */
.addr-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.addr-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.addr-toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gray-300, #ccc);
  border-radius: 12px;
  transition: all 0.3s;
}
.addr-toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.addr-toggle input:checked + .addr-toggle-slider {
  background: var(--primary, #e23a3a);
}
.addr-toggle input:checked + .addr-toggle-slider::before {
  transform: translateX(20px);
}

/* Modal footer */
.addr-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100, #f0f0f0);
}
.addr-modal-cancel {
  height: 40px;
  padding: 0 24px;
  border: 1px solid var(--gray-200, #e0e0e0);
  border-radius: 8px;
  background: white;
  color: var(--gray-600, #555);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.addr-modal-cancel:hover {
  border-color: var(--gray-400, #999);
  color: var(--gray-800, #222);
}
.addr-modal-submit {
  height: 40px;
  padding: 0 32px;
  border: none;
  border-radius: 8px;
  background: var(--primary, #e23a3a);
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.addr-modal-submit:hover {
  background: var(--primary-dark, #c62828);
}

/* Empty state */
.addr-empty {
  text-align: center;
  padding: 60px 20px;
}
.addr-empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: var(--gray-100, #f5f5f5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.addr-empty-icon svg {
  width: 40px;
  height: 40px;
  color: var(--gray-300, #ccc);
}
.addr-empty-text {
  font-size: 15px;
  color: var(--gray-400, #999);
  margin-bottom: 20px;
}

/* Toast */
.addr-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--gray-800, #222);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}
.addr-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Confirm dialog */
.addr-confirm-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1100;
  align-items: center;
  justify-content: center;
}
.addr-confirm-overlay.show {
  display: flex;
}
.addr-confirm-box {
  background: white;
  border-radius: 12px;
  padding: 28px;
  width: 380px;
  max-width: 90vw;
  text-align: center;
  animation: slideUp 0.2s ease;
}
.addr-confirm-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: #fff5f5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.addr-confirm-icon svg {
  width: 24px;
  height: 24px;
  color: #f44336;
}
.addr-confirm-text {
  font-size: 15px;
  color: var(--gray-700, #333);
  margin-bottom: 24px;
  line-height: 1.6;
}
.addr-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.addr-confirm-cancel {
  height: 38px;
  padding: 0 24px;
  border: 1px solid var(--gray-200, #e0e0e0);
  border-radius: 8px;
  background: white;
  color: var(--gray-600, #555);
  font-size: 14px;
  cursor: pointer;
}
.addr-confirm-ok {
  height: 38px;
  padding: 0 24px;
  border: none;
  border-radius: 8px;
  background: #f44336;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .addr-content {
    padding: 16px;
  }
  .addr-card {
    flex-direction: column;
    padding: 16px;
  }
  .addr-card.is-default::after {
    right: 12px;
  }
  .addr-actions {
    align-self: flex-end;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100, #f0f0f0);
    width: 100%;
    justify-content: flex-end;
  }
  .addr-region-row {
    flex-direction: column;
    gap: 8px;
  }
  .addr-modal {
    width: 95vw;
  }
  .addr-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ========== Modal ========== */
.pm-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.pm-modal-overlay.show {
  display: flex;
}
.pm-modal {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  min-width: 400px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.pm-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
}
.pm-modal-body {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
}
.pm-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.pm-modal-btn {
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}
.pm-modal-btn-cancel {
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #666;
}
.pm-modal-btn-cancel:hover {
  border-color: var(--primary, #e2383e);
  color: var(--primary, #e2383e);
}
.pm-modal-btn-danger {
  border: none;
  background: var(--primary, #e2383e);
  color: #fff;
}
.pm-modal-btn-danger:hover {
  background: #c53030;
}

/* ========== Modal ========== */
.ba-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: baFadeIn .2s;
}
.ba-modal-overlay.show { display: flex; }
@keyframes baFadeIn { from { opacity: 0; } to { opacity: 1; } }

.ba-modal {
  background: #fff;
  border-radius: 12px;
  width: 560px;
  max-width: 95vw;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: baSlideUp .25s;
}
@keyframes baSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.ba-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100, #f0f0f0);
}
.ba-modal-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-700, #333);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ba-modal-header h3 svg { width: 20px; height: 20px; color: var(--primary, #e2383e); }
.ba-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400, #999);
  transition: all .2s;
}
.ba-modal-close:hover {
  background: #f5f5f5;
  color: var(--gray-600, #555);
}
.ba-modal-close svg { width: 18px; height: 18px; }

.ba-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.ba-form-group {
  margin-bottom: 20px;
}
.ba-form-group:last-child { margin-bottom: 0; }
.ba-form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600, #555);
  margin-bottom: 6px;
}
.ba-form-label .required {
  color: var(--primary, #e2383e);
  margin-left: 2px;
}
.ba-form-input,
.ba-form-select {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--gray-200, #ddd);
  border-radius: 6px;
  font-size: 14px;
  color: var(--gray-700, #333);
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
  box-sizing: border-box;
}
.ba-form-input:focus,
.ba-form-select:focus {
  outline: none;
  border-color: var(--primary, #e2383e);
  box-shadow: 0 0 0 3px rgba(226,56,62,.1);
}
.ba-form-input::placeholder { color: var(--gray-300, #bbb); }
.ba-form-input.error,
.ba-form-select.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}
.ba-form-error {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
  display: none;
}
.ba-form-group.has-error .ba-form-error { display: block; }
.ba-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23999' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.ba-form-select option { color: #333; }

/* 银行选择网格 */
.ba-bank-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.ba-bank-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px solid var(--gray-200, #ddd);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600, #555);
  transition: all .2s;
  background: #fff;
}
.ba-bank-option:hover {
  border-color: var(--primary, #e2383e);
  color: var(--primary, #e2383e);
}
.ba-bank-option.selected {
  border-color: var(--primary, #e2383e);
  background: #fef2f2;
  color: var(--primary, #e2383e);
}
.ba-bank-option .mini-logo {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* 默认开关 */
.ba-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--gray-100, #f0f0f0);
  margin-top: 8px;
}
.ba-switch-row .ba-switch-label {
  font-size: 13px;
  color: var(--gray-600, #555);
}
.ba-switch-row .ba-switch-desc {
  font-size: 12px;
  color: var(--gray-400, #999);
  margin-top: 2px;
}
.ba-switch {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}
.ba-switch input { display: none; }
.ba-switch-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-200, #ddd);
  border-radius: 12px;
  transition: background .2s;
}
.ba-switch-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.ba-switch input:checked + .ba-switch-slider {
  background: var(--primary, #e2383e);
}
.ba-switch input:checked + .ba-switch-slider::before {
  transform: translateX(20px);
}

/* Modal 底部 */
.ba-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100, #f0f0f0);
  background: #fafafa;
}
.ba-modal-footer .ba-btn { padding: 9px 24px; }

/* 删除确认 */
.ba-confirm-content {
  text-align: center;
  padding: 20px 0;
}
.ba-confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fef2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.ba-confirm-icon svg { width: 28px; height: 28px; color: #ef4444; }
.ba-confirm-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-700, #333);
  margin-bottom: 8px;
}
.ba-confirm-desc {
  font-size: 13px;
  color: var(--gray-400, #999);
  line-height: 1.6;
}

/* 分页 */
.ba-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-100, #f0f0f0);
}
.ba-page-btn {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--gray-200, #ddd);
  border-radius: 6px;
  background: #fff;
  color: var(--gray-600, #555);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  padding: 0 8px;
}
.ba-page-btn:hover { border-color: var(--primary, #e2383e); color: var(--primary, #e2383e); }
.ba-page-btn.active {
  background: var(--primary, #e2383e);
  color: #fff;
  border-color: var(--primary, #e2383e);
}
.ba-page-btn.disabled { opacity: .4; pointer-events: none; }

/* ========== Modal ========== */
.dm-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: dmFadeIn 0.2s;
}
.dm-modal-overlay.show { display: flex; }

@keyframes dmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dm-modal {
  background: #fff;
  border-radius: 12px;
  width: 560px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: dmSlideUp 0.25s;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

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

.dm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f0f0f0;
}
.dm-modal-title {
  font-size: 17px;
  font-weight: 600;
  color: #222;
}
.dm-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.dm-modal-close:hover { background: #fee2e2; }
.dm-modal-close svg { width: 16px; height: 16px; fill: #999; }

.dm-modal-body {
  padding: 20px 24px;
}

.dm-form-group {
  margin-bottom: 18px;
}
.dm-form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
}
.dm-form-label .required {
  color: #e2383e;
  margin-left: 2px;
}
.dm-form-input {
  width: 100%;
  height: 38px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  color: #333;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dm-form-input:focus {
  border-color: #e2383e;
  box-shadow: 0 0 0 2px rgba(226,56,62,0.1);
}
.dm-form-input.error {
  border-color: #e2383e;
}
.dm-form-textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  color: #333;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.dm-form-textarea:focus {
  border-color: #e2383e;
  box-shadow: 0 0 0 2px rgba(226,56,62,0.1);
}
.dm-form-select {
  width: 100%;
  height: 38px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  color: #333;
  outline: none;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: auto;
}
.dm-form-select:focus {
  border-color: #e2383e;
  box-shadow: 0 0 0 2px rgba(226,56,62,0.1);
}
.dm-form-hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
.dm-form-error {
  font-size: 12px;
  color: #e2383e;
  margin-top: 4px;
  display: none;
}
.dm-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Status toggle */
.dm-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.dm-switch-track {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #ddd;
  position: relative;
  transition: background 0.2s;
}
.dm-switch-track.on { background: #e2383e; }
.dm-switch-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.dm-switch-track.on .dm-switch-thumb { transform: translateX(18px); }
.dm-switch-label {
  font-size: 13px;
  color: #666;
}

.dm-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
}

/* Toast */
.dm-toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #222;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}
.dm-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.dm-toast.success { background: #38a169; }
.dm-toast.error { background: #e53e3e; }

/* Confirm dialog */
.dm-confirm-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1100;
  align-items: center;
  justify-content: center;
}
.dm-confirm-overlay.show { display: flex; }
.dm-confirm {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 400px;
  text-align: center;
  animation: dmSlideUp 0.25s;
}
.dm-confirm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #fff5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dm-confirm-icon svg { width: 26px; height: 26px; fill: #e2383e; }
.dm-confirm-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
}
.dm-confirm-desc {
  font-size: 13px;
  color: #999;
  margin-bottom: 24px;
  line-height: 1.6;
}
.dm-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Responsive */
@media (max-width: 1200px) {
  .dm-body { flex-direction: column; }
  .dm-tree-panel { width: 100%; }
  .dm-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .dm-content { margin-left: 0; }
  .dm-main { padding: 16px; }
  .dm-stats { grid-template-columns: 1fr; }
  .dm-form-row { grid-template-columns: 1fr; }
  .dm-modal { width: 95vw; }
}

/* ========== Modal ========== */
.emp-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: empFadeIn .2s;
}
.emp-modal-overlay.show { display: flex; }
@keyframes empFadeIn { from { opacity: 0; } to { opacity: 1; } }

.emp-modal {
  background: #fff;
  border-radius: 14px;
  width: 560px;
  max-width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  animation: empSlideIn .25s ease;
}
@keyframes empSlideIn { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.emp-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f3f4f6;
}
.emp-modal-title { font-size: 17px; font-weight: 600; color: #1f2937; }
.emp-modal-close {
  width: 32px; height: 32px;
  border: none; background: none;
  cursor: pointer; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #9ca3af; transition: all .15s;
}
.emp-modal-close:hover { background: #f3f4f6; color: #374151; }
.emp-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}
.emp-modal-foot {
  padding: 16px 24px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form */
.emp-form-group { margin-bottom: 18px; }
.emp-form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}
.emp-form-label .required { color: #e2383e; margin-right: 2px; }
.emp-form-input,
.emp-form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  color: #1f2937;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}
.emp-form-input:focus,
.emp-form-select:focus {
  border-color: #e2383e;
  box-shadow: 0 0 0 3px rgba(226,56,62,.08);
}
.emp-form-input.error { border-color: #ef4444; }
.emp-form-error { font-size: 12px; color: #ef4444; margin-top: 4px; display: none; }
.emp-form-error.show { display: block; }
.emp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.emp-form-hint { font-size: 12px; color: #9ca3af; margin-top: 4px; }

/* Role Select Chips */
.emp-role-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.emp-role-chip {
  padding: 6px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
  color: #6b7280;
  background: #fff;
}
.emp-role-chip:hover { border-color: #e2383e; color: #e2383e; }
.emp-role-chip.active {
  background: #fef2f2;
  border-color: #e2383e;
  color: #e2383e;
  font-weight: 500;
}

/* Dept Tree Dropdown */
.emp-dept-dropdown {
  position: relative;
}
.emp-dept-trigger {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  color: #1f2937;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  transition: border-color .2s;
}
.emp-dept-trigger:hover { border-color: #e2383e; }
.emp-dept-trigger svg { width: 16px; height: 16px; fill: #9ca3af; transition: transform .2s; }
.emp-dept-trigger.open svg { transform: rotate(180deg); }
.emp-dept-tree {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 220px;
  overflow-y: auto;
  z-index: 10;
  display: none;
  margin-top: 4px;
}
.emp-dept-tree.show { display: block; }
.emp-dept-node {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: #374151;
  transition: background .1s;
}
.emp-dept-node:hover { background: #fef2f2; color: #e2383e; }
.emp-dept-node.selected { background: #fef2f2; color: #e2383e; font-weight: 500; }
.emp-dept-node.level-2 { padding-left: 28px; }
.emp-dept-node.level-3 { padding-left: 44px; }

/* Confirm Modal */
.emp-confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
}
.emp-confirm-overlay.show { display: flex; }
.emp-confirm {
  background: #fff;
  border-radius: 14px;
  padding: 32px;
  width: 400px;
  max-width: 90vw;
  text-align: center;
  animation: empSlideIn .25s ease;
}
.emp-confirm-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #fef2f2;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.emp-confirm-icon svg { width: 28px; height: 28px; fill: #e2383e; }
.emp-confirm-title { font-size: 17px; font-weight: 600; color: #1f2937; margin-bottom: 8px; }
.emp-confirm-msg { font-size: 14px; color: #6b7280; line-height: 1.6; margin-bottom: 24px; }
.emp-confirm-btns { display: flex; gap: 12px; justify-content: center; }

/* Toast */
.emp-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  color: #fff;
  z-index: 2000;
  transition: transform .3s ease;
  white-space: nowrap;
}
.emp-toast.show { transform: translateX(-50%) translateY(0); }
.emp-toast-success { background: #16a34a; }
.emp-toast-error { background: #dc2626; }
.emp-toast-info { background: #e2383e; }

/* Responsive */
@media (max-width: 1200px) {
  .emp-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .emp-stats { grid-template-columns: repeat(2, 1fr); }
  .emp-form-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .emp-stats { grid-template-columns: 1fr; }
  .emp-toolbar-top { flex-direction: column; align-items: stretch; }
  .emp-search input { width: 100%; }
}
