:root {
  font-family: 'Inter', system-ui, sans-serif;
  color: #1d1f2b;
  background: #f5f6fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

header.app-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

header.app-header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

header.app-header p {
  margin: 0;
  color: #5b6070;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.page-nav a {
  text-decoration: none;
  color: #2b2f3a;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef1f8;
}

.page-nav a[aria-current='page'] {
  background: #2b2f3a;
  color: #fff;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.status-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(22, 22, 37, 0.08);
}

.status-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #3b3f4a;
}

.status-card pre {
  background: #f1f3f8;
  padding: 12px;
  border-radius: 10px;
  max-height: 200px;
  overflow: auto;
  margin: 0;
}

.error-console {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(22, 22, 37, 0.08);
  margin-bottom: 28px;
}

.error-console__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.error-console__header h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.error-console__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.error-console__output {
  background: #111827;
  color: #f8fafc;
  padding: 14px;
  border-radius: 12px;
  min-height: 120px;
  max-height: 320px;
  overflow: auto;
  margin: 0;
  font-size: 12px;
  white-space: pre-wrap;
}

.contracts {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.empty-state {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(22, 22, 37, 0.08);
  color: #6a6f80;
}

.contract-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(22, 22, 37, 0.08);
}

.contract-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.contract-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.contract-card input[name='address'] {
  width: 100%;
  max-width: 420px;
}

.muted {
  color: #6a6f80;
  font-size: 13px;
}

.function-list {
  display: grid;
  gap: 16px;
}

.function-card {
  border: 1px solid #e5e7f2;
  border-radius: 14px;
  padding: 16px;
  background: #fdfdff;
}

.function-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.function-header h4 {
  margin: 0 0 6px;
  font-size: 16px;
}

.function-header p {
  margin: 0;
  font-size: 12px;
  color: #7b8195;
}

.function-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 12px;
}

.function-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #505566;
}

input,
button {
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d7dbe7;
}

button {
  background: #2b2f3a;
  color: #fff;
  cursor: pointer;
  border: none;
}

button:hover {
  background: #1c1f2a;
}

.function-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.function-output {
  background: #eef1f8;
  padding: 12px;
  border-radius: 10px;
  min-height: 40px;
  margin: 0;
  font-size: 12px;
  white-space: pre-wrap;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.badge-read {
  background: #e6f4ff;
  color: #1d5c9b;
}

.badge-write {
  background: #fff2d9;
  color: #9b5c1d;
}

.connection-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.connection-row span {
  font-weight: 600;
}

.connection-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
