/* Woidich Login Page Styles
   Light look of woidich.com (WOIDICH & PARTNER GmbH, Business Consulting): navy #37445b text,
   blue-grey #5f759e header band, tints #92a1bd / #c4ccdb / #eaedf2, Trebuchet MS.
   Logo: /css/woidich/logo.png (white lettering, transparent) replaces the app's login logo
   via content: url() and sits on a blue-grey band at the top of the card, like on the website.
   All colours are fixed so the page looks the same whatever theme the browser has 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: #37445b;
}

/* Background: light blue-grey page with soft Woidich tints */
.login-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1100px 620px at 14% 88%, rgba(95, 117, 158, 0.20) 0%, rgba(95, 117, 158, 0) 60%),
        radial-gradient(900px 560px at 86% 10%, rgba(55, 68, 91, 0.14) 0%, rgba(55, 68, 91, 0) 60%),
        linear-gradient(160deg, #eaedf2 0%, #d7dce6 55%, #c4ccdb 100%);
}

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

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

.login-shape:nth-child(2) {
    width: 420px;
    height: 420px;
    background: linear-gradient(135deg, #c4ccdb 0%, #37445b 100%);
    bottom: -210px;
    right: -190px;
    opacity: 0.22;
    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 {
    --wp-card-pad-y: 3rem;
    --wp-card-pad-x: 3rem;
    position: relative;
    overflow: hidden;
    background: rgba(250, 250, 250, 0.96);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(55, 68, 91, 0.16);
    border-radius: 16px;
    padding: var(--wp-card-pad-y) var(--wp-card-pad-x);
    width: 100%;
    max-width: 480px;
    color: #37445b;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    box-shadow:
        0 24px 60px rgba(23, 30, 46, 0.18),
        0 4px 14px rgba(23, 30, 46, 0.08);
    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 white Woidich logo on a full-width blue-grey band at the top of
   the card (radial gradient like the website header). The logo keeps its native 324 px width;
   on narrow cards the side padding shrinks to 1.5rem and the logo scales down. */
.login-logo {
    content: url('/css/woidich/logo.png');
    display: block;
    box-sizing: border-box;
    width: calc(100% + 2 * var(--wp-card-pad-x));
    max-width: none;
    height: auto;
    margin: calc(-1 * var(--wp-card-pad-y)) calc(-1 * var(--wp-card-pad-x)) 0;
    padding: 2.25rem max(1.5rem, calc((100% + 2 * var(--wp-card-pad-x) - 324px) / 2)) 2rem;
    object-fit: contain;
    background: radial-gradient(ellipse 70% 130% at 50% 45%, #7f90b0 0%, #6c80a7 45%, #5f759e 100%);
    border-bottom: 1px solid #52668d;
}

.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 the brand typeface, navy to blue-grey */
.login-header h1 {
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #37445b 0%, #5f759e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: #505e75;
    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: #37445b;
    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;
}

.form-control-modern {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 3rem;
    background: #f1f3f7;
    border: 1px solid #c4ccdb;
    border-radius: 8px;
    color: #283246;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

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

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

.form-control-modern:focus {
    outline: none;
    background: #ffffff;
    border-color: #5f759e;
    box-shadow: 0 0 0 3px rgba(95, 117, 158, 0.22);
}

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

.twofactor-subtext {
    color: #505e75;
    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: #37445b;
    font-size: 0.9rem;
    margin: 0;
}

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

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

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

/* Login Button: blue-grey like the section headings of the website, white text (AA) */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #465a80 0%, #5f759e 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(70, 90, 128, 0.32);
}

.btn-login:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #3a4a69 0%, #546994 100%);
    box-shadow: 0 6px 20px rgba(70, 90, 128, 0.42);
}

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

.btn-login:focus-visible {
    outline: none;
    box-shadow:
        0 4px 15px rgba(70, 90, 128, 0.32),
        0 0 0 3px rgba(55, 68, 91, 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: #505e75;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

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

.link-register:hover {
    color: #37445b;
}

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

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

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

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

/* Validation Messages */
.validation-summary {
    background: rgba(150, 74, 67, 0.08);
    border: 1px solid rgba(150, 74, 67, 0.38);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

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

.text-danger {
    color: #8a3a33 !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(150, 74, 67, 0.08);
    border: 1px solid rgba(150, 74, 67, 0.38);
    color: #7d3c36;
}

.alert-success {
    background: rgba(65, 105, 79, 0.1);
    border: 1px solid rgba(65, 105, 79, 0.4);
    color: #32533d;
}

.login-info-text {
    color: #44526a;
}

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

/* Responsive Design */
@media (max-width: 640px) {
    .login-card {
        --wp-card-pad-y: 2rem;
        --wp-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 #c4ccdb;
    border-radius: 8px;
    background: #ffffff;
    color: #37445b;
    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: #eaedf2;
    border-color: #5f759e;
    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; }
