/* KTG Corporate Login — neutral multi-project visual identity */
.ktg-auth-body {
    background: #f3f6fb;
}

.ktg-auth-shell {
    isolation: isolate;
}

.ktg-auth-brand-panel {
    background:
        radial-gradient(circle at 88% 16%, rgba(112, 190, 255, 0.13), transparent 29%),
        radial-gradient(circle at 12% 90%, rgba(75, 181, 224, 0.10), transparent 31%),
        linear-gradient(145deg, #123b67 0%, #173f6d 52%, #103256 100%);
}

.ktg-auth-brand-panel::before {
    position: absolute;
    inset: 30% 10% 28% 0;
    content: '';
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at 32% 52%, rgba(19, 61, 103, 0.46), rgba(19, 61, 103, 0.16) 46%, transparent 74%);
    filter: blur(16px);
}

.ktg-auth-brand-panel::after {
    position: absolute;
    inset: auto 0 0;
    height: 26%;
    content: '';
    background: linear-gradient(to top, rgba(5, 22, 39, 0.34), transparent);
    pointer-events: none;
}

.ktg-auth-blueprint {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.88;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.030) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.030) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px);
    background-size: 56px 56px, 56px 56px, 280px 280px, 280px 280px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48) 74%, transparent 100%);
}

.ktg-auth-blueprint::before,
.ktg-auth-blueprint::after {
    position: absolute;
    content: '';
    border: 1px solid rgba(219, 238, 255, 0.046);
    border-radius: 2px;
    transform: skewX(-9deg);
}

.ktg-auth-blueprint::before {
    width: 36%;
    height: 54%;
    right: 5%;
    bottom: 7%;
    box-shadow:
        -54px -34px 0 -1px rgba(255, 255, 255, 0.015),
        -108px -68px 0 -1px rgba(255, 255, 255, 0.010);
}

.ktg-auth-blueprint::after {
    width: 23%;
    height: 35%;
    left: 7%;
    top: 20%;
    opacity: 0.52;
}

.ktg-auth-brand-header {
    position: relative;
}

.ktg-auth-brand-logo {
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.ktg-auth-brand-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 46px -24px rgba(0, 0, 0, 0.9);
}

.ktg-auth-system-status {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 24px -18px rgba(0, 0, 0, 0.8);
}

.ktg-auth-system-status > span {
    animation: ktg-auth-status-pulse 2.8s ease-in-out infinite;
}

@keyframes ktg-auth-status-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.09), 0 0 10px rgba(52, 211, 153, 0.18);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.04), 0 0 16px rgba(52, 211, 153, 0.32);
    }
}

.ktg-auth-brand-copy {
    text-wrap: balance;
    text-shadow: 0 2px 18px rgba(4, 20, 37, 0.16);
}

.ktg-auth-capability-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(10, 30, 51, 0.56), rgba(9, 27, 47, 0.74));
    border-color: rgba(211, 233, 255, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 20px 42px -32px rgba(0, 0, 0, 0.72);
}

.ktg-auth-capability-card::after {
    position: absolute;
    inset: 0;
    content: '';
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.045), transparent 35%, transparent 75%, rgba(235, 169, 59, 0.035));
    pointer-events: none;
}

.ktg-auth-access-panel {
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 4%, rgba(72, 117, 174, 0.16), transparent 28%),
        radial-gradient(circle at 12% 92%, rgba(148, 163, 184, 0.14), transparent 28%),
        linear-gradient(145deg, #f8fafc 0%, #f1f5f9 58%, #eaf0f7 100%);
}

.ktg-auth-access-panel::before {
    position: absolute;
    inset: 0;
    content: '';
    pointer-events: none;
    opacity: 0.58;
    background-image:
        linear-gradient(rgba(23, 58, 102, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 58, 102, 0.022) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(circle at center, black, transparent 78%);
}

.ktg-auth-access-panel::after {
    position: absolute;
    width: 36rem;
    height: 36rem;
    right: -23rem;
    top: -18rem;
    content: '';
    border: 1px solid rgba(49, 93, 145, 0.08);
    border-radius: 999px;
    box-shadow: 0 0 0 72px rgba(49, 93, 145, 0.025), 0 0 0 144px rgba(49, 93, 145, 0.015);
    pointer-events: none;
}

.ktg-auth-card-wrap {
    position: relative;
    width: 100%;
    max-width: 436px;
}

.ktg-auth-card-wrap::before {
    position: absolute;
    inset: -48px -60px;
    content: '';
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(63, 105, 154, 0.15), transparent 68%);
    filter: blur(12px);
    pointer-events: none;
}

.ktg-auth-card {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 38px 100px -44px rgba(15, 23, 42, 0.38),
        0 14px 34px -24px rgba(23, 58, 102, 0.32),
        0 0 0 1px rgba(49, 93, 145, 0.025),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.ktg-auth-card::before {
    position: absolute;
    inset: 0;
    content: '';
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.50), transparent 28%, transparent 78%, rgba(49, 93, 145, 0.04));
}

.ktg-login-panel {
    position: relative;
    z-index: 1;
}

.ktg-login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: #315d91;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.115em;
    text-transform: uppercase;
}

.ktg-login-eyebrow::before {
    width: 6px;
    height: 6px;
    content: '';
    border-radius: 999px;
    background: #eba93b;
    box-shadow: 0 0 0 4px rgba(235, 169, 59, 0.11);
}

.ktg-login-title {
    letter-spacing: -0.018em;
}

.ktg-login-form {
    border-color: rgba(148, 163, 184, 0.22) !important;
}

.ktg-login-panel [data-test='login-button'] {
    min-height: 42px;
    border-radius: 11px;
    background: linear-gradient(135deg, #315d91, #27527f) !important;
    box-shadow: 0 12px 24px -16px rgba(23, 58, 102, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.ktg-login-panel [data-test='login-button']:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
    box-shadow: 0 16px 30px -17px rgba(23, 58, 102, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.ktg-login-panel [data-test='login-button']:active {
    transform: translateY(0);
}

.ktg-login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 3px;
    color: #8292a8;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.015em;
}

.ktg-login-security svg {
    width: 12px;
    height: 12px;
    color: #64748b;
}

.ktg-auth-copyright {
    color: #7d8ca0 !important;
    font-size: 9.5px;
    letter-spacing: 0.01em;
}

@media (min-width: 1024px) {
    .ktg-auth-card-wrap {
        transform: translateX(-12px);
    }
}

html.dark .ktg-auth-body {
    background: #071321;
}

html.dark .ktg-auth-access-panel {
    background:
        radial-gradient(circle at 88% 4%, rgba(64, 91, 128, 0.28), transparent 28%),
        radial-gradient(circle at 15% 92%, rgba(31, 64, 101, 0.18), transparent 29%),
        linear-gradient(145deg, #091727 0%, #071423 58%, #06111f 100%);
}

html.dark .ktg-auth-access-panel::before {
    background-image:
        linear-gradient(rgba(148, 184, 225, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 184, 225, 0.025) 1px, transparent 1px);
}

html.dark .ktg-auth-access-panel::after {
    border-color: rgba(122, 162, 207, 0.075);
    box-shadow: 0 0 0 72px rgba(70, 111, 158, 0.022), 0 0 0 144px rgba(70, 111, 158, 0.012);
}

html.dark .ktg-auth-card-wrap::before {
    background: radial-gradient(circle, rgba(74, 112, 158, 0.23), transparent 68%);
}

html.dark .ktg-auth-card {
    border-color: rgba(148, 174, 205, 0.60);
    background: rgba(13, 27, 43, 0.94);
    box-shadow:
        0 42px 104px -44px rgba(0, 0, 0, 0.92),
        0 16px 38px -24px rgba(84, 128, 179, 0.26),
        0 0 0 1px rgba(147, 182, 221, 0.035),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html.dark .ktg-auth-card::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 28%, transparent 76%, rgba(71, 111, 157, 0.06));
}

html.dark .ktg-login-eyebrow {
    color: #abc8e8;
}

html.dark .ktg-login-title {
    color: #f8fafc !important;
}

html.dark .ktg-login-subtitle {
    color: #9aa9bb !important;
}

html.dark .ktg-login-form {
    border-color: rgba(148, 163, 184, 0.22) !important;
}

html.dark .ktg-login-security {
    color: #8798ac;
}

html.dark .ktg-login-security svg {
    color: #91abc7;
}

html.dark .ktg-auth-copyright {
    color: #71849a !important;
}

@media (max-width: 1023px) {
    .ktg-auth-access-panel {
        min-height: 100svh;
    }

    .ktg-auth-card-wrap {
        max-width: 440px;
        transform: none;
    }

    .ktg-auth-card {
        border-radius: 24px;
    }
}

@media (max-width: 520px) {
    .ktg-auth-access-panel {
        padding-inline: 16px !important;
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .ktg-auth-card {
        padding: 21px !important;
    }

    .ktg-auth-card-wrap::before {
        inset: -28px -22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ktg-auth-system-status > span,
    .ktg-auth-brand-logo,
    .ktg-login-panel [data-test='login-button'] {
        animation: none;
        transition: none;
    }
}
