/* Docs: CH6 → Workflow 3 → Phase C → Emergency Staging Access Protection Styling */

/*
    Authentication surface styling.

    This stylesheet follows the ModernAdmin authentication-page visual direction
    while using Xinkco shell tokens and permanent asset paths only.

    Do not reference /modernadmin/ from this stylesheet.
*/

.xk-auth-page {
    min-height: 100vh;
    background: radial-gradient(circle at top left, color-mix(in srgb, var(--shell-accent, #0d6efd) 18%, transparent), transparent 34rem), linear-gradient(135deg, var(--shell-bg, #f6f8fb) 0%, var(--shell-surface, #ffffff) 52%, color-mix(in srgb, var(--shell-accent, #0d6efd) 8%, var(--shell-bg, #f6f8fb)) 100%);
    color: var(--shell-text, #1f2937);
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2.5rem);
}

.xk-auth-shell {
    width: min(100%, 1180px);
    min-height: min(760px, calc(100vh - 5rem));
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
    background: var(--shell-surface, #ffffff);
    border: 1px solid var(--shell-border, rgba(15, 23, 42, 0.1));
    border-radius: 2rem;
    box-shadow: 0 1.5rem 4.5rem rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.xk-auth-visual-panel {
    position: relative;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 4vw, 4rem);
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.24), transparent 14rem), radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.14), transparent 16rem), linear-gradient(140deg, #0f172a 0%, #1d4ed8 48%, #06b6d4 100%);
}

    .xk-auth-visual-panel::before,
    .xk-auth-visual-panel::after {
        content: "";
        position: absolute;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.12);
        pointer-events: none;
    }

    .xk-auth-visual-panel::before {
        width: 22rem;
        height: 22rem;
        right: -7rem;
        bottom: -7rem;
    }

    .xk-auth-visual-panel::after {
        width: 12rem;
        height: 12rem;
        left: -4rem;
        top: 9rem;
    }

.xk-auth-visual-panel__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.24)), repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 18px);
    pointer-events: none;
}

.xk-auth-brand,
.xk-auth-hero,
.xk-auth-visual-panel__meta {
    position: relative;
    z-index: 1;
}

.xk-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.xk-auth-brand__mark {
    width: 3.15rem;
    height: 3.15rem;
    display: inline-grid;
    place-items: center;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

    .xk-auth-brand__mark img {
        width: 2.25rem;
        height: 2.25rem;
        object-fit: contain;
    }

.xk-auth-brand__name {
    font-size: 1.35rem;
}

.xk-auth-hero {
    max-width: 34rem;
    padding-block: 3rem;
}

.xk-auth-eyebrow,
.xk-auth-card__eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.xk-auth-eyebrow {
    color: rgba(255, 255, 255, 0.82);
}

.xk-auth-hero h1 {
    margin: 0;
    max-width: 12ch;
    color: #ffffff;
    font-size: clamp(2.7rem, 6vw, 5rem);
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.06em;
}

.xk-auth-hero p:not(.xk-auth-eyebrow) {
    margin: 1.35rem 0 0;
    max-width: 34rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.7;
}

.xk-auth-visual-panel__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

    .xk-auth-visual-panel__meta span {
        display: inline-flex;
        align-items: center;
        gap: 0.55rem;
        width: fit-content;
        border-radius: 999px;
        padding: 0.7rem 1rem;
        color: rgba(255, 255, 255, 0.9);
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(18px);
    }

.xk-auth-content-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 4rem);
    background: linear-gradient(180deg, color-mix(in srgb, var(--shell-surface, #ffffff) 94%, transparent), var(--shell-surface, #ffffff)), radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--shell-accent, #0d6efd) 8%, transparent), transparent 22rem);
}

.xk-auth-card {
    width: min(100%, 29.5rem);
    border-radius: 1.65rem;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    background: var(--shell-surface, #ffffff);
    border: 1px solid var(--shell-border, rgba(15, 23, 42, 0.12));
    box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.12);
}

.xk-auth-card__header {
    text-align: left;
}

.xk-auth-card__icon {
    width: 3.25rem;
    height: 3.25rem;
    display: inline-grid;
    place-items: center;
    margin-bottom: 1.15rem;
    border-radius: 1rem;
    color: var(--shell-accent, #0d6efd);
    background: color-mix(in srgb, var(--shell-accent, #0d6efd) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--shell-accent, #0d6efd) 18%, transparent);
    font-size: 1.45rem;
}

.xk-auth-card__icon--warning {
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.22);
}

.xk-auth-card__eyebrow {
    color: var(--shell-text-muted, #64748b);
}

.xk-auth-card h2 {
    margin: 0;
    color: var(--shell-text, #1f2937);
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.xk-auth-card__header p:not(.xk-auth-card__eyebrow) {
    margin: 0.8rem 0 0;
    color: var(--shell-text-muted, #64748b);
    line-height: 1.6;
}

.xk-auth-card__actions {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.75rem;
}

.xk-auth-primary-action,
.xk-auth-secondary-action {
    width: 100%;
    min-height: 3.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.95rem;
    font-weight: 700;
}

.xk-auth-primary-action {
    box-shadow: 0 0.8rem 1.7rem color-mix(in srgb, var(--shell-accent, #0d6efd) 24%, transparent);
}

.xk-auth-secondary-action:disabled {
    opacity: 0.78;
    cursor: not-allowed;
}

.xk-auth-security-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 1rem;
    color: var(--shell-text-muted, #64748b);
    background: color-mix(in srgb, var(--shell-surface-muted, #f8fafc) 84%, transparent);
    border: 1px solid var(--shell-border, rgba(15, 23, 42, 0.1));
    font-size: 0.91rem;
    line-height: 1.55;
}

    .xk-auth-security-note i {
        color: var(--shell-accent, #0d6efd);
        margin-top: 0.15rem;
    }

@media (max-width: 991.98px) {
    .xk-auth-page {
        align-items: flex-start;
        padding: 1rem;
    }

    .xk-auth-shell {
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 1.35rem;
    }

    .xk-auth-visual-panel {
        min-height: auto;
        padding: 1.5rem;
    }

    .xk-auth-hero {
        padding-block: 2.5rem 1rem;
    }

        .xk-auth-hero h1 {
            max-width: 14ch;
        }

    .xk-auth-content-panel {
        padding: 1.25rem;
    }

    .xk-auth-card {
        border-radius: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .xk-auth-page {
        padding: 0;
        background: var(--shell-surface, #ffffff);
    }

    .xk-auth-shell {
        width: 100%;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .xk-auth-visual-panel {
        border-radius: 0 0 1.5rem 1.5rem;
    }

    .xk-auth-brand__name {
        font-size: 1.1rem;
    }

    .xk-auth-hero h1 {
        font-size: 2.4rem;
    }

    .xk-auth-content-panel {
        align-items: flex-start;
    }

    .xk-auth-card {
        padding: 1.25rem;
        border-radius: 1rem;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .xk-auth-primary-action,
    .xk-auth-secondary-action {
        transition: none;
    }
}
