/**
 * Lumera Vault — Void / Minimal Dark Theme
 * "Notarize once, prove forever"
 * Styled to match Lumera Research Archive aesthetic
 */

/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --bg:           #000000;
  --bg-card:      #0a0a0a;
  --bg-elevated:  #0a0a0a;
  --bg-modal:     #050505;
  --border:       rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.4);

  --primary:      #ffffff;
  --primary-dim:  rgba(255, 255, 255, 0.08);
  --secondary:    #e5e5e5;
  --success:      #10b981;
  --success-dim:  rgba(16, 185, 129, 0.1);
  --warning:      #f59e0b;
  --warning-dim:  rgba(245, 158, 11, 0.1);
  --error:        #ef4444;
  --error-dim:    rgba(239, 68, 68, 0.1);

  --text:         #ffffff;
  --text-muted:   rgba(255, 255, 255, 0.4);
  --text-dim:     rgba(255, 255, 255, 0.6);

  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --radius:       0;
  --radius-lg:    0;
  --radius-xl:    0;
  --transition:   0.3s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background:  var(--bg);
  color:       var(--text);
  line-height: 1.6;
  min-height:  100vh;
}

/* ── Layout ──────────────────────────────────────────────────────────────────── */
.app {
  max-width:  900px;
  margin:     0 auto;
  padding:    2rem 1rem;
}

/* ── Header ───────────────────────────────────────────────────────────────────── */
.header {
  text-align:    center;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  position:      relative;
}

.header::before {
  display: none;
}

.header-brand {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             1rem;
  margin-bottom:   0.75rem;
}

.brand-logo {
  width:         44px;
  height:        44px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     1.375rem;
  flex-shrink:   0;
  border:        1px solid var(--border);
  background:    transparent;
}

.header-brand h1 {
  font-size:      1.5rem;
  font-weight:    500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          var(--text);
  background:     none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}

.header-brand p {
  font-size:      0.875rem;
  color:          var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-badges {
  display:         flex;
  gap:             0.75rem;
  justify-content: center;
  flex-wrap:       wrap;
  margin-top:      0.5rem;
}

.tech-badge {
  font-size:      0.6875rem;
  font-weight:    500;
  padding:        0.375rem 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border:         1px solid var(--border);
  background:     transparent;
  color:          var(--text-muted);
}

.tech-badge.midnight {
  background: transparent;
  color:      var(--text-muted);
  border:     1px solid var(--border);
}

.tech-badge.cascade {
  background: transparent;
  color:      var(--text-muted);
  border:     1px solid var(--border);
}

/* ── Wallet section ──────────────────────────────────────────────────────────── */
.wallet-section {
  display:        flex;
  align-items:    center;
  justify-content: center;
  gap:            1rem;
  padding:        1rem;
  margin-bottom:  2rem;
  background:     var(--bg-card);
  border:         1px solid var(--border);
  flex-wrap:      wrap;
}

.wallet-section > button {
  flex-shrink: 0;
}

.wallet-address {
  font-family:  var(--font-mono);
  font-size:    0.75rem;
  color:        var(--success);
  padding:      0.5rem 1rem;
  background:   rgba(16, 185, 129, 0.1);
  border:       1px solid rgba(16, 185, 129, 0.3);
}

.dust-balance {
  display:       flex;
  align-items:   center;
  gap:           0.375rem;
  margin-left:   auto;
  font-size:     0.875rem;
  color:         var(--text-muted);
  padding:       0.375rem 0.875rem;
  background:    rgba(255, 255, 255, 0.03);
  border:        1px solid var(--border);
}

.dust-balance strong {
  color:       var(--text);
  font-weight: 500;
}

.dust-icon { font-size: 1rem; }

/* ── Status messages ─────────────────────────────────────────────────────────── */
.status-message {
  padding:       1rem;
  margin-bottom: 1rem;
  font-size:     0.875rem;
  border:        1px solid;
  transition:    opacity 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } }

.status-success  { background: rgba(16, 185, 129, 0.1); color: var(--success); border-color: rgba(16,185,129,0.3); }
.status-error    { background: rgba(239, 68, 68, 0.1);  color: var(--error);   border-color: rgba(239,68,68,0.3); }
.status-warning  { background: rgba(245, 158, 11, 0.1); color: var(--warning); border-color: rgba(245,158,11,0.3); }
.status-info     { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border-color: var(--border); }

/* ── Tab navigation ──────────────────────────────────────────────────────────── */
.tab-nav {
  display:       flex;
  gap:           0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  background:    transparent;
  padding:       0;
  border-top:    none;
  border-left:   none;
  border-right:  none;
}

.tab-nav.disabled { opacity: 0.5; pointer-events: none; }

.tab-button {
  flex:           none;
  padding:        1rem 1.5rem;
  font-size:      0.75rem;
  font-weight:    500;
  color:          var(--text-muted);
  background:     transparent;
  border:         none;
  border-bottom:  1px solid transparent;
  cursor:         pointer;
  transition:     all 0.3s ease;
  white-space:    nowrap;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom:  -1px;
}

.tab-button:hover  { color: var(--text); background: rgba(255,255,255,0.05); }
.tab-button.active { color: var(--text); background: transparent; border-bottom-color: var(--text); }

/* ── Tab content ─────────────────────────────────────────────────────────────── */
.tab-content         { display: none; }
.tab-content.active  { display: block; }

/* ── Section ─────────────────────────────────────────────────────────────────── */
.section {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  padding:       1.5rem;
  margin-bottom: 1rem;
}

.section-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  margin-bottom:   1.5rem;
  padding-bottom:  1rem;
  border-bottom:   1px solid var(--border);
}

.section-header h2 {
  font-size:      0.75rem;
  font-weight:    500;
  color:          var(--text);
  display:        flex;
  align-items:    center;
  gap:            0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-header h2::before {
  content:    '';
  display:    inline-block;
  width:      2px;
  height:     1rem;
  background: var(--text);
}

.section h2 {
  font-size:      0.75rem;
  font-weight:    500;
  color:          var(--text);
  display:        flex;
  align-items:    center;
  gap:            0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section h2::before {
  content:    '';
  display:    inline-block;
  width:      2px;
  height:     1rem;
  background: var(--text);
}

.section-description {
  color:       var(--text-muted);
  font-size:   0.875rem;
  margin-top:  0.25rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
button { font-family: var(--font-sans); cursor: pointer; transition: all 0.3s ease; }

.btn-primary {
  padding:        0.875rem 1.5rem;
  font-size:      0.875rem;
  font-weight:    500;
  color:          black;
  background:     white;
  border:         1px solid white;
  cursor:         pointer;
  transition:     all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.btn-primary:hover:not(:disabled) { background: transparent; color: white; }
.btn-primary:disabled              { opacity: 0.5; cursor: not-allowed; }

.btn-disconnect {
  padding:        0.75rem 1.25rem;
  font-size:      0.875rem;
  font-weight:    500;
  color:          var(--error);
  background:     transparent;
  border:         1px solid rgba(239, 68, 68, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.btn-disconnect:hover { background: var(--error); color: white; }

.btn-ghost {
  padding:        0.5rem 1rem;
  font-size:      0.875rem;
  color:          var(--text-muted);
  background:     transparent;
  border:         none;
  cursor:         pointer;
  transition:     all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.btn-ghost:hover { color: var(--text); }

.btn-sm  { padding:  0.4rem 0.875rem; font-size: 0.8125rem; }
.btn-xs  { padding:  0.3rem 0.625rem; font-size: 0.75rem;   }

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.empty-state {
  text-align:  center;
  padding:     2rem;
  color:       var(--text-muted);
  font-size:   0.875rem;
}
.empty-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.empty-sub  { font-size: 0.875rem; margin-top: 0.5rem; max-width: 400px; margin-left: auto; margin-right: auto; color: var(--text-muted); }

/* ── Document cards ──────────────────────────────────────────────────────────── */
#vault-documents-container {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap:                   1rem;
}

.document-card {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  padding:       1.25rem;
  transition:    all 0.3s ease;
}
.document-card:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.02); }

.doc-card-header {
  display:     flex;
  align-items: flex-start;
  gap:         0.875rem;
  margin-bottom: 1rem;
}

.doc-icon {
  width:         40px;
  height:        40px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     1.25rem;
  flex-shrink:   0;
  border:        1px solid var(--border);
  background:    transparent;
}

.doc-title {
  font-size:   0.875rem;
  font-weight: 500;
  color:       var(--text);
  margin-bottom: 0.375rem;
}

.doc-badges {
  display:  flex;
  gap:      0.375rem;
  flex-wrap: wrap;
}

.doc-card-body {
  display:     flex;
  flex-direction: column;
  gap:         0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.doc-detail {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  font-size:       0.8125rem;
  color:           var(--text-dim);
}
.doc-detail-label { color: var(--text-muted); }

.doc-card-actions {
  display:     flex;
  gap:         0.5rem;
}
.doc-card-actions .btn-primary { flex: 1; text-align: center; }

/* ── Badges ──────────────────────────────────────────────────────────────────── */
.badge {
  display:        inline-block;
  font-size:      0.6875rem;
  font-weight:    500;
  padding:        0.25rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border:         1px solid;
}
.badge-success { background: rgba(16, 185, 129, 0.1);  color: var(--success); border-color: rgba(16,185,129,0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.1);  color: var(--warning); border-color: rgba(245,158,11,0.3); }
.badge-error   { background: rgba(239, 68, 68, 0.1);   color: var(--error);   border-color: rgba(239,68,68,0.3); }
.badge-primary { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border-color: var(--border); }

/* ── Modal ───────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position:   fixed;
  inset:      0;
  background: rgba(0, 0, 0, 0.8);
  z-index:    100;
  backdrop-filter: blur(2px);
}

.modal {
  position:   fixed;
  inset:      0;
  z-index:    101;
  display:    flex;
  align-items: center;
  justify-content: center;
  padding:    1rem;
  pointer-events: none;
}

.modal-content {
  background:    var(--bg-modal);
  border:        1px solid var(--border-hover);
  padding:       2rem;
  width:         100%;
  max-width:     560px;
  max-height:    85vh;
  overflow-y:    auto;
  pointer-events: all;
  animation:     slideUp 0.2s ease;
}

@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } }

.modal-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  margin-bottom:   1.5rem;
  padding-bottom:  1rem;
  border-bottom:   1px solid var(--border);
}

.modal-header h3 {
  font-size:      0.875rem;
  font-weight:    500;
  color:          var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-close {
  background:    none;
  border:        none;
  font-size:     1.25rem;
  color:         var(--text-muted);
  line-height:   1;
  padding:       0.25rem;
  cursor:        pointer;
}
.btn-close:hover { color: var(--text); }

/* ── Certificate viewer modal ─────────────────────────────────────────────── */
.cert-view-hero {
  text-align:    center;
  padding:       1.5rem 1rem;
  border:        1px solid var(--border);
  border-radius: 8px;
  background:     #6366f10c;
  margin-bottom: 1.25rem;
}
.cert-view-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.cert-view-degree {
  font-size:      0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color:          #6366f1;
  font-weight:    600;
  margin-bottom:  0.35rem;
}
.cert-view-name {
  font-size:     1.4rem;
  font-weight:   600;
  color:         var(--text);
  margin-bottom: 0.35rem;
}
.cert-view-inst { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.85rem; }
.cert-view-grid { display: flex; flex-direction: column; }
.cert-view-grid .doc-detail { align-items: flex-start; }
.cert-view-mono { word-break: break-all; text-align: right; margin-left: 1rem; }
.cert-view-foot {
  margin-top:  1.25rem;
  padding-top: 1rem;
  border-top:  1px solid var(--border);
  font-size:   0.75rem;
  color:       var(--text-muted);
  text-align:  center;
}

/* ── Schema grid ─────────────────────────────────────────────────────────────── */
.schema-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap:                   0.75rem;
  margin-top:            0.5rem;
}

.schema-card {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  text-align:     center;
  gap:            0.5rem;
  padding:        1.25rem 0.75rem;
  background:     transparent;
  border:         1px solid var(--border);
  transition:     all 0.3s ease;
  cursor:         pointer;
  color:          var(--text);
}
.schema-card:hover {
  border-color:  rgba(255, 255, 255, 0.4);
  background:    rgba(255, 255, 255, 0.03);
}
.schema-card-icon  { font-size: 2rem; }
.schema-card-label { font-size: 0.75rem; font-weight: 500; color: var(--text); text-transform: uppercase; letter-spacing: 0.05em; }
.schema-card-desc  { font-size: 0.6875rem; color: var(--text-muted); line-height: 1.4; }

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group {
  display:       flex;
  flex-direction: column;
  gap:           0.375rem;
  margin-bottom: 1.5rem;
}

.form-group label {
  display:        block;
  font-size:      0.75rem;
  font-weight:    500;
  color:          var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width:         100%;
  padding:       0.875rem 1rem;
  font-size:     0.875rem;
  color:         var(--text);
  background:    var(--bg-card);
  border:        1px solid var(--border);
  outline:       none;
  font-family:   var(--font-sans);
  transition:    border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.form-group input.error   { border-color: var(--error); }
.form-group select        { appearance: none; cursor: pointer; }
.form-group select option { background: #0a0a0a; }

.checkbox-label {
  display:     flex;
  align-items: center;
  gap:         0.5rem;
  cursor:      pointer;
  font-size:   0.875rem;
  color:       var(--text-dim);
}
.checkbox-label input[type="checkbox"] {
  width:            16px;
  height:           16px;
  accent-color:     var(--text);
  cursor:           pointer;
  flex-shrink:      0;
}

.required { color: var(--error); margin-left: 0.125rem; }
.field-hint { font-size: 0.75rem; color: var(--text-muted); }

/* ── Upload progress ─────────────────────────────────────────────────────────── */
.upload-cost-notice {
  display:       flex;
  align-items:   center;
  gap:           0.5rem;
  font-size:     0.8125rem;
  color:         var(--text-muted);
  padding:       0.75rem;
  background:    rgba(255, 255, 255, 0.03);
  border:        1px solid var(--border);
  margin-bottom: 1rem;
}

.upload-actions {
  display:     flex;
  gap:         0.75rem;
  justify-content: flex-end;
  margin-top:  0.5rem;
}

.upload-step-header {
  font-size:      0.75rem;
  font-weight:    500;
  color:          var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom:  1rem;
}

.progress-bar {
  height:        2px;
  background:    var(--border);
  overflow:      hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height:        100%;
  background:    var(--text);
  transition:    width 0.3s ease;
}

.progress-label {
  font-size:      0.75rem;
  color:          var(--text-muted);
  text-align:     center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Selectable cards (prove step) ───────────────────────────────────────────── */
.selectable-card {
  display:       flex;
  align-items:   center;
  gap:           1rem;
  padding:       1rem 1.25rem;
  width:         100%;
  background:    var(--bg-card);
  border:        1px solid var(--border);
  text-align:    left;
  color:         var(--text);
  margin-bottom: 0.5rem;
  transition:    all 0.3s ease;
}
.selectable-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background:   rgba(255, 255, 255, 0.02);
}

.sel-card-icon   { font-size: 1.5rem; flex-shrink: 0; }
.sel-card-info   { display: flex; flex-direction: column; flex: 1; gap: 0.125rem; }
.sel-card-title  { font-size: 0.875rem; font-weight: 500; }
.sel-card-sub    { font-size: 0.8125rem; color: var(--text-muted); }
.sel-card-arrow  { color: var(--text-muted); font-size: 1.125rem; flex-shrink: 0; }

/* ── Prove wizard ─────────────────────────────────────────────────────────────── */
.prove-step-header {
  font-size:      0.75rem;
  font-weight:    500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color:          var(--text-muted);
  margin-bottom:  1rem;
  display:        flex;
  align-items:    center;
  gap:            0.5rem;
}

.prove-breadcrumb {
  display:     flex;
  align-items: center;
  gap:         0.375rem;
  font-size:   0.8125rem;
  color:       var(--text-muted);
  margin-bottom: 1rem;
  padding:     0.625rem 0.875rem;
  background:  rgba(255,255,255,0.03);
  border:      1px solid var(--border);
}

.prove-breadcrumb .crumb-value {
  color:       var(--text);
  font-weight: 500;
}

.prove-breadcrumb .crumb-sep { color: var(--text-muted); }

.no-params-notice {
  font-size:  0.875rem;
  color:      var(--text-muted);
  font-style: italic;
  padding:    0.75rem;
}

/* ── ZK Proof generation animation ───────────────────────────────────────────── */
.proof-generating {
  text-align:  center;
  padding:     2rem 1rem;
}

.zk-spinner {
  width:         64px;
  height:        64px;
  border:        2px solid var(--border);
  border-top:    2px solid var(--text);
  border-right:  2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation:     spin 1s linear infinite;
  margin:        0 auto 1.25rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.proof-gen-label {
  font-size:      0.875rem;
  color:          var(--text-muted);
  margin-bottom:  1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.proof-progress-bar {
  width:         100%;
  max-width:     320px;
  margin:        0 auto 1.5rem;
  height:        2px;
  background:    var(--border);
  overflow:      hidden;
}

.proof-progress-bar > div {
  height:        100%;
  background:    var(--text);
  transition:    width 0.4s ease;
}

.midnight-steps {
  display:     flex;
  flex-direction: column;
  gap:         0.5rem;
  max-width:   360px;
  margin:      0 auto;
  text-align:  left;
}

.mid-step {
  font-size:   0.8125rem;
  color:       var(--text-muted);
  padding:     0.375rem 0.75rem;
  background:  rgba(255,255,255,0.03);
  border:      1px solid var(--border);
  transition:  all 0.3s ease;
}
.mid-step.done { color: var(--success); background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); }

/* ── Proof result card ────────────────────────────────────────────────────────── */
.proof-result-card {
  border:        1px solid var(--border);
  padding:       1.5rem;
  animation:     fadeIn 0.3s ease;
  background:    var(--bg-card);
}

.proof-pass { border-color: rgba(16, 185, 129, 0.35); }
.proof-fail { border-color: rgba(239, 68,  68,  0.35); }
.proof-invalid { border-color: rgba(239, 68, 68, 0.35); }

.proof-verdict-badge {
  display:        inline-block;
  font-size:      0.75rem;
  font-weight:    500;
  padding:        0.375rem 0.875rem;
  letter-spacing: 0.05em;
  margin-bottom:  0.875rem;
  text-transform: uppercase;
  border:         1px solid;
}
.verdict-pass { background: rgba(16,185,129,0.1); color: var(--success); border-color: rgba(16,185,129,0.3); }
.verdict-fail { background: rgba(239,68,68,0.1);  color: var(--error);   border-color: rgba(239,68,68,0.3); }

.proof-description {
  font-size:     0.9375rem;
  font-weight:   500;
  margin-bottom: 1.25rem;
  color:         var(--text);
}

.proof-details-grid {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   0.625rem;
  margin-bottom:         1.25rem;
}

@media (max-width: 560px) { .proof-details-grid { grid-template-columns: 1fr; } }

.proof-detail {
  display:       flex;
  flex-direction: column;
  gap:           0.125rem;
  padding:       0.625rem 0.75rem;
  background:    rgba(255,255,255,0.03);
  border:        1px solid var(--border);
  font-size:     0.8125rem;
}
.proof-detail-label { color: var(--text-muted); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Groth16 section ─────────────────────────────────────────────────────────── */
.groth16-section {
  margin-bottom: 1.25rem;
  padding:       1rem;
  background:    rgba(255, 255, 255, 0.02);
  border:        1px solid var(--border);
}

.groth16-label {
  font-size:      0.75rem;
  font-weight:    500;
  color:          var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom:  0.75rem;
}

.groth16-points {
  display:       flex;
  flex-direction: column;
  gap:           0.375rem;
}

.groth16-points > div {
  display:     flex;
  align-items: center;
  gap:         0.75rem;
  font-size:   0.75rem;
}

.point-label {
  font-family:  var(--font-mono);
  color:        var(--text-dim);
  font-weight:  500;
  font-size:    0.75rem;
  min-width:    40px;
}

.proof-point {
  color:      var(--text-muted);
  word-break: break-all;
  font-size:  0.6875rem;
}

/* ── Proof share section ─────────────────────────────────────────────────────── */
.proof-share-section {
  border-top:    1px solid var(--border);
  padding-top:   1.25rem;
}

.share-label {
  font-size:      0.75rem;
  color:          var(--text-muted);
  margin-bottom:  0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.share-row {
  display:   flex;
  gap:       0.5rem;
}

.share-row input {
  flex:      1;
  padding:   0.5rem 0.75rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color:     var(--text-muted);
  background: rgba(255,255,255,0.03);
  border:    1px solid var(--border);
  outline:   none;
  min-width: 0;
}

/* ── Verify tab ──────────────────────────────────────────────────────────────── */
.verify-form {
  display:       flex;
  flex-direction: column;
  gap:           0.75rem;
}

.verify-form textarea {
  width:         100%;
  min-height:    100px;
  padding:       0.875rem;
  font-size:     0.875rem;
  font-family:   var(--font-mono);
  color:         var(--text);
  background:    var(--bg-card);
  border:        1px solid var(--border);
  outline:       none;
  resize:        vertical;
  transition:    border-color 0.3s ease;
}

.verify-form textarea:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.verify-result-card {
  margin-top:    1.5rem;
  padding:       1.5rem;
  background:    var(--bg-card);
  border:        1px solid var(--border);
  animation:     fadeIn 0.3s ease;
}

.verify-header {
  display:       flex;
  align-items:   flex-start;
  gap:           1rem;
  margin-bottom: 1.25rem;
}

.verify-icon   { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.verify-verdict {
  font-size:      0.75rem;
  font-weight:    500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom:  0.25rem;
}
.verdict-invalid { color: var(--error); }
.verify-summary  { font-size: 0.875rem; color: var(--text); }
.verify-details  { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.verify-error    { color: var(--error); font-size: 0.875rem; margin-top: 0.5rem; }
.verify-disclaimer {
  font-size:  0.75rem;
  color:      var(--text-muted);
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
}

/* ── History tab ─────────────────────────────────────────────────────────────── */
.history-row {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  gap:             1rem;
  padding:         1rem 1.25rem;
  background:      var(--bg-card);
  border:          1px solid var(--border);
  margin-bottom:   0.5rem;
  transition:      all 0.3s ease;
  flex-wrap:       wrap;
}
.history-row:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.02); }

.history-left          { display: flex; align-items: flex-start; gap: 0.875rem; flex: 1; min-width: 0; }
.history-schema-icon   { font-size: 1.375rem; flex-shrink: 0; margin-top: 0.125rem; }
.history-meta          { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.history-title         { font-size: 0.875rem; font-weight: 500; color: var(--text); }
.history-sub           { font-size: 0.8125rem; color: var(--text-muted); }
.history-proofid       { font-size: 0.6875rem; color: var(--text-muted); }
.history-right         { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

/* ── Typography helpers ──────────────────────────────────────────────────────── */
.mono    { font-family: var(--font-mono); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }

/* ── Hidden ──────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Scrollbar ───────────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .app             { padding: 1rem; }
  .header-brand h1 { font-size: 1.25rem; }
  .header          { flex-direction: column; align-items: center; gap: 1rem; }
  .header-badges   { justify-content: center; }
  .tab-nav         { overflow-x: auto; }
  .tab-button      { padding: 0.75rem 0.75rem; font-size: 0.6875rem; }
  .wallet-section  { flex-direction: column; }
  .section-header  { flex-direction: column; gap: 0.75rem; align-items: stretch; }
  #vault-documents-container { grid-template-columns: 1fr; }
  .history-right   { width: 100%; justify-content: flex-start; }
}

/* ── v2 additions ──────────────────────────────────────────────────────────── */
.doc-meta { flex: 1; min-width: 0; }
.doc-detail-mono span:last-child { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; }
