/**
 * Shared authentication layout styles
 * Used by: login.php, lockscreen.php, resetPass.php, resendCredential.php
 */

html, body {
    height: 100%;
    overflow: hidden;
}

:root {
    --fiuu-blue: #003BA0;
    --fiuu-green: #44d62c;
    --light-gray: #f5f7fa;
    --dark-gray: #2d3748;
    --medium-gray: #718096;
}

/* Blob gradient background */
.blob-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    mix-blend-mode: multiply;
}

.blob1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, #003BA0 0%, #4A90E2 50%, #5A8BC4 100%);
    animation: float1 50s infinite ease-in-out;
}

.blob2 {
    top: 50%;
    right: -20%;
    width: 70vw;
    height: 70vh;
    background: radial-gradient(circle, #002F80 0%, #003BA0 40%, #6B9BD2 100%);
    animation: float2 70s infinite ease-in-out;
}

.blob3 {
    bottom: -20%;
    left: 20%;
    width: 50vw;
    height: 50vh;
    background: radial-gradient(circle, #1E4A72 0%, #003BA0 60%, #7BA3D0 100%);
    animation: float3 50s infinite ease-in-out;
}

.blob4 {
    top: 20%;
    left: 60%;
    width: 40vw;
    height: 40vh;
    background: radial-gradient(circle, #003BA0 0%, #5A8BC4 50%, #4A7AB5 100%);
    animation: float4 40s infinite ease-in-out;
}

.blob5 {
    bottom: 30%;
    right: 40%;
    width: 45vw;
    height: 45vh;
    background: radial-gradient(circle, #002855 0%, #003BA0 30%, #7BA3D0 100%);
    animation: float5 50s infinite ease-in-out;
}

/* Blob animations */
@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(30vw, 20vh) rotate(90deg) scale(1.1); }
    50% { transform: translate(-10vw, 40vh) rotate(180deg) scale(0.9); }
    75% { transform: translate(20vw, -15vh) rotate(270deg) scale(1.05); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    20% { transform: translate(-40vw, -30vh) rotate(72deg) scale(1.2); }
    40% { transform: translate(-20vw, 25vh) rotate(144deg) scale(0.8); }
    60% { transform: translate(15vw, -10vh) rotate(216deg) scale(1.1); }
    80% { transform: translate(-25vw, 15vh) rotate(288deg) scale(0.95); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    30% { transform: translate(25vw, -35vh) rotate(108deg) scale(1.15); }
    60% { transform: translate(-15vw, -20vh) rotate(216deg) scale(0.85); }
}

@keyframes float4 {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(-30vw, 25vh) rotate(120deg) scale(1.3); }
    66% { transform: translate(10vw, -30vh) rotate(240deg) scale(0.7); }
}

@keyframes float5 {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(35vw, -25vh) rotate(90deg) scale(0.9); }
    50% { transform: translate(-25vw, -40vh) rotate(180deg) scale(1.2); }
    75% { transform: translate(15vw, 20vh) rotate(270deg) scale(1.05); }
}

/* Accessibility: reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .blob {
        animation: none;
    }
    .brand-highlight .rotate-text,
    .brand-highlight .rotate-text.fade-out,
    .brand-highlight .rotate-text.fade-in,
    .auth-notice,
    .auth-notice.show,
    .auth-error,
    .auth-error.show {
        animation: none;
        transition: none;
        transform: none;
        opacity: 1;
    }
}

/* Split layout */
.login-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.login-left {
    flex: 1;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    padding-right: 3rem;
    position: relative;
    overflow: hidden;
}

.login-right {
    width: 40%;
    min-width: 400px;
    max-width: 600px;
    background: #fcfcfc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    z-index: 10;
    position: relative;
    overflow-y: auto;
}

.login-right-inner {
    width: 100%;
    max-width: 420px;
}

/* Header */
.login-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.login-header h1 {
    font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--fiuu-blue);
}

.login-header p {
    font-size: 1.5rem;
    color: var(--medium-gray);
    margin: 0;
}

/* Form elements */
.login-container .form-group {
    margin-bottom: 1.5rem;
}

.login-container .form-group label {
    font-family: Poppins, sans-serif;
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

#captcha {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-container .form-control {
    font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    width: 100%;
    padding: 2rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1.5rem;
    transition: all 0.2s;
}

.login-container .form-control:focus {
    border-color: var(--fiuu-blue);
    box-shadow: 0 0 0 3px rgba(0, 59, 160, 0.1);
    outline: none;
}

/* Buttons */
.login-container .btn {
    font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: inline-block;
    padding: 1rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 1.5rem;
    width: 100%;
}

.login-container .btn-primary {
    background-color: var(--fiuu-blue);
    color: white;
    width: 100%;
}

.login-container .btn-primary:hover:not(:disabled) {
    background-color: #002b7a;
}

.login-container .btn-primary:disabled {
    background-color: #a0aec0;
    cursor: not-allowed;
}

.login-container .btn-secondary {
    background-color: white;
    color: var(--fiuu-blue);
    border: 1px solid var(--fiuu-blue);
    width: 100%;
}

.login-container .btn-secondary:hover {
    background-color: #f5f7fa;
}

/* Forgot / back links */
.forgot-links {
    margin-top: 1.5rem;
    text-align: center;
}

.forgot-links a {
    color: var(--medium-gray);
    text-decoration: none;
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.forgot-links a:hover {
    color: var(--fiuu-blue);
    text-decoration: underline;
}

/* Brand message (left panel) */
.brand-message {
    width: 100%;
    max-width: 1015px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.brand-message h2 {
    font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 4.2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: white;
}

.brand-message p {
    font-size: 1.8rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.brand-highlight {
    color: var(--fiuu-green);
    font-weight: 700;
    display: inline-flex;
    overflow: hidden;
    height: 1.25em;
    line-height: 1.25;
    align-items: flex-end;
}

.brand-highlight .rotate-text {
    display: inline-block;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.brand-highlight .rotate-text.fade-out {
    transform: translateY(-100%);
    opacity: 0;
}

.brand-highlight .rotate-text.fade-in {
    transform: translateY(0);
    opacity: 1;
}

.logo {
    width: 160px;
    margin-bottom: 2rem;
}

/* Powered by footer */
.powered-by {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 3rem;
    font-size: 1.2rem;
    opacity: 0.8;
    display: flex;
    justify-content: center;
}

.powered-by-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1015px;
    padding: 0 2rem;
}

.powered-by-links a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
}

.powered-by-links a:hover {
    color: #44d62c;
    text-decoration: underline;
}

/* Auth notice banner (e.g. password changed) */
.auth-notice {
    display: none;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    margin-bottom: 1rem;
    text-align: center;
    animation: auth-fade-in 0.3s ease;
    line-height: 1.5;
}
.auth-notice strong { font-weight: 600; font-size: 13px; }
.auth-notice.show { display: block; }

/* Auth error banner */
.auth-error {
    display: none;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    margin-bottom: 1rem;
    text-align: center;
    animation: auth-fade-in 0.3s ease;
    line-height: 1.5;
}

.auth-error strong {
    font-weight: 600;
    font-size: 13px;
}

.auth-error.show {
    display: block;
}

@keyframes auth-fade-in {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SweetAlert overrides */
.sweet-alert {
    font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    border-radius: 16px !important;
    padding: 2rem !important;
}

.sweet-alert h2 {
    font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #2d3748 !important;
}

.sweet-alert p {
    font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    color: #718096 !important;
}

.sweet-alert button {
    font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 0.6rem 1.5rem !important;
    min-width: 120px !important;
    box-sizing: border-box !important;
    border: 1px solid transparent !important;
}

.sweet-alert button.confirm {
    background-color: var(--fiuu-blue) !important;
    border-color: var(--fiuu-blue) !important;
}

.sweet-alert button.cancel {
    background-color: #f5f7fa !important;
    color: var(--fiuu-blue) !important;
    border-color: var(--fiuu-blue) !important;
}

.sweet-alert .sa-icon {
    transform: scale(0.8);
}

/* Responsive: 1536px (1080p @ 125% scaling) */
@media (max-width: 1536px) {
    .brand-message h2 { font-size: 4.5rem; }
    .brand-message p { font-size: 1.6rem; }
    .brand-highlight { display: flex; }
    .login-right { max-width: 593px; }
    .login-header h1 { font-size: 2.6rem; }
    .login-header p { font-size: 1.4rem; }
    .login-container .form-control { font-size: 1.4rem; }
    .login-container .btn { font-size: 1.4rem; }
    .forgot-links a { font-size: 1.4rem; }
}

/* Responsive: 1200px */
@media (max-width: 1200px) {
    .login-left { padding: 2rem; }
    .login-right { padding: 2.5rem; }
    .login-right-inner { max-width: 380px; }
    .brand-message h2 { font-size: 3.6rem; margin-bottom: 2rem; }
    .brand-message p { font-size: 1.6rem; }
    .login-header h1 { font-size: 2.6rem; }
    .login-header p { font-size: 1.4rem; }
    .login-container .form-control { padding: 1.8rem 1rem; font-size: 1.4rem; }
    .login-container .btn { font-size: 1.4rem; }
    .forgot-links a { font-size: 1.4rem; }
    .logo { width: 140px; margin-bottom: 2rem; }
    .powered-by { font-size: 1.1rem; left: 2rem; right: 2rem; }
}

/* Responsive: 992px */
@media (max-width: 992px) {
    .login-right { padding: 2rem; }
    .login-right-inner { max-width: 360px; }
    .login-left { padding: 1.5rem; }
    .brand-message h2 { font-size: 3rem; margin-bottom: 1.5rem; }
    .brand-message p { font-size: 1.4rem; }
    .login-header { margin-bottom: 1.5rem; }
    .login-header h1 { font-size: 2.4rem; }
    .login-header p { font-size: 1.3rem; }
    .login-container .form-group { margin-bottom: 1.2rem; }
    .login-container .form-control { padding: 1.5rem 1rem; font-size: 1.3rem; }
    .login-container .btn { padding: 0.8rem 1rem; font-size: 1.3rem; }
    .forgot-links a { font-size: 1.3rem; }
    .logo { width: 120px; margin-bottom: 1.5rem; }
    .powered-by { font-size: 1rem; left: 1.5rem; right: 1.5rem; }
}

/* Responsive: 768px — stack layout */
@media (max-width: 768px) {
    html, body { height: auto; overflow: visible; }
    .login-container { flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
    .login-right { overflow-y: visible; }
    .login-left { padding: 3rem 2.5rem; min-height: auto; padding-bottom: 5rem; text-align: center; }
    .login-right { width: auto; min-width: unset; max-width: unset; min-height: 530px; padding: 2.5rem 3rem; margin-top: -30px; justify-content: flex-start; }
    .login-right-inner { max-width: 380px; }
    .brand-message h2 { font-size: 2.6rem; margin-bottom: 1.5rem; }
    .brand-message p { font-size: 1.3rem; margin-top: 2rem; }
    .brand-message { margin-bottom: 1rem; }
    .brand-highlight { justify-content: center; }
    .login-header { margin-bottom: 1.5rem; }
    .login-header h1 { font-size: 2.4rem; }
    .login-header p { font-size: 1.3rem; }
    .login-container .form-group { margin-bottom: 1.2rem; }
    .login-container .form-control { padding: 1.5rem 1rem; font-size: 1.3rem; }
    .login-container .btn { padding: 0.8rem 1rem; font-size: 1.3rem; }
    .forgot-links a { font-size: 1.2rem; }
    .logo { width: 110px; margin-bottom: 1.5rem; }
    .powered-by { position: relative; bottom: auto; margin-top: 1.5rem; font-size: 1rem; left: 0; right: 0; }
    .powered-by-inner { font-size: 0.9rem; }
}

/* Responsive: 480px */
@media (max-width: 480px) {
    .login-left { padding: 2.5rem 1.5rem; padding-bottom: 4rem; }
    .login-right { padding: 2rem 2.5rem; }
    .login-right-inner { max-width: 100%; }
    .brand-message h2 { font-size: 2.2rem; margin-bottom: 1.2rem; }
    .brand-message p { font-size: 1.2rem; margin-top: 1.5rem; }
    .login-header { margin-bottom: 1.2rem; }
    .login-header h1 { font-size: 2rem; }
    .login-header p { font-size: 1.2rem; }
    .login-container .form-group { margin-bottom: 1rem; }
    .login-container .form-control { padding: 1.2rem 0.8rem; font-size: 1.2rem; }
    .login-container .btn { padding: 0.8rem 0.8rem; font-size: 1.2rem; }
    .forgot-links a { font-size: 1.1rem; }
    .logo { width: 90px; margin-bottom: 1.2rem; }
    .powered-by { font-size: 0.9rem; }
    .powered-by-inner { font-size: 0.8rem; }
}

/* Lockscreen-specific styles */
.ls-avatar-block {
    text-align: center;
    margin-bottom: 2rem;
}

.ls-avatar {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
    border: 3px solid var(--fiuu-blue);
    margin: 0 auto 1rem;
    display: block;
}

.ls-name {
    font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 0.25rem;
}

.ls-hint {
    font-family: Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.4rem;
    color: var(--medium-gray);
    position: relative;
    display: inline-block;
}

.ls-2fa-info {
    position: absolute;
    width: 260px;
    left: 50%;
    transform: translateX(-50%);
    top: 2rem;
    background-color: #e8f5e3;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--dark-gray);
    font-size: 12px;
    display: none;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .ls-avatar { width: 70px; height: 70px; }
}
