/* ATTENDX PRO — Auth pages (login, platform admin) */

html.auth-html,
.auth-layout--pro {
    height: 100%;
    overflow: hidden;
}

.auth-layout--pro {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(145deg, #596c93 0%, #496488 42%, #647e9e 100%);
    background-attachment: fixed;
    overflow: hidden;
    --auth-card-max-width: 720px;
}

.auth-bg-watermark {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

.auth-bg-watermark[hidden] {
    display: none !important;
}

.auth-bg-watermark img {
    display: block;
    max-width: min(420px, 68vw);
    max-height: min(360px, 48vh);
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.36;
    transform: translateY(-12vh);
    filter: brightness(1.08);
}

.auth-layout--brand-bg .auth-bg-watermark img {
    mix-blend-mode: normal;
    opacity: 0.4;
}

.auth-layout--company-bg .auth-bg-watermark img {
    opacity: 0.34;
}

.auth-layout--pro::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background: rgba(11, 18, 32, 0.06);
    pointer-events: none;
}

.auth-layout--pro .auth-page {
    position: relative;
    z-index: 2;
}

.auth-layout--pro.auth-layout .auth-page {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    width: 100%;
    margin: 0;
    padding: 1rem 1.25rem;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
}

.auth-layout--pro.auth-layout .auth-glass-card.auth-glass-card--pro {
    margin: auto;
    width: 100%;
    max-width: min(var(--auth-card-max-width), 96vw);
    min-width: min(100%, 360px);
    padding: 2.5rem 3rem 2.25rem;
}

.auth-glass-card--pro {
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow:
        0 4px 6px rgba(15, 23, 42, 0.06),
        0 24px 64px rgba(15, 23, 42, 0.28);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.auth-layout--pro .auth-glass-card.auth-glass-card--pro .auth-form {
    width: 100%;
    max-width: 100%;
}

.auth-platform-hint {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
}

.auth-platform-hint.is-hidden {
    display: none;
}

.auth-server-config.is-hidden {
    display: none;
}

.auth-card-header {
    margin-bottom: 1.75rem;
}

.auth-card-header-inner {
    position: relative;
    min-height: 5.5rem;
}

.auth-header-view {
    transition:
        opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.45s;
}

.auth-header-view.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    position: relative;
}

.auth-header-view.is-hidden {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    visibility: hidden;
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.auth-header-view.is-entering {
    animation: authHeaderIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.auth-header-view.is-leaving {
    animation: authHeaderOut 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes authHeaderIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes authHeaderOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
}

.auth-company-logo.is-hidden {
    display: none;
}

.auth-company-logo.is-revealed {
    animation: authLogoIn 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

@keyframes authLogoIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.auth-card-title-main {
    margin: 0 0 0.45rem;
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-transform: none;
}

.auth-card-tagline {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #64748b;
    line-height: 1.5;
}

.auth-company-brand {
    margin-bottom: 0;
}

.auth-company-logo {
    max-width: 120px;
    max-height: 72px;
    width: auto;
    margin-bottom: 1rem;
    border-radius: 0;
}

.auth-field-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.auth-glass-card--pro .auth-form {
    gap: 1rem;
}

.auth-glass-card--pro .auth-remember-label {
    color: #0f172a;
    font-weight: 500;
}

.auth-glass-card--pro .auth-input {
    padding: 0.85rem 1rem;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
}

.auth-glass-card--pro .auth-input::placeholder {
    color: #94a3b8;
}

.auth-glass-card--pro .auth-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-glass-card--pro .auth-submit {
    margin-top: 0.35rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.auth-glass-card--pro .auth-submit:hover {
    background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
}

.auth-server-config {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.auth-config-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    color: #2563eb;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.auth-config-toggle:hover {
    color: #1d4ed8;
}

.auth-config-chevron {
    font-size: 0.75rem;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-config-toggle[aria-expanded="true"] .auth-config-chevron {
    transform: rotate(180deg);
}

.auth-config-collapse {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s ease;
}

.auth-config-collapse.is-open {
    max-height: 320px;
    opacity: 1;
}

.auth-config-collapse-inner {
    padding-top: 0.15rem;
}

.auth-add-company-btn {
    position: relative;
    min-height: 2rem;
}

.auth-add-company-btn__spinner {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authBtnSpin 0.7s linear infinite;
}

.auth-add-company-btn.is-loading {
    pointer-events: none;
}

.auth-add-company-btn.is-loading .auth-add-company-btn__label {
    visibility: hidden;
}

.auth-add-company-btn.is-loading .auth-add-company-btn__spinner {
    display: block;
}

.auth-add-company-btn.is-success {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
}

@keyframes authBtnSpin {
    to {
        transform: rotate(360deg);
    }
}

.auth-config-help {
    margin: 0.85rem 0 0.75rem;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
}

.auth-config-actions {
    display: flex;
    gap: 0.5rem;
}

.auth-platform-note {
    margin: 0 0 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

.auth-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.auth-back-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Override legacy rules that caused overlap / poor contrast */
.auth-glass-card--pro .auth-card-subtitle--login {
    color: #0f172a;
    text-transform: none;
    letter-spacing: -0.02em;
}

.auth-glass-card--light-text .auth-card-subtitle,
.auth-glass-card--light-text .auth-card-title-main,
.auth-glass-card--light-text .auth-field-label {
    color: #fff;
}

.auth-glass-card--light-text .password-toggle-btn {
    color: rgba(255, 255, 255, 0.75);
}

.auth-glass-card--light-text .password-toggle-btn:hover {
    color: #fff;
}

.auth-glass-card--pro .auth-card-note {
    margin: 0 0 1rem !important;
}

.auth-glass-card--pro .auth-link {
    color: #2563eb;
}

.auth-glass-card--pro .password-toggle-btn {
    color: #64748b;
}

.auth-glass-card--pro .password-toggle-btn:hover {
    color: #0f172a;
}

.auth-layout--plain .auth-bg-watermark {
    display: none !important;
}

.auth-layout--plain.auth-layout--pro {
    background: linear-gradient(145deg, #596c93 0%, #496488 42%, #647e9e 100%);
}
