/* Platform-specific login styles (supplements shared login.css from ClientPortal) */

.hidden { display: none !important; }

/* ── Tenant Picker Cards ── */
.tenant-card {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.375rem;
    color: whitesmoke;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    text-align: left;
    text-decoration: none;
}

.tenant-card:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    color: white;
}

.tenant-card .tenant-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.tenant-card .tenant-name,
.tenant-card .tenant-mode {
    display: block;
}

.tenant-card .tenant-mode {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Front-door practice picker (/) */
.tenant-card-list {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

/* ── Pending practice invitations (D1 in-session approval) ── */
.tenant-card.pending-card {
    cursor: default;
}

.tenant-card.pending-card:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.pending-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.pending-actions form {
    margin: 0;
}

.pending-btn {
    padding: 0.35rem 0.9rem;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    font-size: 0.82rem;
    cursor: pointer;
}

.pending-btn-approve {
    background-color: var(--primary-color, #26D9FF);
    color: #00131a;
    font-weight: 600;
}

.pending-btn-approve:hover {
    filter: brightness(1.08);
}

.pending-btn-decline {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.25);
    color: whitesmoke;
}

.pending-btn-decline:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

/* ── Platform login panel width ── */
.login-panel {
    width: 22rem;
}

/* ── "Sign in to <Practice>" banner shown when tenant_hint is known ── */
.login-tenant-banner {
    text-align: center;
    color: whitesmoke;
    font-size: 0.95rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

.login-tenant-banner .login-tenant-name {
    font-weight: 600;
    opacity: 1;
}

/* Helper links under the login forms (forgot password, etc.) */
.login-links {
    text-align: center;
    margin-top: 0.75rem;
}

.login-links a,
.login-base-panel a {
    color: var(--primary-color, #26D9FF);
    text-decoration: none;
    font-size: 0.85rem;
}

.login-links a:hover,
.login-base-panel a:hover {
    text-decoration: underline;
}

/* The primary login page shows the wordmark inside the panel, so suppress the
   fixed corner wordmark there (other login surfaces keep it for branding). */
body.login-page-index .login-layout-wordmark {
    display: none;
}

/* ──────────────────────────────────────────────────────────────────────────
   Phase 9 — self-service two-factor management (/account/security)
   ────────────────────────────────────────────────────────────────────────── */

/* These surfaces carry more content (QR, code lists) than the login forms. */
.login-panel.security-manage {
    width: 26rem;
    max-width: 92vw;
}

/* 2FA on/off badge */
.security-status-badge {
    text-align: center;
    font-size: 0.95rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.06);
}

.security-status-badge.on {
    border-color: rgba(105, 222, 163, 0.5); /* brand green */
}

/* Per-method rows on the hub */
.security-methods {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem;
}

.security-methods > li {
    padding: 0.6rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.security-methods > li:first-child {
    border-top: none;
}

.security-method-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.security-method-state {
    font-size: 0.82rem;
    opacity: 0.85;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: baseline;
    margin-top: 0.15rem;
}

.security-method-state a {
    color: var(--primary-color, #26D9FF);
    text-decoration: none;
}

.security-method-state a:hover {
    text-decoration: underline;
}

/* Numbered setup steps on EnableAuthenticator */
.security-steps {
    padding-left: 1.1rem;
    font-size: 0.88rem;
}

.security-steps > li {
    margin-bottom: 0.6rem;
}

/* QR code — rendered on a light tile so it scans against the dark theme */
.authenticator-qr {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0;
}

.authenticator-qr img {
    width: 180px;
    height: 180px;
    background: #fff;
    padding: 8px;
    border-radius: 0.375rem;
}

.authenticator-key {
    text-align: center;
    margin-top: 0.25rem;
}

.authenticator-key-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    margin-bottom: 0.15rem;
}

.authenticator-key kbd {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
}

/* Recovery code grid */
.recovery-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 1rem;
    margin: 0.75rem 0;
}

.recovery-codes code {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.25rem;
    padding: 0.35rem 0.5rem;
    text-align: center;
    color: whitesmoke;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

/* A <button> that reads as a link (POST actions inside .login-links) */
.link-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary-color, #26D9FF);
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
}

.link-button:hover {
    text-decoration: underline;
}
