/*
 * Everyone Rises ERP — Public Pages CSS
 * er-public.css
 * Used by: admin login, member login, member register, member verify-email
 * Requires: er-variables.css
 * Version 1.0 | April 2026
 */

/* ── Page body ─────────────────────────────────────────────────────────────── */
body.public-page {
    background-color: #F0EBE0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Auth wrapper ──────────────────────────────────────────────────────────── */
.auth-wrapper {
    width: 100%;
    max-width: 460px;
    padding: 24px 16px;
}

.auth-wrapper--wide {
    max-width: 560px;
}

/* ── Auth card ─────────────────────────────────────────────────────────────── */
.auth-card {
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 32px rgba(26, 60, 110, 0.12);
    border-top: 6px solid var(--gold);
}

/* ── Brand header ──────────────────────────────────────────────────────────── */
.auth-logo {
    background-color: var(--navy-deep);
    padding: 28px 32px 24px;
    text-align: center;
}

.auth-brand-name {
    font-family: var(--font-d);
    font-size: 28px;
    color: #ffffff;
    font-weight: 400;
}

.auth-brand-name em {
    color: var(--gold-lt);
    font-style: italic;
}

.auth-brand-sub {
    font-family: var(--font-b);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-top: 6px;
}

/* ── Card titles ───────────────────────────────────────────────────────────── */
.auth-title {
    font-family: var(--font-d);
    font-size: 22px;
    font-weight: 600;
    color: var(--navy);
    padding: 24px 32px 4px;
}

.auth-subtitle {
    font-size: 13px;
    color: var(--muted);
    padding: 0 32px 20px;
}

/* ── Form inside auth card ─────────────────────────────────────────────────── */
.auth-form {
    padding: 0 32px 24px;
}

.auth-form .form-control {
    padding: 10px 14px;
}

.auth-form .form-control:focus {
    box-shadow: 0 0 0 3px rgba(26,60,110,0.08);
}

/* ── Alerts inside auth card ───────────────────────────────────────────────── */
.auth-alert {
    margin: 0 32px 16px;
    padding: 10px 14px;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.5;
}

/* ── Mobile verification code display ─────────────────────────────────────── */
.mobile-code-display {
    display: none;
    margin-top: 8px;
    padding: 12px 16px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 3px;
}

.mobile-code-display.visible { display: block; }

.mobile-code-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}

.mobile-code-value {
    font-family: 'Courier New', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.3em;
}

.mobile-code-note {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    font-style: italic;
}

/* ── Input with inline action (mobile check button) ───────────────────────── */
.input-with-action {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.input-with-action .form-control { flex: 1; }

.btn-check {
    padding: 10px 14px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 3px;
    font-family: var(--font-b);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.btn-check:hover    { background: var(--navy-deep); }
.btn-check:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-check.verified { background: var(--success); }

/* ── T&C checkbox ──────────────────────────────────────────────────────────── */
.tc-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #F8FAFC;
    border: 1px solid var(--border);
    border-radius: 3px;
    margin-bottom: 16px;
}

.tc-group input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--navy);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.tc-group label {
    font-size: 12px;
    color: var(--text);
    letter-spacing: 0;
    text-transform: none;
    font-weight: 400;
    margin-bottom: 0;
    cursor: pointer;
}

.tc-group label a {
    color: var(--gold);
    text-decoration: none;
}

.tc-group label a:hover { text-decoration: underline; }

/* ── Password strength indicator ──────────────────────────────────────────── */
.password-strength {
    display: none;
    margin-top: 6px;
}

.password-strength.visible { display: block; }

.strength-bar {
    height: 3px;
    border-radius: 2px;
    background: var(--border);
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.strength-fill.weak   { width: 33%; background: var(--error); }
.strength-fill.medium { width: 66%; background: var(--warning); }
.strength-fill.strong { width: 100%; background: var(--success); }

.strength-text {
    font-size: 11px;
    color: var(--muted);
}

/* ── Success / verify email page ───────────────────────────────────────────── */
.auth-success-icon {
    font-size: 48px;
    text-align: center;
    padding: 24px 32px 8px;
}

.auth-success-title {
    font-family: var(--font-d);
    font-size: 22px;
    font-weight: 600;
    color: var(--navy);
    text-align: center;
    padding: 0 32px 8px;
}

.auth-success-body {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    padding: 0 32px 24px;
    line-height: 1.6;
}

.auth-success-email {
    font-weight: 600;
    color: var(--navy);
}

/* ── Footer inside auth card ───────────────────────────────────────────────── */
.auth-footer {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    padding: 0 32px 24px;
    letter-spacing: 0.05em;
}

.auth-footer a {
    color: var(--gold);
    text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

/* ── Loading spinner ───────────────────────────────────────────────────────── */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

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

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-wrapper { padding: 16px 12px; }
    .auth-title   { padding: 20px 20px 4px; font-size: 20px; }
    .auth-subtitle{ padding: 0 20px 16px; }
    .auth-form    { padding: 0 20px 20px; }
    .auth-footer  { padding: 0 20px 20px; }
    .auth-alert   { margin: 0 20px 12px; }
    .form-row     { grid-template-columns: 1fr; }
}
