/* Shared styles for all OneHRIS auth pages (login, register, invitation) */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
    --navy:      #004AAD;
    --navy-dark: #003080;
    --gold:      #FECF5B;
    --surface:   #F7F9FC;
    --surface-2: #EEF3FB;
    --stroke:    rgba(0, 74, 173, 0.10);
    --text:      #0e1c38;
    --text-2:    #3d5080;
    --text-3:    #7a90b8;
    --font:      "Plus Jakarta Sans", system-ui, sans-serif;
    --spring:    cubic-bezier(0.32, 0.72, 0, 1);
}

html { height: 100%; }

body {
    font-family: var(--font);
    background: radial-gradient(ellipse 140% 110% at 62% 38%, #0055cc 0%, #003fa8 45%, #003390 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: clip;
}

/* Decorative rings — kept well off-screen so only a small arc peeks in from each corner */
body::before, body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
body::before {
    width: min(700px, 90vw); height: min(700px, 90vw);
    border: 1px solid rgba(255, 255, 255, 0.09);
    top: 0; right: 0;
    transform: translate(18%, -52%);
}
body::after {
    width: min(520px, 70vw); height: min(520px, 70vw);
    border: 1px solid rgba(254, 207, 91, 0.11);
    bottom: 0; left: 0;
    transform: translate(-16%, 52%);
}

/* Animated orbs */
@keyframes orb-drift-1 {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.7; }
    33%  { transform: translate(-40px, 30px) scale(1.06); opacity: 0.9; }
    66%  { transform: translate(25px, -20px) scale(0.96); opacity: 0.75; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
}
@keyframes orb-drift-2 {
    0%   { transform: translate(0, 0) scale(1); opacity: 0.6; }
    40%  { transform: translate(50px, -35px) scale(1.08); opacity: 0.85; }
    75%  { transform: translate(-20px, 20px) scale(0.94); opacity: 0.65; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
}
@keyframes orb-pulse {
    0%, 100% { transform: scale(1); opacity: 0.55; }
    50%       { transform: scale(1.18); opacity: 0.85; }
}

/* Fixed-position layer so orbs never expand document scrollHeight */
.auth-decor {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: clip;
    z-index: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    will-change: transform, opacity;
}
.orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0, 110, 255, 0.28) 0%, rgba(0, 74, 173, 0.12) 50%, transparent 75%);
    top: -200px; right: -150px;
    animation: orb-drift-1 22s ease-in-out infinite;
}
.orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(254, 207, 91, 0.18) 0%, rgba(254, 207, 91, 0.06) 50%, transparent 75%);
    bottom: -150px; left: -120px;
    animation: orb-drift-2 28s ease-in-out infinite;
}
.orb-3 {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(254, 207, 91, 0.22) 0%, transparent 70%);
    top: 30%; right: 12%;
    filter: blur(40px);
    animation: orb-pulse 14s ease-in-out infinite;
}

/* Brand logo */
.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: #fff;
}

/* Card */
.auth-card {
    background: #fff;
    border: 1px solid var(--stroke);
    border-radius: 1.5rem;
    box-shadow: 0 4px 32px rgba(0, 74, 173, 0.08);
    padding: 2.5rem;
}

.auth-card-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.auth-card-subtitle {
    font-size: 0.875rem;
    color: var(--text-3);
    margin-bottom: 1.75rem;
}

/* Company badge */
.auth-company-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-2);
    border: 1px solid var(--stroke);
    border-radius: 0.625rem;
    padding: 0.625rem 0.875rem;
    margin-bottom: 1.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-2);
}
.auth-company-badge::before {
    content: "";
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--navy);
    flex-shrink: 0;
}

/* Form elements */
.auth-form-group { margin-bottom: 1.125rem; }

.auth-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 0.375rem;
}

.auth-input {
    width: 100%;
    padding: 0.6875rem 0.875rem;
    border: 1.5px solid rgba(0, 74, 173, 0.16);
    border-radius: 0.625rem;
    font-family: var(--font);
    font-size: 0.9375rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s var(--spring), box-shadow 0.2s var(--spring);
}
.auth-input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.10);
}

.auth-error {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.25rem;
    display: block;
}

/* Alerts */
.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}
.auth-alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.auth-alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.auth-alert-success a { color: var(--navy); font-weight: 600; }

/* Primary button */
.auth-btn {
    width: 100%;
    padding: 0.8125rem;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 0.625rem;
    font-family: var(--font);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s var(--spring), transform 0.15s var(--spring), box-shadow 0.2s var(--spring);
    margin-top: 0.5rem;
}
.auth-btn:hover {
    background: var(--navy-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 74, 173, 0.25);
}
.auth-btn:active { transform: translateY(0); }

/* OR divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}
.auth-divider-line { flex: 1; height: 1px; background: var(--stroke); }
.auth-divider-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-3);
    white-space: nowrap;
}

/* SSO buttons */
.auth-sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.6875rem 1rem;
    margin-bottom: 0.625rem;
    border: 1.5px solid rgba(0, 74, 173, 0.16);
    border-radius: 0.625rem;
    background: #fff;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s var(--spring), border-color 0.2s var(--spring);
}
.auth-sso-btn:hover {
    background: var(--surface);
    border-color: rgba(0, 74, 173, 0.28);
    color: var(--text);
}

/* Footer links */
.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-3);
}
.auth-footer a { color: var(--navy); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* Page wrap (z-index above orbs) */
.auth-wrap {
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Invitation card entrance */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
