* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}
.container {
    width: min(1000px, 92%);
    margin: 35px auto;
}
.header {
    margin-bottom: 20px;
}
.header h1 { margin: 0 0 8px; }
.card {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    margin-bottom: 20px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}
input[type=text] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 15px;
}
button, .btn {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 10px 15px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    background: #2563eb;
    color: #fff;
    margin-right: 6px;
}
.btn.secondary, button.secondary { background: #475569; }
.btn.danger, button.danger { background: #b91c1c; }
.btn.success, button.success { background: #15803d; }
.notice {
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    margin-bottom: 18px;
}
.success-msg {
    padding: 12px 14px;
    border-radius: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    margin-bottom: 18px;
}
.error-msg {
    padding: 12px 14px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    margin-bottom: 18px;
}
.status {
    padding: 10px 12px;
    border-radius: 8px;
    background: #eef2ff;
    margin: 12px 0;
}
.preview-wrap {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}
#fingerprintPreview {
    width: 180px;
    min-height: 220px;
    object-fit: contain;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    padding: 8px;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    padding: 11px 8px;
}
th { background: #f8fafc; }
.muted { color: #64748b; }
code { background: #f1f5f9; padding: 2px 5px; border-radius: 4px; }

.result-card { text-align: center; }
.result-name { font-size: 1.6rem; font-weight: 700; margin: 8px 0; }
.score { font-size: 1.15rem; }
.hidden { display: none; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #bbb; border-top-color: #333; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
