.tf-verify {
    min-height: 100vh;
    background: #eceaf3;
    color: var(--ink);
}

.tf-verify-main {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
}

.tf-kyc-card {
    width: min(440px, 100%);
    min-height: min(640px, calc(100vh - 32px));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(17, 17, 17, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: min(860px, calc(100vh - 32px));
}

.tf-kyc-head {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    min-height: 56px;
    padding: 0 8px;
}

.tf-kyc-head-title {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.tf-kyc-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--ink);
}

.tf-kyc-icon:hover,
.tf-kyc-icon:focus-visible {
    background: #f3f2f7;
}

.tf-kyc-icon svg {
    width: 20px;
    height: 20px;
}

.tf-kyc-progress {
    height: 3px;
    background: #eceaf3;
}

.tf-kyc-progress > span {
    display: block;
    height: 100%;
    background: var(--blue);
    transition: width 240ms var(--ease);
}

.tf-kyc-body {
    padding: 28px 28px 8px;
    overflow: auto;
    flex: 1;
}

.tf-kyc-body h1 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    line-height: 36px;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.tf-id-art {
    display: grid;
    place-items: center;
    margin: 4px 0 20px;
}

.tf-id-svg {
    width: min(220px, 100%);
    height: auto;
}

.tf-kyc-legal {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 22px;
    color: #6d6d6d;
}

.tf-kyc-legal a {
    color: var(--blue);
}

.tf-id-country {
    display: block;
    margin: 8px 0 8px;
}

.tf-id-country select {
    width: 100%;
    min-height: 48px;
    padding: 8px 32px 10px 0;
    border: 0;
    border-bottom: 1px solid #c5c3cc;
    border-radius: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%238a8a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right center;
    background-color: transparent;
    font-size: 16px;
    appearance: none;
}

.tf-id-country select:focus {
    outline: 0;
    border-bottom-color: var(--blue);
}

.tf-kyc-stay {
    margin: 16px 0 0;
    font-size: 12px;
    line-height: 18px;
    color: #6d6d6d;
    text-align: center;
}

.tf-kyc-stack {
    display: grid;
    gap: 12px;
}

.tf-kyc-foot {
    padding: 16px 28px 24px;
}

.tf-kyc-foot.is-choice {
    padding-top: 8px;
    min-height: 0;
}

.tf-kyc-continue {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    display: grid;
    place-items: center;
    text-decoration: none;
}

.tf-kyc-continue:hover:not(:disabled) {
    background: var(--blue-deep);
}

.tf-kyc-continue:disabled {
    background: #c9d7fb;
    color: #fff;
    cursor: not-allowed;
}

.tf-kyc-error {
    min-height: 18px;
    margin: 0 0 10px;
    font-size: 13px;
    color: #b42318;
}

.tf-kyc-error:empty {
    min-height: 0;
    margin: 0;
}

.tf-float {
    position: relative;
    border: 1px solid #e4e2ea;
    border-radius: 10px;
    background: #fff;
    min-height: 56px;
}

.tf-float:focus-within {
    border-color: var(--blue);
}

.tf-float.is-invalid {
    border-color: #e7a3a3;
    background: #fdf5f5;
}

.tf-float .field-error {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.tf-float input,
.tf-float select,
.tf-float .tf-combo-control {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink);
    min-height: 56px;
    padding: 16px 14px;
    border-radius: 10px;
}

.tf-float.is-filled input,
.tf-float.is-filled select,
.tf-float.is-filled .tf-combo-control,
.tf-float.is-invalid input,
.tf-float.is-invalid select,
.tf-float.is-invalid .tf-combo-control {
    min-height: 64px;
    padding: 28px 14px 10px;
}

.tf-float label.tf-float-label {
    display: none;
    position: absolute;
    left: 14px;
    top: 10px;
    right: 14px;
    pointer-events: none;
    flex-direction: column;
    gap: 1px;
}

.tf-float.is-filled .tf-float-label,
.tf-float.is-invalid .tf-float-label {
    display: flex;
}

.tf-float-req {
    display: none;
    font-size: 11px;
    line-height: 14px;
    color: #c23b3b;
    font-weight: 500;
}

.tf-float.is-invalid .tf-float-req {
    display: block;
}

.tf-float-name {
    font-size: 13px;
    line-height: 18px;
    color: #8a8a8a;
}

.tf-float.is-filled .tf-float-name,
.tf-float:focus-within .tf-float-name {
    color: #6d6d6d;
}

.tf-float input:focus,
.tf-float select:focus,
.tf-combo-control:focus {
    outline: none;
}

.tf-kyc-icon:focus-visible,
.tf-kyc-continue:focus-visible,
.tf-doc-option:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.tf-combo {
    position: relative;
}

.tf-combo-list {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 240px;
    overflow: auto;
    background: #fff;
    border: 1px solid #e4e2ea;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(17, 17, 17, 0.1);
    padding: 6px;
}

.tf-combo-list button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
}

.tf-combo-list button:hover,
.tf-combo-list button[aria-selected="true"] {
    background: var(--blue-soft);
}

.tf-suggest {
    position: relative;
}

.tf-suggest [data-address-list] {
    top: calc(100% - 4px);
}

.tf-suggest [data-address-list] small {
    display: block;
    color: #6d6d6d;
    font-size: 12px;
    margin-top: 2px;
}

.tf-kyc-addline {
    color: var(--blue);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    padding: 2px 0 6px;
}

.tf-kyc-addline:hover,
.tf-kyc-addline:focus-visible {
    text-decoration: underline;
}

.tf-kyc-split {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 12px;
}

.tf-ssn {
    position: relative;
    border: 1px solid #e4e2ea;
    border-radius: 10px;
    background: #fff;
    min-height: 56px;
}

.tf-ssn:focus-within {
    border-color: var(--blue);
}

.tf-ssn.is-invalid {
    border-color: #e7a3a3;
    background: #fdf5f5;
}

.tf-ssn-lock {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #0f9d8e;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.tf-ssn-lock svg {
    width: 18px;
    height: 18px;
}

.tf-ssn input {
    width: 100%;
    border: 0;
    background: transparent;
    min-height: 56px;
    padding: 16px 14px 16px 44px;
    border-radius: 10px;
    letter-spacing: 0.04em;
}

.tf-ssn input:focus {
    outline: none;
}

.tf-ssn input::placeholder {
    color: #b0b0b0;
    letter-spacing: 0.08em;
}

.tf-kyc-split select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236d6d6d' stroke-width='2' stroke-linecap='round'><path d='m6 8 4 4 4-4'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.tf-choice-list {
    display: grid;
    gap: 10px;
    padding-bottom: 12px;
}

.tf-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: #f3f2f7;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
}

.tf-choice svg {
    width: 18px;
    height: 18px;
    color: #8a8a8a;
}

.tf-choice-dot {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 2px solid #c5c3cc;
    border-radius: 50%;
    background: #fff;
}

.tf-choice.is-selected .tf-choice-dot {
    border-color: var(--blue);
    background: var(--blue);
    box-shadow: inset 0 0 0 4px #fff;
}

.tf-choice:hover,
.tf-choice.is-selected {
    background: #eceaf3;
}

.tf-choice:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.tf-kyc-list {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.tf-kyc-list li {
    display: flex;
    gap: 10px;
    font-size: 15px;
    line-height: 22px;
}

.tf-kyc-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--blue);
    flex-shrink: 0;
}

.tf-kyc-note {
    font-size: 13px;
    line-height: 20px;
    color: #6d6d6d;
    margin: 0 0 8px;
}

.tf-kyc-note a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tf-id-pick-label {
    margin: 4px 0 8px;
    font-size: 14px;
    line-height: 20px;
    color: #6d6d6d;
}

.tf-id-pick {
    display: grid;
}

.tf-id-pick-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 64px;
    padding: 0 2px;
    border: 0;
    border-top: 1px solid #eceaf3;
    border-radius: 0;
    background: transparent;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
}

.tf-id-pick-row:last-child {
    border-bottom: 1px solid #eceaf3;
}

.tf-id-pick-row:hover,
.tf-id-pick-row.is-selected {
    background: #f7f9ff;
}

.tf-id-pick-row:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: -2px;
}

.tf-id-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: grid;
    place-items: center;
}

.tf-id-icon svg {
    width: 18px;
    height: 18px;
}

.tf-id-pick-name {
    flex: 1;
}

.tf-id-pick-row svg:last-child {
    width: 18px;
    height: 18px;
    color: #8a8a8a;
}

.tf-capture {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 380px;
}

.tf-capture-count {
    margin: 0;
    color: #6d6d6d;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
}

.tf-capture-art {
    position: relative;
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 180px;
}

.tf-capture-art.is-live {
    min-height: 220px;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
}

.tf-id-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #111;
}

.tf-capture-cam.is-live svg {
    display: none;
}

.tf-capture-cam.is-live::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.28);
}

.tf-capture-actions {
    display: grid;
    gap: 12px;
}

.tf-capture-cam {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 56px;
    border-radius: 999px;
    background: var(--blue);
    color: #fff;
    cursor: pointer;
}

.tf-capture-cam svg {
    width: 26px;
    height: 26px;
}

.tf-capture-mobile {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 999px;
    background: #eceaf3;
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
}

.tf-mobile-panel {
    display: grid;
    gap: 10px;
    padding: 12px 4px 0;
    color: #6d6d6d;
    font-size: 14px;
    line-height: 20px;
}

.tf-mobile-panel[hidden] {
    display: none;
}

.tf-mobile-panel code {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f3f2f7;
    font-size: 12px;
    word-break: break-all;
}

@media (max-width: 720px), (hover: none) and (pointer: coarse) {
    .tf-continue-on-mobile {
        display: none !important;
    }
}

.tf-scan {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-height: 320px;
    padding-top: 12px;
}

.tf-scan-frame {
    position: relative;
    width: 220px;
}

.tf-scan-frame .tf-id-svg {
    display: block;
    width: 220px;
    height: auto;
}

.tf-scan-beam {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 12%;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, #1558f0, transparent);
    box-shadow: 0 0 14px rgba(21, 88, 240, 0.55);
    animation: tf-scan-beam 1.6s ease-in-out infinite;
}

.tf-scan-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    color: #6d6d6d;
    font-size: 15px;
    line-height: 22px;
    text-align: center;
}

.tf-scan-spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid #dbe6ff;
    border-top-color: #1558f0;
    border-radius: 50%;
    animation: tf-spin 700ms linear infinite;
}

@keyframes tf-scan-beam {
    0%, 100% { top: 14%; opacity: 0.35; }
    50% { top: 78%; opacity: 1; }
}

.tf-docs {
    display: grid;
    gap: 10px;
}

.tf-doc-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid #e4e2ea;
    border-radius: 10px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.tf-doc-option.is-selected,
.tf-doc-option:hover {
    border-color: var(--blue);
    background: #f7f9ff;
}

.tf-upload {
    border: 1px dashed #e4e2ea;
    border-radius: 10px;
    padding: 16px;
    display: grid;
    gap: 10px;
}

.tf-upload-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
}

.tf-upload-head span {
    color: #6d6d6d;
    font-size: 12px;
}

.tf-upload-preview {
    display: none;
    max-height: 140px;
    width: 100%;
    object-fit: contain;
    background: #f6f5f9;
    border-radius: 8px;
}

.tf-upload-preview.is-on {
    display: block;
}

.tf-meter {
    height: 3px;
    background: #eceaf3;
    display: none;
}

.tf-meter.is-on {
    display: block;
}

.tf-meter > span {
    display: block;
    height: 100%;
    background: var(--blue);
}

.tf-camera video,
.tf-camera img.tf-shot {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    background: #111;
    border-radius: 10px;
}

.tf-review {
    display: grid;
    gap: 12px;
}

.tf-review-section {
    border: 1px solid #e4e2ea;
    border-radius: 10px;
    padding: 14px;
}

.tf-review-section header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tf-review-section h2 {
    font-size: 14px;
    font-weight: 600;
}

.tf-review-section button,
.tf-review-edit {
    color: var(--blue);
    font-size: 14px;
    font-weight: 600;
}

.tf-review-section dl {
    display: grid;
    gap: 6px;
    margin: 0;
    font-size: 13px;
}

.tf-review-section dt {
    color: #6d6d6d;
}

.tf-status-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    background: var(--blue-soft);
    color: var(--blue);
}

.tf-status-icon.is-wait { background: #fff6e5; color: #8a5a00; }
.tf-status-icon.is-ok { background: #e7f8ef; color: #067647; }
.tf-status-icon.is-bad { background: #fde8e8; color: #b42318; }

.tf-check-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 20px;
}

.tf-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: -3px;
    animation: tf-spin 700ms linear infinite;
}

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

@media (max-width: 520px) {
    .tf-verify-main {
        padding: 0;
        place-items: stretch;
    }

    .tf-kyc-card {
        width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .tf-kyc-body,
    .tf-kyc-foot {
        padding-left: 20px;
        padding-right: 20px;
    }

    .tf-kyc-split {
        grid-template-columns: 1fr;
    }

    .tf-kyc-body { min-height: 0; }
    .tf-kyc-foot { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
    .tf-kyc-card input, .tf-kyc-card select { min-width: 0; max-width: 100%; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .tf-kyc-progress > span,
    .tf-loader,
    .tf-scan-beam,
    .tf-scan-spinner {
        transition: none;
        animation: none;
    }
}
