:root {
    color-scheme: dark;
    --bg: #07111f;
    --panel: rgba(12, 27, 48, .9);
    --panel-2: rgba(18, 40, 68, .74);
    --text: #f5f8ff;
    --muted: #9db0c8;
    --line: rgba(173, 201, 235, .14);
    --accent: #60a5fa;
    --accent-2: #22d3ee;
    --danger: #fca5a5;
    --success: #86efac;
    --shadow: 0 30px 90px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 15% 20%, rgba(34, 211, 238, .10), transparent 34rem),
        radial-gradient(circle at 85% 10%, rgba(96, 165, 250, .15), transparent 30rem),
        linear-gradient(145deg, #06101d, #0a1728 55%, #081220);
    color: var(--text);
}

button, input { font: inherit; }

button {
    border: 0;
    cursor: pointer;
}

.shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
}

.panel {
    width: min(920px, 100%);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(13, 29, 51, .96), rgba(8, 20, 36, .95));
    box-shadow: var(--shadow);
    padding: clamp(22px, 4vw, 42px);
    backdrop-filter: blur(16px);
}

.brand-row, .result-head, .top-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand-row { justify-content: flex-start; margin-bottom: 28px; }

.brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-weight: 800;
    font-size: 22px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #03111e;
    box-shadow: 0 10px 35px rgba(34, 211, 238, .18);
}

h1, h2, p { margin: 0; }

h1 {
    font-size: clamp(26px, 5vw, 42px);
    letter-spacing: -.04em;
}

h2 {
    font-size: clamp(21px, 4vw, 30px);
    letter-spacing: -.025em;
}

.eyebrow {
    margin-bottom: 5px;
    color: var(--accent-2);
    font-size: 11px;
    letter-spacing: .16em;
    font-weight: 800;
}

.muted, small, .footnote { color: var(--muted); }

.notice, .error-box {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
}

.notice {
    background: rgba(96, 165, 250, .08);
    border: 1px solid rgba(96, 165, 250, .20);
    color: #cfe5ff;
}

.error-box {
    background: rgba(248, 113, 113, .10);
    border: 1px solid rgba(248, 113, 113, .25);
    color: var(--danger);
}

.auth-form, .query-form { margin-top: 26px; }

label {
    display: block;
    font-size: 13px;
    font-weight: 750;
    margin-bottom: 9px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

input {
    width: 100%;
    min-width: 0;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(3, 13, 25, .60);
    color: var(--text);
    padding: 15px 16px;
    outline: none;
    transition: .18s ease;
}

input:focus {
    border-color: rgba(96, 165, 250, .65);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, .10);
}

.field-row > button {
    min-width: 126px;
    border-radius: 14px;
    padding: 0 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #04121f;
}

button:disabled {
    opacity: .6;
    cursor: wait;
}

.link-button {
    color: #b8cae0;
    background: transparent;
    padding: 7px 0;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.query-form small {
    display: block;
    margin-top: 9px;
}

.status {
    min-height: 24px;
    margin: 18px 0 2px;
    font-size: 14px;
}

.status.error { color: var(--danger); }
.status.success { color: var(--success); }
.status.loading { color: #bfdbfe; }

.result-card {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 22px;
    background: var(--panel-2);
}

.hidden { display: none; }

.badge {
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 800;
    color: #bfeaff;
    border: 1px solid rgba(34, 211, 238, .24);
    background: rgba(34, 211, 238, .08);
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.data-box {
    border: 1px solid var(--line);
    background: rgba(4, 15, 28, .43);
    border-radius: 16px;
    padding: 16px;
}

.data-box.wide { grid-column: 1 / -1; }

.data-box span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 7px;
}

.data-box strong {
    font-size: 16px;
    overflow-wrap: anywhere;
}

.data-box small {
    display: block;
    margin-top: 7px;
    line-height: 1.45;
}

.footnote {
    margin-top: 20px;
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .field-row, .grid { grid-template-columns: 1fr; }

    .field-row > button { min-height: 48px; }

    .data-box.wide { grid-column: auto; }

    .top-actions, .result-head { align-items: flex-start; }

    .top-actions { flex-direction: column; }
}


.identity-header {
    display: flex;
    align-items: center;
    gap: 18px;
}

.identity-title {
    min-width: 0;
    flex: 1;
}

.photo-wrap {
    width: 92px;
    height: 112px;
    flex: 0 0 92px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(4, 15, 28, .55);
}

.identity-photo,
.photo-placeholder {
    width: 100%;
    height: 100%;
}

.identity-photo {
    display: block;
    object-fit: cover;
}

.photo-placeholder {
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .08em;
    color: var(--muted);
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.badge-ok {
    color: #bbf7d0;
    border-color: rgba(134, 239, 172, .25);
    background: rgba(134, 239, 172, .08);
}

.badge-bad {
    color: #fecaca;
    border-color: rgba(252, 165, 165, .25);
    background: rgba(252, 165, 165, .08);
}

@media (max-width: 520px) {
    .identity-header {
        align-items: flex-start;
    }

    .photo-wrap {
        width: 74px;
        height: 92px;
        flex-basis: 74px;
    }
}
