/* Login — aligned with public landing (Inter, brand red #E63838, hero imagery) */

:root {
    --amicus-red: #e63838;
    --amicus-red-dark: #c42d2d;
    --amicus-surface: #f8f9fb;
    --amicus-text: #2b2f36;
    --amicus-muted: #6b7280;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-public-body {
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--amicus-text);
    background: var(--amicus-surface);
    min-height: 100vh;
}

.login-public-layout {
    display: flex;
    min-height: 100vh;
    flex-wrap: wrap;
}

/* Hero / brand column */
.login-public-hero {
    flex: 1 1 42%;
    min-height: 280px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.login-public-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.login-public-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(43, 47, 54, 0.88) 0%,
        rgba(183, 48, 82, 0.45) 50%,
        rgba(230, 56, 56, 0.35) 100%
    );
}

.login-public-hero-content {
    position: relative;
    z-index: 2;
    max-width: 28rem;
    color: #fff;
    text-align: left;
}

.login-public-hero-logo {
    display: block;
    margin-bottom: 1.25rem;
    filter: brightness(0) invert(1);
}

.login-public-hero-kicker {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.95);
}

.login-public-hero-title {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.login-public-hero-lead {
    font-size: 0.95rem;
    line-height: 1.55;
    opacity: 0.92;
    font-weight: 400;
}

/* Form column */
.login-public-main {
    flex: 1 1 58%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background: linear-gradient(180deg, #ffffff 0%, var(--amicus-surface) 100%);
}

.login-public-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(43, 47, 54, 0.08), 0 1px 3px rgba(43, 47, 54, 0.06);
    border: 1px solid rgba(230, 56, 56, 0.08);
    padding: clamp(1.5rem, 3vw, 2.25rem);
}

.login-public-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--amicus-muted);
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: color 0.15s ease;
}

.login-public-back:hover {
    color: var(--amicus-red);
}

.login-public-back-icon {
    font-size: 1rem;
    line-height: 1;
}

.welcome-caption {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-public-signin-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--amicus-text);
    margin-bottom: 0.35rem;
}

.login-public-signin-sub {
    font-size: 0.9rem;
    color: var(--amicus-muted);
    font-weight: 400;
}

/* Form block (IDs preserved for DevExtreme / login.js) */
section {
    display: block;
    height: auto;
    margin: 0;
}

.right-section {
    width: 100%;
    display: block;
    position: relative;
    padding: 0;
    background: transparent;
    right: auto;
    height: auto;
}

.login-form {
    width: 100%;
    max-width: none;
    padding: 0;
}

.dx-textbox {
    margin-bottom: 18px;
}

.password-container {
    position: relative;
}

.password-container .dx-textbox {
    padding-right: 35px;
}

.password-container .eye-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 22px !important;
}

.captcha-block {
    margin-bottom: 20px;
    width: 100%;
}

.captcha-container {
    display: flex;
    align-items: center;
}

/* Captcha auto-refresh: 30s countdown strip */
.captcha-expiry {
    margin-top: 8px;
    width: 100%;
    max-width: 370px;
}

.captcha-expiry-track {
    height: 3px;
    border-radius: 2px;
    background: rgba(43, 47, 54, 0.1);
    overflow: hidden;
}

.captcha-expiry-fill {
    height: 100%;
    width: 100%;
    transform-origin: left center;
    transform: scaleX(1);
    background: linear-gradient(90deg, var(--amicus-red-dark), var(--amicus-red));
    border-radius: 2px;
    will-change: transform;
}

.captcha-display {
    padding: 0 10px;
    font-size: 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-right: 10px;
    min-width: 80px;
    background-color: #f9fafb;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#captchaText {
    cursor: default;
}

.captcha-letter {
    display: inline-block;
    margin: 0 5px;
}

.captcha-letter:nth-child(odd) {
    font-size: 20px;
    transform: translateY(-5px);
}

.captcha-letter:nth-child(even) {
    font-size: 14px;
    transform: translateY(5px);
}

.refresh-button {
    cursor: pointer;
    font-size: 16px;
    color: var(--amicus-red);
    border: none;
    background: none;
    padding: 0;
    margin: 0;
}

.refresh-button:hover {
    color: var(--amicus-red-dark);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0.75rem;
}

.login-app-version {
    font-size: 12px;
    font-weight: 500;
    color: var(--amicus-muted);
    line-height: 1.2;
    flex-shrink: 0;
}

.form-footer .forgot-password {
    font-size: 14px;
    margin-top: 0;
    flex-shrink: 0;
}

.form-footer .forgot-password a {
    text-decoration: none;
    color: var(--amicus-red) !important;
    font-size: 14px !important;
    font-weight: 500;
}

.form-footer .forgot-password a:hover {
    text-decoration: underline;
}

.error-message {
    color: #c62828;
    font-size: 12px;
    margin-bottom: 10px;
}

.success-message {
    color: #2e7d32;
    font-size: 12px;
    margin-top: -10px;
    margin-bottom: 10px;
}

#loginButton {
    position: relative;
    width: 100%;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.loader {
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    border-top: 4px solid #ffffff;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#loginButton.loading {
    cursor: not-allowed;
}

#loginButton.loading .loader {
    display: block;
}

#loginButton .loader {
    display: none;
}

.login_btn {
    background: linear-gradient(120deg, #b73052 0%, #e6263f 100%) !important;
    color: #ffffff !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    text-align: center !important;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    font-size: 15px !important;
    text-transform: none !important;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(230, 56, 56, 0.35);
}

.login_btn:hover {
    background: linear-gradient(90deg, #e6263f 0%, #b73052 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(230, 56, 56, 0.4);
}

.dx-texteditor-input-container {
    padding: 5px !important;
}

.dx-checkbox-icon {
    width: 1.5em !important;
    height: 1.5em !important;
    font-size: 18px !important;
}

.dx-checkbox-text {
    font-size: 16px !important;
}

/* Tablet / mobile */
@media (max-width: 991px) {
    .login-public-layout {
        flex-direction: column;
    }

    .login-public-hero {
        flex: none;
        min-height: 240px;
    }

    .login-public-hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .login-public-hero-logo {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 576px) {
    .login-public-card {
        border-radius: 12px;
        box-shadow: 0 2px 16px rgba(43, 47, 54, 0.06);
    }

    .login-public-hero-title {
        font-size: 1.2rem;
    }
}

/* --- Sign-in help: username@siteID hint + modal -------------------------- */
.login-help-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}
.login-help-hint strong {
    color: #374151;
    font-weight: 600;
}
.login-help-trigger {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    line-height: 16px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #b91c1c;
    background: transparent;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.login-help-trigger:hover,
.login-help-trigger:focus-visible {
    background: #b91c1c;
    color: #fff;
    outline: none;
}
.login-help-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 24, 39, .55);
}
.login-help-backdrop[hidden] {
    display: none;
}
.login-help-dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    padding: 26px 24px 22px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .25);
    color: #374151;
    font-size: 14px;
    line-height: 1.55;
}
.login-help-dialog h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}
.login-help-dialog p {
    margin: 0 0 12px;
}
.login-help-dialog p:last-child {
    margin-bottom: 0;
}
.login-help-format {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 15px;
    font-weight: 600;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: center;
}
.login-help-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.login-help-close:hover {
    color: #374151;
}
