*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary:    #7c3aed;
  --color-primary-dk: #5b21b6;
  --color-bg:         #ffffff;
  --color-surface:    #f9fafb;
  --color-border:     #e5e7eb;
  --color-text:       #111827;
  --color-text-muted: #6b7280;
  --color-success:    #059669;
  --color-error:      #dc2626;
  --color-warning:    #d97706;
  --radius:           0.75rem;
  --shadow:           0 1px 3px rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
  text-decoration: none;
}
.nav-links a {
  margin-left: 1.5rem;
  color: var(--color-text-muted);
  text-decoration: none;
}
.nav-links a:hover { color: var(--color-primary); }

.container { max-width: 800px; margin: 0 auto; padding: 2rem; }

.card {
  display: block;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  background: var(--color-surface);
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: 0 4px 12px rgba(124,58,237,0.15);
  border-color: var(--color-primary);
}
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dk); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); }

.status-box {
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  display: none;
}
.status-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: var(--color-success); }
.status-error   { background: #fef2f2; border: 1px solid #fecaca; color: var(--color-error); }
.status-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }

.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}
.input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--color-text);
  background: var(--color-bg);
  outline: none;
  transition: border-color 0.15s;
}
.input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.input-file {
  display: block;
  width: 100%;
  font-size: 0.875rem;
  cursor: pointer;
}
.hash-display {
  font-family: 'Geist Mono', 'Courier New', monospace;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  word-break: break-all;
  display: none;
}
.hash-display:not(:empty) { display: block; }

.wallet-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  font-family: 'Geist Mono', 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  word-break: break-all;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.badge-admin   { background: #ecfdf5; color: var(--color-success); border: 1px solid #a7f3d0; }
.badge-warning { background: #fffbeb; color: var(--color-warning); border: 1px solid #fde68a; }

.subtitle {
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.8125rem;
}
.file-table th,
.file-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.file-table th {
  background: var(--color-surface);
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.file-table td:nth-child(1) {
  color: var(--color-text-muted);
  width: 2.5rem;
  text-align: center;
}
.file-table td:nth-child(4) {
  white-space: nowrap;
}
.file-table a {
  color: var(--color-primary);
  text-decoration: none;
  font-family: 'Geist Mono', 'Courier New', monospace;
}
.file-table a:hover { text-decoration: underline; }

.result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.875rem;
}
.result-table td {
  padding: 0.375rem 0.5rem;
  vertical-align: top;
}
.result-table td:first-child {
  white-space: nowrap;
  font-weight: 500;
  color: var(--color-success);
  padding-right: 1rem;
  width: 6rem;
}
.result-table td:last-child {
  font-family: 'Geist Mono', 'Courier New', monospace;
  word-break: break-all;
}
.result-table a {
  color: var(--color-success);
}

.footer {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--color-border);
  margin-top: 4rem;
}
.footer a { color: var(--color-primary); text-decoration: none; }
