/* PayChain Hub (/app) — 라이브 모니터링 */

.hub-app {
  margin: 0;
  min-height: 100vh;
  background: var(--gray-50, #f8fafc);
  color: var(--navy, #0f172a);
  font-family: var(--font, "DM Sans", system-ui, sans-serif);
}

.hub-header {
  background: linear-gradient(180deg, #0f172a 0%, #1e3a5f 100%);
  color: #fff;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 20;
}

.hub-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hub-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
}

.hub-logo:hover {
  color: #93c5fd;
}

.hub-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
  padding: 0.25rem 0.6rem;
  border: 1px solid rgba(147, 197, 253, 0.35);
  border-radius: 999px;
}

.hub-nav {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.hub-nav a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.hub-nav a:hover {
  color: #fff;
}

.hub-last-refresh {
  flex-basis: 100%;
  margin: 0;
  padding-top: 0.35rem;
  text-align: right;
  font-size: 0.75rem;
  color: #94a3b8;
}

.hub-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.hub-lead {
  margin: 0 0 1.5rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: #64748b;
  max-width: 48em;
}

.hub-lead strong {
  color: #0f172a;
}

.hub-quick-grid {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .hub-quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hub-quick-card {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.hub-quick-card__title {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  color: #0f172a;
}

.hub-quick-card__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #475569;
}

.hub-config {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.hub-config__grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .hub-config__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.hub-config__grid--onchain {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

@media (min-width: 720px) {
  .hub-config__grid--onchain {
    grid-template-columns: 1fr 1fr;
  }
  .hub-field--span2 {
    grid-column: 1 / -1;
  }
}

.hub-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hub-field label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.hub-field input[type="url"],
.hub-field input[type="password"],
.hub-field input[type="text"] {
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: ui-monospace, monospace;
}

.hub-field input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 1rem;
}

.hub-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.hub-btn--primary {
  background: #2563eb;
  color: #fff;
}

.hub-btn--primary:hover {
  background: #1d4ed8;
}

.hub-btn--secondary {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

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

.hub-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #64748b;
  cursor: pointer;
}

.hub-conn-mode {
  margin: 0.65rem 0 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 8px;
  line-height: 1.4;
  white-space: pre-line;
}

.hub-conn-mode--direct {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.hub-conn-mode--proxy {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.hub-note {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #94a3b8;
}

.hub-note code {
  font-size: 0.85em;
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.hub-note kbd {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-family: ui-monospace, monospace;
}

.hub-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .hub-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .hub-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .hub-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hub-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.hub-card__title {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.hub-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.hub-dot--ok {
  background: #059669;
}

.hub-dot--warn {
  background: #d97706;
}

.hub-dot--err {
  background: #dc2626;
}

.hub-pre {
  margin: 0;
  padding: 0.75rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  font-size: 0.7rem;
  line-height: 1.5;
  overflow: auto;
  max-height: 14rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, monospace;
}

.hub-pre.is-error {
  color: #fecaca;
}

.hub-pre.is-muted {
  color: #94a3b8;
}

.hub-pre--short {
  max-height: 10rem;
}

.hub-summary {
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.65rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.hub-summary:empty {
  display: none;
}

.hub-dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  align-items: baseline;
}

.hub-dl dt {
  margin: 0;
  color: #64748b;
  font-weight: 600;
}

.hub-dl dd {
  margin: 0;
  color: #0f172a;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  word-break: break-word;
}

.hub-summary__muted {
  margin: 0;
  color: #94a3b8;
  font-size: 0.75rem;
}

.hub-card__hint {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
}

.hub-net-mvp-summary.hub-net-mvp--muted {
  color: #94a3b8;
}

.hub-net-mvp-summary.hub-net-mvp--warn {
  color: #b45309;
}

.hub-link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hub-link-list li {
  margin: 0.35rem 0;
  font-size: 0.8125rem;
  word-break: break-all;
}

.hub-link-list a {
  color: #2563eb;
  text-decoration: none;
}

.hub-link-list a:hover {
  text-decoration: underline;
}

.hub-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  color: #0f172a;
}

.hub-fold {
  margin-top: 2rem;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.hub-fold__summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.hub-fold__summary::-webkit-details-marker {
  display: none;
}

.hub-fold__summary::after {
  content: "+";
  float: right;
  color: #2563eb;
  font-size: 1.1rem;
  line-height: 1;
}

.hub-fold[open] .hub-fold__summary::after {
  content: "−";
}

.hub-fold__lead {
  margin: 0;
  padding: 0 1.15rem 1rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.55;
}

.hub-fold .hub-grid,
.hub-fold .hub-tabs,
.hub-fold .hub-card {
  margin-left: 1.15rem;
  margin-right: 1.15rem;
}

.hub-fold .hub-grid:last-child,
.hub-fold .hub-card:last-child {
  margin-bottom: 1.15rem;
}

.hub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.hub-tab {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
}

.hub-tab.is-active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

.hub-copy-feedback {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #059669;
}

.hub-footnote {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: #92400e;
  line-height: 1.55;
}

.hub-footnote__link {
  display: inline-block;
  margin-top: 0.5rem;
  color: #b45309;
  font-weight: 600;
}

.hub-footnote__link:hover {
  color: #92400e;
  text-decoration: underline;
}
