/* InfiniPort login — kurumsal giriş */
:root {
    --lp-blue: #2f7fe0;
    --lp-blue-deep: #1a5bb8;
    --lp-ink: #1e293b;
    --lp-muted: #64748b;
    --lp-line: #e2e8f0;
    --lp-panel: #ffffff;
    --lp-soft: #f1f5f9;
    --lp-danger: #b91c1c;
    --lp-ok: #15803d;
    --lp-font: "Manrope", "Segoe UI", sans-serif;
    --lp-display: "Sora", "Manrope", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body.login-page {
    height: 100%;
    margin: 0;
}

body.login-page {
    font-family: var(--lp-font);
    color: var(--lp-ink);
    background: #0f172a;
    -webkit-font-smoothing: antialiased;
}

.lp-shell {
    min-height: 100%;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

/* —— Sol: görsel panel —— */
.lp-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(2rem, 4vw, 3.5rem);
    padding-bottom: clamp(3.25rem, 7vh, 5.5rem);
    color: #fff;
    background-color: #1e293b;
}

.lp-hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.lp-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1.4s ease-in-out, transform 8s ease-out;
}

.lp-hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.lp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.78) 55%, rgba(15, 23, 42, 0.88) 100%),
        linear-gradient(90deg, rgba(30, 64, 120, 0.35), transparent 55%);
}

/* Dikey tarama çizgisi — sağa sola (ince) */
.lp-scan-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 4%;
    width: 0.5px;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 12%,
        rgba(191, 219, 254, 0.7) 50%,
        rgba(255, 255, 255, 0.08) 88%,
        transparent 100%
    );
    box-shadow: none;
    animation: lp-scan-x 7s ease-in-out infinite;
}

.lp-scan-line::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10px;
    width: 20px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(147, 197, 253, 0.04),
        transparent
    );
}

.lp-hero-inner {
    position: relative;
    z-index: 2;
    max-width: none;
    margin-bottom: 0.85rem;
    animation: lp-rise 0.7s ease-out both;
}

.lp-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
}

.lp-brand--panel {
    color: var(--lp-ink);
    margin-bottom: 1.75rem;
}

.lp-brand--panel img {
    height: 64px;
    width: auto;
    display: block;
}

.lp-brand--panel .lp-brand-name {
    font-family: var(--lp-display);
    font-weight: 600;
    font-size: 1.95rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--lp-ink);
}

.lp-hero h1 {
    font-family: var(--lp-display);
    font-weight: 600;
    font-size: clamp(1.2rem, 1.7vw, 1.55rem);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0 0 0.45rem;
    max-width: none;
    white-space: nowrap;
}

.lp-hero p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.82);
    max-width: none;
    white-space: nowrap;
}

.lp-hero-foot {
    position: relative;
    z-index: 2;
    margin-top: 1.25rem;
    padding-top: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.02em;
}

/* —— Sağ: form paneli —— */
.lp-panel {
    background: var(--lp-panel);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.75rem, 4vw, 3.25rem) clamp(1.5rem, 4vw, 3.5rem);
    animation: lp-panel-in 0.55s ease-out 0.12s both;
}

.lp-panel-inner {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.lp-panel-kicker {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lp-blue);
    margin: 0 0 0.5rem;
}

.lp-panel h2 {
    font-family: var(--lp-display);
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 0.4rem;
    color: var(--lp-ink);
}

.lp-panel h2.lp-panel-title-soft {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.45;
    margin: 0 0 1.35rem;
    color: var(--lp-muted);
}

.lp-panel-lead {
    margin: 0 0 1.5rem;
    color: var(--lp-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.lp-field {
    margin-bottom: 1rem;
}

.lp-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--lp-ink);
    margin-bottom: 0.35rem;
}

.lp-input-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--lp-line);
    border-radius: 0.5rem;
    background: var(--lp-soft);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.lp-input-wrap:focus-within {
    background: #fff;
    border-color: var(--lp-blue);
    box-shadow: 0 0 0 3px rgba(47, 127, 224, 0.15);
}

.lp-input-wrap input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0.7rem 0.85rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--lp-ink);
    outline: none;
    border-radius: 0.5rem 0 0 0.5rem;
}

.lp-input-wrap input::placeholder {
    color: #94a3b8;
}

.lp-input-affix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    color: #94a3b8;
    border: 0;
    background: transparent;
    padding: 0;
    border-radius: 0 0.5rem 0.5rem 0;
}

button.lp-input-affix {
    cursor: pointer;
}

button.lp-input-affix:hover {
    color: var(--lp-blue);
}

.lp-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.8rem 1rem;
    border: 0;
    border-radius: 0.5rem;
    background: var(--lp-blue);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lp-submit:hover {
    background: var(--lp-blue-deep);
    transform: translateY(-1px);
}

.lp-submit:active {
    transform: translateY(0);
}

.lp-alert {
    border-radius: 0.5rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.875rem;
    line-height: 1.45;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.lp-alert ul {
    margin: 0.4rem 0 0;
    padding-left: 1.1rem;
}

.lp-alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--lp-danger);
}

.lp-alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.lp-alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: var(--lp-ok);
}

.lp-panel-footer {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--lp-line);
    font-size: 0.78rem;
    color: var(--lp-muted);
    text-align: center;
}

.lp-mobile-brand {
    display: none;
}

@keyframes lp-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lp-panel-in {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes lp-scan-x {
    0%,
    100% {
        left: 4%;
        opacity: 0.65;
    }
    50% {
        left: calc(100% - 4%);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-hero-inner,
    .lp-panel,
    .lp-scan-line {
        animation: none;
    }
    .lp-scan-line {
        display: none;
    }
    .lp-hero-slide {
        transition: none;
        transform: none;
    }
}

@media (max-width: 900px) {
    .lp-shell {
        grid-template-columns: 1fr;
    }

    .lp-hero {
        order: -1;
        min-height: 28vh;
        justify-content: flex-end;
        padding: 1.5rem 1.35rem 1.75rem;
        padding-bottom: 1.75rem;
    }

    .lp-scan-line {
        animation-duration: 5.5s;
    }

    .lp-hero h1 {
        max-width: none;
        font-size: 1.05rem;
        white-space: nowrap;
    }

    .lp-hero p {
        display: block;
        font-size: 0.78rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .lp-hero-slide {
        transform: none;
    }

    .lp-hero-foot {
        display: none;
    }

    .lp-brand--panel {
        margin-bottom: 1.25rem;
    }

    .lp-brand--panel img {
        height: 52px;
    }

    .lp-brand--panel .lp-brand-name {
        font-size: 1.55rem;
    }

    .lp-panel {
        animation: lp-rise 0.45s ease-out both;
        flex: 1;
        justify-content: flex-start;
        padding-top: 1.75rem;
        padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .lp-hero {
        min-height: 28vh;
    }

    .lp-panel-inner {
        max-width: none;
    }
}

/* Capacitor / uygulama kabuğu */
body.infini-login-app .lp-shell {
    min-height: 100dvh;
}

body.infini-login-app .lp-hero {
    padding-top: max(1.5rem, env(safe-area-inset-top));
}

body.infini-login-app .lp-submit {
    min-height: 44px;
}

/* Giriş sonrası / form gönderiminde bekleme */
.lp-wait-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
}

.lp-wait-overlay[hidden] {
    display: none !important;
}

.lp-wait-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    max-width: 320px;
    text-align: center;
    color: #e2e8f0;
}

.lp-wait-card strong {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f8fafc;
}

.lp-wait-card span {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.45;
}

.lp-wait-spin {
    width: 42px;
    height: 42px;
    margin-bottom: 0.65rem;
    border: 3px solid rgba(148, 163, 184, 0.35);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: lp-wait-spin 0.8s linear infinite;
}

@keyframes lp-wait-spin {
    to { transform: rotate(360deg); }
}

body.lp-is-waiting {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .lp-wait-spin {
        animation: none;
        border-top-color: #60a5fa;
    }
}
