/* ============================================================
   Onxeera — Premium Auth CSS v5.0
   Production Ready | No conflicts | Full responsive
   ============================================================ */

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Scope: auth pages only ── */
.onxeera-auth body,
body.onxeera-auth {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Full-page wrapper ── */
.auth-root {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EEF2FF 0%, #F0F4FF 40%, #E8F0FE 100%);
    padding: 40px 20px;
    box-sizing: border-box;
}

/* ── Card ── */
.auth-card {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 520px;
    padding: 48px 48px 40px;
    box-shadow:
        0 0 0 1px rgba(79, 70, 229, 0.06),
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 12px 32px rgba(79, 70, 229, 0.08),
        0 32px 64px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    position: relative;
    animation: authCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes authCardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Logo ── */
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}
.auth-logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.auth-logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* ── Heading ── */
.auth-heading {
    font-size: 28px;
    font-weight: 800;
    color: #0D0C22;
    text-align: center;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 8px;
}

.auth-subheading {
    font-size: 15px;
    color: #6B7280;
    text-align: center;
    line-height: 1.6;
    margin: 0 0 28px;
}

/* ── Alert / message ── */
.auth-alert {
    display: none;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    padding: 13px 16px;
    margin-bottom: 18px;
    border-left: 4px solid;
}
.auth-alert.is-visible { display: block; }
.auth-alert.is-error   { background: #FEF2F2; border-color: #EF4444; color: #B91C1C; }
.auth-alert.is-success { background: #F0FDF4; border-color: #22C55E; color: #15803D; }
.auth-alert.is-info    { background: #EFF6FF; border-color: #3B82F6; color: #1D4ED8; }

/* ── Google Button ── */
.auth-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    background: #ffffff;
    border: 1.5px solid #E2E5F1;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 0;
}
.auth-google:hover {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08), 0 2px 8px rgba(79, 70, 229, 0.10);
    color: #374151;
    transform: translateY(-1px);
}
.auth-google:active { transform: translateY(0); }
.auth-google:focus-visible {
    outline: 2px solid #4F46E5;
    outline-offset: 2px;
}
.auth-google.is-soon {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── OR divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    font-size: 13px;
    font-weight: 500;
    color: #9CA3AF;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #EAECF5;
}

/* ── Field ── */
.auth-field {
    margin-bottom: 16px;
}
.auth-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
    letter-spacing: 0.01em;
}
.auth-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-field-icon {
    position: absolute;
    left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B0B7C9;
    pointer-events: none;
    transition: color 0.15s;
    z-index: 1;
    width: 18px;
    height: 18px;
}
.auth-field:focus-within .auth-field-icon { color: #4F46E5; }

.auth-field-input {
    width: 100%;
    height: 54px;
    padding: 0 54px 0 46px;
    background: #FAFBFF;
    border: 1.5px solid #E2E5F1;
    border-radius: 14px;
    font-size: 15px;
    color: #111827;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    font-family: inherit;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.auth-field-input:hover { border-color: #C7D2FE; }
.auth-field-input:focus {
    border-color: #4F46E5;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.10);
}
.auth-field-input::placeholder { color: #B0B7C9; font-size: 14px; }
.auth-field-input.is-text { padding-right: 16px; }
.auth-field-input.is-error { border-color: #EF4444; }

.auth-field-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #B0B7C9;
    padding: 6px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
    z-index: 1;
}
.auth-field-toggle:hover { color: #4F46E5; background: rgba(79, 70, 229, 0.06); }
.auth-field-toggle:focus-visible { outline: 2px solid #4F46E5; }

/* ── Password strength ── */
.auth-strength {
    margin-top: 8px;
}
.auth-strength-track {
    height: 4px;
    background: #E9ECFA;
    border-radius: 4px;
    overflow: hidden;
}
.auth-strength-fill {
    height: 100%;
    border-radius: 4px;
    width: 0;
    transition: width 0.35s ease, background-color 0.35s ease;
}
.auth-strength-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-top: 5px;
    min-height: 16px;
    transition: color 0.35s;
}

/* ── Checklist ── */
.auth-checks {
    list-style: none;
    padding: 0;
    margin: 10px 0 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.auth-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #9CA3AF;
    transition: color 0.2s;
    line-height: 1.4;
}
.auth-check-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
}
.auth-check-item.is-valid { color: #059669; }

/* ── Remember / Forgot row ── */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0 20px;
    gap: 8px;
}
.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
}
.auth-checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #4F46E5;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 4px;
}
.auth-forgot {
    font-size: 14px;
    color: #4F46E5;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
}
.auth-forgot:hover { color: #3730A3; text-decoration: underline; }

/* ── Terms ── */
.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0 20px;
    font-size: 13px;
    color: #6B7280;
    line-height: 1.55;
}
.auth-terms input[type="checkbox"] {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: #4F46E5;
    cursor: pointer;
}
.auth-terms a {
    color: #4F46E5;
    font-weight: 600;
    text-decoration: none;
}
.auth-terms a:hover { text-decoration: underline; }

/* ── Primary button ── */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 54px;
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    letter-spacing: 0.01em;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}
.auth-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 100%);
    border-radius: inherit;
}
.auth-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(79, 70, 229, 0.45);
}
.auth-btn:active { transform: translateY(0); opacity: 1; }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.auth-btn:focus-visible { outline: 2px solid #4F46E5; outline-offset: 3px; }

.auth-btn-text { position: relative; z-index: 1; }
.auth-btn-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
    position: relative;
    z-index: 1;
}
.auth-btn.is-loading .auth-btn-spinner { display: block; }
.auth-btn.is-loading .auth-btn-text { opacity: 0.75; }

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

/* ── Switch link ── */
.auth-switch {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
    color: #6B7280;
}
.auth-switch a {
    color: #4F46E5;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s;
}
.auth-switch a:hover { color: #3730A3; text-decoration: underline; }

/* ── Trust footer ── */
.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #F0F2FA;
    flex-wrap: wrap;
}
.auth-footer-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 500;
}
.auth-footer-item svg { flex-shrink: 0; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .auth-root { padding: 24px 16px; }
    .auth-card { padding: 40px 28px 32px; border-radius: 20px; }
    .auth-heading { font-size: 24px; }
    .auth-footer { gap: 16px; }
}
@media (max-width: 380px) {
    .auth-root { padding: 16px 12px; }
    .auth-card { padding: 32px 20px 28px; border-radius: 18px; }
    .auth-heading { font-size: 22px; }
    .auth-footer { gap: 12px; }
    .auth-footer-item:last-child { display: none; }
}

/* ── Focus visible ── */
*:focus { outline: none; }
*:focus-visible { outline: 2px solid #4F46E5; outline-offset: 2px; border-radius: 4px; }
