/* batch.css - 批量查期限弹层样式 */

.batch-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.batch-modal.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.batch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.batch-card {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 1;
}

/* Header */
.batch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  color: #fff;
}

.batch-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.batch-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.batch-close-btn:hover {
  background: rgba(255,255,255,0.35);
}

/* Body */
.batch-body {
  padding: 20px 24px 24px;
}

/* Import Section */
.batch-import-section {
  margin-bottom: 16px;
}

.batch-input-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.batch-file-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.batch-file-name {
  color: #6b7280;
  font-size: 13px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-paste-wrap {
  flex: 1;
  min-width: 260px;
}

.batch-label {
  display: block;
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
  font-weight: 500;
}

.batch-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
  box-sizing: border-box;
}

.batch-textarea:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.batch-actions-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

/* Buttons */
.batch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  line-height: 1.5;
  min-height: 36px;
}

.batch-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.batch-btn-primary {
  background: #0d9488;
  color: #fff;
  border-color: #0d9488;
}

.batch-btn-primary:hover:not(:disabled) {
  background: #0f766e;
  border-color: #0f766e;
}

.batch-btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

.batch-btn-secondary:hover:not(:disabled) {
  background: #e5e7eb;
}

.batch-btn-ghost {
  background: transparent;
  color: #6b7280;
  border-color: #d1d5db;
}

.batch-btn-ghost:hover:not(:disabled) {
  background: #f9fafb;
}

/* Import Info */
.batch-import-info {
  font-size: 13px;
  min-height: 20px;
}

.batch-info-success {
  color: #059669;
}

.batch-info-error {
  color: #dc2626;
}

.batch-info-info {
  color: #0369a1;
}

/* Progress */
.batch-progress-section {
  margin-bottom: 16px;
}

.batch-progress-text {
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
}

.batch-progress-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.batch-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #14b8a6, #0d9488);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Toolbar */
.batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.batch-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.batch-filter-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.batch-filter-btn.active {
  background: #0d9488;
  color: #fff;
  border-color: #0d9488;
}

.batch-action-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Table */
.batch-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 640px;
}

.batch-table th {
  background: #f9fafb;
  color: #374151;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.batch-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  color: #4b5563;
  vertical-align: top;
}

.batch-table tbody tr:hover {
  background: #f9fafb;
}

.batch-table tbody tr:last-child td {
  border-bottom: none;
}

.batch-empty {
  text-align: center;
  color: #9ca3af;
  padding: 40px 16px !important;
}

/* Status badges */
.batch-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.status-stopped,
.status-expired {
  background: #fef2f2;
  color: #dc2626;
}

.status-valid {
  background: #ecfdf5;
  color: #059669;
}

.status-unknown {
  background: #fffbeb;
  color: #d97706;
}

/* Evidence row */
.batch-evidence-row {
  background: #f9fafb;
}

.batch-evidence-row td {
  padding: 0 !important;
}

.batch-evidence {
  padding: 12px 16px;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.6;
}

/* Links */
.batch-table a {
  color: #0d9488;
  text-decoration: none;
}

.batch-table a:hover {
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 640px) {
  .batch-modal.active {
    padding: 0;
  }

  .batch-card {
    border-radius: 0;
    max-width: 100%;
    min-height: 100vh;
  }

  .batch-body {
    padding: 16px;
  }

  .batch-input-row {
    flex-direction: column;
  }

  .batch-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .batch-action-group {
    justify-content: flex-start;
  }

  .batch-table {
    font-size: 12px;
  }

  .batch-table th,
  .batch-table td {
    padding: 10px 12px;
  }
}