/* stationmgr.css — 관측소 마스터 관리 전용 스타일시트 */

.sm-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
}

.sm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sm-header-left h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sm-header-left p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

.sm-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.sm-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.sm-btn.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.sm-btn.primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.sm-btn.success {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.sm-btn.success:hover {
  background: #059669;
  border-color: #059669;
}

.sm-btn.secondary {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

.sm-btn.secondary:hover {
  background: #e2e8f0;
}

.sm-btn.danger {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.sm-btn.danger:hover {
  background: #fecaca;
}

.sm-btn-sm {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
}

/* KPI Summary Cards */
.sm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.sm-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.sm-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sm-kpi-val {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 4px;
}

.sm-kpi-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

/* Filter & Search Toolbar */
.sm-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 16px;
}

.sm-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sm-search-input {
  width: 240px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
}

.sm-search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.sm-select {
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  outline: none;
}

/* Data Table */
.sm-table-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.sm-table th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.sm-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.sm-table tr:hover {
  background: #f8fafc;
}

.sm-table tr.inactive {
  background: #f8fafc;
  opacity: 0.65;
}

/* Status Badges */
.sm-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.sm-badge.net-kins { background: #e0f2fe; color: #0369a1; }
.sm-badge.net-jnu { background: #dcfce7; color: #15803d; }

.sm-badge.status-online { background: #dcfce7; color: #166534; }
.sm-badge.status-warning { background: #fef9c3; color: #854d0e; }
.sm-badge.status-offline { background: #fee2e2; color: #991b1b; }
.sm-badge.status-unknown { background: #f1f5f9; color: #64748b; }

.sm-badge.xml-ok { background: #dcfce7; color: #166534; }
.sm-badge.xml-missing { background: #fee2e2; color: #991b1b; }

.sm-badge.active-yes { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.sm-badge.active-no { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }

/* Modal Styles */
.sm-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 99999;
  justify-content: center;
  align-items: center;
}

.sm-modal {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 820px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  border: 1px solid #cbd5e1;
  overflow: hidden;
}

.sm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.sm-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.sm-modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}

.sm-modal-close:hover {
  color: #0f172a;
}

.sm-modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sm-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

/* Upload Dropzones */
.sm-dropzones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sm-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  padding: 20px 16px;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.sm-dropzone:hover, .sm-dropzone.dragover {
  border-color: #2563eb;
  background: #eff6ff;
}

.sm-dropzone.has-file {
  border-color: #10b981;
  background: #f0fdf4;
}

.sm-dropzone-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.sm-dropzone-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.sm-dropzone-desc {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.sm-dropzone-status {
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  margin-top: 8px;
}

/* Preview Table */
.sm-preview-table-wrap {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.sm-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.sm-preview-table th {
  background: #f8fafc;
  padding: 6px 10px;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  font-weight: 600;
  color: #475569;
}

.sm-preview-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f1f5f9;
}

.sm-diff-insert { background: #f0fdf4; color: #166534; font-weight: 700; }
.sm-diff-update { background: #eff6ff; color: #1d4ed8; font-weight: 700; }
