/* Guardian Balance — infrastructure utility aesthetic */

.gb-hero {
  padding: clamp(24px, 5vw, 48px) 0 clamp(12px, 3vw, 20px);
}
.gb-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.gb-hero-desc {
  color: var(--muted);
  font-size: clamp(0.875rem, 2vw, 0.95rem);
  line-height: 1.5;
  max-width: 520px;
}

/* Lookup form */
.gb-lookup {
  padding: 20px 24px;
}
.gb-input-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.gb-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gb-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.gb-input-wrap input {
  font-family: var(--gm-font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.gb-input-hint {
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
}
.gb-input-hint.error {
  color: #b91c1c;
}
.gb-input-hint.ok {
  color: #15803d;
}
.gb-submit {
  flex-shrink: 0;
  margin-bottom: 22px;
}
@media (max-width: 600px) {
  .gb-input-row {
    flex-direction: column;
    align-items: stretch;
  }
  .gb-submit {
    margin-bottom: 0;
  }
}

/* Loading */
.gb-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 0;
  color: var(--muted);
  font-size: 14px;
}
.gb-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: gb-spin 0.7s linear infinite;
}
@keyframes gb-spin {
  to { transform: rotate(360deg); }
}

/* Error */
.gb-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: var(--gm-radius);
  padding: 14px 20px;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Credit hero card */
.gb-credit-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.gb-credit-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gb-credit-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.gb-credit-value {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.gb-credit-breakdown {
  display: flex;
  gap: 32px;
}
.gb-credit-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.gb-credit-sub-value {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.gb-credit-sub-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Grid layout for node + registration */
.gb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 740px) {
  .gb-grid { grid-template-columns: 1fr; }
}

/* Section cards */
.gb-section {
  padding: 20px 24px;
}
.gb-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.gb-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0;
}

/* Status pills */
.gb-status-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--gm-radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.gb-status-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.gb-status-pill.online {
  background: #f0fdf4;
  color: #15803d;
}
.gb-status-pill.online::before {
  animation: gb-pulse 2s ease-in-out infinite;
}
.gb-status-pill.offline {
  background: #f4f4f5;
  color: #71717a;
}
.gb-reg-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--gm-radius-full);
}
.gb-reg-pill.persistent {
  background: #eff6ff;
  color: #1d4ed8;
}
.gb-reg-pill.ephemeral {
  background: #f4f4f5;
  color: #71717a;
}

@keyframes gb-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Data grid */
.gb-data-grid {
  display: grid;
  gap: 0;
}
.gb-datum {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.gb-datum:last-child {
  border-bottom: none;
}
.gb-datum-label {
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
}
.gb-datum-value {
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}
.gb-mono {
  font-family: var(--gm-font-mono);
  font-size: 12px;
  letter-spacing: 0.01em;
}

/* Empty state */
.gb-empty {
  font-size: 13px;
  color: var(--muted);
  padding: 12px 0 4px;
  font-style: italic;
}

/* Settlements table */
.gb-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#gb-settlements-table {
  font-size: 13px;
  margin: 0;
}
#gb-settlements-table th {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 6px 8px 10px;
}
#gb-settlements-table td {
  padding: 10px 8px;
  font-variant-numeric: tabular-nums;
}
#gb-settlements-table .gb-settlement-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--gm-radius-full);
  text-transform: capitalize;
}
#gb-settlements-table .gb-settlement-status.paid {
  background: #f0fdf4;
  color: #15803d;
}
#gb-settlements-table .gb-settlement-status.pending {
  background: #fffbeb;
  color: #92400e;
}
#gb-settlements-table .gb-settlement-status.settled {
  background: #eff6ff;
  color: #1d4ed8;
}

/* Fade-in animation */
.gb-fade-in {
  animation: gb-fadein 0.3s ease-out;
}
@keyframes gb-fadein {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
