/* VictaPay console: pages outside the sidebar layout (sign-in, errors) and the few widgets pm.css does not cover.
   Colours come from the archi theme tokens (--th-*) so light and dark both work; the fallbacks are the light values. */

html, body { width: 100%; min-height: 100%; margin: 0; padding: 0; overflow-x: hidden; }

body.anon-body {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--th-page, #f7f4eb);
    color: var(--th-text, #25282b);
}

main.app-page { width: 100%; flex: 1 0 auto; }

footer.app-footer {
    min-height: 48px;
    flex-shrink: 0;
    background: var(--th-surface, #fff);
    border-top: 1px solid var(--th-border-soft, rgba(0, 0, 0, .08));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    color: var(--th-text-muted, #6a727a);
}

.footer-content { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.footer-logo { width: 28px; height: 28px; object-fit: contain; }

/* ---- Sign-in / forced password change ---- */
.login-page { min-height: calc(100vh - 48px); display: flex; justify-content: center; align-items: center; padding: 24px 16px; }

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--th-surface, #fff);
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .15);
}

.login-logo-img { max-height: 48px; object-fit: contain; }
.welcome-title { font-size: 30px; font-weight: 700; margin-bottom: 5px; color: var(--th-heading, #222); }
.welcome-subtitle { color: var(--th-text-muted, #666); font-size: 14px; margin-bottom: 26px; }

.custom-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--th-text-muted, #666); margin-bottom: 6px; display: block; }
.custom-input { border-radius: 10px; padding: 12px 14px; }

.eye-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--th-text-muted, #888); }

.login-btn { background: #0f505e; color: #fff; font-weight: 700; letter-spacing: .06em; border-radius: 10px; padding: 12px; border: 0; }
.login-btn:hover { background: #0a3a45; color: #fff; }

.alert-error, .alert-success {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
}
.alert-error { background: #fdecea; color: #a12622; }
.alert-success { background: #e6f4ea; color: #1e6b34; }

/* ---- Error pages ---- */
.err-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.err-card {
    width: 100%;
    max-width: 520px;
    background: var(--th-surface, #fff);
    border-radius: 14px;
    padding: 40px 36px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
}
.err-logo { max-height: 40px; margin-bottom: 18px; }
.err-code { font-size: 14px; font-weight: 700; letter-spacing: .12em; color: var(--th-text-muted, #6a727a); margin: 0; }
.err-heading { font-size: 28px; font-weight: 700; margin: 8px 0 10px; color: var(--th-heading, #222); }
.err-desc { color: var(--th-text-muted, #666); margin-bottom: 18px; }
.err-request { font-size: 12px; color: var(--th-text-muted, #666); }
.err-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }

/* ---- One-time secrets (API key, callback secret, temporary password) ---- */
.secret-panel {
    border: 2px solid #e0a800;
    background: #fff8e1;
    color: #3d2f00;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.secret-panel h3 { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.secret-panel p { margin: 0 0 12px; font-size: 13px; }
.secret-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.secret-row .label { font-size: 12px; font-weight: 700; min-width: 110px; }
.secret-value {
    flex: 1;
    min-width: 240px;
    font-family: Consolas, "JetBrains Mono", monospace;
    font-size: 13px;
    background: #fff;
    border: 1px solid #e0c870;
    border-radius: 8px;
    padding: 8px 10px;
    word-break: break-all;
    user-select: all;
}
.btn-copy {
    border: 0;
    background: #0f505e;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    padding: 8px 12px;
}

.inline-form { display: inline; }
.pm .detail-item .value span + span { margin-left: 6px; }
.role-check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.role-check small { color: var(--th-text-muted, #6a727a); }
.mono { font-family: Consolas, "JetBrains Mono", monospace; }
