@charset "utf-8";

/* CSS Document */

/* Modern Centered Login Card Styles */

body,
html {
    width: 100%;
    min-height: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    font-family: 'Ubuntu', sans-serif;
}

html body {
    min-width: 320px;
    min-height: 100vh;
    position: relative;
    display: block;
    overflow-y: auto;
}

/* Background Image Container */
#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Dark overlay for better card visibility */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
    pointer-events: none;
}

/* Login Container - Full viewport centering */
.login-container {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

/* Login Card - Centered white box */
.login-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 0;
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
    animation: fadeInUp 0.5s ease;
    overflow: hidden;
}

/* Card body - content below the header banner */
.login-card-body {
    padding: 30px 40px 40px 40px;
}

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

/* Login Header - Logo banner, color defined per skin in color.css */
.login-header {
    text-align: center;
    padding: 24px 40px;
}

.login-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.login-title {
    font-size: 16px;
    font-weight: 400;
    color: #666;
    margin: 0;
    margin-bottom: 15px;
    padding-top: 20px;
    line-height: 1.5;
    text-align: center;
}

/* Error Message Display */
.login-error-message {
	color: #dc3545;
	font-size: 13px;
	font-weight: 500;
	text-align: center;
	margin-bottom: 20px;
	min-height: 20px;
	padding: 8px;
	border-radius: 4px;
	background-color: #ffe6e6;
	display: none;
}

.login-error-message:not(:empty) {
	display: block;
}

.login-error-message.success {
	color: #155724;
	background-color: #d4edda;
}

/* Back to Login Link */
.back-to-login-link {
    text-align: center;
    margin-top: 20px;
}

.back-to-login-link a {
    color: #39B54A;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-to-login-link a:hover {
    color: #2d8a3a;
    text-decoration: underline;
}

/* Login Form Styles */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    height: 45px;
    padding: 0 15px;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: 'Ubuntu', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: #39B54A;
    box-shadow: 0 0 0 3px rgba(57, 181, 74, 0.1);
}

.form-input:hover {
    border-color: #b8b8b8;
}

/* Login Button */
.login-btn {
    width: 100%;
    height: 45px;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Ubuntu', sans-serif;
    margin-top: 10px;
}

.login-btn:hover {
    filter: brightness(0.88);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.login-btn:active {
    filter: brightness(0.78);
    transform: translateY(0);
    box-shadow: none;
}

/* Forgot Password Link */
.forgot-password-link {
    text-align: center;
    margin-top: 15px;
}

.forgot-password-link a {
    color: #39B54A;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password-link a:hover {
    color: #2d8a3a;
    text-decoration: underline;
}

/* Separator - OR between auth methods */
.separator {
    position: relative;
    text-align: center;
    margin: 30px 0;
}

.separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.separator span {
    position: relative;
    display: inline-block;
    background: #ffffff;
    padding: 0 15px;
    color: #999;
    font-size: 13px;
    font-weight: 500;
}

/* OAuth Buttons */
.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: #ffffff;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.oauth-btn svg {
    margin-right: 10px;
    flex-shrink: 0;
}

.oauth-btn:hover {
    border-color: #39B54A;
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.oauth-btn.keycloak-btn:hover {
    border-color: #39B54A;
}

.oauth-btn.google-btn:hover {
    border-color: #4285f4;
}

.oauth-btn.microsoft-btn:hover {
    border-color: #00a4ef;
}

/* Mobile Access Link */
.mobile-access-link {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.mobile-access-link a {
    color: #39B54A;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.mobile-access-link a:hover {
    color: #2d8a3a;
    text-decoration: underline;
}

/* Footer */
.login-footer {
    margin-top: 30px;
    text-align: center;
}

.login-footer p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.login-footer a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 500;
}

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

/* Social Links */
.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.social-links a svg {
    width: 18px;
    height: 18px;
    fill: rgba(255, 255, 255, 0.9);
}

.social-links a:hover svg {
    fill: #ffffff;
}

/* Forgot Password Overlay */
.forgot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.forgot-box {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-sizing: border-box;
}

.forgot-box h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
}

.forgot-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.forgot-buttons .login-btn {
    flex: 1;
}

.cancel-btn {
    flex: 1;
    height: 45px;
    background: #6c757d;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Ubuntu', sans-serif;
}

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

.cancel-btn:active {
    transform: translateY(0);
}

.forgot-loading {
    text-align: center;
    padding: 20px 0;
}

/* Responsive Design */
@media screen and (max-width: 480px) {
    .login-card-body {
        padding: 25px 20px 30px 20px;
    }

    .login-header {
        padding: 20px;
    }

    .login-logo {
        max-width: 180px;
    }

    .login-title {
        font-size: 16px;
    }

    .form-input,
    .login-btn {
        height: 42px;
    }

    .forgot-box {
        padding: 25px 20px;
    }
}

@media screen and (max-height: 700px) {
    .login-container {
        justify-content: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-card-body {
        padding: 20px 30px 30px 30px;
    }

    .login-header {
        padding: 16px 30px;
    }

    .login-logo {
        max-width: 180px;
    }
}
