/* ── Session Alert & Conflict Overlay ──────────────────── */

/* Overlay backdrop */
#sesOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.62);
    z-index: 99500;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
#sesOverlay.show { display: flex; }

/* Card utama */
.ses-card {
    background: #fff;
    border-radius: 22px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    animation: sesSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes sesSlideIn {
    from { opacity: 0; transform: translateY(-28px) scale(0.95); }
    to   { opacity: 1; transform: none; }
}

/* Header merah — sesi diambil alih */
.ses-header-red {
    background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 55%, #ef4444 100%);
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
/* Header kuning — percobaan login terdeteksi */
.ses-header-amber {
    background: linear-gradient(135deg, #78350f 0%, #d97706 55%, #f59e0b 100%);
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
/* Header biru — konfirmasi soft-lock */
.ses-header-blue {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #3b82f6 100%);
    padding: 1.75rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.ses-header-red::before,
.ses-header-amber::before,
.ses-header-blue::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
}
.ses-header-icon {
    width: 58px; height: 58px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.875rem;
}
.ses-header-icon i { font-size: 1.7rem; color: #fff; }
.ses-header-title {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
}
.ses-header-sub {
    color: rgba(255,255,255,0.78);
    font-size: 0.8rem;
    margin: 0;
}

/* Body */
.ses-body { padding: 1.5rem 1.75rem 1.625rem; }

/* Info device box */
.ses-device-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.ses-device-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ses-device-icon i { color: #4f46e5; font-size: 1rem; }
.ses-device-label { font-size: 0.78rem; color: #64748b; margin-bottom: 0.1rem; }
.ses-device-value { font-size: 0.85rem; font-weight: 600; color: #1e293b; }

/* Tombol */
.ses-btn-row { display: flex; gap: 0.65rem; margin-top: 1.1rem; }
.ses-btn {
    flex: 1;
    padding: 0.7rem;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.ses-btn:hover { opacity: 0.88; }
.ses-btn-outline {
    background: #fff;
    border: 1.5px solid #e2e8f0 !important;
    color: #64748b;
    font-weight: 600;
}
.ses-btn-outline:hover { background: #f8fafc; opacity: 1; }
.ses-btn-danger  { background: linear-gradient(135deg, #dc2626, #ef4444); color: #fff; }
.ses-btn-primary { background: linear-gradient(135deg, #1d4ed8, #3b82f6); color: #fff; }
.ses-btn-amber   { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }
.ses-btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Toast notifikasi percobaan login (pojok kanan bawah) */
.ses-toast {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 99600;
    max-width: 360px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    border-left: 4px solid #f59e0b;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    animation: sesSlideIn 0.3s ease;
    cursor: pointer;
}
.ses-toast.danger  { border-left-color: #ef4444; }
.ses-toast.success { border-left-color: #22c55e; }
.ses-toast-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.ses-toast-body { flex: 1; }
.ses-toast-title { font-size: 0.84rem; font-weight: 700; color: #1e293b; margin-bottom: 0.2rem; }
.ses-toast-msg   { font-size: 0.78rem; color: #475569; line-height: 1.45; }
.ses-toast-close {
    background: none; border: none; cursor: pointer;
    color: #94a3b8; font-size: 1rem; padding: 0;
    line-height: 1; flex-shrink: 0;
}
.ses-toast-close:hover { color: #475569; }
