/* Viewer onboarding / engagement polish. Kept separate from the core dashboard
   stylesheet so the invitation feature remains easy to evolve or remove. */

.password-input-wrap {
    position: relative;
}
.password-input-wrap input {
    padding-right: 52px;
}
button.password-toggle {
    position: absolute;
    top: 9px;
    right: 7px;
    width: 38px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    background: transparent;
    color: #aeb8c8;
    font-size: 17px;
}
button.password-toggle:hover,
button.password-toggle[aria-pressed="true"] {
    filter: none;
    background: #202631;
    border-color: #3a4352;
}

.invite-card {
    max-width: 560px;
}
.invite-card h1 {
    margin-bottom: 10px;
}
.invite-email {
    margin: 18px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #11161d;
    color: #aeb8c8;
}
.invite-email strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
}
.password-policy {
    margin: -4px 0 16px;
    color: #8f98a9;
    font-size: 13px;
    line-height: 1.45;
}

.viewer-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 24px;
    padding: 20px 22px;
    border: 1px solid #31547e;
    border-radius: 14px;
    background: linear-gradient(135deg,#14243a,#171b23);
}
.viewer-welcome h2 {
    margin: 6px 0 8px;
}
.viewer-welcome p {
    max-width: 900px;
    margin: 0;
    color: #c6ccd7;
    line-height: 1.55;
}
.viewer-welcome .button-link {
    flex: 0 0 auto;
    background: #315b91;
}

.viewer-invite-panel h2,
.email-settings-panel h2 {
    margin: 6px 0 8px;
}

.status-pill {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid #3a4352;
    background: #202631;
    color: #c9d3e4;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.status-pill.accepted {
    background: #14251b;
    border-color: #397b55;
    color: #a9dbb8;
}
.status-pill.pending {
    background: #271f13;
    border-color: #775b2e;
    color: #e0bb78;
}
.status-pill.expired,
.status-pill.revoked {
    background: #2a1717;
    border-color: #8d4343;
    color: #ffaaaa;
}
.status-pill.neutral {
    background: #202631;
    color: #aeb8c8;
}
.user-table-meta {
    display: block;
    margin-top: 6px;
    color: #8f98a9;
    font-size: 11px;
    white-space: nowrap;
}
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.inline-actions form {
    margin: 0;
}
.inline-actions button {
    padding: 7px 9px;
    font-size: 12px;
    white-space: nowrap;
}

.email-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 12px;
    margin: 16px 0;
}
.email-settings-grid > div {
    padding: 12px;
    border: 1px solid #303744;
    border-radius: 9px;
    background: #11161d;
}
.email-settings-grid span,
.email-settings-grid strong {
    display: block;
}
.email-settings-grid span {
    margin-bottom: 5px;
    color: #8f98a9;
    font-size: 12px;
}
.email-settings-grid strong {
    overflow-wrap: anywhere;
}
.email-test-form {
    max-width: 780px;
    margin-top: 10px;
}

@media (max-width: 760px) {
    .viewer-welcome {
        align-items: flex-start;
        flex-direction: column;
    }
    .viewer-welcome .button-link {
        width: 100%;
        text-align: center;
    }
}
