/* Sign-in, sign-up and password reset (views/access.html) */

.i18n-loading body {
    visibility: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px 16px;
}

.access-box {
    width: 100%;
    max-width: 460px;
    padding: 28px;
}

.access-box .brand {
    margin-bottom: 18px;
    color: var(--text-main);
    text-decoration: none;
}

.brand-name {
    font-size: 19px;
    font-weight: 800;
}

.access-box h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
}

.subtitle {
    margin: 0 0 20px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

input[type='tel'] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-main);
    font: inherit;
}

/* Two fields side by side (first/last name, country/phone); one under the other on phones */
.field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}

@media (max-width: 440px) {
    .field-pair {
        grid-template-columns: 1fr;
    }

    .access-box {
        padding: 22px 18px;
    }
}

.label-row {
    display: flex !important;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.small-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.optional {
    font-weight: 400;
}

.password-wrap {
    position: relative;
    display: block;
}

.password-wrap input {
    padding-right: 80px;
}

.show-password {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    padding: 5px 9px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.show-password:hover {
    color: var(--text-main);
}

.terms-row {
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.45;
}

.terms-row input {
    flex-shrink: 0;
    margin-top: 1px;
}

.terms-row a {
    color: var(--primary);
}

#clerk-captcha:not(:empty) {
    margin-bottom: 14px;
}

.code-input {
    font-size: 28px !important;
    font-weight: 800;
    letter-spacing: 0.4em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.code-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 8px;
    font-size: 14px;
}

.link-btn {
    padding: 0;
    border: none;
    background: none;
    color: var(--primary);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.link-btn:disabled {
    color: var(--text-muted);
    cursor: default;
}

.switch {
    margin: 18px 0 0;
    font-size: 14px;
    text-align: center;
    color: var(--text-muted);
}

.switch a,
.demo-link {
    font-weight: 600;
    color: var(--primary);
}

.demo-link {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}

#formMessage {
    margin-top: 14px;
}

.message-success {
    background: rgb(34 197 94 / 0.15);
    color: var(--text-success, #86efac);
}

.busy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-muted);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.page-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    font-size: 13px;
}

.page-links a {
    color: var(--text-muted);
}

/* === Licence status page (views/account.html) === */
.status-badge {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: rgb(59 130 246 / 0.15);
    color: var(--text-info);
}

.status-badge.expired,
.status-badge.disabled {
    background: rgb(239 68 68 / 0.15);
    color: var(--text-danger);
}

.status-badge.not_started {
    background: rgb(245 158 11 / 0.15);
    color: var(--text-warning);
}

.account-facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--bg-input);
    font-size: 14px;
}

.account-facts dt {
    color: var(--text-muted);
    font-weight: 600;
}

.account-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.contact {
    font-size: 14px;
    color: var(--text-muted);
}

.contact a {
    font-weight: 600;
    color: var(--primary);
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

/* Hints under a field: normal text, not the bold of the field label */
label.field > .hint {
    font-weight: 400;
}
