/* Lorum1 Identity — auth pages, layered on top of Syncfusion Fluent 2 theme */

:root {
    --auth-bg: #faf9f8;
    --auth-card-bg: #ffffff;
    --auth-ink: #242424;
    --auth-ink-subtle: #616161;
    --auth-accent: #0f6cbd;
    --auth-accent-hover: #0c5a9e;
    --auth-line: #e0e0e0;
    --auth-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    --auth-radius: 4px;
    --auth-error-bg: #fdf2f2;
    --auth-error-border: #f3b6b6;
    --auth-error-ink: #a4262c;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--auth-bg);
    color: var(--auth-ink);
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

a { color: var(--auth-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top nav */
.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    background: #1f1f1f;
    color: #fff;
}
.auth-topbar-brand {
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.3px;
    font-size: 14px;
}
.auth-topbar-brand:hover { color: #fff; text-decoration: none; }
.auth-user-menu { position: relative; }
.auth-user-menu summary {
    cursor: pointer;
    list-style: none;
    color: #fff;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: var(--auth-radius);
}
.auth-user-menu summary::-webkit-details-marker { display: none; }
.auth-user-menu summary:hover { background: #2f2f2f; }
.auth-caret { font-size: 10px; opacity: 0.7; }
.auth-user-menu-items {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--auth-card-bg);
    color: var(--auth-ink);
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    min-width: 220px;
    padding: 4px 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
}
.auth-user-menu-items a {
    color: var(--auth-ink);
    padding: 8px 14px;
    font-size: 13px;
}
.auth-user-menu-items a:hover { background: #f5f5f5; text-decoration: none; }
.auth-user-menu-items hr { margin: 4px 0; border: 0; border-top: 1px solid var(--auth-line); }

/* Page container */
.auth-page-container {
    min-height: calc(100vh - 60px);
    padding: 0 16px;
}

/* Shell / brand */
.auth-shell {
    max-width: 960px;
    margin: 24px auto 40px;
    padding: 0;
}

.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand-title { font-size: 24px; font-weight: 600; margin: 0; letter-spacing: 0.3px; }
.auth-brand-tag { margin: 4px 0 0; color: var(--auth-ink-subtle); font-size: 14px; }

/* Card grid */
.auth-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
@media (min-width: 768px) {
    .auth-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}

.auth-card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    padding: 24px 28px;
    box-shadow: var(--auth-shadow);
}
.auth-card-title { font-size: 18px; font-weight: 600; margin: 0 0 16px 0; }
.auth-card-subtle { color: var(--auth-ink-subtle); font-size: 13px; margin: -8px 0 14px 0; }

/* Form fields */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 4px; }
.auth-label { font-size: 13px; color: var(--auth-ink-subtle); margin: 0; }
.auth-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.auth-checkbox { padding-top: 2px; }

/* Override Syncfusion input width to fill the field */
.auth-form .e-input-group,
.auth-form .e-control-wrapper { width: 100%; }

/* Buttons row */
.auth-actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.auth-submit { flex: 1 1 auto; min-width: 120px; }

/* Section divider */
.auth-divider {
    display: flex; align-items: center; text-align: center;
    color: var(--auth-ink-subtle); font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px;
    margin: 22px 0 14px 0;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; border-top: 1px solid var(--auth-line);
}
.auth-divider span { padding: 0 12px; }

/* Alternate methods */
.auth-alt { display: flex; flex-direction: column; gap: 8px; }
.auth-alt-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none;
}
.auth-alt-btn:hover { text-decoration: none; }
.auth-icon { font-size: 15px; }

/* External providers */
.auth-card-secondary { background: #f5f8fc; }
.auth-providers { display: flex; flex-direction: column; gap: 8px; }
.auth-provider-btn {
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none;
}
.auth-provider-btn:hover { text-decoration: none; }

/* Generic anchor styling for buttons */
a.e-btn { display: inline-flex; align-items: center; justify-content: center; }

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 12px;
    color: var(--auth-ink-subtle);
}
.auth-footer span { margin: 0 8px; }
.auth-link { color: var(--auth-accent); font-size: 13px; }

/* Errors */
.auth-error {
    background: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    color: var(--auth-error-ink);
    padding: 10px 14px;
    border-radius: var(--auth-radius);
    margin-bottom: 14px;
    font-size: 13px;
}

/* Re-use card styling for the simple single-card auth pages */
.forgot-password-page, .reset-password-page, .phone-login-page, .phone-verify-page,
.passkey-login-page, .redeem-invitation-page, .manage-page {
    max-width: 480px;
    margin: 32px auto;
    padding: 24px 28px;
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
}
.manage-page { max-width: 960px; display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.manage-nav { list-style: none; padding: 0; margin: 0; }
.manage-nav li { margin-bottom: 2px; }
.manage-nav .nav-link {
    display: block;
    padding: 8px 12px;
    color: var(--auth-ink);
    border-radius: var(--auth-radius);
    text-decoration: none;
    font-size: 13px;
}
.manage-nav .nav-link:hover { background: #f5f5f5; text-decoration: none; }
.manage-nav .nav-link.active { background: var(--auth-accent); color: #fff; }

.forgot-password-page h1, .reset-password-page h1, .phone-login-page h1,
.phone-verify-page h1, .passkey-login-page h1, .redeem-invitation-page h1 {
    font-size: 20px; font-weight: 600; margin: 0 0 4px 0;
}
.forgot-password-page .lead, .reset-password-page .lead, .phone-login-page .lead,
.phone-verify-page .lead, .passkey-login-page .lead, .redeem-invitation-page .lead {
    margin-bottom: 16px;
}

/* MFA setup styling kept from earlier */
.mfa-setup { display: flex; gap: 20px; align-items: center; margin: 16px 0; }
.mfa-qr { width: 200px; height: 200px; border: 1px solid var(--auth-line); padding: 6px; background: #fff; }
.mfa-key { display: inline-block; padding: 6px 10px; background: #f3f4f6; border-radius: var(--auth-radius); font-family: monospace; }
.recovery-codes { columns: 2; list-style: none; padding-left: 0; }
.recovery-codes code { font-size: 16px; padding: 4px 8px; }
.passkey-list { list-style: none; padding-left: 0; }
.passkey-list li { padding: 6px 0; border-bottom: 1px solid var(--auth-line); }

/* Bootstrap-class compatibility shims (so existing manage pages still render reasonably) */
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.col-md-3 { flex: 0 0 220px; }
.col-md-9 { flex: 1 1 0; min-width: 0; }
.alert { padding: 10px 14px; border-radius: var(--auth-radius); font-size: 13px; margin-bottom: 12px; }
.alert-success { background: #f1faf1; border: 1px solid #b7dfb7; color: #1d6f42; }
.alert-info { background: #f0f6fc; border: 1px solid #b6d3f0; color: #1f4f80; }
.alert-warning { background: #fff8e1; border: 1px solid #ecd089; color: #8a5a00; }
.alert-danger { background: var(--auth-error-bg); border: 1px solid var(--auth-error-border); color: var(--auth-error-ink); }
.form-group { margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 13px; color: var(--auth-ink-subtle); }
.form-control {
    padding: 7px 10px;
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}
.form-control:focus { outline: none; border-color: var(--auth-accent); box-shadow: 0 0 0 3px rgba(15, 108, 189, 0.2); }
.text-muted { color: var(--auth-ink-subtle); }
.text-danger { color: var(--auth-error-ink); font-size: 12px; }
.btn { padding: 7px 14px; border-radius: var(--auth-radius); font-size: 14px; cursor: pointer; border: 1px solid var(--auth-line); background: #fff; }
.btn-primary { background: var(--auth-accent); border-color: var(--auth-accent); color: #fff; }
.btn-primary:hover { background: var(--auth-accent-hover); }
.btn-secondary { background: #f3f3f3; }
.btn-secondary:hover { background: #e8e8e8; }
.btn-danger { background: var(--auth-error-ink); border-color: var(--auth-error-ink); color: #fff; }
.btn-warning { background: #ffaa44; border-color: #ffaa44; color: #fff; }
.badge { padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 500; }
.badge.bg-success { background: #1d6f42; color: #fff; }
.badge.bg-warning { background: #ffaa44; color: #fff; }
.d-inline { display: inline; }
.ms-2 { margin-left: 8px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
