/* Chenet Login Page Styles
   Light look of alexanderchenet.com (Mag. Alexander Chenet, "Copilot für Leader:innen"): white
   surfaces, text #222326, website gold #9a7d36 (wordmark, top band) with the darker gold #80652a for
   the button and #5f4b1f / #463816 for hover and links, warm light greys #fbfaf8 / #f5f3ef / #e4e0d8.
   No external fonts (the website uses Plus Jakarta Sans and Newsreader from Google Fonts; they are
   only named here and used when installed locally).
   Logo: /css/chenet/logo_full.png (gold "Alexander Chenet" in Newsreader, gold rule and the claim
   "COPILOT FÜR LEADER:INNEN", transparent, 738 x 138 px, shown at most 369 px wide) replaces the
   app's login logo via content: url() and sits on a white band with a gold top edge like the
   website's gold top bar. All colours are fixed so the page looks the same whatever theme is
   selected. */

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

/* Background: warm light page with a soft gold glow and a brown-grey corner */
.login-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1100px 620px at 14% 88%, rgba(128, 101, 42, 0.10) 0%, rgba(128, 101, 42, 0) 60%),
        radial-gradient(900px 560px at 86% 10%, rgba(74, 66, 61, 0.12) 0%, rgba(74, 66, 61, 0) 60%),
        linear-gradient(160deg, #fbfaf8 0%, #f5f3ef 55%, #e4e0d8 100%);
}

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

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

.login-shape:nth-child(2) {
    width: 420px;
    height: 420px;
    background: linear-gradient(135deg, #6b625b 0%, #4a423d 100%);
    bottom: -210px;
    right: -190px;
    opacity: 0.16;
    animation-delay: -11s;
}

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

    25% {
        transform: translate(50px, 50px) scale(1.1);
    }

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

    75% {
        transform: translate(-50px, 30px) scale(1.05);
    }
}

/* Login Card. The explicit colour keeps inherited text (legal links, info texts) readable. */
.login-card {
    --chenet-card-pad-y: 3rem;
    --chenet-card-pad-x: 3rem;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(18px);
    border: 1px solid #e4e0d8;
    border-radius: 16px;
    padding: var(--chenet-card-pad-y) var(--chenet-card-pad-x);
    width: 100%;
    max-width: 480px;
    color: #222326;
    box-shadow:
        0 24px 60px rgba(20, 22, 24, 0.16),
        0 4px 14px rgba(20, 22, 24, 0.07);
    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.25rem;
}

/* Logo override via CSS: the Alexander Chenet logo on a full-width white band at the top of the
   card, with the gold top edge of the website's top bar and a fine warm grey line below. On narrow
   cards the side padding shrinks to 1.5rem and the logo scales down. */
.login-logo {
    content: url('/css/chenet/logo_full.png');
    display: block;
    box-sizing: border-box;
    width: calc(100% + 2 * var(--chenet-card-pad-x));
    max-width: none;
    height: auto;
    margin: calc(-1 * var(--chenet-card-pad-y)) calc(-1 * var(--chenet-card-pad-x)) 0;
    padding: 2.25rem max(1.5rem, calc((100% + 2 * var(--chenet-card-pad-x) - 369px) / 2)) 1.75rem;
    object-fit: contain;
    background: #ffffff;
    border-top: 5px solid #9a7d36;
    border-bottom: 1px solid #e4e0d8;
}

.login-header .login-logo + p {
    margin-top: 1.5rem;
}

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

/* Text fallback (no logo): name in website gold like the wordmark, Newsreader/Georgia */
.login-header h1 {
    font-family: "Newsreader", Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #80652a;
}

.login-header p {
    color: #4a423d;
    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: #222326;
    font-size: 0.9rem;
    font-weight: 600;
}

.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;
    filter: grayscale(1) brightness(0.7);
    opacity: 0.75;
}

/* Inputs: warm light grey form fields (#f5f3ef), white with gold focus */
.form-control-modern {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    background: #f5f3ef;
    border: 1px solid #dcd8d0;
    border-radius: 8px;
    color: #141618;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control-modern::placeholder {
    color: #6b625b;
}

.form-control-modern:hover {
    border-color: #bdb5a6;
}

.form-control-modern:focus {
    outline: none;
    background: #ffffff;
    border-color: #80652a;
    box-shadow: 0 0 0 3px rgba(128, 101, 42, 0.16);
}

.form-control-modern[readonly] {
    opacity: .7;
    cursor: default;
}

.twofactor-subtext {
    color: #4a423d;
    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: #222326;
    font-size: 0.9rem;
    margin: 0;
}

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

.forgot-password {
    color: #5f4b1f;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #463816;
    text-decoration: underline;
}

/* Login Button: darker website gold, white text (5.51:1 on #80652a, 4.67:1 on #8d7030) */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #80652a 0%, #8d7030 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    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 4px 15px rgba(128, 101, 42, 0.28);
}

.btn-login:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #5f4b1f 0%, #80652a 100%);
    box-shadow: 0 6px 20px rgba(128, 101, 42, 0.38);
}

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

.btn-login:focus-visible {
    outline: none;
    box-shadow:
        0 4px 15px rgba(128, 101, 42, 0.28),
        0 0 0 3px rgba(74, 66, 61, 0.45);
}

.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: #4a423d;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

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

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

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

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

/* 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 #e4e0d8;
}

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

/* Validation Messages: clear red, deliberately different from the gold brand colour */
.validation-summary {
    background: rgba(179, 38, 30, 0.07);
    border: 1px solid rgba(179, 38, 30, 0.36);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.validation-summary-info {
    background: rgba(0, 97, 152, 0.08);
    border-color: rgba(0, 97, 152, 0.36);
}

.text-danger {
    color: #8f1e18 !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(179, 38, 30, 0.07);
    border: 1px solid rgba(179, 38, 30, 0.36);
    color: #8f1e18;
}

.alert-success {
    background: rgba(47, 122, 69, 0.09);
    border: 1px solid rgba(47, 122, 69, 0.38);
    color: #245e35;
}

.login-info-text {
    color: #303133;
}

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

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

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

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

/* 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 #dcd8d0;
    border-radius: 8px;
    background: #ffffff;
    color: #222326;
    font-family: inherit;
    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: #fbfaf8;
    border-color: #80652a;
    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; }
