/* Mueslibar (Gutschermühle) Login Page Styles */
/* Logo: /css/mueslibar/logo.png */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    padding-top: 10vh;
    position: relative;
    overflow: hidden;
}

/* Light background: paper surface texture with restrained lime accents */
.login-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1000px 560px at 16% 88%, rgba(168, 201, 20, 0.14) 0%, rgba(168, 201, 20, 0) 58%),
        radial-gradient(860px 520px at 84% 16%, rgba(168, 201, 20, 0.10) 0%, rgba(168, 201, 20, 0) 60%),
        url('/css/mueslibar/surface-texture.jpg') center / cover no-repeat,
        linear-gradient(128deg, #f6f6f6 0%, #fdfdfd 50%, #f2f2ee 100%);
    animation: mb-drift 26s ease-in-out infinite alternate;
}

.login-background::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(104deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 70%);
    mix-blend-mode: screen;
    opacity: 0.35;
    transform: translateX(-115%);
    animation: mb-shimmer 12s ease-in-out infinite;
}

.login-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(96px);
    opacity: 0.28;
    animation: float 24s infinite ease-in-out;
}

.login-shape:nth-child(1) {
    width: 520px;
    height: 520px;
    background: linear-gradient(135deg, #a8c914 0%, #d3e668 100%);
    top: -260px;
    left: -230px;
    animation-delay: 0s;
}

.login-shape:nth-child(2) {
    width: 430px;
    height: 430px;
    background: linear-gradient(135deg, #e6ecc9 0%, #b7d62a 100%);
    bottom: -220px;
    right: -190px;
    animation-delay: -12s;
}

@keyframes mb-drift {
    0% {
        filter: saturate(1);
    }

    50% {
        filter: saturate(1.04);
    }

    100% {
        filter: saturate(1.01);
    }
}

@keyframes mb-shimmer {
    0% {
        transform: translateX(-115%);
        opacity: 0.12;
    }

    46% {
        transform: translateX(-115%);
        opacity: 0.12;
    }

    62% {
        transform: translateX(115%);
        opacity: 0.32;
    }

    100% {
        transform: translateX(115%);
        opacity: 0.1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(46px, 42px) scale(1.07);
    }

    50% {
        transform: translate(24px, -30px) scale(0.93);
    }

    75% {
        transform: translate(-42px, 28px) scale(1.03);
    }
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px) saturate(1.04);
    border: 1px solid rgba(90, 90, 90, 0.16);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow:
        0 26px 64px rgba(51, 51, 51, 0.16),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Logo override via CSS */
.login-logo {
    content: url('/css/mueslibar/logo.png');
    width: min(254px, 80%);
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-logo-icon {
    width: min(180px, 55%);
    height: auto;
    display: block;
    margin: 0 auto 0.75rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #6f8d0f 0%, #a8c914 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: #6f6f6f;
    font-size: 0.95rem;
    margin: 0;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #454545;
    font-size: 0.9rem;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 1;
}

.form-control-modern {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    background: rgba(246, 246, 246, 0.85);
    border: 1px solid rgba(90, 90, 90, 0.24);
    border-radius: 12px;
    color: #333333;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control-modern::placeholder {
    color: #9e9e9e;
}

.form-control-modern:focus {
    outline: none;
    background: #ffffff;
    border-color: #a8c914;
    box-shadow: 0 0 0 3px rgba(168, 201, 20, 0.24);
}

.twofactor-subtext {
    color: #6f6f6f;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
    line-height: 1.45;
}

.twofactor-code-input {
    letter-spacing: 0.18rem;
    font-weight: 600;
}

.twofactor-code-input::placeholder {
    letter-spacing: normal;
    font-weight: 400;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #454545;
    font-size: 0.9rem;
    margin: 0;
}

.checkbox-modern {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #a8c914;
}

.forgot-password {
    color: #6f8d0f;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #a8c914;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #8bab10 0%, #a8c914 55%, #b7d62a 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 22px rgba(111, 141, 15, 0.35);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(111, 141, 15, 0.45);
}

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

.btn-login .arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-login:hover .arrow {
    transform: translateX(4px);
}

/* Footer Links */
.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.login-footer p {
    color: #6f6f6f;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.link-register {
    color: #6f8d0f;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.link-register:hover {
    color: #a8c914;
}

.link-secondary {
    color: #838383;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.link-secondary:hover {
    color: #333333;
}

/* External Login Section */
.external-login-section {
    margin-top: 2rem;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(90, 90, 90, 0.2);
}

.divider span {
    padding: 0 1rem;
    color: #838383;
    font-size: 0.85rem;
}

/* Validation Messages */
.validation-summary {
    background: rgba(214, 69, 69, 0.1);
    border: 1px solid rgba(214, 69, 69, 0.4);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.validation-summary-info {
    background: rgba(111, 117, 128, 0.1);
    border-color: rgba(111, 117, 128, 0.4);
}

.text-danger {
    color: #c23434 !important;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

/* Alert / Status Messages */
.alert {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.alert-danger {
    background: rgba(214, 69, 69, 0.1);
    border: 1px solid rgba(214, 69, 69, 0.4);
    color: #b02e2e;
}

.alert-success {
    background: rgba(111, 141, 15, 0.12);
    border: 1px solid rgba(111, 141, 15, 0.4);
    color: #55700c;
}

.login-info-text {
    color: rgba(69, 69, 69, 0.9);
}

.btn-login-link {
    text-decoration: none;
}

/* External Login Buttons */
.external-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-external-login {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(90, 90, 90, 0.24);
    border-radius: 12px;
    background: rgba(246, 246, 246, 0.85);
    color: #454545;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.btn-external-login:hover {
    background: #ffffff;
    border-color: #a8c914;
    transform: translateY(-1px);
}

/* Provider-specific hover colors */
.btn-external-microsoft:hover { border-color: #00a4ef; }
.btn-external-google:hover { border-color: #4285f4; }
.btn-external-azuread:hover { border-color: #0078d4; }
.btn-external-okta:hover { border-color: #007dc1; }

/* Responsive Design */
@media (max-width: 640px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-header h1 {
        font-size: 1.75rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
