@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --vs-teal: #0d9488;
    --vs-teal-dark: #0f766e;
    --vs-text: #1e293b;
    --vs-muted: #64748b;
    --vs-line: #e2e8f0;
    --vs-fill: #f8fafc;
    --vs-page: #f4f6f8;
    --vs-danger: #b91c1c;
    --vs-ok: #047857;
    --vs-radius: 16px;
    --vs-control: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--vs-page);
    color: var(--vs-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.vs-wrap {
    width: 100%;
    max-width: 420px;
}

.vs-card {
    background: #fff;
    border: 1px solid var(--vs-line);
    border-radius: var(--vs-radius);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    border-top: 3px solid var(--vs-teal);
}

.vs-head {
    padding: 28px 28px 0;
    text-align: center;
}

.vs-mark {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--vs-teal);
    color: #fff;
    font-size: 1.15rem;
}

.vs-head h1 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.vs-head p {
    margin-top: 6px;
    font-size: 0.9rem;
    color: var(--vs-muted);
    line-height: 1.5;
}

.vs-head.hidden + .vs-body {
    padding-top: 28px;
}

.vs-body {
    padding: 24px 28px 28px;
}

.vs-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--vs-text);
    margin-bottom: 8px;
}

.vs-field {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--vs-line);
    border-radius: var(--vs-control);
    background: #fff;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--vs-text);
}

.vs-field::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.vs-field:focus {
    outline: none;
    border-color: var(--vs-teal);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.vs-btn {
    width: 100%;
    height: 48px;
    border-radius: var(--vs-control);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.vs-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.vs-btn--primary {
    margin-top: 12px;
    border: 0;
    background: var(--vs-teal);
    color: #fff;
}

.vs-btn--primary:hover { background: var(--vs-teal-dark); }

.vs-btn--ghost {
    border: 1px solid var(--vs-line);
    background: #fff;
    color: var(--vs-text);
}

.vs-btn--ghost:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
    color: var(--vs-teal-dark);
}

.vs-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vs-or::before,
.vs-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--vs-line);
}

.vs-qrbox {
    margin-top: 12px;
    border: 1px solid var(--vs-line);
    border-radius: var(--vs-control);
    padding: 10px;
    background: var(--vs-fill);
    overflow: hidden;
}

.vs-qrbox .vs-btn { margin-top: 10px; }

#qrReader {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

#qrReader video,
#qrReader canvas,
#qrReader img {
    max-width: 100% !important;
    height: auto !important;
}

#qrReader button {
    width: 100%;
    margin-top: 8px;
}

#html5-qrcode-anchor-scan-type-change {
    display: none !important;
}

.vs-result:empty { display: none; }
.vs-result { margin-bottom: 16px; }
.vs-wrap:has(form.hidden) .vs-result { margin-bottom: 0; }

.vs-alert {
    border-radius: var(--vs-control);
    padding: 12px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.45;
}

.vs-alert--error {
    background: #fef2f2;
    color: var(--vs-danger);
    border: 1px solid #fecaca;
}

.vs-alert--info {
    background: #f0fdfa;
    color: #115e59;
    border: 1px solid #99f6e4;
}

.vs-id {
    text-align: center;
}

.vs-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: var(--vs-ok);
    border: 1px solid #a7f3d0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
}

.vs-photo {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--vs-line);
    background: var(--vs-fill);
    display: block;
    margin: 16px auto 12px;
}

.vs-id h2 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.vs-role {
    margin-top: 4px;
    color: var(--vs-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.vs-note {
    margin: 16px 0;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
}

.vs-meta {
    text-align: left;
    border: 1px solid var(--vs-line);
    border-radius: var(--vs-control);
    overflow: hidden;
}

.vs-meta div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--vs-line);
    font-size: 0.85rem;
}

.vs-meta div:last-child { border-bottom: 0; }

.vs-meta span {
    color: var(--vs-muted);
    font-weight: 600;
    flex-shrink: 0;
}

.vs-meta strong {
    color: var(--vs-text);
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
}

.vs-id .vs-btn { margin-top: 16px; }

.vs-foot {
    text-align: center;
    color: var(--vs-muted);
    font-size: 0.75rem;
    margin-top: 16px;
}

.hidden { display: none !important; }

@media (max-width: 420px) {
    body { padding: 16px 12px; align-items: flex-start; }
    .vs-head { padding: 22px 20px 0; }
    .vs-body { padding: 20px; }
}
