/* Session security alert — centered glass card over blurred app */

.login-alert-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
    background: rgba(5, 5, 6, 0.55);
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
    animation: loginAlertFade 0.28s var(--ease, ease);
}

@keyframes loginAlertFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-alert-sheet {
    width: min(360px, 100%);
    background: linear-gradient(165deg, rgba(28, 30, 36, 0.98) 0%, rgba(18, 19, 24, 0.99) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 22px 20px 18px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.35),
        0 24px 64px rgba(0, 0, 0, 0.55),
        0 0 80px rgba(62, 255, 160, 0.04);
    animation: loginAlertPop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginAlertPop {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.login-alert-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.login-alert-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background:
        radial-gradient(120% 120% at 30% 20%, rgba(245, 184, 74, 0.28) 0%, rgba(245, 184, 74, 0.08) 70%);
    color: #f5b84a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    box-shadow:
        inset 0 0 0 1px rgba(245, 184, 74, 0.35),
        0 0 0 4px rgba(245, 184, 74, 0.06),
        0 4px 16px rgba(245, 184, 74, 0.12);
}

.login-alert-title {
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--text-0);
    line-height: 1.25;
}

.login-alert-compare {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.login-alert-panel {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.login-alert-panel--foreign {
    border-color: rgba(245, 184, 74, 0.35);
    background: rgba(245, 184, 74, 0.06);
}

.login-alert-panel--you {
    border-color: rgba(62, 255, 160, 0.25);
    background: rgba(62, 255, 160, 0.05);
}

.login-alert-panel-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}

.login-alert-panel-label .ui-icon {
    opacity: 0.9;
}

.login-alert-panel--foreign .login-alert-panel-label {
    color: #f5b84a;
}

.login-alert-panel--you .login-alert-panel-label {
    color: var(--accent);
}

.login-alert-panel-line {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
    line-height: 1.35;
}

.login-alert-panel-line--ip {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
}

.login-alert-panel-time {
    font-size: 12px;
    color: var(--text-3);
}

.login-alert-panel-warn {
    font-size: 11px;
    line-height: 1.4;
    color: #f5b84a;
    margin-top: 4px;
}

.login-alert-hint {
    font-size: 13px;
    color: var(--text-3);
    margin: 0 0 20px;
    line-height: 1.5;
}

.login-alert-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-alert-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-0);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition:
        background var(--duration, 0.15s) var(--ease, ease),
        border-color var(--duration, 0.15s) var(--ease, ease),
        box-shadow var(--duration, 0.15s) var(--ease, ease),
        transform 0.12s ease;
}

.login-alert-btn .ui-icon {
    flex-shrink: 0;
    opacity: 0.92;
}

.login-alert-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
}

.login-alert-btn:active:not(:disabled) {
    transform: scale(0.985);
}

.login-alert-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Birincil: "Bu bendim" — guvenli sahiplenme aksiyonu, accent vurgu */
.login-alert-btn--primary {
    border: none;
    background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 82%, #14e0a0) 100%);
    color: var(--on-accent, #04110b);
    font-weight: 700;
    box-shadow:
        0 6px 20px rgba(62, 255, 160, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.login-alert-btn--primary .ui-icon {
    opacity: 1;
}

.login-alert-btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, #ffffff) 0%, var(--accent) 100%);
    box-shadow:
        0 8px 26px rgba(62, 255, 160, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Ikincil tehlike sezgisi: oturumu sonlandir */
.login-alert-btn--revoke {
    background: rgba(245, 184, 74, 0.1);
    border-color: rgba(245, 184, 74, 0.28);
    color: #f5c168;
}

.login-alert-btn--revoke .ui-icon {
    color: #f5c168;
}

.login-alert-btn--revoke:hover:not(:disabled) {
    background: rgba(245, 184, 74, 0.16);
    border-color: rgba(245, 184, 74, 0.4);
}

.login-alert-btn--danger {
    margin-top: 4px;
    min-height: auto;
    padding: 10px 4px;
    border: none;
    background: none;
    color: var(--text-0);
    font-weight: 700;
}

.login-alert-btn--danger:hover:not(:disabled) {
    background: none;
    color: var(--danger, #f87171);
}

.login-alert-later {
    display: block;
    margin: 14px auto 0;
    padding: 8px 12px;
    background: none;
    border: none;
    color: var(--text-3);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--duration, 0.15s) ease;
}

.login-alert-later:hover {
    color: var(--text-2);
}

.login-alert-msg {
    font-size: 13px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bg-3);
}

.login-alert-msg.ok {
    color: var(--accent);
    background: var(--accent-dim);
}

.login-alert-msg.err {
    color: var(--danger);
    background: rgba(248, 113, 113, 0.1);
}

[data-theme="light"] .login-alert-backdrop {
    background: rgba(15, 23, 42, 0.35);
}

[data-theme="light"] .login-alert-sheet {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.99) 100%);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

[data-theme="light"] .login-alert-btn {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.08);
    color: var(--text-0);
}

[data-theme="light"] .login-alert-btn:hover:not(:disabled) {
    background: rgba(15, 23, 42, 0.09);
}
