/* ============================================================
   ZTrack — Login (ported from the old portal design: photo
   background + curved white brand panel + floating glass card).
   Loaded only by the auth layout; prefix ztk-auth-*/ztk-body--auth.
   ============================================================ */

.ztk-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.ztk-body--auth {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    isolation: isolate;
    background: #0b1220;
}
.ztk-auth-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}
.ztk-body--auth::before {
    /* readability scrim over the photo; masks the right two-thirds so the
       white brand panel's curved edge reads cleanly against it */
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(100deg,
        rgba(7, 12, 26, .18) 0%,
        rgba(7, 12, 26, .08) 30%,
        rgba(7, 12, 26, 0) 55%);
}

/* Fixed top-right utility pills (language / theme) */
.ztk-auth-lang {
    position: fixed; top: 22px; inset-inline-end: 22px;
    display: flex; align-items: center; gap: 8px; z-index: 40;
}
.ztk-icon-btn--pill {
    width: auto; height: auto;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px; border-radius: 999px;
    background: rgba(15, 20, 30, .55);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .14);
    cursor: pointer;
}
.ztk-icon-btn--pill:hover { background: rgba(15, 20, 30, .72); color: #fff; }
.ztk-icon-btn__label { font-size: 0.78rem; font-weight: 700; letter-spacing: .02em; }
.ztk-icon-btn--round {
    width: 38px; height: 38px; border-radius: 999px;
    background: rgba(15, 20, 30, .55);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .14);
    cursor: pointer;
}
.ztk-icon-btn--round:hover { background: rgba(15, 20, 30, .72); color: #fff; }
.ztk-icon--xs { width: 12px; height: 12px; }
.ztk-icon--lg { width: 30px; height: 30px; }

/* Overall two-column shell: white curved brand panel + floating card over photo */
.ztk-auth-shell {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 100vh;
    width: 100%;
}

.ztk-auth-panel {
    position: relative;
    flex: 0 0 clamp(340px, 40vw, 620px);
    width: clamp(340px, 40vw, 620px);
    background: var(--ztk-surface);
    box-shadow: 40px 0 80px -40px rgba(2, 6, 23, .35);
    clip-path: polygon(
        0 0, 100% 0,
        100% 8%, 96% 16%, 90% 24%, 84% 32%, 80% 40%,
        80% 48%, 84% 56%, 90% 64%, 96% 72%, 100% 80%,
        100% 100%, 0 100%
    );
    z-index: 2;
}
.ztk-auth-panel__inner {
    max-width: 440px;
    padding-block: 56px 40px;
    padding-inline: 56px 48px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.ztk-auth-brand { margin-bottom: 40px; }
.ztk-brand__logo--auth { height: 58px; }
.ztk-auth-panel__heading {
    font-family: var(--ztk-font-heading);
    font-weight: 800;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    line-height: 1.2;
    color: var(--ztk-text);
    margin: 0 0 14px;
}
.ztk-auth-panel__tagline {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ztk-text-muted);
    margin: 0 0 34px;
    max-width: 380px;
}

.ztk-auth-features { list-style: none; margin: 0 0 auto; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.ztk-auth-features li { display: flex; align-items: flex-start; gap: 14px; }
.ztk-auth-features__icon {
    flex: 0 0 auto;
    width: 42px; height: 42px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
}
.ztk-auth-features__icon .ztk-icon { width: 20px; height: 20px; }
.ztk-auth-features__icon--blue   { background: color-mix(in srgb, var(--ztk-blue) 14%, transparent);   color: var(--ztk-blue); }
.ztk-auth-features__icon--green  { background: color-mix(in srgb, var(--ztk-status-moving) 16%, transparent); color: var(--ztk-status-moving); }
.ztk-auth-features__icon--purple { background: color-mix(in srgb, var(--ztk-purple) 14%, transparent); color: var(--ztk-purple); }
.ztk-auth-features__text { display: flex; flex-direction: column; gap: 3px; }
.ztk-auth-features__text strong { font-size: 0.92rem; font-weight: 700; color: var(--ztk-text); }
.ztk-auth-features__text span { font-size: 0.82rem; color: var(--ztk-text-muted); line-height: 1.5; }

.ztk-auth-panel__copy {
    margin: 40px 0 0;
    font-size: 0.76rem;
    color: var(--ztk-text-muted);
}

/* Floating card column, sits over the photo */
.ztk-auth-cardwrap {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 100px 24px 60px;
    z-index: 1;
}

.ztk-auth__card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: color-mix(in srgb, var(--ztk-surface) 96%, transparent);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid color-mix(in srgb, #ffffff 45%, transparent);
    border-radius: 30px;
    box-shadow: 0 30px 60px -24px rgba(2, 6, 23, .5), 0 10px 26px rgba(2, 6, 23, .18);
    padding: 56px 38px 38px;
    text-align: center;
}
html[data-theme="dark"] .ztk-auth__card {
    border-color: color-mix(in srgb, #ffffff 10%, transparent);
}
.ztk-auth__badge {
    position: absolute;
    top: 0; left: 50%;
    transform: translate(-50%, -50%);
    width: 74px; height: 74px;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--ztk-blue), var(--ztk-cyan));
    color: #fff;
    box-shadow: 0 14px 26px -8px color-mix(in srgb, var(--ztk-blue) 60%, transparent), 0 0 0 6px var(--ztk-surface);
}
.ztk-auth__title {
    font-family: var(--ztk-font-heading);
    font-size: 1.5rem; font-weight: 800;
    margin: 0 0 6px;
    color: var(--ztk-text);
}
.ztk-auth__subtitle { margin: 0 0 26px; color: var(--ztk-text-muted); font-size: 0.9rem; }

.ztk-form--pill .ztk-field__control { border-radius: 999px; padding: 13px 20px; }
.ztk-form--pill .ztk-field__control input { text-align: start; }
.ztk-auth__card .ztk-alert { text-align: start; }

.ztk-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: -4px; }
.ztk-auth__row .ztk-checkbox span { white-space: nowrap; }
.ztk-auth__forgot {
    font-size: 0.82rem; font-weight: 700; color: var(--ztk-blue);
    display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
    white-space: nowrap;
    cursor: default; user-select: none;
}
.ztk-auth__forgot .ztk-badge { margin-inline-start: 0; }

.ztk-btn--pill { border-radius: 999px; padding: 14px 18px; font-size: 0.95rem; }
.ztk-btn--pill.ztk-btn--primary {
    background: linear-gradient(135deg, var(--ztk-blue), var(--ztk-cyan));
    box-shadow: 0 14px 26px -10px color-mix(in srgb, var(--ztk-blue) 65%, transparent);
}

.ztk-auth__trust {
    width: 100%;
    max-width: 440px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(9, 14, 28, .68);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    padding: 16px 18px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: start;
}
.ztk-auth__trust .ztk-icon { color: var(--ztk-status-moving); flex-shrink: 0; margin-top: 2px; }
.ztk-auth__trust > span { display: flex; flex-direction: column; gap: 3px; }
.ztk-auth__trust strong { font-size: 0.86rem; }
.ztk-auth__trust > span > span { font-size: 0.78rem; color: rgba(255, 255, 255, .72); line-height: 1.5; }

/* Mobile: drop the curved brand panel entirely, center the card over the photo */
@media (max-width: 900px) {
    .ztk-auth-panel { display: none; }
    .ztk-auth-shell { justify-content: center; }
    .ztk-auth-cardwrap { padding-top: 90px; }
    .ztk-body--auth::before {
        background: linear-gradient(180deg, rgba(7,12,26,.55) 0%, rgba(7,12,26,.35) 100%);
    }
}
@media (max-width: 480px) {
    .ztk-auth__card { padding: 50px 24px 30px; border-radius: 24px; }
    .ztk-icon-btn__label { display: none; }
}
