* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; background: #f5f5f7; color: #0a0a0a; min-height: 100vh; }
main { max-width: 768px; margin: 0 auto; padding: 48px 24px; }

nav {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid #e5e5e5;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(8px);
  padding: 12px 24px;
  display: flex; align-items: center; gap: 8px;
}
.brand { font-size: 14px; font-weight: 600; color: #404040; }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-header h1 { font-size: 20px; font-weight: 700; }

.hero { margin-bottom: 32px; }
.hero-title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hero-title h1 { font-size: 20px; font-weight: 700; }
.hero p { font-size: 14px; color: #737373; }

.icon-badge { width: 32px; height: 32px; background: #dbeafe; color: #2563eb; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-badge.lg { width: 48px; height: 48px; border-radius: 16px; }

.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab { padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid #e5e5e5; background: #fff; color: #737373; transition: all .15s; }
.tab.active { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }

.dropzone { border: 2px dashed #e5e5e5; border-radius: 12px; background: #fafafa; padding: 64px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: #93c5fd; background: #eff6ff; }
.dropzone .title { font-size: 14px; font-weight: 500; color: #404040; }
.dropzone .hint { font-size: 12px; color: #a3a3a3; }
#file-input { display: none; }

.spinner { display: none; flex-direction: column; align-items: center; gap: 12px; padding: 48px 0; }
.spinner p { font-size: 14px; font-weight: 500; color: #404040; }
.spin { width: 28px; height: 28px; border: 3px solid #e5e5e5; border-top-color: #f97316; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.card { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; margin-top: 16px; overflow: hidden; }
.card-hd { padding: 12px 16px; border-bottom: 1px solid #f5f5f5; display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; }
.hstack { display: flex; align-items: center; gap: 8px; }
.icon-blue { color: #3b82f6; }
#cert-panel { display: none; }

.row { padding: 12px 16px; border-bottom: 1px solid #f5f5f5; }
.row:last-child { border-bottom: none; }
.row-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #a3a3a3; margin-bottom: 2px; }
.row-val { font-family: monospace; font-size: 13px; color: #0a0a0a; word-break: break-all; }
.row-val.normal { font-family: inherit; }

.kv-row { display: flex; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #f5f5f5; }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { width: 33%; font-size: 12px; font-weight: 500; color: #737373; flex-shrink: 0; }
.kv-row .v { font-size: 14px; color: #0a0a0a; }

.section-label { padding: 12px 16px; border-bottom: 1px solid #f5f5f5; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #a3a3a3; }

.tamper-region { padding: 12px 16px; border-bottom: 1px solid #f5f5f5; }
.tamper-region:last-child { border-bottom: none; }
.tamper-region p { font-size: 12px; color: #737373; margin-bottom: 8px; }
.tamper-region img { max-width: 100%; border: 1px solid #e5e5e5; border-radius: 8px; }

.btn { width: 100%; margin-top: 16px; background: #0a0a0a; color: #fff; border: none; border-radius: 12px; padding: 14px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s; }
.btn:hover { background: #262626; }
.btn-reset { font-size: 12px; color: #a3a3a3; cursor: pointer; background: none; border: none; }
.btn-reset:hover { color: #737373; }

.link { font-size: 12px; color: #3b82f6; text-decoration: none; }
.link-muted { display: inline-block; margin-top: 16px; font-size: 14px; color: #737373; text-decoration: none; }

.alert { display: flex; align-items: center; gap: 8px; border-radius: 12px; padding: 12px 16px; }
.alert.stack { align-items: flex-start; }
.alert .icon { font-size: 18px; }
.alert .msg { font-size: 14px; font-weight: 600; }
.alert-blue { background: #eff6ff; border: 1px solid #bfdbfe; justify-content: space-between; }
.alert-blue .icon, .alert-blue svg { color: #2563eb; }
.alert-blue .msg { color: #1d4ed8; }
.alert-green { background: #f0fdf4; border: 1px solid #bbf7d0; }
.alert-green .icon { color: #16a34a; }
.alert-green .msg { color: #166534; }
.alert-red { background: #fef2f2; border: 1px solid #fecaca; }
.alert-red .icon { color: #ef4444; }
.alert-red .msg { color: #991b1b; }
.alert-red .detail { font-size: 12px; color: #dc2626; margin-top: 4px; }

.pdf-preview { width: 100%; height: 70vh; border-radius: 12px; border: 1px solid #e5e5e5; }
