.emp-sgc-overlay {
  position: fixed;
  inset: 0;
  z-index: 10240;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 6, 7, 0.66);
}

.emp-sgc-panel {
  position: relative;
  width: min(1120px, calc(100vw - 48px));
  height: min(680px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #16181b;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  color: #f2f5f8;
}

.emp-sgc-headbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.emp-sgc-headbar h2,
.emp-sgc-dialog h3,
.emp-sgc-subhead {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
}

.emp-sgc-headbar p,
.emp-sgc-readonly,
.emp-sgc-status,
.emp-sgc-meta {
  margin: 4px 0 0;
  color: rgba(242, 245, 248, 0.68);
  font-size: 13px;
}

.emp-sgc-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f2f5f8;
  font-size: 24px;
  cursor: pointer;
}

.emp-sgc-close:focus-visible,
.emp-sgc-act:focus-visible,
.emp-sgc-chip:focus-visible,
.emp-sgc-field input:focus-visible,
.emp-sgc-field select:focus-visible,
.emp-sgc-search input:focus-visible {
  outline: 2px solid #59b7de;
  outline-offset: 2px;
}

.emp-sgc-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 20px 0;
  padding: 10px 12px;
  border-radius: 10px;
}

.emp-sgc-banner p { margin: 0; }
.emp-sgc-banner.is-error { background: rgba(220, 80, 80, 0.16); color: #ffd4d4; }
.emp-sgc-banner.is-ok { background: rgba(67, 176, 106, 0.16); color: #d7f5e2; }

.emp-sgc-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 20px 0;
}

.emp-sgc-search {
  flex: 1 1 220px;
  min-width: 180px;
  color: rgba(242, 245, 248, 0.72);
  font-size: 12px;
}

.emp-sgc-search input,
.emp-sgc-field input,
.emp-sgc-field select {
  display: block;
  width: 100%;
  min-height: 36px;
  margin-top: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #101214;
  color: #f2f5f8;
  padding: 8px 10px;
}

.emp-sgc-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 20px 18px;
}

.emp-sgc-table { min-width: 860px; }
.emp-sgc-head,
.emp-sgc-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) 140px 90px 100px 120px minmax(120px, 1fr) 180px;
  gap: 8px;
  align-items: center;
}
.emp-sgc-head-companies,
.emp-sgc-row-companies {
  grid-template-columns: minmax(180px, 1.5fr) 150px 110px 150px 160px;
}
.emp-sgc-head {
  position: sticky;
  top: 0;
  padding-bottom: 8px;
  background: #16181b;
  color: rgba(242, 245, 248, 0.55);
  font-size: 12px;
}
.emp-sgc-row {
  min-height: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}
.emp-sgc-name,
.emp-sgc-code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.emp-sgc-actions { display: flex; gap: 6px; justify-content: flex-end; }
.emp-sgc-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.emp-sgc-badge.is-on { background: rgba(67, 176, 106, 0.22); }
.emp-sgc-act,
.emp-sgc-chip {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: transparent;
  color: #f2f5f8;
  padding: 6px 10px;
  cursor: pointer;
}
.emp-sgc-act.is-primary,
.emp-sgc-chip.is-selected { background: #1d6f8f; border-color: transparent; }
.emp-sgc-act.is-danger { background: #8d3030; border-color: transparent; }
.emp-sgc-act:disabled { opacity: 0.45; cursor: not-allowed; }
.emp-sgc-subhead { margin: 16px 0 8px; font-size: 15px; }
.emp-sgc-dialog-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 6, 7, 0.55);
}
.emp-sgc-dialog {
  width: min(480px, 100%);
  max-height: calc(100% - 24px);
  overflow: auto;
  border-radius: 14px;
  background: #1d2024;
  padding: 18px;
}
.emp-sgc-field { display: block; margin-top: 12px; font-size: 13px; }
.emp-sgc-field-error { min-height: 1.2em; color: #ffb4b4; }
.emp-sgc-dialog footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.emp-sgc-image { display: grid; gap: 8px; margin-top: 12px; }
.emp-sgc-image-label { font-size: 13px; }
.emp-sgc-optional { color: #b7c0c8; font-weight: 500; }
.emp-sgc-image-preview {
  width: 120px;
  height: 84px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #121417;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.emp-sgc-image-preview .emp-sgc-thumb { width: 100%; height: 100%; object-fit: contain; }
.emp-sgc-thumb { width: 56px; height: 36px; object-fit: contain; border-radius: 4px; background: #121417; }
.emp-sgc-thumb-pending { display: inline-block; border: 1px solid rgba(255, 255, 255, 0.12); }
.emp-sgc-thumb-empty { color: #b7c0c8; font-size: 12px; }
.emp-sgc-image-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.emp-sgc-image-file {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.emp-sgc-image-file:focus-visible + .emp-sgc-image-actions,
.emp-sgc-image-file:focus-visible { outline: 2px solid #59b7de; }
