.company-records-module {
  max-width: 1120px;
  padding-bottom: 20px;
}

.company-records-shell {
  display: grid;
  gap: 18px;
}

.company-records-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.company-records-stat-card {
  --company-records-stat-icon-bg: #eaf3ff;
  --company-records-stat-icon-color: #4e78a8;
  min-height: 92px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.company-records-stat-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--company-records-stat-icon-bg);
  color: var(--company-records-stat-icon-color);
}

.company-records-stat-card--online {
  --company-records-stat-icon-bg: #e7f8ed;
  --company-records-stat-icon-color: #35a85c;
}

.company-records-stat-card--unavailable {
  --company-records-stat-icon-bg: #fff3d9;
  --company-records-stat-icon-color: #b9852e;
}

.company-records-stat-card--inspection {
  --company-records-stat-icon-bg: #f1ecff;
  --company-records-stat-icon-color: #7865a8;
}

.company-records-stat-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.company-records-stat-content {
  min-width: 0;
}

.company-records-stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-transform: none;
}

.company-records-stat-value {
  margin-top: 3px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
}

.company-records-stat-description {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted-soft);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-records-stage {
  display: grid;
  grid-template-rows: auto auto;
  gap: 18px;
}

.company-records-query-zone {
  position: relative;
  z-index: 2;
  overflow: visible;
}

.company-records-search-stage {
  width: min(920px, 100%);
  margin: 0 auto;
}

.company-records-search-shell {
  grid-template-columns: 160px minmax(0, 1fr);
  width: 100%;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
  transition: box-shadow 0.24s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.company-records-search-shell:focus-within {
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.1), 0 0 0 4px rgba(52, 199, 89, 0.06);
}

.company-records-region-toggle {
  font-size: 17px;
}

.company-records-region-input {
  padding-right: 16px;
}

.company-records-query-button:disabled {
  cursor: default;
  opacity: 0.48;
  box-shadow: none;
}

.company-records-region-panel {
  max-height: 330px;
}

.company-records-province-list,
.company-records-city-list {
  max-height: 270px;
  overflow-y: auto;
  padding-right: 4px;
}

.company-records-city-item::before {
  display: none;
}

.company-records-city-item.is-active {
  background: rgba(52, 199, 89, 0.12);
  color: #17351f;
  box-shadow: inset 0 0 0 1px rgba(52, 199, 89, 0.14);
}

.company-records-region-empty {
  padding: 0 8px;
}

.company-records-query-hint {
  min-height: 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.company-records-result-reveal {
  position: relative;
  z-index: 1;
}

.company-records-result-card {
  padding: 24px 28px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.035);
}

.company-records-result-meta-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-height: 20px;
}

.company-records-result-region,
.company-records-result-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.company-records-result-note {
  flex: 0 1 auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(52, 199, 89, 0.08);
  color: #4b6c54;
  text-align: right;
}

.company-records-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 6px;
}

.company-records-official-link {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.company-records-official-link:hover:not(.is-disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(52, 199, 89, 0.2);
}

.company-records-official-link.is-disabled {
  border-color: var(--line-soft);
  background: #f4f5f6;
  color: var(--muted);
  opacity: 0.42;
  cursor: not-allowed;
}

.company-records-system-name {
  min-width: 0;
  margin: 0;
  color: #2c2c2e;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.company-records-capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  padding: 10px 0 7px;
}

.company-records-capability {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  padding: 1px 12px;
}

.company-records-capability-label {
  color: var(--muted);
  font-size: 14px;
}

.company-records-capability-value {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  border-radius: 50%;
  background: var(--muted-soft);
}

.company-records-capability-value.is-supported {
  background: var(--accent);
}

.company-records-capability-value.is-unsupported {
  background: #ff6b6b;
}

.company-records-capability-value.is-unknown {
  background: #fde047;
}

.company-records-status-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 0 0 12px;
  color: var(--muted-soft);
  font-size: 11px;
  line-height: 1.4;
}

.company-records-status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.company-records-status-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-soft);
}

.company-records-status-legend .is-supported {
  background: var(--accent);
}

.company-records-status-legend .is-unsupported {
  background: #ff6b6b;
}

.company-records-status-legend .is-unknown {
  background: #fde047;
}

.company-records-detail {
  margin-top: 18px;
}

.company-records-detail h3 {
  margin: 0 0 9px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 700;
}

.company-records-detail p {
  margin: 0;
  color: #4d4d52;
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.company-records-note p {
  color: var(--muted);
}

.company-records-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(250px, 1fr);
  gap: 0;
  margin-top: 2px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.company-records-lower-grid .company-records-detail {
  margin-top: 0;
}

.company-records-description {
  padding-right: 24px;
}

.company-records-description [data-result-description] {
  display: grid;
  gap: 8px;
}

.company-records-description [data-result-description] p {
  white-space: pre-line;
}

.company-records-feedback {
  padding-left: 24px;
  border-left: 1px solid var(--line-soft);
}

.company-records-feedback-options {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.company-records-feedback-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4d4d52;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

.company-records-feedback-options input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.company-records-feedback-content {
  box-sizing: border-box;
  width: 100%;
  min-height: 80px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  outline: 0;
  background: rgba(255, 255, 255, 0.72);
  color: #4d4d52;
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}

.company-records-feedback-content::placeholder {
  color: var(--muted-soft);
}

.company-records-feedback-content:focus {
  border-color: rgba(52, 199, 89, 0.46);
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.08);
}

.company-records-feedback-content:disabled {
  cursor: not-allowed;
  background: rgba(15, 23, 42, 0.025);
}

.company-records-feedback-button {
  min-height: 34px;
  margin-top: 10px;
  margin-left: auto;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(52, 199, 89, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #278840;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.company-records-feedback-button:hover:not(:disabled) {
  border-color: rgba(52, 199, 89, 0.5);
  background: rgba(52, 199, 89, 0.09);
}

.company-records-feedback-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.company-records-feedback [data-feedback-status] {
  min-height: 20px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.company-records-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--text);
}

.company-records-dialog::backdrop {
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(5px);
}

.company-records-dialog-inner {
  width: 100%;
  padding: 20px;
}

.company-records-dialog-copy {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .company-records-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .company-records-result-card {
    padding: 20px;
  }

  .company-records-result-meta-line,
  .company-records-result-header {
    align-items: flex-start;
  }

  .company-records-result-meta-line {
    flex-direction: column;
    gap: 3px;
  }

  .company-records-result-note {
    text-align: left;
  }

  .company-records-result-header {
    gap: 14px;
  }

  .company-records-system-name {
    font-size: 18px;
  }

  .company-records-capability {
    gap: 6px;
    padding: 1px 6px;
  }

  .company-records-capability-label {
    font-size: 12px;
  }

  .company-records-status-legend {
    gap: 5px 10px;
  }

  .company-records-lower-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .company-records-description {
    padding-right: 0;
  }

  .company-records-feedback {
    padding-top: 18px;
    padding-left: 0;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .company-records-stage,
  .company-records-search-shell,
  .company-records-result-reveal,
  .company-records-official-link {
    transition: none;
  }
}
