* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Arial,
        "Segoe UI",
        sans-serif;

    background: #f4f7f6;
    color: #17211d;
}

button {
    font: inherit;
}

.portal {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
}

.card {
    width: 100%;
    max-width: 520px;

    background: #ffffff;

    border-radius: 22px;

    padding: 36px;

    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.08);

    text-align: center;
}

.client-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 9px 16px;

    margin-bottom: 18px;

    border-radius: 30px;

    background: #e9f9ef;

    color: #087a3e;

    font-weight: 700;
}

h1 {
    margin: 0 0 10px;

    font-size: 28px;
}

h2 {
    margin: 14px 0 8px;

    font-size: 22px;
}

/* .client-name {
    display: inline-block;
    margin: 4px 0 14px;
    padding: 6px 14px;

    background: #f4f7f6;
    border-radius: 20px;

    font-size: 14px;
    font-weight: 700;
    color: #52605a;
} */

.subtitle,
.state p,
.connection-result p {
    line-height: 1.8;

    color: #63706a;
}

.subtitle {
    margin-bottom: 28px;
}

.hidden {
    display: none !important;
}

.state,
.connection-result {
    margin-top: 24px;
}

.status-icon {
    width: 62px;
    height: 62px;

    margin: 0 auto 12px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 30px;
    font-weight: 700;
}

.status-icon.success {
    background: #e7f8ed;
    color: #087a3e;
}

.status-icon.danger {
    background: #fdecec;
    color: #c13535;
}

.methods {
    display: grid;

    gap: 12px;

    margin-top: 25px;
}

.button {
    width: 100%;

    border: 0;

    padding: 15px 18px;

    border-radius: 12px;

    cursor: pointer;

    font-weight: 700;

    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled {
    opacity: 0.55;

    cursor: wait;

    transform: none;
}

.button.primary {
    background: #128c4f;
    color: white;
}

.button.secondary {
    background: #eef2f0;
    color: #17211d;
}

.qr-wrapper {
    max-width: 300px;

    margin: 20px auto;

    padding: 14px;

    border: 1px solid #e4e9e6;

    border-radius: 18px;

    background: white;
}

.qr-wrapper img {
    display: block;

    width: 100%;
    height: auto;
}

.pairing-code {
    margin: 22px auto;

    padding: 17px 20px;

    border: 2px dashed #128c4f;

    border-radius: 14px;

    font-size: 30px;

    font-weight: 800;

    letter-spacing: 4px;

    direction: ltr;

    background: #f3fbf6;
}

.instructions {
    margin: 25px 0 0;

    padding-right: 25px;

    text-align: right;

    line-height: 2;

    color: #525e59;
}

.spinner {
    width: 44px;
    height: 44px;

    margin: 10px auto 18px;

    border: 4px solid #e1e7e4;
    border-top-color: #128c4f;

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

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

footer {
    margin-top: 34px;

    padding-top: 18px;

    border-top: 1px solid #eef1ef;

    color: #909995;

    font-size: 13px;
}

@media (max-width: 600px) {

    .portal {
        padding: 14px;
    }

    .card {
        padding: 26px 20px;

        border-radius: 18px;
    }

    h1 {
        font-size: 24px;
    }

    .pairing-code {
        font-size: 25px;
    }
}
